aws_sdk_pinpointsmsvoicev2/operation/update_pool/_update_pool_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 UpdatePoolInput {
6 /// <p>The unique identifier of the pool to update. Valid values are either the PoolId or PoolArn.</p><important>
7 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
8 /// </important>
9 pub pool_id: ::std::option::Option<::std::string::String>,
10 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
11 pub two_way_enabled: ::std::option::Option<bool>,
12 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
13 pub two_way_channel_arn: ::std::option::Option<::std::string::String>,
14 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
15 pub two_way_channel_role: ::std::option::Option<::std::string::String>,
16 /// <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>
17 pub self_managed_opt_outs_enabled: ::std::option::Option<bool>,
18 /// <p>The OptOutList to associate with the pool. Valid values are either OptOutListName or OptOutListArn.</p><important>
19 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
20 /// </important>
21 pub opt_out_list_name: ::std::option::Option<::std::string::String>,
22 /// <p>Indicates whether shared routes are enabled for the pool.</p>
23 pub shared_routes_enabled: ::std::option::Option<bool>,
24 /// <p>When set to true the pool can't be deleted.</p>
25 pub deletion_protection_enabled: ::std::option::Option<bool>,
26}
27impl UpdatePoolInput {
28 /// <p>The unique identifier of the pool to update. Valid values are either the PoolId or PoolArn.</p><important>
29 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
30 /// </important>
31 pub fn pool_id(&self) -> ::std::option::Option<&str> {
32 self.pool_id.as_deref()
33 }
34 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
35 pub fn two_way_enabled(&self) -> ::std::option::Option<bool> {
36 self.two_way_enabled
37 }
38 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
39 pub fn two_way_channel_arn(&self) -> ::std::option::Option<&str> {
40 self.two_way_channel_arn.as_deref()
41 }
42 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
43 pub fn two_way_channel_role(&self) -> ::std::option::Option<&str> {
44 self.two_way_channel_role.as_deref()
45 }
46 /// <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>
47 pub fn self_managed_opt_outs_enabled(&self) -> ::std::option::Option<bool> {
48 self.self_managed_opt_outs_enabled
49 }
50 /// <p>The OptOutList to associate with the pool. Valid values are either OptOutListName or OptOutListArn.</p><important>
51 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
52 /// </important>
53 pub fn opt_out_list_name(&self) -> ::std::option::Option<&str> {
54 self.opt_out_list_name.as_deref()
55 }
56 /// <p>Indicates whether shared routes are enabled for the pool.</p>
57 pub fn shared_routes_enabled(&self) -> ::std::option::Option<bool> {
58 self.shared_routes_enabled
59 }
60 /// <p>When set to true the pool can't be deleted.</p>
61 pub fn deletion_protection_enabled(&self) -> ::std::option::Option<bool> {
62 self.deletion_protection_enabled
63 }
64}
65impl UpdatePoolInput {
66 /// Creates a new builder-style object to manufacture [`UpdatePoolInput`](crate::operation::update_pool::UpdatePoolInput).
67 pub fn builder() -> crate::operation::update_pool::builders::UpdatePoolInputBuilder {
68 crate::operation::update_pool::builders::UpdatePoolInputBuilder::default()
69 }
70}
71
72/// A builder for [`UpdatePoolInput`](crate::operation::update_pool::UpdatePoolInput).
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct UpdatePoolInputBuilder {
76 pub(crate) pool_id: ::std::option::Option<::std::string::String>,
77 pub(crate) two_way_enabled: ::std::option::Option<bool>,
78 pub(crate) two_way_channel_arn: ::std::option::Option<::std::string::String>,
79 pub(crate) two_way_channel_role: ::std::option::Option<::std::string::String>,
80 pub(crate) self_managed_opt_outs_enabled: ::std::option::Option<bool>,
81 pub(crate) opt_out_list_name: ::std::option::Option<::std::string::String>,
82 pub(crate) shared_routes_enabled: ::std::option::Option<bool>,
83 pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
84}
85impl UpdatePoolInputBuilder {
86 /// <p>The unique identifier of the pool to update. Valid values are either the PoolId or PoolArn.</p><important>
87 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
88 /// </important>
89 /// This field is required.
90 pub fn pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.pool_id = ::std::option::Option::Some(input.into());
92 self
93 }
94 /// <p>The unique identifier of the pool to update. Valid values are either the PoolId or PoolArn.</p><important>
95 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
96 /// </important>
97 pub fn set_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.pool_id = input;
99 self
100 }
101 /// <p>The unique identifier of the pool to update. Valid values are either the PoolId or PoolArn.</p><important>
102 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
103 /// </important>
104 pub fn get_pool_id(&self) -> &::std::option::Option<::std::string::String> {
105 &self.pool_id
106 }
107 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
108 pub fn two_way_enabled(mut self, input: bool) -> Self {
109 self.two_way_enabled = ::std::option::Option::Some(input);
110 self
111 }
112 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
113 pub fn set_two_way_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
114 self.two_way_enabled = input;
115 self
116 }
117 /// <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
118 pub fn get_two_way_enabled(&self) -> &::std::option::Option<bool> {
119 &self.two_way_enabled
120 }
121 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
122 pub fn two_way_channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.two_way_channel_arn = ::std::option::Option::Some(input.into());
124 self
125 }
126 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
127 pub fn set_two_way_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.two_way_channel_arn = input;
129 self
130 }
131 /// <p>The Amazon Resource Name (ARN) of the two way channel.</p>
132 pub fn get_two_way_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
133 &self.two_way_channel_arn
134 }
135 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
136 pub fn two_way_channel_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.two_way_channel_role = ::std::option::Option::Some(input.into());
138 self
139 }
140 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
141 pub fn set_two_way_channel_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.two_way_channel_role = input;
143 self
144 }
145 /// <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
146 pub fn get_two_way_channel_role(&self) -> &::std::option::Option<::std::string::String> {
147 &self.two_way_channel_role
148 }
149 /// <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>
150 pub fn self_managed_opt_outs_enabled(mut self, input: bool) -> Self {
151 self.self_managed_opt_outs_enabled = ::std::option::Option::Some(input);
152 self
153 }
154 /// <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>
155 pub fn set_self_managed_opt_outs_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
156 self.self_managed_opt_outs_enabled = input;
157 self
158 }
159 /// <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>
160 pub fn get_self_managed_opt_outs_enabled(&self) -> &::std::option::Option<bool> {
161 &self.self_managed_opt_outs_enabled
162 }
163 /// <p>The OptOutList to associate with the pool. Valid values are either OptOutListName or OptOutListArn.</p><important>
164 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
165 /// </important>
166 pub fn opt_out_list_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167 self.opt_out_list_name = ::std::option::Option::Some(input.into());
168 self
169 }
170 /// <p>The OptOutList to associate with the pool. Valid values are either OptOutListName or OptOutListArn.</p><important>
171 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
172 /// </important>
173 pub fn set_opt_out_list_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
174 self.opt_out_list_name = input;
175 self
176 }
177 /// <p>The OptOutList to associate with the pool. Valid values are either OptOutListName or OptOutListArn.</p><important>
178 /// <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p>
179 /// </important>
180 pub fn get_opt_out_list_name(&self) -> &::std::option::Option<::std::string::String> {
181 &self.opt_out_list_name
182 }
183 /// <p>Indicates whether shared routes are enabled for the pool.</p>
184 pub fn shared_routes_enabled(mut self, input: bool) -> Self {
185 self.shared_routes_enabled = ::std::option::Option::Some(input);
186 self
187 }
188 /// <p>Indicates whether shared routes are enabled for the pool.</p>
189 pub fn set_shared_routes_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
190 self.shared_routes_enabled = input;
191 self
192 }
193 /// <p>Indicates whether shared routes are enabled for the pool.</p>
194 pub fn get_shared_routes_enabled(&self) -> &::std::option::Option<bool> {
195 &self.shared_routes_enabled
196 }
197 /// <p>When set to true the pool can't be deleted.</p>
198 pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
199 self.deletion_protection_enabled = ::std::option::Option::Some(input);
200 self
201 }
202 /// <p>When set to true the pool can't be deleted.</p>
203 pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
204 self.deletion_protection_enabled = input;
205 self
206 }
207 /// <p>When set to true the pool can't be deleted.</p>
208 pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
209 &self.deletion_protection_enabled
210 }
211 /// Consumes the builder and constructs a [`UpdatePoolInput`](crate::operation::update_pool::UpdatePoolInput).
212 pub fn build(self) -> ::std::result::Result<crate::operation::update_pool::UpdatePoolInput, ::aws_smithy_types::error::operation::BuildError> {
213 ::std::result::Result::Ok(crate::operation::update_pool::UpdatePoolInput {
214 pool_id: self.pool_id,
215 two_way_enabled: self.two_way_enabled,
216 two_way_channel_arn: self.two_way_channel_arn,
217 two_way_channel_role: self.two_way_channel_role,
218 self_managed_opt_outs_enabled: self.self_managed_opt_outs_enabled,
219 opt_out_list_name: self.opt_out_list_name,
220 shared_routes_enabled: self.shared_routes_enabled,
221 deletion_protection_enabled: self.deletion_protection_enabled,
222 })
223 }
224}