// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// One target's compact per-document distribution.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ExperimentByTargetMetricsResponse {
    pub run_id: String,
    /// Defaults to `by_target`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub kind: Option<String>,
    /// Defaults to `by_target`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub view: Option<String>,
    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>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub confusion: Option<ExperimentTargetConfusionMetric>,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub documents: Option<Vec<ExperimentByTargetDocumentMetric>>,
}
impl ExperimentByTargetMetricsResponse {
    /// Construct a new `ExperimentByTargetMetricsResponse` with the required fields set.
    #[allow(deprecated)]
    pub fn new(run_id: impl Into<String>, target: impl Into<String>) -> Self {
        Self {
            run_id: run_id.into(),
            kind: Default::default(),
            view: Default::default(),
            target: target.into(),
            score: Default::default(),
            prior_score: Default::default(),
            confusion: Default::default(),
            documents: Default::default(),
        }
    }
}
