#[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 FailedToExecuteState {
    #[serde(rename = "jobRid")]
    job_rid: super::super::super::checks::api::JobRid,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::rids::api::CheckAlertState>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "reviewState", skip_serializing_if = "Option::is_none", default)]
    review_state: Option<Box<super::super::super::rids::api::CheckAlertState>>,
    #[builder(default, into)]
    #[serde(rename = "reviewNotes", skip_serializing_if = "Option::is_none", default)]
    review_notes: Option<String>,
    #[builder(default, set(item(type = super::super::super::rids::api::UserRid)))]
    #[serde(
        rename = "assigneeRids",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    assignee_rids: std::collections::BTreeSet<super::super::super::rids::api::UserRid>,
}
impl FailedToExecuteState {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(job_rid: super::super::super::checks::api::JobRid) -> Self {
        Self::builder().job_rid(job_rid).build()
    }
    #[inline]
    pub fn job_rid(&self) -> &super::super::super::checks::api::JobRid {
        &self.job_rid
    }
    #[inline]
    pub fn review_state(
        &self,
    ) -> Option<&super::super::super::rids::api::CheckAlertState> {
        self.review_state.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn review_notes(&self) -> Option<&str> {
        self.review_notes.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn assignee_rids(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::rids::api::UserRid> {
        &self.assignee_rids
    }
}
