aws-sdk-location 1.103.0

AWS SDK for Amazon Location Service
Documentation
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains details about addresses or points of interest that match the search criteria.</p>
/// <p>Not all details are included with all responses. Some details may only be returned by specific data partners.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Place {
    /// <p>The full name and address of the point of interest such as a city, region, or country. For example, <code>123 Any Street, Any Town, USA</code>.</p>
    pub label: ::std::option::Option<::std::string::String>,
    /// <p>Places uses a point geometry to specify a location or a Place.</p>
    pub geometry: ::std::option::Option<crate::types::PlaceGeometry>,
    /// <p>The numerical portion of an address, such as a building number.</p>
    pub address_number: ::std::option::Option<::std::string::String>,
    /// <p>The name for a street or a road to identify a location. For example, <code>Main Street</code>.</p>
    pub street: ::std::option::Option<::std::string::String>,
    /// <p>The name of a community district. For example, <code>Downtown</code>.</p>
    pub neighborhood: ::std::option::Option<::std::string::String>,
    /// <p>A name for a local area, such as a city or town name. For example, <code>Toronto</code>.</p>
    pub municipality: ::std::option::Option<::std::string::String>,
    /// <p>A county, or an area that's part of a larger region. For example, <code>Metro Vancouver</code>.</p>
    pub sub_region: ::std::option::Option<::std::string::String>,
    /// <p>A name for an area or geographical division, such as a province or state name. For example, <code>British Columbia</code>.</p>
    pub region: ::std::option::Option<::std::string::String>,
    /// <p>A country/region specified using <a href="https://www.iso.org/iso-3166-country-codes.html">ISO 3166</a> 3-digit country/region code. For example, <code>CAN</code>.</p>
    pub country: ::std::option::Option<::std::string::String>,
    /// <p>A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.</p>
    pub postal_code: ::std::option::Option<::std::string::String>,
    /// <p><code>True</code> if the result is interpolated from other known places.</p>
    /// <p><code>False</code> if the Place is a known place.</p>
    /// <p>Not returned when the partner does not provide the information.</p>
    /// <p>For example, returns <code>False</code> for an address location that is found in the partner data, but returns <code>True</code> if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.</p>
    pub interpolated: ::std::option::Option<bool>,
    /// <p>The time zone in which the <code>Place</code> is located. Returned only when using HERE or Grab as the selected partner.</p>
    pub time_zone: ::std::option::Option<crate::types::TimeZone>,
    /// <p>For addresses with a <code>UnitNumber</code>, the type of unit. For example, <code>Apartment</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri as a data provider.</p>
    /// </note>
    pub unit_type: ::std::option::Option<::std::string::String>,
    /// <p>For addresses with multiple units, the unit identifier. Can include numbers and letters, for example <code>3B</code> or <code>Unit 123</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri or Grab as a data provider. Is not returned for <code>SearchPlaceIndexForPosition</code>.</p>
    /// </note>
    pub unit_number: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Location categories that describe this Place.</p>
    /// <p>For more information about using categories, including a list of Amazon Location categories, see <a href="https://docs.aws.amazon.com/location/previous/developerguide/category-filtering.html">Categories and filtering</a>, in the <i>Amazon Location Service developer guide</i>.</p>
    pub categories: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.</p>
    pub supplemental_categories: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>An area that's part of a larger municipality. For example, <code>Blissville </code> is a submunicipality in the Queen County in New York.</p><note>
    /// <p>This property supported by Esri and OpenData. The Esri property is <code>district</code>, and the OpenData property is <code>borough</code>.</p>
    /// </note>
    pub sub_municipality: ::std::option::Option<::std::string::String>,
}
impl Place {
    /// <p>The full name and address of the point of interest such as a city, region, or country. For example, <code>123 Any Street, Any Town, USA</code>.</p>
    pub fn label(&self) -> ::std::option::Option<&str> {
        self.label.as_deref()
    }
    /// <p>Places uses a point geometry to specify a location or a Place.</p>
    pub fn geometry(&self) -> ::std::option::Option<&crate::types::PlaceGeometry> {
        self.geometry.as_ref()
    }
    /// <p>The numerical portion of an address, such as a building number.</p>
    pub fn address_number(&self) -> ::std::option::Option<&str> {
        self.address_number.as_deref()
    }
    /// <p>The name for a street or a road to identify a location. For example, <code>Main Street</code>.</p>
    pub fn street(&self) -> ::std::option::Option<&str> {
        self.street.as_deref()
    }
    /// <p>The name of a community district. For example, <code>Downtown</code>.</p>
    pub fn neighborhood(&self) -> ::std::option::Option<&str> {
        self.neighborhood.as_deref()
    }
    /// <p>A name for a local area, such as a city or town name. For example, <code>Toronto</code>.</p>
    pub fn municipality(&self) -> ::std::option::Option<&str> {
        self.municipality.as_deref()
    }
    /// <p>A county, or an area that's part of a larger region. For example, <code>Metro Vancouver</code>.</p>
    pub fn sub_region(&self) -> ::std::option::Option<&str> {
        self.sub_region.as_deref()
    }
    /// <p>A name for an area or geographical division, such as a province or state name. For example, <code>British Columbia</code>.</p>
    pub fn region(&self) -> ::std::option::Option<&str> {
        self.region.as_deref()
    }
    /// <p>A country/region specified using <a href="https://www.iso.org/iso-3166-country-codes.html">ISO 3166</a> 3-digit country/region code. For example, <code>CAN</code>.</p>
    pub fn country(&self) -> ::std::option::Option<&str> {
        self.country.as_deref()
    }
    /// <p>A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.</p>
    pub fn postal_code(&self) -> ::std::option::Option<&str> {
        self.postal_code.as_deref()
    }
    /// <p><code>True</code> if the result is interpolated from other known places.</p>
    /// <p><code>False</code> if the Place is a known place.</p>
    /// <p>Not returned when the partner does not provide the information.</p>
    /// <p>For example, returns <code>False</code> for an address location that is found in the partner data, but returns <code>True</code> if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.</p>
    pub fn interpolated(&self) -> ::std::option::Option<bool> {
        self.interpolated
    }
    /// <p>The time zone in which the <code>Place</code> is located. Returned only when using HERE or Grab as the selected partner.</p>
    pub fn time_zone(&self) -> ::std::option::Option<&crate::types::TimeZone> {
        self.time_zone.as_ref()
    }
    /// <p>For addresses with a <code>UnitNumber</code>, the type of unit. For example, <code>Apartment</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri as a data provider.</p>
    /// </note>
    pub fn unit_type(&self) -> ::std::option::Option<&str> {
        self.unit_type.as_deref()
    }
    /// <p>For addresses with multiple units, the unit identifier. Can include numbers and letters, for example <code>3B</code> or <code>Unit 123</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri or Grab as a data provider. Is not returned for <code>SearchPlaceIndexForPosition</code>.</p>
    /// </note>
    pub fn unit_number(&self) -> ::std::option::Option<&str> {
        self.unit_number.as_deref()
    }
    /// <p>The Amazon Location categories that describe this Place.</p>
    /// <p>For more information about using categories, including a list of Amazon Location categories, see <a href="https://docs.aws.amazon.com/location/previous/developerguide/category-filtering.html">Categories and filtering</a>, in the <i>Amazon Location Service developer guide</i>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.categories.is_none()`.
    pub fn categories(&self) -> &[::std::string::String] {
        self.categories.as_deref().unwrap_or_default()
    }
    /// <p>Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supplemental_categories.is_none()`.
    pub fn supplemental_categories(&self) -> &[::std::string::String] {
        self.supplemental_categories.as_deref().unwrap_or_default()
    }
    /// <p>An area that's part of a larger municipality. For example, <code>Blissville </code> is a submunicipality in the Queen County in New York.</p><note>
    /// <p>This property supported by Esri and OpenData. The Esri property is <code>district</code>, and the OpenData property is <code>borough</code>.</p>
    /// </note>
    pub fn sub_municipality(&self) -> ::std::option::Option<&str> {
        self.sub_municipality.as_deref()
    }
}
impl ::std::fmt::Debug for Place {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Place");
        formatter.field("label", &"*** Sensitive Data Redacted ***");
        formatter.field("geometry", &self.geometry);
        formatter.field("address_number", &"*** Sensitive Data Redacted ***");
        formatter.field("street", &"*** Sensitive Data Redacted ***");
        formatter.field("neighborhood", &"*** Sensitive Data Redacted ***");
        formatter.field("municipality", &"*** Sensitive Data Redacted ***");
        formatter.field("sub_region", &"*** Sensitive Data Redacted ***");
        formatter.field("region", &"*** Sensitive Data Redacted ***");
        formatter.field("country", &"*** Sensitive Data Redacted ***");
        formatter.field("postal_code", &"*** Sensitive Data Redacted ***");
        formatter.field("interpolated", &"*** Sensitive Data Redacted ***");
        formatter.field("time_zone", &self.time_zone);
        formatter.field("unit_type", &"*** Sensitive Data Redacted ***");
        formatter.field("unit_number", &"*** Sensitive Data Redacted ***");
        formatter.field("categories", &"*** Sensitive Data Redacted ***");
        formatter.field("supplemental_categories", &"*** Sensitive Data Redacted ***");
        formatter.field("sub_municipality", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl Place {
    /// Creates a new builder-style object to manufacture [`Place`](crate::types::Place).
    pub fn builder() -> crate::types::builders::PlaceBuilder {
        crate::types::builders::PlaceBuilder::default()
    }
}

/// A builder for [`Place`](crate::types::Place).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct PlaceBuilder {
    pub(crate) label: ::std::option::Option<::std::string::String>,
    pub(crate) geometry: ::std::option::Option<crate::types::PlaceGeometry>,
    pub(crate) address_number: ::std::option::Option<::std::string::String>,
    pub(crate) street: ::std::option::Option<::std::string::String>,
    pub(crate) neighborhood: ::std::option::Option<::std::string::String>,
    pub(crate) municipality: ::std::option::Option<::std::string::String>,
    pub(crate) sub_region: ::std::option::Option<::std::string::String>,
    pub(crate) region: ::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) interpolated: ::std::option::Option<bool>,
    pub(crate) time_zone: ::std::option::Option<crate::types::TimeZone>,
    pub(crate) unit_type: ::std::option::Option<::std::string::String>,
    pub(crate) unit_number: ::std::option::Option<::std::string::String>,
    pub(crate) categories: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) supplemental_categories: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) sub_municipality: ::std::option::Option<::std::string::String>,
}
impl PlaceBuilder {
    /// <p>The full name and address of the point of interest such as a city, region, or country. For example, <code>123 Any Street, Any Town, USA</code>.</p>
    pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The full name and address of the point of interest such as a city, region, or country. For example, <code>123 Any Street, Any Town, USA</code>.</p>
    pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.label = input;
        self
    }
    /// <p>The full name and address of the point of interest such as a city, region, or country. For example, <code>123 Any Street, Any Town, USA</code>.</p>
    pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.label
    }
    /// <p>Places uses a point geometry to specify a location or a Place.</p>
    /// This field is required.
    pub fn geometry(mut self, input: crate::types::PlaceGeometry) -> Self {
        self.geometry = ::std::option::Option::Some(input);
        self
    }
    /// <p>Places uses a point geometry to specify a location or a Place.</p>
    pub fn set_geometry(mut self, input: ::std::option::Option<crate::types::PlaceGeometry>) -> Self {
        self.geometry = input;
        self
    }
    /// <p>Places uses a point geometry to specify a location or a Place.</p>
    pub fn get_geometry(&self) -> &::std::option::Option<crate::types::PlaceGeometry> {
        &self.geometry
    }
    /// <p>The numerical portion of an address, such as a building number.</p>
    pub fn address_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.address_number = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The numerical portion of an address, such as a building number.</p>
    pub fn set_address_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.address_number = input;
        self
    }
    /// <p>The numerical portion of an address, such as a building number.</p>
    pub fn get_address_number(&self) -> &::std::option::Option<::std::string::String> {
        &self.address_number
    }
    /// <p>The name for a street or a road to identify a location. For example, <code>Main Street</code>.</p>
    pub fn street(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.street = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name for a street or a road to identify a location. For example, <code>Main Street</code>.</p>
    pub fn set_street(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.street = input;
        self
    }
    /// <p>The name for a street or a road to identify a location. For example, <code>Main Street</code>.</p>
    pub fn get_street(&self) -> &::std::option::Option<::std::string::String> {
        &self.street
    }
    /// <p>The name of a community district. For example, <code>Downtown</code>.</p>
    pub fn neighborhood(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.neighborhood = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of a community district. For example, <code>Downtown</code>.</p>
    pub fn set_neighborhood(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.neighborhood = input;
        self
    }
    /// <p>The name of a community district. For example, <code>Downtown</code>.</p>
    pub fn get_neighborhood(&self) -> &::std::option::Option<::std::string::String> {
        &self.neighborhood
    }
    /// <p>A name for a local area, such as a city or town name. For example, <code>Toronto</code>.</p>
    pub fn municipality(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.municipality = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A name for a local area, such as a city or town name. For example, <code>Toronto</code>.</p>
    pub fn set_municipality(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.municipality = input;
        self
    }
    /// <p>A name for a local area, such as a city or town name. For example, <code>Toronto</code>.</p>
    pub fn get_municipality(&self) -> &::std::option::Option<::std::string::String> {
        &self.municipality
    }
    /// <p>A county, or an area that's part of a larger region. For example, <code>Metro Vancouver</code>.</p>
    pub fn sub_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sub_region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A county, or an area that's part of a larger region. For example, <code>Metro Vancouver</code>.</p>
    pub fn set_sub_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sub_region = input;
        self
    }
    /// <p>A county, or an area that's part of a larger region. For example, <code>Metro Vancouver</code>.</p>
    pub fn get_sub_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.sub_region
    }
    /// <p>A name for an area or geographical division, such as a province or state name. For example, <code>British Columbia</code>.</p>
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A name for an area or geographical division, such as a province or state name. For example, <code>British Columbia</code>.</p>
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.region = input;
        self
    }
    /// <p>A name for an area or geographical division, such as a province or state name. For example, <code>British Columbia</code>.</p>
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.region
    }
    /// <p>A country/region specified using <a href="https://www.iso.org/iso-3166-country-codes.html">ISO 3166</a> 3-digit country/region code. For example, <code>CAN</code>.</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>A country/region specified using <a href="https://www.iso.org/iso-3166-country-codes.html">ISO 3166</a> 3-digit country/region code. For example, <code>CAN</code>.</p>
    pub fn set_country(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.country = input;
        self
    }
    /// <p>A country/region specified using <a href="https://www.iso.org/iso-3166-country-codes.html">ISO 3166</a> 3-digit country/region code. For example, <code>CAN</code>.</p>
    pub fn get_country(&self) -> &::std::option::Option<::std::string::String> {
        &self.country
    }
    /// <p>A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.</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>A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.</p>
    pub fn set_postal_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.postal_code = input;
        self
    }
    /// <p>A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.</p>
    pub fn get_postal_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.postal_code
    }
    /// <p><code>True</code> if the result is interpolated from other known places.</p>
    /// <p><code>False</code> if the Place is a known place.</p>
    /// <p>Not returned when the partner does not provide the information.</p>
    /// <p>For example, returns <code>False</code> for an address location that is found in the partner data, but returns <code>True</code> if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.</p>
    pub fn interpolated(mut self, input: bool) -> Self {
        self.interpolated = ::std::option::Option::Some(input);
        self
    }
    /// <p><code>True</code> if the result is interpolated from other known places.</p>
    /// <p><code>False</code> if the Place is a known place.</p>
    /// <p>Not returned when the partner does not provide the information.</p>
    /// <p>For example, returns <code>False</code> for an address location that is found in the partner data, but returns <code>True</code> if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.</p>
    pub fn set_interpolated(mut self, input: ::std::option::Option<bool>) -> Self {
        self.interpolated = input;
        self
    }
    /// <p><code>True</code> if the result is interpolated from other known places.</p>
    /// <p><code>False</code> if the Place is a known place.</p>
    /// <p>Not returned when the partner does not provide the information.</p>
    /// <p>For example, returns <code>False</code> for an address location that is found in the partner data, but returns <code>True</code> if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.</p>
    pub fn get_interpolated(&self) -> &::std::option::Option<bool> {
        &self.interpolated
    }
    /// <p>The time zone in which the <code>Place</code> is located. Returned only when using HERE or Grab as the selected partner.</p>
    pub fn time_zone(mut self, input: crate::types::TimeZone) -> Self {
        self.time_zone = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time zone in which the <code>Place</code> is located. Returned only when using HERE or Grab as the selected partner.</p>
    pub fn set_time_zone(mut self, input: ::std::option::Option<crate::types::TimeZone>) -> Self {
        self.time_zone = input;
        self
    }
    /// <p>The time zone in which the <code>Place</code> is located. Returned only when using HERE or Grab as the selected partner.</p>
    pub fn get_time_zone(&self) -> &::std::option::Option<crate::types::TimeZone> {
        &self.time_zone
    }
    /// <p>For addresses with a <code>UnitNumber</code>, the type of unit. For example, <code>Apartment</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri as a data provider.</p>
    /// </note>
    pub fn unit_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.unit_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For addresses with a <code>UnitNumber</code>, the type of unit. For example, <code>Apartment</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri as a data provider.</p>
    /// </note>
    pub fn set_unit_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.unit_type = input;
        self
    }
    /// <p>For addresses with a <code>UnitNumber</code>, the type of unit. For example, <code>Apartment</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri as a data provider.</p>
    /// </note>
    pub fn get_unit_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.unit_type
    }
    /// <p>For addresses with multiple units, the unit identifier. Can include numbers and letters, for example <code>3B</code> or <code>Unit 123</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri or Grab as a data provider. Is not returned for <code>SearchPlaceIndexForPosition</code>.</p>
    /// </note>
    pub fn unit_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.unit_number = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For addresses with multiple units, the unit identifier. Can include numbers and letters, for example <code>3B</code> or <code>Unit 123</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri or Grab as a data provider. Is not returned for <code>SearchPlaceIndexForPosition</code>.</p>
    /// </note>
    pub fn set_unit_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.unit_number = input;
        self
    }
    /// <p>For addresses with multiple units, the unit identifier. Can include numbers and letters, for example <code>3B</code> or <code>Unit 123</code>.</p><note>
    /// <p>Returned only for a place index that uses Esri or Grab as a data provider. Is not returned for <code>SearchPlaceIndexForPosition</code>.</p>
    /// </note>
    pub fn get_unit_number(&self) -> &::std::option::Option<::std::string::String> {
        &self.unit_number
    }
    /// Appends an item to `categories`.
    ///
    /// To override the contents of this collection use [`set_categories`](Self::set_categories).
    ///
    /// <p>The Amazon Location categories that describe this Place.</p>
    /// <p>For more information about using categories, including a list of Amazon Location categories, see <a href="https://docs.aws.amazon.com/location/previous/developerguide/category-filtering.html">Categories and filtering</a>, in the <i>Amazon Location Service developer guide</i>.</p>
    pub fn categories(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.categories.unwrap_or_default();
        v.push(input.into());
        self.categories = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Location categories that describe this Place.</p>
    /// <p>For more information about using categories, including a list of Amazon Location categories, see <a href="https://docs.aws.amazon.com/location/previous/developerguide/category-filtering.html">Categories and filtering</a>, in the <i>Amazon Location Service developer guide</i>.</p>
    pub fn set_categories(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.categories = input;
        self
    }
    /// <p>The Amazon Location categories that describe this Place.</p>
    /// <p>For more information about using categories, including a list of Amazon Location categories, see <a href="https://docs.aws.amazon.com/location/previous/developerguide/category-filtering.html">Categories and filtering</a>, in the <i>Amazon Location Service developer guide</i>.</p>
    pub fn get_categories(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.categories
    }
    /// Appends an item to `supplemental_categories`.
    ///
    /// To override the contents of this collection use [`set_supplemental_categories`](Self::set_supplemental_categories).
    ///
    /// <p>Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.</p>
    pub fn supplemental_categories(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.supplemental_categories.unwrap_or_default();
        v.push(input.into());
        self.supplemental_categories = ::std::option::Option::Some(v);
        self
    }
    /// <p>Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.</p>
    pub fn set_supplemental_categories(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.supplemental_categories = input;
        self
    }
    /// <p>Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.</p>
    pub fn get_supplemental_categories(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.supplemental_categories
    }
    /// <p>An area that's part of a larger municipality. For example, <code>Blissville </code> is a submunicipality in the Queen County in New York.</p><note>
    /// <p>This property supported by Esri and OpenData. The Esri property is <code>district</code>, and the OpenData property is <code>borough</code>.</p>
    /// </note>
    pub fn sub_municipality(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sub_municipality = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An area that's part of a larger municipality. For example, <code>Blissville </code> is a submunicipality in the Queen County in New York.</p><note>
    /// <p>This property supported by Esri and OpenData. The Esri property is <code>district</code>, and the OpenData property is <code>borough</code>.</p>
    /// </note>
    pub fn set_sub_municipality(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sub_municipality = input;
        self
    }
    /// <p>An area that's part of a larger municipality. For example, <code>Blissville </code> is a submunicipality in the Queen County in New York.</p><note>
    /// <p>This property supported by Esri and OpenData. The Esri property is <code>district</code>, and the OpenData property is <code>borough</code>.</p>
    /// </note>
    pub fn get_sub_municipality(&self) -> &::std::option::Option<::std::string::String> {
        &self.sub_municipality
    }
    /// Consumes the builder and constructs a [`Place`](crate::types::Place).
    pub fn build(self) -> crate::types::Place {
        crate::types::Place {
            label: self.label,
            geometry: self.geometry,
            address_number: self.address_number,
            street: self.street,
            neighborhood: self.neighborhood,
            municipality: self.municipality,
            sub_region: self.sub_region,
            region: self.region,
            country: self.country,
            postal_code: self.postal_code,
            interpolated: self.interpolated,
            time_zone: self.time_zone,
            unit_type: self.unit_type,
            unit_number: self.unit_number,
            categories: self.categories,
            supplemental_categories: self.supplemental_categories,
            sub_municipality: self.sub_municipality,
        }
    }
}
impl ::std::fmt::Debug for PlaceBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PlaceBuilder");
        formatter.field("label", &"*** Sensitive Data Redacted ***");
        formatter.field("geometry", &self.geometry);
        formatter.field("address_number", &"*** Sensitive Data Redacted ***");
        formatter.field("street", &"*** Sensitive Data Redacted ***");
        formatter.field("neighborhood", &"*** Sensitive Data Redacted ***");
        formatter.field("municipality", &"*** Sensitive Data Redacted ***");
        formatter.field("sub_region", &"*** Sensitive Data Redacted ***");
        formatter.field("region", &"*** Sensitive Data Redacted ***");
        formatter.field("country", &"*** Sensitive Data Redacted ***");
        formatter.field("postal_code", &"*** Sensitive Data Redacted ***");
        formatter.field("interpolated", &"*** Sensitive Data Redacted ***");
        formatter.field("time_zone", &self.time_zone);
        formatter.field("unit_type", &"*** Sensitive Data Redacted ***");
        formatter.field("unit_number", &"*** Sensitive Data Redacted ***");
        formatter.field("categories", &"*** Sensitive Data Redacted ***");
        formatter.field("supplemental_categories", &"*** Sensitive Data Redacted ***");
        formatter.field("sub_municipality", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}