nominal-api 0.1240.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 SlackWebhookIntegration {
    #[builder(into)]
    #[serde(rename = "teamName")]
    team_name: String,
    #[builder(into)]
    #[serde(rename = "channel")]
    channel: String,
    #[builder(into)]
    #[serde(rename = "channelId")]
    channel_id: String,
    #[builder(default, into)]
    #[serde(rename = "slackInstance", skip_serializing_if = "Option::is_none", default)]
    slack_instance: Option<super::SlackInstanceType>,
}
impl SlackWebhookIntegration {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        team_name: impl Into<String>,
        channel: impl Into<String>,
        channel_id: impl Into<String>,
    ) -> Self {
        Self::builder()
            .team_name(team_name)
            .channel(channel)
            .channel_id(channel_id)
            .build()
    }
    #[inline]
    pub fn team_name(&self) -> &str {
        &*self.team_name
    }
    #[inline]
    pub fn channel(&self) -> &str {
        &*self.channel
    }
    #[inline]
    pub fn channel_id(&self) -> &str {
        &*self.channel_id
    }
    #[inline]
    pub fn slack_instance(&self) -> Option<&super::SlackInstanceType> {
        self.slack_instance.as_ref().map(|o| &*o)
    }
}