#[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 ExecuteChecklistForAssetsRequest {
    #[serde(rename = "checklist")]
    checklist: super::super::super::rids::api::ChecklistRid,
    #[builder(default, set(item(type = super::super::super::rids::api::AssetRid)))]
    #[serde(
        rename = "assets",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    assets: std::collections::BTreeSet<super::super::super::rids::api::AssetRid>,
    #[builder(
        default,
        list(
            item(
                type = super::super::super::integrations::api::NotificationConfiguration
            )
        )
    )]
    #[serde(
        rename = "notificationConfigurations",
        skip_serializing_if = "Vec::is_empty",
        default
    )]
    notification_configurations: Vec<
        super::super::super::integrations::api::NotificationConfiguration,
    >,
    #[builder(
        custom(type = super::super::super::run::api::Duration, convert = Box::new)
    )]
    #[serde(rename = "evaluationDelay")]
    evaluation_delay: Box<super::super::super::run::api::Duration>,
    #[builder(
        custom(type = super::super::super::run::api::Duration, convert = Box::new)
    )]
    #[serde(rename = "recoveryDelay")]
    recovery_delay: Box<super::super::super::run::api::Duration>,
    #[builder(default, into)]
    #[serde(
        rename = "autoCreateEvents",
        skip_serializing_if = "Option::is_none",
        default
    )]
    auto_create_events: Option<bool>,
}
impl ExecuteChecklistForAssetsRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        checklist: super::super::super::rids::api::ChecklistRid,
        evaluation_delay: super::super::super::run::api::Duration,
        recovery_delay: super::super::super::run::api::Duration,
    ) -> Self {
        Self::builder()
            .checklist(checklist)
            .evaluation_delay(evaluation_delay)
            .recovery_delay(recovery_delay)
            .build()
    }
    #[inline]
    pub fn checklist(&self) -> &super::super::super::rids::api::ChecklistRid {
        &self.checklist
    }
    #[inline]
    pub fn assets(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::rids::api::AssetRid> {
        &self.assets
    }
    /// Checklist violations will be sent to the specified integrations. If empty, no notifications will be sent.
    #[inline]
    pub fn notification_configurations(
        &self,
    ) -> &[super::super::super::integrations::api::NotificationConfiguration] {
        &*self.notification_configurations
    }
    /// Delays the evaluation of the streaming checklist. This is useful for when data is delayed.
    #[inline]
    pub fn evaluation_delay(&self) -> &super::super::super::run::api::Duration {
        &*self.evaluation_delay
    }
    /// Specifies the minimum amount of time that must pass before a check can recover from a failure.
    /// Minimum value is 15 seconds.
    #[inline]
    pub fn recovery_delay(&self) -> &super::super::super::run::api::Duration {
        &*self.recovery_delay
    }
    /// The option to automatically create events for check status changes.
    /// If true, events will be created when checks fail and recover.
    /// Defaults to false if not specified.
    #[inline]
    pub fn auto_create_events(&self) -> Option<bool> {
        self.auto_create_events.as_ref().map(|o| *o)
    }
}
