aws-sdk-notifications 1.51.0

AWS SDK for AWS User Notifications
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateChannelInput {
    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
    pub notification_configuration_arn: ::std::option::Option<::std::string::String>,
}
impl AssociateChannelInput {
    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
    pub fn notification_configuration_arn(&self) -> ::std::option::Option<&str> {
        self.notification_configuration_arn.as_deref()
    }
}
impl AssociateChannelInput {
    /// Creates a new builder-style object to manufacture [`AssociateChannelInput`](crate::operation::associate_channel::AssociateChannelInput).
    pub fn builder() -> crate::operation::associate_channel::builders::AssociateChannelInputBuilder {
        crate::operation::associate_channel::builders::AssociateChannelInputBuilder::default()
    }
}

/// A builder for [`AssociateChannelInput`](crate::operation::associate_channel::AssociateChannelInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateChannelInputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) notification_configuration_arn: ::std::option::Option<::std::string::String>,
}
impl AssociateChannelInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
    /// This field is required.
    pub fn notification_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.notification_configuration_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
    pub fn set_notification_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.notification_configuration_arn = input;
        self
    }
    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
    pub fn get_notification_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.notification_configuration_arn
    }
    /// Consumes the builder and constructs a [`AssociateChannelInput`](crate::operation::associate_channel::AssociateChannelInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::associate_channel::AssociateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::associate_channel::AssociateChannelInput {
            arn: self.arn,
            notification_configuration_arn: self.notification_configuration_arn,
        })
    }
}