aws_sdk_pinpointsmsvoicev2/operation/update_pool/
_update_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 UpdatePoolOutput {
6    /// <p>The ARN of the pool.</p>
7    pub pool_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the pool.</p>
9    pub pool_id: ::std::option::Option<::std::string::String>,
10    /// <p>The current status of the pool update request.</p>
11    pub status: ::std::option::Option<crate::types::PoolStatus>,
12    /// <p>The type of message for the pool to use.</p>
13    pub message_type: ::std::option::Option<crate::types::MessageType>,
14    /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
15    pub two_way_enabled: bool,
16    /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
17    pub two_way_channel_arn: ::std::option::Option<::std::string::String>,
18    /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
19    pub two_way_channel_role: ::std::option::Option<::std::string::String>,
20    /// <p>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>
21    pub self_managed_opt_outs_enabled: bool,
22    /// <p>The name of the OptOutList associated with the pool.</p>
23    pub opt_out_list_name: ::std::option::Option<::std::string::String>,
24    /// <p>Indicates whether shared routes are enabled for the pool.</p>
25    pub shared_routes_enabled: bool,
26    /// <p>When set to true the pool can't be deleted.</p>
27    pub deletion_protection_enabled: bool,
28    /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
29    pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
30    _request_id: Option<String>,
31}
32impl UpdatePoolOutput {
33    /// <p>The ARN of the pool.</p>
34    pub fn pool_arn(&self) -> ::std::option::Option<&str> {
35        self.pool_arn.as_deref()
36    }
37    /// <p>The unique identifier of the pool.</p>
38    pub fn pool_id(&self) -> ::std::option::Option<&str> {
39        self.pool_id.as_deref()
40    }
41    /// <p>The current status of the pool update request.</p>
42    pub fn status(&self) -> ::std::option::Option<&crate::types::PoolStatus> {
43        self.status.as_ref()
44    }
45    /// <p>The type of message for the pool to use.</p>
46    pub fn message_type(&self) -> ::std::option::Option<&crate::types::MessageType> {
47        self.message_type.as_ref()
48    }
49    /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
50    pub fn two_way_enabled(&self) -> bool {
51        self.two_way_enabled
52    }
53    /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
54    pub fn two_way_channel_arn(&self) -> ::std::option::Option<&str> {
55        self.two_way_channel_arn.as_deref()
56    }
57    /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
58    pub fn two_way_channel_role(&self) -> ::std::option::Option<&str> {
59        self.two_way_channel_role.as_deref()
60    }
61    /// <p>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>
62    pub fn self_managed_opt_outs_enabled(&self) -> bool {
63        self.self_managed_opt_outs_enabled
64    }
65    /// <p>The name of the OptOutList associated with the pool.</p>
66    pub fn opt_out_list_name(&self) -> ::std::option::Option<&str> {
67        self.opt_out_list_name.as_deref()
68    }
69    /// <p>Indicates whether shared routes are enabled for the pool.</p>
70    pub fn shared_routes_enabled(&self) -> bool {
71        self.shared_routes_enabled
72    }
73    /// <p>When set to true the pool can't be deleted.</p>
74    pub fn deletion_protection_enabled(&self) -> bool {
75        self.deletion_protection_enabled
76    }
77    /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
78    pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
79        self.created_timestamp.as_ref()
80    }
81}
82impl ::aws_types::request_id::RequestId for UpdatePoolOutput {
83    fn request_id(&self) -> Option<&str> {
84        self._request_id.as_deref()
85    }
86}
87impl UpdatePoolOutput {
88    /// Creates a new builder-style object to manufacture [`UpdatePoolOutput`](crate::operation::update_pool::UpdatePoolOutput).
89    pub fn builder() -> crate::operation::update_pool::builders::UpdatePoolOutputBuilder {
90        crate::operation::update_pool::builders::UpdatePoolOutputBuilder::default()
91    }
92}
93
94/// A builder for [`UpdatePoolOutput`](crate::operation::update_pool::UpdatePoolOutput).
95#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
96#[non_exhaustive]
97pub struct UpdatePoolOutputBuilder {
98    pub(crate) pool_arn: ::std::option::Option<::std::string::String>,
99    pub(crate) pool_id: ::std::option::Option<::std::string::String>,
100    pub(crate) status: ::std::option::Option<crate::types::PoolStatus>,
101    pub(crate) message_type: ::std::option::Option<crate::types::MessageType>,
102    pub(crate) two_way_enabled: ::std::option::Option<bool>,
103    pub(crate) two_way_channel_arn: ::std::option::Option<::std::string::String>,
104    pub(crate) two_way_channel_role: ::std::option::Option<::std::string::String>,
105    pub(crate) self_managed_opt_outs_enabled: ::std::option::Option<bool>,
106    pub(crate) opt_out_list_name: ::std::option::Option<::std::string::String>,
107    pub(crate) shared_routes_enabled: ::std::option::Option<bool>,
108    pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
109    pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
110    _request_id: Option<String>,
111}
112impl UpdatePoolOutputBuilder {
113    /// <p>The ARN of the pool.</p>
114    pub fn pool_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.pool_arn = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The ARN of the pool.</p>
119    pub fn set_pool_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.pool_arn = input;
121        self
122    }
123    /// <p>The ARN of the pool.</p>
124    pub fn get_pool_arn(&self) -> &::std::option::Option<::std::string::String> {
125        &self.pool_arn
126    }
127    /// <p>The unique identifier of the pool.</p>
128    pub fn pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.pool_id = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The unique identifier of the pool.</p>
133    pub fn set_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.pool_id = input;
135        self
136    }
137    /// <p>The unique identifier of the pool.</p>
138    pub fn get_pool_id(&self) -> &::std::option::Option<::std::string::String> {
139        &self.pool_id
140    }
141    /// <p>The current status of the pool update request.</p>
142    pub fn status(mut self, input: crate::types::PoolStatus) -> Self {
143        self.status = ::std::option::Option::Some(input);
144        self
145    }
146    /// <p>The current status of the pool update request.</p>
147    pub fn set_status(mut self, input: ::std::option::Option<crate::types::PoolStatus>) -> Self {
148        self.status = input;
149        self
150    }
151    /// <p>The current status of the pool update request.</p>
152    pub fn get_status(&self) -> &::std::option::Option<crate::types::PoolStatus> {
153        &self.status
154    }
155    /// <p>The type of message for the pool to use.</p>
156    pub fn message_type(mut self, input: crate::types::MessageType) -> Self {
157        self.message_type = ::std::option::Option::Some(input);
158        self
159    }
160    /// <p>The type of message for the pool to use.</p>
161    pub fn set_message_type(mut self, input: ::std::option::Option<crate::types::MessageType>) -> Self {
162        self.message_type = input;
163        self
164    }
165    /// <p>The type of message for the pool to use.</p>
166    pub fn get_message_type(&self) -> &::std::option::Option<crate::types::MessageType> {
167        &self.message_type
168    }
169    /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
170    pub fn two_way_enabled(mut self, input: bool) -> Self {
171        self.two_way_enabled = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
175    pub fn set_two_way_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
176        self.two_way_enabled = input;
177        self
178    }
179    /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
180    pub fn get_two_way_enabled(&self) -> &::std::option::Option<bool> {
181        &self.two_way_enabled
182    }
183    /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
184    pub fn two_way_channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.two_way_channel_arn = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
189    pub fn set_two_way_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.two_way_channel_arn = input;
191        self
192    }
193    /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
194    pub fn get_two_way_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
195        &self.two_way_channel_arn
196    }
197    /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
198    pub fn two_way_channel_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199        self.two_way_channel_role = ::std::option::Option::Some(input.into());
200        self
201    }
202    /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
203    pub fn set_two_way_channel_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.two_way_channel_role = input;
205        self
206    }
207    /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
208    pub fn get_two_way_channel_role(&self) -> &::std::option::Option<::std::string::String> {
209        &self.two_way_channel_role
210    }
211    /// <p>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>
212    pub fn self_managed_opt_outs_enabled(mut self, input: bool) -> Self {
213        self.self_managed_opt_outs_enabled = ::std::option::Option::Some(input);
214        self
215    }
216    /// <p>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>
217    pub fn set_self_managed_opt_outs_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
218        self.self_managed_opt_outs_enabled = input;
219        self
220    }
221    /// <p>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>
222    pub fn get_self_managed_opt_outs_enabled(&self) -> &::std::option::Option<bool> {
223        &self.self_managed_opt_outs_enabled
224    }
225    /// <p>The name of the OptOutList associated with the pool.</p>
226    pub fn opt_out_list_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227        self.opt_out_list_name = ::std::option::Option::Some(input.into());
228        self
229    }
230    /// <p>The name of the OptOutList associated with the pool.</p>
231    pub fn set_opt_out_list_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232        self.opt_out_list_name = input;
233        self
234    }
235    /// <p>The name of the OptOutList associated with the pool.</p>
236    pub fn get_opt_out_list_name(&self) -> &::std::option::Option<::std::string::String> {
237        &self.opt_out_list_name
238    }
239    /// <p>Indicates whether shared routes are enabled for the pool.</p>
240    pub fn shared_routes_enabled(mut self, input: bool) -> Self {
241        self.shared_routes_enabled = ::std::option::Option::Some(input);
242        self
243    }
244    /// <p>Indicates whether shared routes are enabled for the pool.</p>
245    pub fn set_shared_routes_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
246        self.shared_routes_enabled = input;
247        self
248    }
249    /// <p>Indicates whether shared routes are enabled for the pool.</p>
250    pub fn get_shared_routes_enabled(&self) -> &::std::option::Option<bool> {
251        &self.shared_routes_enabled
252    }
253    /// <p>When set to true the pool can't be deleted.</p>
254    pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
255        self.deletion_protection_enabled = ::std::option::Option::Some(input);
256        self
257    }
258    /// <p>When set to true the pool can't be deleted.</p>
259    pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
260        self.deletion_protection_enabled = input;
261        self
262    }
263    /// <p>When set to true the pool can't be deleted.</p>
264    pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
265        &self.deletion_protection_enabled
266    }
267    /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
268    pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
269        self.created_timestamp = ::std::option::Option::Some(input);
270        self
271    }
272    /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
273    pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
274        self.created_timestamp = input;
275        self
276    }
277    /// <p>The time when the pool was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
278    pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
279        &self.created_timestamp
280    }
281    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
282        self._request_id = Some(request_id.into());
283        self
284    }
285
286    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
287        self._request_id = request_id;
288        self
289    }
290    /// Consumes the builder and constructs a [`UpdatePoolOutput`](crate::operation::update_pool::UpdatePoolOutput).
291    pub fn build(self) -> crate::operation::update_pool::UpdatePoolOutput {
292        crate::operation::update_pool::UpdatePoolOutput {
293            pool_arn: self.pool_arn,
294            pool_id: self.pool_id,
295            status: self.status,
296            message_type: self.message_type,
297            two_way_enabled: self.two_way_enabled.unwrap_or_default(),
298            two_way_channel_arn: self.two_way_channel_arn,
299            two_way_channel_role: self.two_way_channel_role,
300            self_managed_opt_outs_enabled: self.self_managed_opt_outs_enabled.unwrap_or_default(),
301            opt_out_list_name: self.opt_out_list_name,
302            shared_routes_enabled: self.shared_routes_enabled.unwrap_or_default(),
303            deletion_protection_enabled: self.deletion_protection_enabled.unwrap_or_default(),
304            created_timestamp: self.created_timestamp,
305            _request_id: self._request_id,
306        }
307    }
308}