#[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 Failed {
    #[builder(default, into)]
    #[serde(rename = "failureMessage", skip_serializing_if = "Option::is_none", default)]
    failure_message: Option<String>,
    #[builder(default, into)]
    #[serde(
        rename = "executionStartTime",
        skip_serializing_if = "Option::is_none",
        default
    )]
    execution_start_time: Option<conjure_object::DateTime<conjure_object::Utc>>,
    #[serde(rename = "executionEndTime")]
    execution_end_time: conjure_object::DateTime<conjure_object::Utc>,
}
impl Failed {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        execution_end_time: conjure_object::DateTime<conjure_object::Utc>,
    ) -> Self {
        Self::builder().execution_end_time(execution_end_time).build()
    }
    #[inline]
    pub fn failure_message(&self) -> Option<&str> {
        self.failure_message.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn execution_start_time(
        &self,
    ) -> Option<conjure_object::DateTime<conjure_object::Utc>> {
        self.execution_start_time.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn execution_end_time(&self) -> conjure_object::DateTime<conjure_object::Utc> {
        self.execution_end_time
    }
}
