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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateRegistrationAssociationOutput {
/// <p>The Amazon Resource Name (ARN) for the registration.</p>
pub registration_arn: ::std::string::String,
/// <p>The unique identifier for the registration.</p>
pub registration_id: ::std::string::String,
/// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
pub registration_type: ::std::string::String,
/// <p>The Amazon Resource Name (ARN) of the origination identity that is associated with the registration.</p>
pub resource_arn: ::std::string::String,
/// <p>The unique identifier for the origination identity. For example this could be a <b>PhoneNumberId</b> or <b>SenderId</b>.</p>
pub resource_id: ::std::string::String,
/// <p>The registration type or origination identity type.</p>
pub resource_type: ::std::string::String,
/// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.</p>
pub iso_country_code: ::std::option::Option<::std::string::String>,
/// <p>The phone number associated with the registration in E.164 format.</p>
pub phone_number: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateRegistrationAssociationOutput {
/// <p>The Amazon Resource Name (ARN) for the registration.</p>
pub fn registration_arn(&self) -> &str {
use std::ops::Deref;
self.registration_arn.deref()
}
/// <p>The unique identifier for the registration.</p>
pub fn registration_id(&self) -> &str {
use std::ops::Deref;
self.registration_id.deref()
}
/// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
pub fn registration_type(&self) -> &str {
use std::ops::Deref;
self.registration_type.deref()
}
/// <p>The Amazon Resource Name (ARN) of the origination identity that is associated with the registration.</p>
pub fn resource_arn(&self) -> &str {
use std::ops::Deref;
self.resource_arn.deref()
}
/// <p>The unique identifier for the origination identity. For example this could be a <b>PhoneNumberId</b> or <b>SenderId</b>.</p>
pub fn resource_id(&self) -> &str {
use std::ops::Deref;
self.resource_id.deref()
}
/// <p>The registration type or origination identity type.</p>
pub fn resource_type(&self) -> &str {
use std::ops::Deref;
self.resource_type.deref()
}
/// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.</p>
pub fn iso_country_code(&self) -> ::std::option::Option<&str> {
self.iso_country_code.as_deref()
}
/// <p>The phone number associated with the registration in E.164 format.</p>
pub fn phone_number(&self) -> ::std::option::Option<&str> {
self.phone_number.as_deref()
}
}
impl ::aws_types::request_id::RequestId for CreateRegistrationAssociationOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateRegistrationAssociationOutput {
/// Creates a new builder-style object to manufacture [`CreateRegistrationAssociationOutput`](crate::operation::create_registration_association::CreateRegistrationAssociationOutput).
pub fn builder() -> crate::operation::create_registration_association::builders::CreateRegistrationAssociationOutputBuilder {
crate::operation::create_registration_association::builders::CreateRegistrationAssociationOutputBuilder::default()
}
}
/// A builder for [`CreateRegistrationAssociationOutput`](crate::operation::create_registration_association::CreateRegistrationAssociationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRegistrationAssociationOutputBuilder {
pub(crate) registration_arn: ::std::option::Option<::std::string::String>,
pub(crate) registration_id: ::std::option::Option<::std::string::String>,
pub(crate) registration_type: ::std::option::Option<::std::string::String>,
pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
pub(crate) resource_id: ::std::option::Option<::std::string::String>,
pub(crate) resource_type: ::std::option::Option<::std::string::String>,
pub(crate) iso_country_code: ::std::option::Option<::std::string::String>,
pub(crate) phone_number: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateRegistrationAssociationOutputBuilder {
/// <p>The Amazon Resource Name (ARN) for the registration.</p>
/// This field is required.
pub fn registration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.registration_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for the registration.</p>
pub fn set_registration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.registration_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) for the registration.</p>
pub fn get_registration_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.registration_arn
}
/// <p>The unique identifier for the registration.</p>
/// This field is required.
pub fn registration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.registration_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier for the registration.</p>
pub fn set_registration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.registration_id = input;
self
}
/// <p>The unique identifier for the registration.</p>
pub fn get_registration_id(&self) -> &::std::option::Option<::std::string::String> {
&self.registration_id
}
/// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
/// This field is required.
pub fn registration_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.registration_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
pub fn set_registration_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.registration_type = input;
self
}
/// <p>The type of registration form. The list of <b>RegistrationTypes</b> can be found using the <code>DescribeRegistrationTypeDefinitions</code> action.</p>
pub fn get_registration_type(&self) -> &::std::option::Option<::std::string::String> {
&self.registration_type
}
/// <p>The Amazon Resource Name (ARN) of the origination identity that is associated with the registration.</p>
/// This field is required.
pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the origination identity that is associated with the registration.</p>
pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the origination identity that is associated with the registration.</p>
pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_arn
}
/// <p>The unique identifier for the origination identity. For example this could be a <b>PhoneNumberId</b> or <b>SenderId</b>.</p>
/// This field is required.
pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier for the origination identity. For example this could be a <b>PhoneNumberId</b> or <b>SenderId</b>.</p>
pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_id = input;
self
}
/// <p>The unique identifier for the origination identity. For example this could be a <b>PhoneNumberId</b> or <b>SenderId</b>.</p>
pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_id
}
/// <p>The registration type or origination identity type.</p>
/// This field is required.
pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The registration type or origination identity type.</p>
pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_type = input;
self
}
/// <p>The registration type or origination identity type.</p>
pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_type
}
/// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.</p>
pub fn iso_country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.iso_country_code = ::std::option::Option::Some(input.into());
self
}
/// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.</p>
pub fn set_iso_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.iso_country_code = input;
self
}
/// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.</p>
pub fn get_iso_country_code(&self) -> &::std::option::Option<::std::string::String> {
&self.iso_country_code
}
/// <p>The phone number associated with the registration in E.164 format.</p>
pub fn phone_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.phone_number = ::std::option::Option::Some(input.into());
self
}
/// <p>The phone number associated with the registration in E.164 format.</p>
pub fn set_phone_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.phone_number = input;
self
}
/// <p>The phone number associated with the registration in E.164 format.</p>
pub fn get_phone_number(&self) -> &::std::option::Option<::std::string::String> {
&self.phone_number
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`CreateRegistrationAssociationOutput`](crate::operation::create_registration_association::CreateRegistrationAssociationOutput).
/// This method will fail if any of the following fields are not set:
/// - [`registration_arn`](crate::operation::create_registration_association::builders::CreateRegistrationAssociationOutputBuilder::registration_arn)
/// - [`registration_id`](crate::operation::create_registration_association::builders::CreateRegistrationAssociationOutputBuilder::registration_id)
/// - [`registration_type`](crate::operation::create_registration_association::builders::CreateRegistrationAssociationOutputBuilder::registration_type)
/// - [`resource_arn`](crate::operation::create_registration_association::builders::CreateRegistrationAssociationOutputBuilder::resource_arn)
/// - [`resource_id`](crate::operation::create_registration_association::builders::CreateRegistrationAssociationOutputBuilder::resource_id)
/// - [`resource_type`](crate::operation::create_registration_association::builders::CreateRegistrationAssociationOutputBuilder::resource_type)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_registration_association::CreateRegistrationAssociationOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_registration_association::CreateRegistrationAssociationOutput {
registration_arn: self.registration_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"registration_arn",
"registration_arn was not specified but it is required when building CreateRegistrationAssociationOutput",
)
})?,
registration_id: self.registration_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"registration_id",
"registration_id was not specified but it is required when building CreateRegistrationAssociationOutput",
)
})?,
registration_type: self.registration_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"registration_type",
"registration_type was not specified but it is required when building CreateRegistrationAssociationOutput",
)
})?,
resource_arn: self.resource_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"resource_arn",
"resource_arn was not specified but it is required when building CreateRegistrationAssociationOutput",
)
})?,
resource_id: self.resource_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"resource_id",
"resource_id was not specified but it is required when building CreateRegistrationAssociationOutput",
)
})?,
resource_type: self.resource_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"resource_type",
"resource_type was not specified but it is required when building CreateRegistrationAssociationOutput",
)
})?,
iso_country_code: self.iso_country_code,
phone_number: self.phone_number,
_request_id: self._request_id,
})
}
}