nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[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 SendMessageRequest {
    #[builder(default, into)]
    #[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
    title: Option<String>,
    #[builder(into)]
    #[serde(rename = "message")]
    message: String,
    #[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 = "opsGenieAlias", skip_serializing_if = "Option::is_none", default)]
    ops_genie_alias: Option<String>,
    #[serde(rename = "integrationRid")]
    integration_rid: super::IntegrationRid,
    #[builder(default, into)]
    #[serde(rename = "priority", skip_serializing_if = "Option::is_none", default)]
    priority: Option<super::super::super::api::Priority>,
}
impl SendMessageRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        message: impl Into<String>,
        integration_rid: super::IntegrationRid,
    ) -> Self {
        Self::builder().message(message).integration_rid(integration_rid).build()
    }
    /// Optional title for the message. 130 characters max.
    #[inline]
    pub fn title(&self) -> Option<&str> {
        self.title.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn message(&self) -> &str {
        &*self.message
    }
    /// 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
    }
    /// Alias to use for the Opsgenie alert deduplication. 512 characters max.
    #[inline]
    pub fn ops_genie_alias(&self) -> Option<&str> {
        self.ops_genie_alias.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn integration_rid(&self) -> &super::IntegrationRid {
        &self.integration_rid
    }
    #[inline]
    pub fn priority(&self) -> Option<&super::super::super::api::Priority> {
        self.priority.as_ref().map(|o| &*o)
    }
}