#[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 CheckJobResult {
    #[serde(rename = "status")]
    status: super::super::super::datareview::api::Status,
    #[builder(default, list(item(type = super::super::super::compute::api::Range)))]
    #[serde(rename = "failures", skip_serializing_if = "Vec::is_empty", default)]
    failures: Vec<super::super::super::compute::api::Range>,
    #[serde(rename = "areFailuresDecimated")]
    are_failures_decimated: bool,
}
impl CheckJobResult {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        status: super::super::super::datareview::api::Status,
        are_failures_decimated: bool,
    ) -> Self {
        Self::builder()
            .status(status)
            .are_failures_decimated(are_failures_decimated)
            .build()
    }
    #[inline]
    pub fn status(&self) -> &super::super::super::datareview::api::Status {
        &self.status
    }
    #[inline]
    pub fn failures(&self) -> &[super::super::super::compute::api::Range] {
        &*self.failures
    }
    #[inline]
    pub fn are_failures_decimated(&self) -> bool {
        self.are_failures_decimated
    }
}
