aws_sdk_notifications/operation/disassociate_channel/
_disassociate_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 DisassociateChannelInput {
6    /// <p>The Amazon Resource Name (ARN) of the Channel to disassociate.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the <code>NotificationConfiguration</code> to disassociate.</p>
9    pub notification_configuration_arn: ::std::option::Option<::std::string::String>,
10}
11impl DisassociateChannelInput {
12    /// <p>The Amazon Resource Name (ARN) of the Channel to disassociate.</p>
13    pub fn arn(&self) -> ::std::option::Option<&str> {
14        self.arn.as_deref()
15    }
16    /// <p>The ARN of the <code>NotificationConfiguration</code> to disassociate.</p>
17    pub fn notification_configuration_arn(&self) -> ::std::option::Option<&str> {
18        self.notification_configuration_arn.as_deref()
19    }
20}
21impl DisassociateChannelInput {
22    /// Creates a new builder-style object to manufacture [`DisassociateChannelInput`](crate::operation::disassociate_channel::DisassociateChannelInput).
23    pub fn builder() -> crate::operation::disassociate_channel::builders::DisassociateChannelInputBuilder {
24        crate::operation::disassociate_channel::builders::DisassociateChannelInputBuilder::default()
25    }
26}
27
28/// A builder for [`DisassociateChannelInput`](crate::operation::disassociate_channel::DisassociateChannelInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DisassociateChannelInputBuilder {
32    pub(crate) arn: ::std::option::Option<::std::string::String>,
33    pub(crate) notification_configuration_arn: ::std::option::Option<::std::string::String>,
34}
35impl DisassociateChannelInputBuilder {
36    /// <p>The Amazon Resource Name (ARN) of the Channel to disassociate.</p>
37    /// This field is required.
38    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.arn = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The Amazon Resource Name (ARN) of the Channel to disassociate.</p>
43    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.arn = input;
45        self
46    }
47    /// <p>The Amazon Resource Name (ARN) of the Channel to disassociate.</p>
48    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
49        &self.arn
50    }
51    /// <p>The ARN of the <code>NotificationConfiguration</code> to disassociate.</p>
52    /// This field is required.
53    pub fn notification_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.notification_configuration_arn = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The ARN of the <code>NotificationConfiguration</code> to disassociate.</p>
58    pub fn set_notification_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.notification_configuration_arn = input;
60        self
61    }
62    /// <p>The ARN of the <code>NotificationConfiguration</code> to disassociate.</p>
63    pub fn get_notification_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
64        &self.notification_configuration_arn
65    }
66    /// Consumes the builder and constructs a [`DisassociateChannelInput`](crate::operation::disassociate_channel::DisassociateChannelInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::disassociate_channel::DisassociateChannelInput, ::aws_smithy_types::error::operation::BuildError>
70    {
71        ::std::result::Result::Ok(crate::operation::disassociate_channel::DisassociateChannelInput {
72            arn: self.arn,
73            notification_configuration_arn: self.notification_configuration_arn,
74        })
75    }
76}