1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// 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)]
pub struct UnsubscribeInput {
    /// <p>The Amazon Resource Name (ARN) of the notification rule.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the Chatbot topic to unsubscribe from the notification rule.</p>
    pub target_address: ::std::option::Option<::std::string::String>,
}
impl UnsubscribeInput {
    /// <p>The Amazon Resource Name (ARN) of the notification rule.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The ARN of the Chatbot topic to unsubscribe from the notification rule.</p>
    pub fn target_address(&self) -> ::std::option::Option<&str> {
        self.target_address.as_deref()
    }
}
impl ::std::fmt::Debug for UnsubscribeInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UnsubscribeInput");
        formatter.field("arn", &self.arn);
        formatter.field("target_address", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl UnsubscribeInput {
    /// Creates a new builder-style object to manufacture [`UnsubscribeInput`](crate::operation::unsubscribe::UnsubscribeInput).
    pub fn builder() -> crate::operation::unsubscribe::builders::UnsubscribeInputBuilder {
        crate::operation::unsubscribe::builders::UnsubscribeInputBuilder::default()
    }
}

/// A builder for [`UnsubscribeInput`](crate::operation::unsubscribe::UnsubscribeInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct UnsubscribeInputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) target_address: ::std::option::Option<::std::string::String>,
}
impl UnsubscribeInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the notification rule.</p>
    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 notification rule.</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 notification rule.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The ARN of the Chatbot topic to unsubscribe from the notification rule.</p>
    pub fn target_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the Chatbot topic to unsubscribe from the notification rule.</p>
    pub fn set_target_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_address = input;
        self
    }
    /// <p>The ARN of the Chatbot topic to unsubscribe from the notification rule.</p>
    pub fn get_target_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_address
    }
    /// Consumes the builder and constructs a [`UnsubscribeInput`](crate::operation::unsubscribe::UnsubscribeInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::unsubscribe::UnsubscribeInput, ::aws_smithy_http::operation::error::BuildError> {
        ::std::result::Result::Ok(crate::operation::unsubscribe::UnsubscribeInput {
            arn: self.arn,
            target_address: self.target_address,
        })
    }
}
impl ::std::fmt::Debug for UnsubscribeInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UnsubscribeInputBuilder");
        formatter.field("arn", &self.arn);
        formatter.field("target_address", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}