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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Provides information about an Amazon SNS topic to which notifications can be published.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AwsSnsTopicDetails {
    /// <p>The ID of an Amazon Web Services managed key for Amazon SNS or a customer managed key.</p>
    pub kms_master_key_id: ::std::option::Option<::std::string::String>,
    /// <p>Subscription is an embedded property that describes the subscription endpoints of an Amazon SNS topic.</p>
    pub subscription: ::std::option::Option<::std::vec::Vec<crate::types::AwsSnsTopicSubscription>>,
    /// <p>The name of the Amazon SNS topic.</p>
    pub topic_name: ::std::option::Option<::std::string::String>,
    /// <p>The subscription's owner.</p>
    pub owner: ::std::option::Option<::std::string::String>,
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub sqs_success_feedback_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub sqs_failure_feedback_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p>
    pub application_success_feedback_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub firehose_success_feedback_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub firehose_failure_feedback_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub http_success_feedback_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub http_failure_feedback_role_arn: ::std::option::Option<::std::string::String>,
}
impl AwsSnsTopicDetails {
    /// <p>The ID of an Amazon Web Services managed key for Amazon SNS or a customer managed key.</p>
    pub fn kms_master_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_master_key_id.as_deref()
    }
    /// <p>Subscription is an embedded property that describes the subscription endpoints of an Amazon SNS topic.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subscription.is_none()`.
    pub fn subscription(&self) -> &[crate::types::AwsSnsTopicSubscription] {
        self.subscription.as_deref().unwrap_or_default()
    }
    /// <p>The name of the Amazon SNS topic.</p>
    pub fn topic_name(&self) -> ::std::option::Option<&str> {
        self.topic_name.as_deref()
    }
    /// <p>The subscription's owner.</p>
    pub fn owner(&self) -> ::std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub fn sqs_success_feedback_role_arn(&self) -> ::std::option::Option<&str> {
        self.sqs_success_feedback_role_arn.as_deref()
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub fn sqs_failure_feedback_role_arn(&self) -> ::std::option::Option<&str> {
        self.sqs_failure_feedback_role_arn.as_deref()
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p>
    pub fn application_success_feedback_role_arn(&self) -> ::std::option::Option<&str> {
        self.application_success_feedback_role_arn.as_deref()
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub fn firehose_success_feedback_role_arn(&self) -> ::std::option::Option<&str> {
        self.firehose_success_feedback_role_arn.as_deref()
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub fn firehose_failure_feedback_role_arn(&self) -> ::std::option::Option<&str> {
        self.firehose_failure_feedback_role_arn.as_deref()
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub fn http_success_feedback_role_arn(&self) -> ::std::option::Option<&str> {
        self.http_success_feedback_role_arn.as_deref()
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub fn http_failure_feedback_role_arn(&self) -> ::std::option::Option<&str> {
        self.http_failure_feedback_role_arn.as_deref()
    }
}
impl AwsSnsTopicDetails {
    /// Creates a new builder-style object to manufacture [`AwsSnsTopicDetails`](crate::types::AwsSnsTopicDetails).
    pub fn builder() -> crate::types::builders::AwsSnsTopicDetailsBuilder {
        crate::types::builders::AwsSnsTopicDetailsBuilder::default()
    }
}

/// A builder for [`AwsSnsTopicDetails`](crate::types::AwsSnsTopicDetails).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AwsSnsTopicDetailsBuilder {
    pub(crate) kms_master_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) subscription: ::std::option::Option<::std::vec::Vec<crate::types::AwsSnsTopicSubscription>>,
    pub(crate) topic_name: ::std::option::Option<::std::string::String>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
    pub(crate) sqs_success_feedback_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) sqs_failure_feedback_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) application_success_feedback_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) firehose_success_feedback_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) firehose_failure_feedback_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) http_success_feedback_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) http_failure_feedback_role_arn: ::std::option::Option<::std::string::String>,
}
impl AwsSnsTopicDetailsBuilder {
    /// <p>The ID of an Amazon Web Services managed key for Amazon SNS or a customer managed key.</p>
    pub fn kms_master_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_master_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of an Amazon Web Services managed key for Amazon SNS or a customer managed key.</p>
    pub fn set_kms_master_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_master_key_id = input;
        self
    }
    /// <p>The ID of an Amazon Web Services managed key for Amazon SNS or a customer managed key.</p>
    pub fn get_kms_master_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_master_key_id
    }
    /// Appends an item to `subscription`.
    ///
    /// To override the contents of this collection use [`set_subscription`](Self::set_subscription).
    ///
    /// <p>Subscription is an embedded property that describes the subscription endpoints of an Amazon SNS topic.</p>
    pub fn subscription(mut self, input: crate::types::AwsSnsTopicSubscription) -> Self {
        let mut v = self.subscription.unwrap_or_default();
        v.push(input);
        self.subscription = ::std::option::Option::Some(v);
        self
    }
    /// <p>Subscription is an embedded property that describes the subscription endpoints of an Amazon SNS topic.</p>
    pub fn set_subscription(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AwsSnsTopicSubscription>>) -> Self {
        self.subscription = input;
        self
    }
    /// <p>Subscription is an embedded property that describes the subscription endpoints of an Amazon SNS topic.</p>
    pub fn get_subscription(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AwsSnsTopicSubscription>> {
        &self.subscription
    }
    /// <p>The name of the Amazon SNS topic.</p>
    pub fn topic_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.topic_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon SNS topic.</p>
    pub fn set_topic_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.topic_name = input;
        self
    }
    /// <p>The name of the Amazon SNS topic.</p>
    pub fn get_topic_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.topic_name
    }
    /// <p>The subscription's owner.</p>
    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The subscription's owner.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner = input;
        self
    }
    /// <p>The subscription's owner.</p>
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub fn sqs_success_feedback_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sqs_success_feedback_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub fn set_sqs_success_feedback_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sqs_success_feedback_role_arn = input;
        self
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub fn get_sqs_success_feedback_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.sqs_success_feedback_role_arn
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub fn sqs_failure_feedback_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sqs_failure_feedback_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub fn set_sqs_failure_feedback_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sqs_failure_feedback_role_arn = input;
        self
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p>
    pub fn get_sqs_failure_feedback_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.sqs_failure_feedback_role_arn
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p>
    pub fn application_success_feedback_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_success_feedback_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p>
    pub fn set_application_success_feedback_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_success_feedback_role_arn = input;
        self
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p>
    pub fn get_application_success_feedback_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_success_feedback_role_arn
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub fn firehose_success_feedback_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.firehose_success_feedback_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub fn set_firehose_success_feedback_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.firehose_success_feedback_role_arn = input;
        self
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub fn get_firehose_success_feedback_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.firehose_success_feedback_role_arn
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub fn firehose_failure_feedback_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.firehose_failure_feedback_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub fn set_firehose_failure_feedback_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.firehose_failure_feedback_role_arn = input;
        self
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Kinesis Data Firehose endpoint.</p>
    pub fn get_firehose_failure_feedback_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.firehose_failure_feedback_role_arn
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub fn http_success_feedback_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.http_success_feedback_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub fn set_http_success_feedback_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.http_success_feedback_role_arn = input;
        self
    }
    /// <p>Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub fn get_http_success_feedback_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.http_success_feedback_role_arn
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub fn http_failure_feedback_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.http_failure_feedback_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub fn set_http_failure_feedback_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.http_failure_feedback_role_arn = input;
        self
    }
    /// <p>Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p>
    pub fn get_http_failure_feedback_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.http_failure_feedback_role_arn
    }
    /// Consumes the builder and constructs a [`AwsSnsTopicDetails`](crate::types::AwsSnsTopicDetails).
    pub fn build(self) -> crate::types::AwsSnsTopicDetails {
        crate::types::AwsSnsTopicDetails {
            kms_master_key_id: self.kms_master_key_id,
            subscription: self.subscription,
            topic_name: self.topic_name,
            owner: self.owner,
            sqs_success_feedback_role_arn: self.sqs_success_feedback_role_arn,
            sqs_failure_feedback_role_arn: self.sqs_failure_feedback_role_arn,
            application_success_feedback_role_arn: self.application_success_feedback_role_arn,
            firehose_success_feedback_role_arn: self.firehose_success_feedback_role_arn,
            firehose_failure_feedback_role_arn: self.firehose_failure_feedback_role_arn,
            http_success_feedback_role_arn: self.http_success_feedback_role_arn,
            http_failure_feedback_role_arn: self.http_failure_feedback_role_arn,
        }
    }
}