/// Configuration details to send notifications to a linked integration.
#[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 NotificationConfiguration {
    #[serde(rename = "integrationRid")]
    integration_rid: super::IntegrationRid,
    #[builder(default, into)]
    #[serde(
        rename = "notificationFilters",
        skip_serializing_if = "Option::is_none",
        default
    )]
    notification_filters: Option<std::collections::BTreeSet<super::NotificationFilter>>,
    #[builder(default, into)]
    #[serde(
        rename = "appendedWorkbookRid",
        skip_serializing_if = "Option::is_none",
        default
    )]
    appended_workbook_rid: Option<super::super::super::rids::api::NotebookRid>,
    #[builder(default, list(item(type = String, into)))]
    #[serde(rename = "tags", skip_serializing_if = "Vec::is_empty", default)]
    tags: Vec<String>,
    #[builder(default, into)]
    #[serde(rename = "muteUntil", skip_serializing_if = "Option::is_none", default)]
    mute_until: Option<conjure_object::DateTime<conjure_object::Utc>>,
}
impl NotificationConfiguration {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(integration_rid: super::IntegrationRid) -> Self {
        Self::builder().integration_rid(integration_rid).build()
    }
    #[inline]
    pub fn integration_rid(&self) -> &super::IntegrationRid {
        &self.integration_rid
    }
    /// Specifies the type of notifications to filter. If not provided, all notifications are sent.
    #[inline]
    pub fn notification_filters(
        &self,
    ) -> Option<&std::collections::BTreeSet<super::NotificationFilter>> {
        self.notification_filters.as_ref().map(|o| &*o)
    }
    /// If provided, appends a link to the workbook specified by the RID to the notification.
    #[inline]
    pub fn appended_workbook_rid(
        &self,
    ) -> Option<&super::super::super::rids::api::NotebookRid> {
        self.appended_workbook_rid.as_ref().map(|o| &*o)
    }
    /// 20 tags max, 50 characters max each. Tags are used to filter messages in Opsgenie. For other integrations, tags are ignored.
    #[inline]
    pub fn tags(&self) -> &[String] {
        &*self.tags
    }
    /// If provided, all notifications for this channel are suppressed until the specified time.
    /// The streaming checklist continues to evaluate, but no notifications are sent.
    /// Once the time has passed, notifications resume automatically.
    #[inline]
    pub fn mute_until(&self) -> Option<conjure_object::DateTime<conjure_object::Utc>> {
        self.mute_until.as_ref().map(|o| *o)
    }
}
