#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct ComparisonRun {
    #[serde(rename = "runRid")]
    run_rid: super::super::super::run::api::RunRid,
    #[serde(rename = "enabled")]
    enabled: bool,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::Offset>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "offsetOverride", skip_serializing_if = "Option::is_none", default)]
    offset_override: Option<Box<super::Offset>>,
}
impl ComparisonRun {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(run_rid: super::super::super::run::api::RunRid, enabled: bool) -> Self {
        Self::builder().run_rid(run_rid).enabled(enabled).build()
    }
    #[inline]
    pub fn run_rid(&self) -> &super::super::super::run::api::RunRid {
        &self.run_rid
    }
    #[inline]
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    #[inline]
    pub fn offset_override(&self) -> Option<&super::Offset> {
        self.offset_override.as_ref().map(|o| &**o)
    }
}
