// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Compact target score returned by the per-document metrics view.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ExperimentByDocumentTargetMetric {
    pub path: 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 value: Option<serde_json::Value>,
}
impl ExperimentByDocumentTargetMetric {
    /// Construct a new `ExperimentByDocumentTargetMetric` with the required fields set.
    #[allow(deprecated)]
    pub fn new(path: impl Into<String>) -> Self {
        Self {
            path: path.into(),
            score: Default::default(),
            prior_score: Default::default(),
            value: Default::default(),
        }
    }
}
