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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The address that you want the Snow device(s) associated with a specific job to be shipped to. Addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. Although no individual elements of the <code>Address</code> are required, if the address is invalid or unsupported, then an exception is thrown.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Address {
/// <p>The unique ID for an address.</p>
pub address_id: ::std::option::Option<::std::string::String>,
/// <p>The name of a person to receive a Snow device at an address.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The name of the company to receive a Snow device at an address.</p>
pub company: ::std::option::Option<::std::string::String>,
/// <p>The first line in a street address that a Snow device is to be delivered to.</p>
pub street1: ::std::option::Option<::std::string::String>,
/// <p>The second line in a street address that a Snow device is to be delivered to.</p>
pub street2: ::std::option::Option<::std::string::String>,
/// <p>The third line in a street address that a Snow device is to be delivered to.</p>
pub street3: ::std::option::Option<::std::string::String>,
/// <p>The city in an address that a Snow device is to be delivered to.</p>
pub city: ::std::option::Option<::std::string::String>,
/// <p>The state or province in an address that a Snow device is to be delivered to.</p>
pub state_or_province: ::std::option::Option<::std::string::String>,
/// <p>This field is no longer used and the value is ignored.</p>
pub prefecture_or_district: ::std::option::Option<::std::string::String>,
/// <p>This field is no longer used and the value is ignored.</p>
pub landmark: ::std::option::Option<::std::string::String>,
/// <p>The country in an address that a Snow device is to be delivered to.</p>
pub country: ::std::option::Option<::std::string::String>,
/// <p>The postal code in an address that a Snow device is to be delivered to.</p>
pub postal_code: ::std::option::Option<::std::string::String>,
/// <p>The phone number associated with an address that a Snow device is to be delivered to.</p>
pub phone_number: ::std::option::Option<::std::string::String>,
/// <p>If the address you are creating is a primary address, then set this option to true. This field is not supported in most regions.</p>
pub is_restricted: bool,
/// <p>Differentiates between delivery address and pickup address in the customer account. Provided at job creation.</p>
pub r#type: ::std::option::Option<crate::types::AddressType>,
}
impl Address {
/// <p>The unique ID for an address.</p>
pub fn address_id(&self) -> ::std::option::Option<&str> {
self.address_id.as_deref()
}
/// <p>The name of a person to receive a Snow device at an address.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The name of the company to receive a Snow device at an address.</p>
pub fn company(&self) -> ::std::option::Option<&str> {
self.company.as_deref()
}
/// <p>The first line in a street address that a Snow device is to be delivered to.</p>
pub fn street1(&self) -> ::std::option::Option<&str> {
self.street1.as_deref()
}
/// <p>The second line in a street address that a Snow device is to be delivered to.</p>
pub fn street2(&self) -> ::std::option::Option<&str> {
self.street2.as_deref()
}
/// <p>The third line in a street address that a Snow device is to be delivered to.</p>
pub fn street3(&self) -> ::std::option::Option<&str> {
self.street3.as_deref()
}
/// <p>The city in an address that a Snow device is to be delivered to.</p>
pub fn city(&self) -> ::std::option::Option<&str> {
self.city.as_deref()
}
/// <p>The state or province in an address that a Snow device is to be delivered to.</p>
pub fn state_or_province(&self) -> ::std::option::Option<&str> {
self.state_or_province.as_deref()
}
/// <p>This field is no longer used and the value is ignored.</p>
pub fn prefecture_or_district(&self) -> ::std::option::Option<&str> {
self.prefecture_or_district.as_deref()
}
/// <p>This field is no longer used and the value is ignored.</p>
pub fn landmark(&self) -> ::std::option::Option<&str> {
self.landmark.as_deref()
}
/// <p>The country in an address that a Snow device is to be delivered to.</p>
pub fn country(&self) -> ::std::option::Option<&str> {
self.country.as_deref()
}
/// <p>The postal code in an address that a Snow device is to be delivered to.</p>
pub fn postal_code(&self) -> ::std::option::Option<&str> {
self.postal_code.as_deref()
}
/// <p>The phone number associated with an address that a Snow device is to be delivered to.</p>
pub fn phone_number(&self) -> ::std::option::Option<&str> {
self.phone_number.as_deref()
}
/// <p>If the address you are creating is a primary address, then set this option to true. This field is not supported in most regions.</p>
pub fn is_restricted(&self) -> bool {
self.is_restricted
}
/// <p>Differentiates between delivery address and pickup address in the customer account. Provided at job creation.</p>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::AddressType> {
self.r#type.as_ref()
}
}
impl Address {
/// Creates a new builder-style object to manufacture [`Address`](crate::types::Address).
pub fn builder() -> crate::types::builders::AddressBuilder {
crate::types::builders::AddressBuilder::default()
}
}
/// A builder for [`Address`](crate::types::Address).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddressBuilder {
pub(crate) address_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) company: ::std::option::Option<::std::string::String>,
pub(crate) street1: ::std::option::Option<::std::string::String>,
pub(crate) street2: ::std::option::Option<::std::string::String>,
pub(crate) street3: ::std::option::Option<::std::string::String>,
pub(crate) city: ::std::option::Option<::std::string::String>,
pub(crate) state_or_province: ::std::option::Option<::std::string::String>,
pub(crate) prefecture_or_district: ::std::option::Option<::std::string::String>,
pub(crate) landmark: ::std::option::Option<::std::string::String>,
pub(crate) country: ::std::option::Option<::std::string::String>,
pub(crate) postal_code: ::std::option::Option<::std::string::String>,
pub(crate) phone_number: ::std::option::Option<::std::string::String>,
pub(crate) is_restricted: ::std::option::Option<bool>,
pub(crate) r#type: ::std::option::Option<crate::types::AddressType>,
}
impl AddressBuilder {
/// <p>The unique ID for an address.</p>
pub fn address_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.address_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique ID for an address.</p>
pub fn set_address_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.address_id = input;
self
}
/// <p>The unique ID for an address.</p>
pub fn get_address_id(&self) -> &::std::option::Option<::std::string::String> {
&self.address_id
}
/// <p>The name of a person to receive a Snow device at an address.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of a person to receive a Snow device at an address.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of a person to receive a Snow device at an address.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The name of the company to receive a Snow device at an address.</p>
pub fn company(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.company = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the company to receive a Snow device at an address.</p>
pub fn set_company(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.company = input;
self
}
/// <p>The name of the company to receive a Snow device at an address.</p>
pub fn get_company(&self) -> &::std::option::Option<::std::string::String> {
&self.company
}
/// <p>The first line in a street address that a Snow device is to be delivered to.</p>
pub fn street1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.street1 = ::std::option::Option::Some(input.into());
self
}
/// <p>The first line in a street address that a Snow device is to be delivered to.</p>
pub fn set_street1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.street1 = input;
self
}
/// <p>The first line in a street address that a Snow device is to be delivered to.</p>
pub fn get_street1(&self) -> &::std::option::Option<::std::string::String> {
&self.street1
}
/// <p>The second line in a street address that a Snow device is to be delivered to.</p>
pub fn street2(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.street2 = ::std::option::Option::Some(input.into());
self
}
/// <p>The second line in a street address that a Snow device is to be delivered to.</p>
pub fn set_street2(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.street2 = input;
self
}
/// <p>The second line in a street address that a Snow device is to be delivered to.</p>
pub fn get_street2(&self) -> &::std::option::Option<::std::string::String> {
&self.street2
}
/// <p>The third line in a street address that a Snow device is to be delivered to.</p>
pub fn street3(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.street3 = ::std::option::Option::Some(input.into());
self
}
/// <p>The third line in a street address that a Snow device is to be delivered to.</p>
pub fn set_street3(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.street3 = input;
self
}
/// <p>The third line in a street address that a Snow device is to be delivered to.</p>
pub fn get_street3(&self) -> &::std::option::Option<::std::string::String> {
&self.street3
}
/// <p>The city in an address that a Snow device is to be delivered to.</p>
pub fn city(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.city = ::std::option::Option::Some(input.into());
self
}
/// <p>The city in an address that a Snow device is to be delivered to.</p>
pub fn set_city(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.city = input;
self
}
/// <p>The city in an address that a Snow device is to be delivered to.</p>
pub fn get_city(&self) -> &::std::option::Option<::std::string::String> {
&self.city
}
/// <p>The state or province in an address that a Snow device is to be delivered to.</p>
pub fn state_or_province(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.state_or_province = ::std::option::Option::Some(input.into());
self
}
/// <p>The state or province in an address that a Snow device is to be delivered to.</p>
pub fn set_state_or_province(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.state_or_province = input;
self
}
/// <p>The state or province in an address that a Snow device is to be delivered to.</p>
pub fn get_state_or_province(&self) -> &::std::option::Option<::std::string::String> {
&self.state_or_province
}
/// <p>This field is no longer used and the value is ignored.</p>
pub fn prefecture_or_district(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.prefecture_or_district = ::std::option::Option::Some(input.into());
self
}
/// <p>This field is no longer used and the value is ignored.</p>
pub fn set_prefecture_or_district(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.prefecture_or_district = input;
self
}
/// <p>This field is no longer used and the value is ignored.</p>
pub fn get_prefecture_or_district(&self) -> &::std::option::Option<::std::string::String> {
&self.prefecture_or_district
}
/// <p>This field is no longer used and the value is ignored.</p>
pub fn landmark(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.landmark = ::std::option::Option::Some(input.into());
self
}
/// <p>This field is no longer used and the value is ignored.</p>
pub fn set_landmark(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.landmark = input;
self
}
/// <p>This field is no longer used and the value is ignored.</p>
pub fn get_landmark(&self) -> &::std::option::Option<::std::string::String> {
&self.landmark
}
/// <p>The country in an address that a Snow device is to be delivered to.</p>
pub fn country(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.country = ::std::option::Option::Some(input.into());
self
}
/// <p>The country in an address that a Snow device is to be delivered to.</p>
pub fn set_country(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.country = input;
self
}
/// <p>The country in an address that a Snow device is to be delivered to.</p>
pub fn get_country(&self) -> &::std::option::Option<::std::string::String> {
&self.country
}
/// <p>The postal code in an address that a Snow device is to be delivered to.</p>
pub fn postal_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.postal_code = ::std::option::Option::Some(input.into());
self
}
/// <p>The postal code in an address that a Snow device is to be delivered to.</p>
pub fn set_postal_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.postal_code = input;
self
}
/// <p>The postal code in an address that a Snow device is to be delivered to.</p>
pub fn get_postal_code(&self) -> &::std::option::Option<::std::string::String> {
&self.postal_code
}
/// <p>The phone number associated with an address that a Snow device is to be delivered to.</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 an address that a Snow device is to be delivered to.</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 an address that a Snow device is to be delivered to.</p>
pub fn get_phone_number(&self) -> &::std::option::Option<::std::string::String> {
&self.phone_number
}
/// <p>If the address you are creating is a primary address, then set this option to true. This field is not supported in most regions.</p>
pub fn is_restricted(mut self, input: bool) -> Self {
self.is_restricted = ::std::option::Option::Some(input);
self
}
/// <p>If the address you are creating is a primary address, then set this option to true. This field is not supported in most regions.</p>
pub fn set_is_restricted(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_restricted = input;
self
}
/// <p>If the address you are creating is a primary address, then set this option to true. This field is not supported in most regions.</p>
pub fn get_is_restricted(&self) -> &::std::option::Option<bool> {
&self.is_restricted
}
/// <p>Differentiates between delivery address and pickup address in the customer account. Provided at job creation.</p>
pub fn r#type(mut self, input: crate::types::AddressType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>Differentiates between delivery address and pickup address in the customer account. Provided at job creation.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::AddressType>) -> Self {
self.r#type = input;
self
}
/// <p>Differentiates between delivery address and pickup address in the customer account. Provided at job creation.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::AddressType> {
&self.r#type
}
/// Consumes the builder and constructs a [`Address`](crate::types::Address).
pub fn build(self) -> crate::types::Address {
crate::types::Address {
address_id: self.address_id,
name: self.name,
company: self.company,
street1: self.street1,
street2: self.street2,
street3: self.street3,
city: self.city,
state_or_province: self.state_or_province,
prefecture_or_district: self.prefecture_or_district,
landmark: self.landmark,
country: self.country,
postal_code: self.postal_code,
phone_number: self.phone_number,
is_restricted: self.is_restricted.unwrap_or_default(),
r#type: self.r#type,
}
}
}