aws_sdk_pinpointsmsvoicev2/operation/create_pool/_create_pool_output.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 CreatePoolOutput {
6 /// <p>The Amazon Resource Name (ARN) for the pool.</p>
7 pub pool_arn: ::std::option::Option<::std::string::String>,
8 /// <p>The unique identifier for the pool.</p>
9 pub pool_id: ::std::option::Option<::std::string::String>,
10 /// <p>The current status of the pool.</p>
11 /// <ul>
12 /// <li>
13 /// <p>CREATING: The pool is currently being created and isn't yet available for use.</p></li>
14 /// <li>
15 /// <p>ACTIVE: The pool is active and available for use.</p></li>
16 /// <li>
17 /// <p>DELETING: The pool is being deleted.</p></li>
18 /// </ul>
19 pub status: ::std::option::Option<crate::types::PoolStatus>,
20 /// <p>The type of message for the pool to use.</p>
21 pub message_type: ::std::option::Option<crate::types::MessageType>,
22 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
23 pub two_way_enabled: bool,
24 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
25 pub two_way_channel_arn: ::std::option::Option<::std::string::String>,
26 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
27 pub two_way_channel_role: ::std::option::Option<::std::string::String>,
28 /// <p>By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.</p>
29 pub self_managed_opt_outs_enabled: bool,
30 /// <p>The name of the OptOutList associated with the pool.</p>
31 pub opt_out_list_name: ::std::option::Option<::std::string::String>,
32 /// <p>Indicates whether shared routes are enabled for the pool. Set to false and only origination identities in this pool are used to send messages.</p>
33 pub shared_routes_enabled: bool,
34 /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
35 pub deletion_protection_enabled: bool,
36 /// <p>An array of tags (key and value pairs) associated with the pool.</p>
37 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
38 /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
39 pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
40 _request_id: Option<String>,
41}
42impl CreatePoolOutput {
43 /// <p>The Amazon Resource Name (ARN) for the pool.</p>
44 pub fn pool_arn(&self) -> ::std::option::Option<&str> {
45 self.pool_arn.as_deref()
46 }
47 /// <p>The unique identifier for the pool.</p>
48 pub fn pool_id(&self) -> ::std::option::Option<&str> {
49 self.pool_id.as_deref()
50 }
51 /// <p>The current status of the pool.</p>
52 /// <ul>
53 /// <li>
54 /// <p>CREATING: The pool is currently being created and isn't yet available for use.</p></li>
55 /// <li>
56 /// <p>ACTIVE: The pool is active and available for use.</p></li>
57 /// <li>
58 /// <p>DELETING: The pool is being deleted.</p></li>
59 /// </ul>
60 pub fn status(&self) -> ::std::option::Option<&crate::types::PoolStatus> {
61 self.status.as_ref()
62 }
63 /// <p>The type of message for the pool to use.</p>
64 pub fn message_type(&self) -> ::std::option::Option<&crate::types::MessageType> {
65 self.message_type.as_ref()
66 }
67 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
68 pub fn two_way_enabled(&self) -> bool {
69 self.two_way_enabled
70 }
71 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
72 pub fn two_way_channel_arn(&self) -> ::std::option::Option<&str> {
73 self.two_way_channel_arn.as_deref()
74 }
75 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
76 pub fn two_way_channel_role(&self) -> ::std::option::Option<&str> {
77 self.two_way_channel_role.as_deref()
78 }
79 /// <p>By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.</p>
80 pub fn self_managed_opt_outs_enabled(&self) -> bool {
81 self.self_managed_opt_outs_enabled
82 }
83 /// <p>The name of the OptOutList associated with the pool.</p>
84 pub fn opt_out_list_name(&self) -> ::std::option::Option<&str> {
85 self.opt_out_list_name.as_deref()
86 }
87 /// <p>Indicates whether shared routes are enabled for the pool. Set to false and only origination identities in this pool are used to send messages.</p>
88 pub fn shared_routes_enabled(&self) -> bool {
89 self.shared_routes_enabled
90 }
91 /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
92 pub fn deletion_protection_enabled(&self) -> bool {
93 self.deletion_protection_enabled
94 }
95 /// <p>An array of tags (key and value pairs) associated with the pool.</p>
96 ///
97 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
98 pub fn tags(&self) -> &[crate::types::Tag] {
99 self.tags.as_deref().unwrap_or_default()
100 }
101 /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
102 pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
103 self.created_timestamp.as_ref()
104 }
105}
106impl ::aws_types::request_id::RequestId for CreatePoolOutput {
107 fn request_id(&self) -> Option<&str> {
108 self._request_id.as_deref()
109 }
110}
111impl CreatePoolOutput {
112 /// Creates a new builder-style object to manufacture [`CreatePoolOutput`](crate::operation::create_pool::CreatePoolOutput).
113 pub fn builder() -> crate::operation::create_pool::builders::CreatePoolOutputBuilder {
114 crate::operation::create_pool::builders::CreatePoolOutputBuilder::default()
115 }
116}
117
118/// A builder for [`CreatePoolOutput`](crate::operation::create_pool::CreatePoolOutput).
119#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
120#[non_exhaustive]
121pub struct CreatePoolOutputBuilder {
122 pub(crate) pool_arn: ::std::option::Option<::std::string::String>,
123 pub(crate) pool_id: ::std::option::Option<::std::string::String>,
124 pub(crate) status: ::std::option::Option<crate::types::PoolStatus>,
125 pub(crate) message_type: ::std::option::Option<crate::types::MessageType>,
126 pub(crate) two_way_enabled: ::std::option::Option<bool>,
127 pub(crate) two_way_channel_arn: ::std::option::Option<::std::string::String>,
128 pub(crate) two_way_channel_role: ::std::option::Option<::std::string::String>,
129 pub(crate) self_managed_opt_outs_enabled: ::std::option::Option<bool>,
130 pub(crate) opt_out_list_name: ::std::option::Option<::std::string::String>,
131 pub(crate) shared_routes_enabled: ::std::option::Option<bool>,
132 pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
133 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
134 pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
135 _request_id: Option<String>,
136}
137impl CreatePoolOutputBuilder {
138 /// <p>The Amazon Resource Name (ARN) for the pool.</p>
139 pub fn pool_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140 self.pool_arn = ::std::option::Option::Some(input.into());
141 self
142 }
143 /// <p>The Amazon Resource Name (ARN) for the pool.</p>
144 pub fn set_pool_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145 self.pool_arn = input;
146 self
147 }
148 /// <p>The Amazon Resource Name (ARN) for the pool.</p>
149 pub fn get_pool_arn(&self) -> &::std::option::Option<::std::string::String> {
150 &self.pool_arn
151 }
152 /// <p>The unique identifier for the pool.</p>
153 pub fn pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154 self.pool_id = ::std::option::Option::Some(input.into());
155 self
156 }
157 /// <p>The unique identifier for the pool.</p>
158 pub fn set_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159 self.pool_id = input;
160 self
161 }
162 /// <p>The unique identifier for the pool.</p>
163 pub fn get_pool_id(&self) -> &::std::option::Option<::std::string::String> {
164 &self.pool_id
165 }
166 /// <p>The current status of the pool.</p>
167 /// <ul>
168 /// <li>
169 /// <p>CREATING: The pool is currently being created and isn't yet available for use.</p></li>
170 /// <li>
171 /// <p>ACTIVE: The pool is active and available for use.</p></li>
172 /// <li>
173 /// <p>DELETING: The pool is being deleted.</p></li>
174 /// </ul>
175 pub fn status(mut self, input: crate::types::PoolStatus) -> Self {
176 self.status = ::std::option::Option::Some(input);
177 self
178 }
179 /// <p>The current status of the pool.</p>
180 /// <ul>
181 /// <li>
182 /// <p>CREATING: The pool is currently being created and isn't yet available for use.</p></li>
183 /// <li>
184 /// <p>ACTIVE: The pool is active and available for use.</p></li>
185 /// <li>
186 /// <p>DELETING: The pool is being deleted.</p></li>
187 /// </ul>
188 pub fn set_status(mut self, input: ::std::option::Option<crate::types::PoolStatus>) -> Self {
189 self.status = input;
190 self
191 }
192 /// <p>The current status of the pool.</p>
193 /// <ul>
194 /// <li>
195 /// <p>CREATING: The pool is currently being created and isn't yet available for use.</p></li>
196 /// <li>
197 /// <p>ACTIVE: The pool is active and available for use.</p></li>
198 /// <li>
199 /// <p>DELETING: The pool is being deleted.</p></li>
200 /// </ul>
201 pub fn get_status(&self) -> &::std::option::Option<crate::types::PoolStatus> {
202 &self.status
203 }
204 /// <p>The type of message for the pool to use.</p>
205 pub fn message_type(mut self, input: crate::types::MessageType) -> Self {
206 self.message_type = ::std::option::Option::Some(input);
207 self
208 }
209 /// <p>The type of message for the pool to use.</p>
210 pub fn set_message_type(mut self, input: ::std::option::Option<crate::types::MessageType>) -> Self {
211 self.message_type = input;
212 self
213 }
214 /// <p>The type of message for the pool to use.</p>
215 pub fn get_message_type(&self) -> &::std::option::Option<crate::types::MessageType> {
216 &self.message_type
217 }
218 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
219 pub fn two_way_enabled(mut self, input: bool) -> Self {
220 self.two_way_enabled = ::std::option::Option::Some(input);
221 self
222 }
223 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
224 pub fn set_two_way_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
225 self.two_way_enabled = input;
226 self
227 }
228 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
229 pub fn get_two_way_enabled(&self) -> &::std::option::Option<bool> {
230 &self.two_way_enabled
231 }
232 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
233 pub fn two_way_channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234 self.two_way_channel_arn = ::std::option::Option::Some(input.into());
235 self
236 }
237 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
238 pub fn set_two_way_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
239 self.two_way_channel_arn = input;
240 self
241 }
242 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
243 pub fn get_two_way_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
244 &self.two_way_channel_arn
245 }
246 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
247 pub fn two_way_channel_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248 self.two_way_channel_role = ::std::option::Option::Some(input.into());
249 self
250 }
251 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
252 pub fn set_two_way_channel_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
253 self.two_way_channel_role = input;
254 self
255 }
256 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
257 pub fn get_two_way_channel_role(&self) -> &::std::option::Option<::std::string::String> {
258 &self.two_way_channel_role
259 }
260 /// <p>By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.</p>
261 pub fn self_managed_opt_outs_enabled(mut self, input: bool) -> Self {
262 self.self_managed_opt_outs_enabled = ::std::option::Option::Some(input);
263 self
264 }
265 /// <p>By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.</p>
266 pub fn set_self_managed_opt_outs_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
267 self.self_managed_opt_outs_enabled = input;
268 self
269 }
270 /// <p>By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.</p>
271 pub fn get_self_managed_opt_outs_enabled(&self) -> &::std::option::Option<bool> {
272 &self.self_managed_opt_outs_enabled
273 }
274 /// <p>The name of the OptOutList associated with the pool.</p>
275 pub fn opt_out_list_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
276 self.opt_out_list_name = ::std::option::Option::Some(input.into());
277 self
278 }
279 /// <p>The name of the OptOutList associated with the pool.</p>
280 pub fn set_opt_out_list_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
281 self.opt_out_list_name = input;
282 self
283 }
284 /// <p>The name of the OptOutList associated with the pool.</p>
285 pub fn get_opt_out_list_name(&self) -> &::std::option::Option<::std::string::String> {
286 &self.opt_out_list_name
287 }
288 /// <p>Indicates whether shared routes are enabled for the pool. Set to false and only origination identities in this pool are used to send messages.</p>
289 pub fn shared_routes_enabled(mut self, input: bool) -> Self {
290 self.shared_routes_enabled = ::std::option::Option::Some(input);
291 self
292 }
293 /// <p>Indicates whether shared routes are enabled for the pool. Set to false and only origination identities in this pool are used to send messages.</p>
294 pub fn set_shared_routes_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
295 self.shared_routes_enabled = input;
296 self
297 }
298 /// <p>Indicates whether shared routes are enabled for the pool. Set to false and only origination identities in this pool are used to send messages.</p>
299 pub fn get_shared_routes_enabled(&self) -> &::std::option::Option<bool> {
300 &self.shared_routes_enabled
301 }
302 /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
303 pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
304 self.deletion_protection_enabled = ::std::option::Option::Some(input);
305 self
306 }
307 /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
308 pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
309 self.deletion_protection_enabled = input;
310 self
311 }
312 /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
313 pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
314 &self.deletion_protection_enabled
315 }
316 /// Appends an item to `tags`.
317 ///
318 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
319 ///
320 /// <p>An array of tags (key and value pairs) associated with the pool.</p>
321 pub fn tags(mut self, input: crate::types::Tag) -> Self {
322 let mut v = self.tags.unwrap_or_default();
323 v.push(input);
324 self.tags = ::std::option::Option::Some(v);
325 self
326 }
327 /// <p>An array of tags (key and value pairs) associated with the pool.</p>
328 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
329 self.tags = input;
330 self
331 }
332 /// <p>An array of tags (key and value pairs) associated with the pool.</p>
333 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
334 &self.tags
335 }
336 /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
337 pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
338 self.created_timestamp = ::std::option::Option::Some(input);
339 self
340 }
341 /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
342 pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
343 self.created_timestamp = input;
344 self
345 }
346 /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
347 pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
348 &self.created_timestamp
349 }
350 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
351 self._request_id = Some(request_id.into());
352 self
353 }
354
355 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
356 self._request_id = request_id;
357 self
358 }
359 /// Consumes the builder and constructs a [`CreatePoolOutput`](crate::operation::create_pool::CreatePoolOutput).
360 pub fn build(self) -> crate::operation::create_pool::CreatePoolOutput {
361 crate::operation::create_pool::CreatePoolOutput {
362 pool_arn: self.pool_arn,
363 pool_id: self.pool_id,
364 status: self.status,
365 message_type: self.message_type,
366 two_way_enabled: self.two_way_enabled.unwrap_or_default(),
367 two_way_channel_arn: self.two_way_channel_arn,
368 two_way_channel_role: self.two_way_channel_role,
369 self_managed_opt_outs_enabled: self.self_managed_opt_outs_enabled.unwrap_or_default(),
370 opt_out_list_name: self.opt_out_list_name,
371 shared_routes_enabled: self.shared_routes_enabled.unwrap_or_default(),
372 deletion_protection_enabled: self.deletion_protection_enabled.unwrap_or_default(),
373 tags: self.tags,
374 created_timestamp: self.created_timestamp,
375 _request_id: self._request_id,
376 }
377 }
378}