// Code generated by oagen. DO NOT EDIT.

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