aws_sdk_pinpointsmsvoicev2/operation/delete_registration/_delete_registration_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 DeleteRegistrationOutput {
6 /// <p>The Amazon Resource Name (ARN) for the registration.</p>
7 pub registration_arn: ::std::string::String,
8 /// <p>The unique identifier for the registration.</p>
9 pub registration_id: ::std::string::String,
10 /// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
11 pub registration_type: ::std::string::String,
12 /// <p>The status of the registration.</p>
13 /// <ul>
14 /// <li>
15 /// <p><code>CLOSED</code>: The phone number or sender ID has been deleted and you must also delete the registration for the number.</p></li>
16 /// <li>
17 /// <p><code>CREATED</code>: Your registration is created but not submitted.</p></li>
18 /// <li>
19 /// <p><code>COMPLETE</code>: Your registration has been approved and your origination identity has been created.</p></li>
20 /// <li>
21 /// <p><code>DELETED</code>: The registration has been deleted.</p></li>
22 /// <li>
23 /// <p><code>PROVISIONING</code>: Your registration has been approved and your origination identity is being created.</p></li>
24 /// <li>
25 /// <p><code>REQUIRES_AUTHENTICATION</code>: You need to complete email authentication.</p></li>
26 /// <li>
27 /// <p><code>REQUIRES_UPDATES</code>: You must fix your registration and resubmit it.</p></li>
28 /// <li>
29 /// <p><code>REVIEWING</code>: Your registration has been accepted and is being reviewed.</p></li>
30 /// <li>
31 /// <p><code>SUBMITTED</code>: Your registration has been submitted and is awaiting review.</p></li>
32 /// </ul>
33 pub registration_status: crate::types::RegistrationStatus,
34 /// <p>The current version number of the registration.</p>
35 pub current_version_number: i64,
36 /// <p>The version number of the registration that was approved.</p>
37 pub approved_version_number: ::std::option::Option<i64>,
38 /// <p>The latest version number of the registration that was denied.</p>
39 pub latest_denied_version_number: ::std::option::Option<i64>,
40 /// <p>Metadata about a given registration which is specific to that registration type.</p>
41 pub additional_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
42 /// <p>The time when the registration was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
43 pub created_timestamp: ::aws_smithy_types::DateTime,
44 _request_id: Option<String>,
45}
46impl DeleteRegistrationOutput {
47 /// <p>The Amazon Resource Name (ARN) for the registration.</p>
48 pub fn registration_arn(&self) -> &str {
49 use std::ops::Deref;
50 self.registration_arn.deref()
51 }
52 /// <p>The unique identifier for the registration.</p>
53 pub fn registration_id(&self) -> &str {
54 use std::ops::Deref;
55 self.registration_id.deref()
56 }
57 /// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
58 pub fn registration_type(&self) -> &str {
59 use std::ops::Deref;
60 self.registration_type.deref()
61 }
62 /// <p>The status of the registration.</p>
63 /// <ul>
64 /// <li>
65 /// <p><code>CLOSED</code>: The phone number or sender ID has been deleted and you must also delete the registration for the number.</p></li>
66 /// <li>
67 /// <p><code>CREATED</code>: Your registration is created but not submitted.</p></li>
68 /// <li>
69 /// <p><code>COMPLETE</code>: Your registration has been approved and your origination identity has been created.</p></li>
70 /// <li>
71 /// <p><code>DELETED</code>: The registration has been deleted.</p></li>
72 /// <li>
73 /// <p><code>PROVISIONING</code>: Your registration has been approved and your origination identity is being created.</p></li>
74 /// <li>
75 /// <p><code>REQUIRES_AUTHENTICATION</code>: You need to complete email authentication.</p></li>
76 /// <li>
77 /// <p><code>REQUIRES_UPDATES</code>: You must fix your registration and resubmit it.</p></li>
78 /// <li>
79 /// <p><code>REVIEWING</code>: Your registration has been accepted and is being reviewed.</p></li>
80 /// <li>
81 /// <p><code>SUBMITTED</code>: Your registration has been submitted and is awaiting review.</p></li>
82 /// </ul>
83 pub fn registration_status(&self) -> &crate::types::RegistrationStatus {
84 &self.registration_status
85 }
86 /// <p>The current version number of the registration.</p>
87 pub fn current_version_number(&self) -> i64 {
88 self.current_version_number
89 }
90 /// <p>The version number of the registration that was approved.</p>
91 pub fn approved_version_number(&self) -> ::std::option::Option<i64> {
92 self.approved_version_number
93 }
94 /// <p>The latest version number of the registration that was denied.</p>
95 pub fn latest_denied_version_number(&self) -> ::std::option::Option<i64> {
96 self.latest_denied_version_number
97 }
98 /// <p>Metadata about a given registration which is specific to that registration type.</p>
99 pub fn additional_attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
100 self.additional_attributes.as_ref()
101 }
102 /// <p>The time when the registration was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
103 pub fn created_timestamp(&self) -> &::aws_smithy_types::DateTime {
104 &self.created_timestamp
105 }
106}
107impl ::aws_types::request_id::RequestId for DeleteRegistrationOutput {
108 fn request_id(&self) -> Option<&str> {
109 self._request_id.as_deref()
110 }
111}
112impl DeleteRegistrationOutput {
113 /// Creates a new builder-style object to manufacture [`DeleteRegistrationOutput`](crate::operation::delete_registration::DeleteRegistrationOutput).
114 pub fn builder() -> crate::operation::delete_registration::builders::DeleteRegistrationOutputBuilder {
115 crate::operation::delete_registration::builders::DeleteRegistrationOutputBuilder::default()
116 }
117}
118
119/// A builder for [`DeleteRegistrationOutput`](crate::operation::delete_registration::DeleteRegistrationOutput).
120#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
121#[non_exhaustive]
122pub struct DeleteRegistrationOutputBuilder {
123 pub(crate) registration_arn: ::std::option::Option<::std::string::String>,
124 pub(crate) registration_id: ::std::option::Option<::std::string::String>,
125 pub(crate) registration_type: ::std::option::Option<::std::string::String>,
126 pub(crate) registration_status: ::std::option::Option<crate::types::RegistrationStatus>,
127 pub(crate) current_version_number: ::std::option::Option<i64>,
128 pub(crate) approved_version_number: ::std::option::Option<i64>,
129 pub(crate) latest_denied_version_number: ::std::option::Option<i64>,
130 pub(crate) additional_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
131 pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
132 _request_id: Option<String>,
133}
134impl DeleteRegistrationOutputBuilder {
135 /// <p>The Amazon Resource Name (ARN) for the registration.</p>
136 /// This field is required.
137 pub fn registration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.registration_arn = ::std::option::Option::Some(input.into());
139 self
140 }
141 /// <p>The Amazon Resource Name (ARN) for the registration.</p>
142 pub fn set_registration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.registration_arn = input;
144 self
145 }
146 /// <p>The Amazon Resource Name (ARN) for the registration.</p>
147 pub fn get_registration_arn(&self) -> &::std::option::Option<::std::string::String> {
148 &self.registration_arn
149 }
150 /// <p>The unique identifier for the registration.</p>
151 /// This field is required.
152 pub fn registration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.registration_id = ::std::option::Option::Some(input.into());
154 self
155 }
156 /// <p>The unique identifier for the registration.</p>
157 pub fn set_registration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158 self.registration_id = input;
159 self
160 }
161 /// <p>The unique identifier for the registration.</p>
162 pub fn get_registration_id(&self) -> &::std::option::Option<::std::string::String> {
163 &self.registration_id
164 }
165 /// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
166 /// This field is required.
167 pub fn registration_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168 self.registration_type = ::std::option::Option::Some(input.into());
169 self
170 }
171 /// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
172 pub fn set_registration_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.registration_type = input;
174 self
175 }
176 /// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
177 pub fn get_registration_type(&self) -> &::std::option::Option<::std::string::String> {
178 &self.registration_type
179 }
180 /// <p>The status of the registration.</p>
181 /// <ul>
182 /// <li>
183 /// <p><code>CLOSED</code>: The phone number or sender ID has been deleted and you must also delete the registration for the number.</p></li>
184 /// <li>
185 /// <p><code>CREATED</code>: Your registration is created but not submitted.</p></li>
186 /// <li>
187 /// <p><code>COMPLETE</code>: Your registration has been approved and your origination identity has been created.</p></li>
188 /// <li>
189 /// <p><code>DELETED</code>: The registration has been deleted.</p></li>
190 /// <li>
191 /// <p><code>PROVISIONING</code>: Your registration has been approved and your origination identity is being created.</p></li>
192 /// <li>
193 /// <p><code>REQUIRES_AUTHENTICATION</code>: You need to complete email authentication.</p></li>
194 /// <li>
195 /// <p><code>REQUIRES_UPDATES</code>: You must fix your registration and resubmit it.</p></li>
196 /// <li>
197 /// <p><code>REVIEWING</code>: Your registration has been accepted and is being reviewed.</p></li>
198 /// <li>
199 /// <p><code>SUBMITTED</code>: Your registration has been submitted and is awaiting review.</p></li>
200 /// </ul>
201 /// This field is required.
202 pub fn registration_status(mut self, input: crate::types::RegistrationStatus) -> Self {
203 self.registration_status = ::std::option::Option::Some(input);
204 self
205 }
206 /// <p>The status of the registration.</p>
207 /// <ul>
208 /// <li>
209 /// <p><code>CLOSED</code>: The phone number or sender ID has been deleted and you must also delete the registration for the number.</p></li>
210 /// <li>
211 /// <p><code>CREATED</code>: Your registration is created but not submitted.</p></li>
212 /// <li>
213 /// <p><code>COMPLETE</code>: Your registration has been approved and your origination identity has been created.</p></li>
214 /// <li>
215 /// <p><code>DELETED</code>: The registration has been deleted.</p></li>
216 /// <li>
217 /// <p><code>PROVISIONING</code>: Your registration has been approved and your origination identity is being created.</p></li>
218 /// <li>
219 /// <p><code>REQUIRES_AUTHENTICATION</code>: You need to complete email authentication.</p></li>
220 /// <li>
221 /// <p><code>REQUIRES_UPDATES</code>: You must fix your registration and resubmit it.</p></li>
222 /// <li>
223 /// <p><code>REVIEWING</code>: Your registration has been accepted and is being reviewed.</p></li>
224 /// <li>
225 /// <p><code>SUBMITTED</code>: Your registration has been submitted and is awaiting review.</p></li>
226 /// </ul>
227 pub fn set_registration_status(mut self, input: ::std::option::Option<crate::types::RegistrationStatus>) -> Self {
228 self.registration_status = input;
229 self
230 }
231 /// <p>The status of the registration.</p>
232 /// <ul>
233 /// <li>
234 /// <p><code>CLOSED</code>: The phone number or sender ID has been deleted and you must also delete the registration for the number.</p></li>
235 /// <li>
236 /// <p><code>CREATED</code>: Your registration is created but not submitted.</p></li>
237 /// <li>
238 /// <p><code>COMPLETE</code>: Your registration has been approved and your origination identity has been created.</p></li>
239 /// <li>
240 /// <p><code>DELETED</code>: The registration has been deleted.</p></li>
241 /// <li>
242 /// <p><code>PROVISIONING</code>: Your registration has been approved and your origination identity is being created.</p></li>
243 /// <li>
244 /// <p><code>REQUIRES_AUTHENTICATION</code>: You need to complete email authentication.</p></li>
245 /// <li>
246 /// <p><code>REQUIRES_UPDATES</code>: You must fix your registration and resubmit it.</p></li>
247 /// <li>
248 /// <p><code>REVIEWING</code>: Your registration has been accepted and is being reviewed.</p></li>
249 /// <li>
250 /// <p><code>SUBMITTED</code>: Your registration has been submitted and is awaiting review.</p></li>
251 /// </ul>
252 pub fn get_registration_status(&self) -> &::std::option::Option<crate::types::RegistrationStatus> {
253 &self.registration_status
254 }
255 /// <p>The current version number of the registration.</p>
256 /// This field is required.
257 pub fn current_version_number(mut self, input: i64) -> Self {
258 self.current_version_number = ::std::option::Option::Some(input);
259 self
260 }
261 /// <p>The current version number of the registration.</p>
262 pub fn set_current_version_number(mut self, input: ::std::option::Option<i64>) -> Self {
263 self.current_version_number = input;
264 self
265 }
266 /// <p>The current version number of the registration.</p>
267 pub fn get_current_version_number(&self) -> &::std::option::Option<i64> {
268 &self.current_version_number
269 }
270 /// <p>The version number of the registration that was approved.</p>
271 pub fn approved_version_number(mut self, input: i64) -> Self {
272 self.approved_version_number = ::std::option::Option::Some(input);
273 self
274 }
275 /// <p>The version number of the registration that was approved.</p>
276 pub fn set_approved_version_number(mut self, input: ::std::option::Option<i64>) -> Self {
277 self.approved_version_number = input;
278 self
279 }
280 /// <p>The version number of the registration that was approved.</p>
281 pub fn get_approved_version_number(&self) -> &::std::option::Option<i64> {
282 &self.approved_version_number
283 }
284 /// <p>The latest version number of the registration that was denied.</p>
285 pub fn latest_denied_version_number(mut self, input: i64) -> Self {
286 self.latest_denied_version_number = ::std::option::Option::Some(input);
287 self
288 }
289 /// <p>The latest version number of the registration that was denied.</p>
290 pub fn set_latest_denied_version_number(mut self, input: ::std::option::Option<i64>) -> Self {
291 self.latest_denied_version_number = input;
292 self
293 }
294 /// <p>The latest version number of the registration that was denied.</p>
295 pub fn get_latest_denied_version_number(&self) -> &::std::option::Option<i64> {
296 &self.latest_denied_version_number
297 }
298 /// Adds a key-value pair to `additional_attributes`.
299 ///
300 /// To override the contents of this collection use [`set_additional_attributes`](Self::set_additional_attributes).
301 ///
302 /// <p>Metadata about a given registration which is specific to that registration type.</p>
303 pub fn additional_attributes(
304 mut self,
305 k: impl ::std::convert::Into<::std::string::String>,
306 v: impl ::std::convert::Into<::std::string::String>,
307 ) -> Self {
308 let mut hash_map = self.additional_attributes.unwrap_or_default();
309 hash_map.insert(k.into(), v.into());
310 self.additional_attributes = ::std::option::Option::Some(hash_map);
311 self
312 }
313 /// <p>Metadata about a given registration which is specific to that registration type.</p>
314 pub fn set_additional_attributes(
315 mut self,
316 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
317 ) -> Self {
318 self.additional_attributes = input;
319 self
320 }
321 /// <p>Metadata about a given registration which is specific to that registration type.</p>
322 pub fn get_additional_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
323 &self.additional_attributes
324 }
325 /// <p>The time when the registration was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
326 /// This field is required.
327 pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
328 self.created_timestamp = ::std::option::Option::Some(input);
329 self
330 }
331 /// <p>The time when the registration was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
332 pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
333 self.created_timestamp = input;
334 self
335 }
336 /// <p>The time when the registration was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
337 pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
338 &self.created_timestamp
339 }
340 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
341 self._request_id = Some(request_id.into());
342 self
343 }
344
345 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
346 self._request_id = request_id;
347 self
348 }
349 /// Consumes the builder and constructs a [`DeleteRegistrationOutput`](crate::operation::delete_registration::DeleteRegistrationOutput).
350 /// This method will fail if any of the following fields are not set:
351 /// - [`registration_arn`](crate::operation::delete_registration::builders::DeleteRegistrationOutputBuilder::registration_arn)
352 /// - [`registration_id`](crate::operation::delete_registration::builders::DeleteRegistrationOutputBuilder::registration_id)
353 /// - [`registration_type`](crate::operation::delete_registration::builders::DeleteRegistrationOutputBuilder::registration_type)
354 /// - [`registration_status`](crate::operation::delete_registration::builders::DeleteRegistrationOutputBuilder::registration_status)
355 /// - [`current_version_number`](crate::operation::delete_registration::builders::DeleteRegistrationOutputBuilder::current_version_number)
356 /// - [`created_timestamp`](crate::operation::delete_registration::builders::DeleteRegistrationOutputBuilder::created_timestamp)
357 pub fn build(
358 self,
359 ) -> ::std::result::Result<crate::operation::delete_registration::DeleteRegistrationOutput, ::aws_smithy_types::error::operation::BuildError>
360 {
361 ::std::result::Result::Ok(crate::operation::delete_registration::DeleteRegistrationOutput {
362 registration_arn: self.registration_arn.ok_or_else(|| {
363 ::aws_smithy_types::error::operation::BuildError::missing_field(
364 "registration_arn",
365 "registration_arn was not specified but it is required when building DeleteRegistrationOutput",
366 )
367 })?,
368 registration_id: self.registration_id.ok_or_else(|| {
369 ::aws_smithy_types::error::operation::BuildError::missing_field(
370 "registration_id",
371 "registration_id was not specified but it is required when building DeleteRegistrationOutput",
372 )
373 })?,
374 registration_type: self.registration_type.ok_or_else(|| {
375 ::aws_smithy_types::error::operation::BuildError::missing_field(
376 "registration_type",
377 "registration_type was not specified but it is required when building DeleteRegistrationOutput",
378 )
379 })?,
380 registration_status: self.registration_status.ok_or_else(|| {
381 ::aws_smithy_types::error::operation::BuildError::missing_field(
382 "registration_status",
383 "registration_status was not specified but it is required when building DeleteRegistrationOutput",
384 )
385 })?,
386 current_version_number: self.current_version_number.ok_or_else(|| {
387 ::aws_smithy_types::error::operation::BuildError::missing_field(
388 "current_version_number",
389 "current_version_number was not specified but it is required when building DeleteRegistrationOutput",
390 )
391 })?,
392 approved_version_number: self.approved_version_number,
393 latest_denied_version_number: self.latest_denied_version_number,
394 additional_attributes: self.additional_attributes,
395 created_timestamp: self.created_timestamp.ok_or_else(|| {
396 ::aws_smithy_types::error::operation::BuildError::missing_field(
397 "created_timestamp",
398 "created_timestamp was not specified but it is required when building DeleteRegistrationOutput",
399 )
400 })?,
401 _request_id: self._request_id,
402 })
403 }
404}