// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// One document/target vote matrix with flat consensus rows.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ExperimentVotesMetricsResponse {
    pub run_id: String,
    /// Defaults to `votes`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub kind: Option<String>,
    /// Defaults to `votes`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub view: Option<String>,
    pub document: ExperimentVotesMetricDocument,
    pub target: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub score: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub prior_score: Option<f64>,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub rows: Option<Vec<ExperimentVoteRow>>,
}
impl ExperimentVotesMetricsResponse {
    /// Construct a new `ExperimentVotesMetricsResponse` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        run_id: impl Into<String>,
        document: ExperimentVotesMetricDocument,
        target: impl Into<String>,
    ) -> Self {
        Self {
            run_id: run_id.into(),
            kind: Default::default(),
            view: Default::default(),
            document,
            target: target.into(),
            score: Default::default(),
            prior_score: Default::default(),
            rows: Default::default(),
        }
    }
}
