#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct CheckJobSpec {
    #[serde(rename = "dataReviewRid")]
    data_review_rid: super::super::super::rids::api::DataReviewRid,
    #[serde(rename = "checkRid")]
    check_rid: super::super::super::rids::api::CheckRid,
    #[builder(default, into)]
    #[serde(rename = "runRid", skip_serializing_if = "Option::is_none", default)]
    run_rid: Option<super::super::super::run::api::RunRid>,
    #[builder(default, into)]
    #[serde(rename = "assetRid", skip_serializing_if = "Option::is_none", default)]
    asset_rid: Option<super::super::super::rids::api::AssetRid>,
    #[builder(default, into)]
    #[serde(
        rename = "checkImplementationIndex",
        skip_serializing_if = "Option::is_none",
        default
    )]
    check_implementation_index: Option<i32>,
    #[serde(rename = "checkEvaluationRid")]
    check_evaluation_rid: conjure_object::ResourceIdentifier,
    #[builder(custom(type = super::CheckCondition, convert = Box::new))]
    #[serde(rename = "checkCondition")]
    check_condition: Box<super::CheckCondition>,
    #[builder(
        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
    )]
    #[serde(rename = "start")]
    start: Box<super::super::super::super::api::Timestamp>,
    #[builder(
        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
    )]
    #[serde(rename = "end")]
    end: Box<super::super::super::super::api::Timestamp>,
    #[builder(
        custom(type = super::super::super::compute::api::Context, convert = Box::new)
    )]
    #[serde(rename = "context")]
    context: Box<super::super::super::compute::api::Context>,
}
impl CheckJobSpec {
    #[inline]
    pub fn data_review_rid(&self) -> &super::super::super::rids::api::DataReviewRid {
        &self.data_review_rid
    }
    #[inline]
    pub fn check_rid(&self) -> &super::super::super::rids::api::CheckRid {
        &self.check_rid
    }
    #[inline]
    pub fn run_rid(&self) -> Option<&super::super::super::run::api::RunRid> {
        self.run_rid.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn asset_rid(&self) -> Option<&super::super::super::rids::api::AssetRid> {
        self.asset_rid.as_ref().map(|o| &*o)
    }
    /// Checks can define a single range computation which can evaluate over multiple implementations of a context.
    /// The check implementation index will correspond to the implementation index of the check condition.
    #[inline]
    pub fn check_implementation_index(&self) -> Option<i32> {
        self.check_implementation_index.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn check_evaluation_rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.check_evaluation_rid
    }
    #[inline]
    pub fn check_condition(&self) -> &super::CheckCondition {
        &*self.check_condition
    }
    #[inline]
    pub fn start(&self) -> &super::super::super::super::api::Timestamp {
        &*self.start
    }
    #[inline]
    pub fn end(&self) -> &super::super::super::super::api::Timestamp {
        &*self.end
    }
    #[inline]
    pub fn context(&self) -> &super::super::super::compute::api::Context {
        &*self.context
    }
}
