aws_sdk_notifications/operation/associate_channel/
_associate_channel_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct AssociateChannelInput {
6    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
7    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
8    pub arn: ::std::option::Option<::std::string::String>,
9    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
10    pub notification_configuration_arn: ::std::option::Option<::std::string::String>,
11}
12impl AssociateChannelInput {
13    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
14    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
15    pub fn arn(&self) -> ::std::option::Option<&str> {
16        self.arn.as_deref()
17    }
18    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
19    pub fn notification_configuration_arn(&self) -> ::std::option::Option<&str> {
20        self.notification_configuration_arn.as_deref()
21    }
22}
23impl AssociateChannelInput {
24    /// Creates a new builder-style object to manufacture [`AssociateChannelInput`](crate::operation::associate_channel::AssociateChannelInput).
25    pub fn builder() -> crate::operation::associate_channel::builders::AssociateChannelInputBuilder {
26        crate::operation::associate_channel::builders::AssociateChannelInputBuilder::default()
27    }
28}
29
30/// A builder for [`AssociateChannelInput`](crate::operation::associate_channel::AssociateChannelInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct AssociateChannelInputBuilder {
34    pub(crate) arn: ::std::option::Option<::std::string::String>,
35    pub(crate) notification_configuration_arn: ::std::option::Option<::std::string::String>,
36}
37impl AssociateChannelInputBuilder {
38    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
39    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
40    /// This field is required.
41    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42        self.arn = ::std::option::Option::Some(input.into());
43        self
44    }
45    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
46    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
47    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
48        self.arn = input;
49        self
50    }
51    /// <p>The Amazon Resource Name (ARN) of the Channel to associate with the <code>NotificationConfiguration</code>.</p>
52    /// <p>Supported ARNs include Amazon Q Developer in chat applications, the Console Mobile Application, and notifications-contacts.</p>
53    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
54        &self.arn
55    }
56    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
57    /// This field is required.
58    pub fn notification_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.notification_configuration_arn = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
63    pub fn set_notification_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.notification_configuration_arn = input;
65        self
66    }
67    /// <p>The ARN of the <code>NotificationConfiguration</code> to associate with the Channel.</p>
68    pub fn get_notification_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
69        &self.notification_configuration_arn
70    }
71    /// Consumes the builder and constructs a [`AssociateChannelInput`](crate::operation::associate_channel::AssociateChannelInput).
72    pub fn build(
73        self,
74    ) -> ::std::result::Result<crate::operation::associate_channel::AssociateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
75        ::std::result::Result::Ok(crate::operation::associate_channel::AssociateChannelInput {
76            arn: self.arn,
77            notification_configuration_arn: self.notification_configuration_arn,
78        })
79    }
80}