// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Run-level summary plus block-specific diagnostics.
/// `prior_run_id` + `prior_score` populate when the request opts into
/// prior-comparison and a completed prior run exists.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ExperimentSummaryMetricsResponse {
    pub experiment_id: String,
    pub run_id: String,
    /// Defaults to `summary`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub kind: Option<String>,
    /// Defaults to `summary`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub view: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub block_execution_fingerprint: Option<String>,
    pub block_type: ExperimentSummaryMetricsResponseBlockType,
    #[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 documents: Option<Vec<ExperimentSummaryMetricDocument>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub aggregate: Option<ExperimentSummaryMetricsResponseAggregateOneOf>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub prior_run_id: Option<String>,
}
impl ExperimentSummaryMetricsResponse {
    /// Construct a new `ExperimentSummaryMetricsResponse` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        experiment_id: impl Into<String>,
        run_id: impl Into<String>,
        block_type: ExperimentSummaryMetricsResponseBlockType,
    ) -> Self {
        Self {
            experiment_id: experiment_id.into(),
            run_id: run_id.into(),
            kind: Default::default(),
            view: Default::default(),
            block_execution_fingerprint: Default::default(),
            block_type,
            score: Default::default(),
            prior_score: Default::default(),
            documents: Default::default(),
            aggregate: Default::default(),
            prior_run_id: Default::default(),
        }
    }
}
