aws_sdk_geoplaces/operation/get_place/
_get_place_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)]
5pub struct GetPlaceOutput {
6    /// <p>The <code>PlaceId</code> of the place you wish to receive the information for.</p>
7    pub place_id: ::std::string::String,
8    /// <p>A <code>PlaceType</code> is a category that the result place must belong to.</p>
9    pub place_type: crate::types::PlaceType,
10    /// <p>The localized display name of this result item based on request parameter <code>language</code>.</p>
11    pub title: ::std::string::String,
12    /// <p>The pricing bucket for which the query is charged at.</p>
13    /// <p>For more information on pricing, please visit <a href="https://aws.amazon.com/location/pricing/">Amazon Location Service Pricing</a>.</p>
14    pub pricing_bucket: ::std::string::String,
15    /// <p>The place's address.</p>
16    pub address: ::std::option::Option<crate::types::Address>,
17    /// <p>Boolean indicating if the address provided has been corrected.</p>
18    pub address_number_corrected: ::std::option::Option<bool>,
19    /// <p>Contains details about the postal code of the place/result.</p>
20    pub postal_code_details: ::std::option::Option<::std::vec::Vec<crate::types::PostalCodeDetails>>,
21    /// <p>The position, in longitude and latitude.</p>
22    pub position: ::std::option::Option<::std::vec::Vec<f64>>,
23    /// <p>The bounding box enclosing the geometric shape (area or line) that an individual result covers.</p>
24    /// <p>The bounding box formed is defined as a set of four coordinates: <code>\[{westward lng}, {southern lat}, {eastward lng}, {northern lat}\]</code></p>
25    pub map_view: ::std::option::Option<::std::vec::Vec<f64>>,
26    /// <p>Categories of results that results must belong to.</p>
27    pub categories: ::std::option::Option<::std::vec::Vec<crate::types::Category>>,
28    /// <p>List of food types offered by this result.</p>
29    pub food_types: ::std::option::Option<::std::vec::Vec<crate::types::FoodType>>,
30    /// <p>The Business Chains associated with the place.</p>
31    pub business_chains: ::std::option::Option<::std::vec::Vec<crate::types::BusinessChain>>,
32    /// <p>List of potential contact methods for the result/place.</p>
33    pub contacts: ::std::option::Option<crate::types::Contacts>,
34    /// <p>List of opening hours objects.</p>
35    pub opening_hours: ::std::option::Option<::std::vec::Vec<crate::types::OpeningHours>>,
36    /// <p>Position of the access point in <code>(lng,lat)</code>.</p>
37    pub access_points: ::std::option::Option<::std::vec::Vec<crate::types::AccessPoint>>,
38    /// <p>Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.</p>
39    pub access_restrictions: ::std::option::Option<::std::vec::Vec<crate::types::AccessRestriction>>,
40    /// <p>The time zone in which the place is located.</p>
41    pub time_zone: ::std::option::Option<crate::types::TimeZone>,
42    /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
43    pub political_view: ::std::option::Option<::std::string::String>,
44    /// <p>How the various components of the result's address are pronounced in various languages.</p>
45    pub phonemes: ::std::option::Option<crate::types::PhonemeDetails>,
46    /// <p>The main address corresponding to a place of type Secondary Address.</p>
47    pub main_address: ::std::option::Option<crate::types::RelatedPlace>,
48    /// <p>All secondary addresses that are associated with a main address. A secondary address is one that includes secondary designators, such as a Suite or Unit Number, Building, or Floor information.</p>
49    pub secondary_addresses: ::std::option::Option<::std::vec::Vec<crate::types::RelatedPlace>>,
50    _request_id: Option<String>,
51}
52impl GetPlaceOutput {
53    /// <p>The <code>PlaceId</code> of the place you wish to receive the information for.</p>
54    pub fn place_id(&self) -> &str {
55        use std::ops::Deref;
56        self.place_id.deref()
57    }
58    /// <p>A <code>PlaceType</code> is a category that the result place must belong to.</p>
59    pub fn place_type(&self) -> &crate::types::PlaceType {
60        &self.place_type
61    }
62    /// <p>The localized display name of this result item based on request parameter <code>language</code>.</p>
63    pub fn title(&self) -> &str {
64        use std::ops::Deref;
65        self.title.deref()
66    }
67    /// <p>The pricing bucket for which the query is charged at.</p>
68    /// <p>For more information on pricing, please visit <a href="https://aws.amazon.com/location/pricing/">Amazon Location Service Pricing</a>.</p>
69    pub fn pricing_bucket(&self) -> &str {
70        use std::ops::Deref;
71        self.pricing_bucket.deref()
72    }
73    /// <p>The place's address.</p>
74    pub fn address(&self) -> ::std::option::Option<&crate::types::Address> {
75        self.address.as_ref()
76    }
77    /// <p>Boolean indicating if the address provided has been corrected.</p>
78    pub fn address_number_corrected(&self) -> ::std::option::Option<bool> {
79        self.address_number_corrected
80    }
81    /// <p>Contains details about the postal code of the place/result.</p>
82    ///
83    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.postal_code_details.is_none()`.
84    pub fn postal_code_details(&self) -> &[crate::types::PostalCodeDetails] {
85        self.postal_code_details.as_deref().unwrap_or_default()
86    }
87    /// <p>The position, in longitude and latitude.</p>
88    ///
89    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.position.is_none()`.
90    pub fn position(&self) -> &[f64] {
91        self.position.as_deref().unwrap_or_default()
92    }
93    /// <p>The bounding box enclosing the geometric shape (area or line) that an individual result covers.</p>
94    /// <p>The bounding box formed is defined as a set of four coordinates: <code>\[{westward lng}, {southern lat}, {eastward lng}, {northern lat}\]</code></p>
95    ///
96    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.map_view.is_none()`.
97    pub fn map_view(&self) -> &[f64] {
98        self.map_view.as_deref().unwrap_or_default()
99    }
100    /// <p>Categories of results that results must belong to.</p>
101    ///
102    /// 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()`.
103    pub fn categories(&self) -> &[crate::types::Category] {
104        self.categories.as_deref().unwrap_or_default()
105    }
106    /// <p>List of food types offered by this result.</p>
107    ///
108    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.food_types.is_none()`.
109    pub fn food_types(&self) -> &[crate::types::FoodType] {
110        self.food_types.as_deref().unwrap_or_default()
111    }
112    /// <p>The Business Chains associated with the place.</p>
113    ///
114    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.business_chains.is_none()`.
115    pub fn business_chains(&self) -> &[crate::types::BusinessChain] {
116        self.business_chains.as_deref().unwrap_or_default()
117    }
118    /// <p>List of potential contact methods for the result/place.</p>
119    pub fn contacts(&self) -> ::std::option::Option<&crate::types::Contacts> {
120        self.contacts.as_ref()
121    }
122    /// <p>List of opening hours objects.</p>
123    ///
124    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.opening_hours.is_none()`.
125    pub fn opening_hours(&self) -> &[crate::types::OpeningHours] {
126        self.opening_hours.as_deref().unwrap_or_default()
127    }
128    /// <p>Position of the access point in <code>(lng,lat)</code>.</p>
129    ///
130    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.access_points.is_none()`.
131    pub fn access_points(&self) -> &[crate::types::AccessPoint] {
132        self.access_points.as_deref().unwrap_or_default()
133    }
134    /// <p>Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.</p>
135    ///
136    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.access_restrictions.is_none()`.
137    pub fn access_restrictions(&self) -> &[crate::types::AccessRestriction] {
138        self.access_restrictions.as_deref().unwrap_or_default()
139    }
140    /// <p>The time zone in which the place is located.</p>
141    pub fn time_zone(&self) -> ::std::option::Option<&crate::types::TimeZone> {
142        self.time_zone.as_ref()
143    }
144    /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
145    pub fn political_view(&self) -> ::std::option::Option<&str> {
146        self.political_view.as_deref()
147    }
148    /// <p>How the various components of the result's address are pronounced in various languages.</p>
149    pub fn phonemes(&self) -> ::std::option::Option<&crate::types::PhonemeDetails> {
150        self.phonemes.as_ref()
151    }
152    /// <p>The main address corresponding to a place of type Secondary Address.</p>
153    pub fn main_address(&self) -> ::std::option::Option<&crate::types::RelatedPlace> {
154        self.main_address.as_ref()
155    }
156    /// <p>All secondary addresses that are associated with a main address. A secondary address is one that includes secondary designators, such as a Suite or Unit Number, Building, or Floor information.</p>
157    ///
158    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.secondary_addresses.is_none()`.
159    pub fn secondary_addresses(&self) -> &[crate::types::RelatedPlace] {
160        self.secondary_addresses.as_deref().unwrap_or_default()
161    }
162}
163impl ::std::fmt::Debug for GetPlaceOutput {
164    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
165        let mut formatter = f.debug_struct("GetPlaceOutput");
166        formatter.field("place_id", &"*** Sensitive Data Redacted ***");
167        formatter.field("place_type", &"*** Sensitive Data Redacted ***");
168        formatter.field("title", &"*** Sensitive Data Redacted ***");
169        formatter.field("pricing_bucket", &self.pricing_bucket);
170        formatter.field("address", &self.address);
171        formatter.field("address_number_corrected", &"*** Sensitive Data Redacted ***");
172        formatter.field("postal_code_details", &self.postal_code_details);
173        formatter.field("position", &"*** Sensitive Data Redacted ***");
174        formatter.field("map_view", &"*** Sensitive Data Redacted ***");
175        formatter.field("categories", &self.categories);
176        formatter.field("food_types", &self.food_types);
177        formatter.field("business_chains", &self.business_chains);
178        formatter.field("contacts", &self.contacts);
179        formatter.field("opening_hours", &self.opening_hours);
180        formatter.field("access_points", &self.access_points);
181        formatter.field("access_restrictions", &self.access_restrictions);
182        formatter.field("time_zone", &self.time_zone);
183        formatter.field("political_view", &"*** Sensitive Data Redacted ***");
184        formatter.field("phonemes", &self.phonemes);
185        formatter.field("main_address", &self.main_address);
186        formatter.field("secondary_addresses", &self.secondary_addresses);
187        formatter.field("_request_id", &self._request_id);
188        formatter.finish()
189    }
190}
191impl ::aws_types::request_id::RequestId for GetPlaceOutput {
192    fn request_id(&self) -> Option<&str> {
193        self._request_id.as_deref()
194    }
195}
196impl GetPlaceOutput {
197    /// Creates a new builder-style object to manufacture [`GetPlaceOutput`](crate::operation::get_place::GetPlaceOutput).
198    pub fn builder() -> crate::operation::get_place::builders::GetPlaceOutputBuilder {
199        crate::operation::get_place::builders::GetPlaceOutputBuilder::default()
200    }
201}
202
203/// A builder for [`GetPlaceOutput`](crate::operation::get_place::GetPlaceOutput).
204#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
205#[non_exhaustive]
206pub struct GetPlaceOutputBuilder {
207    pub(crate) place_id: ::std::option::Option<::std::string::String>,
208    pub(crate) place_type: ::std::option::Option<crate::types::PlaceType>,
209    pub(crate) title: ::std::option::Option<::std::string::String>,
210    pub(crate) pricing_bucket: ::std::option::Option<::std::string::String>,
211    pub(crate) address: ::std::option::Option<crate::types::Address>,
212    pub(crate) address_number_corrected: ::std::option::Option<bool>,
213    pub(crate) postal_code_details: ::std::option::Option<::std::vec::Vec<crate::types::PostalCodeDetails>>,
214    pub(crate) position: ::std::option::Option<::std::vec::Vec<f64>>,
215    pub(crate) map_view: ::std::option::Option<::std::vec::Vec<f64>>,
216    pub(crate) categories: ::std::option::Option<::std::vec::Vec<crate::types::Category>>,
217    pub(crate) food_types: ::std::option::Option<::std::vec::Vec<crate::types::FoodType>>,
218    pub(crate) business_chains: ::std::option::Option<::std::vec::Vec<crate::types::BusinessChain>>,
219    pub(crate) contacts: ::std::option::Option<crate::types::Contacts>,
220    pub(crate) opening_hours: ::std::option::Option<::std::vec::Vec<crate::types::OpeningHours>>,
221    pub(crate) access_points: ::std::option::Option<::std::vec::Vec<crate::types::AccessPoint>>,
222    pub(crate) access_restrictions: ::std::option::Option<::std::vec::Vec<crate::types::AccessRestriction>>,
223    pub(crate) time_zone: ::std::option::Option<crate::types::TimeZone>,
224    pub(crate) political_view: ::std::option::Option<::std::string::String>,
225    pub(crate) phonemes: ::std::option::Option<crate::types::PhonemeDetails>,
226    pub(crate) main_address: ::std::option::Option<crate::types::RelatedPlace>,
227    pub(crate) secondary_addresses: ::std::option::Option<::std::vec::Vec<crate::types::RelatedPlace>>,
228    _request_id: Option<String>,
229}
230impl GetPlaceOutputBuilder {
231    /// <p>The <code>PlaceId</code> of the place you wish to receive the information for.</p>
232    /// This field is required.
233    pub fn place_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234        self.place_id = ::std::option::Option::Some(input.into());
235        self
236    }
237    /// <p>The <code>PlaceId</code> of the place you wish to receive the information for.</p>
238    pub fn set_place_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
239        self.place_id = input;
240        self
241    }
242    /// <p>The <code>PlaceId</code> of the place you wish to receive the information for.</p>
243    pub fn get_place_id(&self) -> &::std::option::Option<::std::string::String> {
244        &self.place_id
245    }
246    /// <p>A <code>PlaceType</code> is a category that the result place must belong to.</p>
247    /// This field is required.
248    pub fn place_type(mut self, input: crate::types::PlaceType) -> Self {
249        self.place_type = ::std::option::Option::Some(input);
250        self
251    }
252    /// <p>A <code>PlaceType</code> is a category that the result place must belong to.</p>
253    pub fn set_place_type(mut self, input: ::std::option::Option<crate::types::PlaceType>) -> Self {
254        self.place_type = input;
255        self
256    }
257    /// <p>A <code>PlaceType</code> is a category that the result place must belong to.</p>
258    pub fn get_place_type(&self) -> &::std::option::Option<crate::types::PlaceType> {
259        &self.place_type
260    }
261    /// <p>The localized display name of this result item based on request parameter <code>language</code>.</p>
262    /// This field is required.
263    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264        self.title = ::std::option::Option::Some(input.into());
265        self
266    }
267    /// <p>The localized display name of this result item based on request parameter <code>language</code>.</p>
268    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269        self.title = input;
270        self
271    }
272    /// <p>The localized display name of this result item based on request parameter <code>language</code>.</p>
273    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
274        &self.title
275    }
276    /// <p>The pricing bucket for which the query is charged at.</p>
277    /// <p>For more information on pricing, please visit <a href="https://aws.amazon.com/location/pricing/">Amazon Location Service Pricing</a>.</p>
278    /// This field is required.
279    pub fn pricing_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
280        self.pricing_bucket = ::std::option::Option::Some(input.into());
281        self
282    }
283    /// <p>The pricing bucket for which the query is charged at.</p>
284    /// <p>For more information on pricing, please visit <a href="https://aws.amazon.com/location/pricing/">Amazon Location Service Pricing</a>.</p>
285    pub fn set_pricing_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
286        self.pricing_bucket = input;
287        self
288    }
289    /// <p>The pricing bucket for which the query is charged at.</p>
290    /// <p>For more information on pricing, please visit <a href="https://aws.amazon.com/location/pricing/">Amazon Location Service Pricing</a>.</p>
291    pub fn get_pricing_bucket(&self) -> &::std::option::Option<::std::string::String> {
292        &self.pricing_bucket
293    }
294    /// <p>The place's address.</p>
295    pub fn address(mut self, input: crate::types::Address) -> Self {
296        self.address = ::std::option::Option::Some(input);
297        self
298    }
299    /// <p>The place's address.</p>
300    pub fn set_address(mut self, input: ::std::option::Option<crate::types::Address>) -> Self {
301        self.address = input;
302        self
303    }
304    /// <p>The place's address.</p>
305    pub fn get_address(&self) -> &::std::option::Option<crate::types::Address> {
306        &self.address
307    }
308    /// <p>Boolean indicating if the address provided has been corrected.</p>
309    pub fn address_number_corrected(mut self, input: bool) -> Self {
310        self.address_number_corrected = ::std::option::Option::Some(input);
311        self
312    }
313    /// <p>Boolean indicating if the address provided has been corrected.</p>
314    pub fn set_address_number_corrected(mut self, input: ::std::option::Option<bool>) -> Self {
315        self.address_number_corrected = input;
316        self
317    }
318    /// <p>Boolean indicating if the address provided has been corrected.</p>
319    pub fn get_address_number_corrected(&self) -> &::std::option::Option<bool> {
320        &self.address_number_corrected
321    }
322    /// Appends an item to `postal_code_details`.
323    ///
324    /// To override the contents of this collection use [`set_postal_code_details`](Self::set_postal_code_details).
325    ///
326    /// <p>Contains details about the postal code of the place/result.</p>
327    pub fn postal_code_details(mut self, input: crate::types::PostalCodeDetails) -> Self {
328        let mut v = self.postal_code_details.unwrap_or_default();
329        v.push(input);
330        self.postal_code_details = ::std::option::Option::Some(v);
331        self
332    }
333    /// <p>Contains details about the postal code of the place/result.</p>
334    pub fn set_postal_code_details(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PostalCodeDetails>>) -> Self {
335        self.postal_code_details = input;
336        self
337    }
338    /// <p>Contains details about the postal code of the place/result.</p>
339    pub fn get_postal_code_details(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PostalCodeDetails>> {
340        &self.postal_code_details
341    }
342    /// Appends an item to `position`.
343    ///
344    /// To override the contents of this collection use [`set_position`](Self::set_position).
345    ///
346    /// <p>The position, in longitude and latitude.</p>
347    pub fn position(mut self, input: f64) -> Self {
348        let mut v = self.position.unwrap_or_default();
349        v.push(input);
350        self.position = ::std::option::Option::Some(v);
351        self
352    }
353    /// <p>The position, in longitude and latitude.</p>
354    pub fn set_position(mut self, input: ::std::option::Option<::std::vec::Vec<f64>>) -> Self {
355        self.position = input;
356        self
357    }
358    /// <p>The position, in longitude and latitude.</p>
359    pub fn get_position(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
360        &self.position
361    }
362    /// Appends an item to `map_view`.
363    ///
364    /// To override the contents of this collection use [`set_map_view`](Self::set_map_view).
365    ///
366    /// <p>The bounding box enclosing the geometric shape (area or line) that an individual result covers.</p>
367    /// <p>The bounding box formed is defined as a set of four coordinates: <code>\[{westward lng}, {southern lat}, {eastward lng}, {northern lat}\]</code></p>
368    pub fn map_view(mut self, input: f64) -> Self {
369        let mut v = self.map_view.unwrap_or_default();
370        v.push(input);
371        self.map_view = ::std::option::Option::Some(v);
372        self
373    }
374    /// <p>The bounding box enclosing the geometric shape (area or line) that an individual result covers.</p>
375    /// <p>The bounding box formed is defined as a set of four coordinates: <code>\[{westward lng}, {southern lat}, {eastward lng}, {northern lat}\]</code></p>
376    pub fn set_map_view(mut self, input: ::std::option::Option<::std::vec::Vec<f64>>) -> Self {
377        self.map_view = input;
378        self
379    }
380    /// <p>The bounding box enclosing the geometric shape (area or line) that an individual result covers.</p>
381    /// <p>The bounding box formed is defined as a set of four coordinates: <code>\[{westward lng}, {southern lat}, {eastward lng}, {northern lat}\]</code></p>
382    pub fn get_map_view(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
383        &self.map_view
384    }
385    /// Appends an item to `categories`.
386    ///
387    /// To override the contents of this collection use [`set_categories`](Self::set_categories).
388    ///
389    /// <p>Categories of results that results must belong to.</p>
390    pub fn categories(mut self, input: crate::types::Category) -> Self {
391        let mut v = self.categories.unwrap_or_default();
392        v.push(input);
393        self.categories = ::std::option::Option::Some(v);
394        self
395    }
396    /// <p>Categories of results that results must belong to.</p>
397    pub fn set_categories(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Category>>) -> Self {
398        self.categories = input;
399        self
400    }
401    /// <p>Categories of results that results must belong to.</p>
402    pub fn get_categories(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Category>> {
403        &self.categories
404    }
405    /// Appends an item to `food_types`.
406    ///
407    /// To override the contents of this collection use [`set_food_types`](Self::set_food_types).
408    ///
409    /// <p>List of food types offered by this result.</p>
410    pub fn food_types(mut self, input: crate::types::FoodType) -> Self {
411        let mut v = self.food_types.unwrap_or_default();
412        v.push(input);
413        self.food_types = ::std::option::Option::Some(v);
414        self
415    }
416    /// <p>List of food types offered by this result.</p>
417    pub fn set_food_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FoodType>>) -> Self {
418        self.food_types = input;
419        self
420    }
421    /// <p>List of food types offered by this result.</p>
422    pub fn get_food_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FoodType>> {
423        &self.food_types
424    }
425    /// Appends an item to `business_chains`.
426    ///
427    /// To override the contents of this collection use [`set_business_chains`](Self::set_business_chains).
428    ///
429    /// <p>The Business Chains associated with the place.</p>
430    pub fn business_chains(mut self, input: crate::types::BusinessChain) -> Self {
431        let mut v = self.business_chains.unwrap_or_default();
432        v.push(input);
433        self.business_chains = ::std::option::Option::Some(v);
434        self
435    }
436    /// <p>The Business Chains associated with the place.</p>
437    pub fn set_business_chains(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BusinessChain>>) -> Self {
438        self.business_chains = input;
439        self
440    }
441    /// <p>The Business Chains associated with the place.</p>
442    pub fn get_business_chains(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BusinessChain>> {
443        &self.business_chains
444    }
445    /// <p>List of potential contact methods for the result/place.</p>
446    pub fn contacts(mut self, input: crate::types::Contacts) -> Self {
447        self.contacts = ::std::option::Option::Some(input);
448        self
449    }
450    /// <p>List of potential contact methods for the result/place.</p>
451    pub fn set_contacts(mut self, input: ::std::option::Option<crate::types::Contacts>) -> Self {
452        self.contacts = input;
453        self
454    }
455    /// <p>List of potential contact methods for the result/place.</p>
456    pub fn get_contacts(&self) -> &::std::option::Option<crate::types::Contacts> {
457        &self.contacts
458    }
459    /// Appends an item to `opening_hours`.
460    ///
461    /// To override the contents of this collection use [`set_opening_hours`](Self::set_opening_hours).
462    ///
463    /// <p>List of opening hours objects.</p>
464    pub fn opening_hours(mut self, input: crate::types::OpeningHours) -> Self {
465        let mut v = self.opening_hours.unwrap_or_default();
466        v.push(input);
467        self.opening_hours = ::std::option::Option::Some(v);
468        self
469    }
470    /// <p>List of opening hours objects.</p>
471    pub fn set_opening_hours(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OpeningHours>>) -> Self {
472        self.opening_hours = input;
473        self
474    }
475    /// <p>List of opening hours objects.</p>
476    pub fn get_opening_hours(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OpeningHours>> {
477        &self.opening_hours
478    }
479    /// Appends an item to `access_points`.
480    ///
481    /// To override the contents of this collection use [`set_access_points`](Self::set_access_points).
482    ///
483    /// <p>Position of the access point in <code>(lng,lat)</code>.</p>
484    pub fn access_points(mut self, input: crate::types::AccessPoint) -> Self {
485        let mut v = self.access_points.unwrap_or_default();
486        v.push(input);
487        self.access_points = ::std::option::Option::Some(v);
488        self
489    }
490    /// <p>Position of the access point in <code>(lng,lat)</code>.</p>
491    pub fn set_access_points(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccessPoint>>) -> Self {
492        self.access_points = input;
493        self
494    }
495    /// <p>Position of the access point in <code>(lng,lat)</code>.</p>
496    pub fn get_access_points(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessPoint>> {
497        &self.access_points
498    }
499    /// Appends an item to `access_restrictions`.
500    ///
501    /// To override the contents of this collection use [`set_access_restrictions`](Self::set_access_restrictions).
502    ///
503    /// <p>Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.</p>
504    pub fn access_restrictions(mut self, input: crate::types::AccessRestriction) -> Self {
505        let mut v = self.access_restrictions.unwrap_or_default();
506        v.push(input);
507        self.access_restrictions = ::std::option::Option::Some(v);
508        self
509    }
510    /// <p>Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.</p>
511    pub fn set_access_restrictions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccessRestriction>>) -> Self {
512        self.access_restrictions = input;
513        self
514    }
515    /// <p>Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.</p>
516    pub fn get_access_restrictions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessRestriction>> {
517        &self.access_restrictions
518    }
519    /// <p>The time zone in which the place is located.</p>
520    pub fn time_zone(mut self, input: crate::types::TimeZone) -> Self {
521        self.time_zone = ::std::option::Option::Some(input);
522        self
523    }
524    /// <p>The time zone in which the place is located.</p>
525    pub fn set_time_zone(mut self, input: ::std::option::Option<crate::types::TimeZone>) -> Self {
526        self.time_zone = input;
527        self
528    }
529    /// <p>The time zone in which the place is located.</p>
530    pub fn get_time_zone(&self) -> &::std::option::Option<crate::types::TimeZone> {
531        &self.time_zone
532    }
533    /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
534    pub fn political_view(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
535        self.political_view = ::std::option::Option::Some(input.into());
536        self
537    }
538    /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
539    pub fn set_political_view(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
540        self.political_view = input;
541        self
542    }
543    /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
544    pub fn get_political_view(&self) -> &::std::option::Option<::std::string::String> {
545        &self.political_view
546    }
547    /// <p>How the various components of the result's address are pronounced in various languages.</p>
548    pub fn phonemes(mut self, input: crate::types::PhonemeDetails) -> Self {
549        self.phonemes = ::std::option::Option::Some(input);
550        self
551    }
552    /// <p>How the various components of the result's address are pronounced in various languages.</p>
553    pub fn set_phonemes(mut self, input: ::std::option::Option<crate::types::PhonemeDetails>) -> Self {
554        self.phonemes = input;
555        self
556    }
557    /// <p>How the various components of the result's address are pronounced in various languages.</p>
558    pub fn get_phonemes(&self) -> &::std::option::Option<crate::types::PhonemeDetails> {
559        &self.phonemes
560    }
561    /// <p>The main address corresponding to a place of type Secondary Address.</p>
562    pub fn main_address(mut self, input: crate::types::RelatedPlace) -> Self {
563        self.main_address = ::std::option::Option::Some(input);
564        self
565    }
566    /// <p>The main address corresponding to a place of type Secondary Address.</p>
567    pub fn set_main_address(mut self, input: ::std::option::Option<crate::types::RelatedPlace>) -> Self {
568        self.main_address = input;
569        self
570    }
571    /// <p>The main address corresponding to a place of type Secondary Address.</p>
572    pub fn get_main_address(&self) -> &::std::option::Option<crate::types::RelatedPlace> {
573        &self.main_address
574    }
575    /// Appends an item to `secondary_addresses`.
576    ///
577    /// To override the contents of this collection use [`set_secondary_addresses`](Self::set_secondary_addresses).
578    ///
579    /// <p>All secondary addresses that are associated with a main address. A secondary address is one that includes secondary designators, such as a Suite or Unit Number, Building, or Floor information.</p>
580    pub fn secondary_addresses(mut self, input: crate::types::RelatedPlace) -> Self {
581        let mut v = self.secondary_addresses.unwrap_or_default();
582        v.push(input);
583        self.secondary_addresses = ::std::option::Option::Some(v);
584        self
585    }
586    /// <p>All secondary addresses that are associated with a main address. A secondary address is one that includes secondary designators, such as a Suite or Unit Number, Building, or Floor information.</p>
587    pub fn set_secondary_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RelatedPlace>>) -> Self {
588        self.secondary_addresses = input;
589        self
590    }
591    /// <p>All secondary addresses that are associated with a main address. A secondary address is one that includes secondary designators, such as a Suite or Unit Number, Building, or Floor information.</p>
592    pub fn get_secondary_addresses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RelatedPlace>> {
593        &self.secondary_addresses
594    }
595    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
596        self._request_id = Some(request_id.into());
597        self
598    }
599
600    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
601        self._request_id = request_id;
602        self
603    }
604    /// Consumes the builder and constructs a [`GetPlaceOutput`](crate::operation::get_place::GetPlaceOutput).
605    /// This method will fail if any of the following fields are not set:
606    /// - [`place_id`](crate::operation::get_place::builders::GetPlaceOutputBuilder::place_id)
607    /// - [`place_type`](crate::operation::get_place::builders::GetPlaceOutputBuilder::place_type)
608    /// - [`title`](crate::operation::get_place::builders::GetPlaceOutputBuilder::title)
609    /// - [`pricing_bucket`](crate::operation::get_place::builders::GetPlaceOutputBuilder::pricing_bucket)
610    pub fn build(self) -> ::std::result::Result<crate::operation::get_place::GetPlaceOutput, ::aws_smithy_types::error::operation::BuildError> {
611        ::std::result::Result::Ok(crate::operation::get_place::GetPlaceOutput {
612            place_id: self.place_id.ok_or_else(|| {
613                ::aws_smithy_types::error::operation::BuildError::missing_field(
614                    "place_id",
615                    "place_id was not specified but it is required when building GetPlaceOutput",
616                )
617            })?,
618            place_type: self.place_type.ok_or_else(|| {
619                ::aws_smithy_types::error::operation::BuildError::missing_field(
620                    "place_type",
621                    "place_type was not specified but it is required when building GetPlaceOutput",
622                )
623            })?,
624            title: self.title.ok_or_else(|| {
625                ::aws_smithy_types::error::operation::BuildError::missing_field(
626                    "title",
627                    "title was not specified but it is required when building GetPlaceOutput",
628                )
629            })?,
630            pricing_bucket: self.pricing_bucket.ok_or_else(|| {
631                ::aws_smithy_types::error::operation::BuildError::missing_field(
632                    "pricing_bucket",
633                    "pricing_bucket was not specified but it is required when building GetPlaceOutput",
634                )
635            })?,
636            address: self.address,
637            address_number_corrected: self.address_number_corrected,
638            postal_code_details: self.postal_code_details,
639            position: self.position,
640            map_view: self.map_view,
641            categories: self.categories,
642            food_types: self.food_types,
643            business_chains: self.business_chains,
644            contacts: self.contacts,
645            opening_hours: self.opening_hours,
646            access_points: self.access_points,
647            access_restrictions: self.access_restrictions,
648            time_zone: self.time_zone,
649            political_view: self.political_view,
650            phonemes: self.phonemes,
651            main_address: self.main_address,
652            secondary_addresses: self.secondary_addresses,
653            _request_id: self._request_id,
654        })
655    }
656}
657impl ::std::fmt::Debug for GetPlaceOutputBuilder {
658    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
659        let mut formatter = f.debug_struct("GetPlaceOutputBuilder");
660        formatter.field("place_id", &"*** Sensitive Data Redacted ***");
661        formatter.field("place_type", &"*** Sensitive Data Redacted ***");
662        formatter.field("title", &"*** Sensitive Data Redacted ***");
663        formatter.field("pricing_bucket", &self.pricing_bucket);
664        formatter.field("address", &self.address);
665        formatter.field("address_number_corrected", &"*** Sensitive Data Redacted ***");
666        formatter.field("postal_code_details", &self.postal_code_details);
667        formatter.field("position", &"*** Sensitive Data Redacted ***");
668        formatter.field("map_view", &"*** Sensitive Data Redacted ***");
669        formatter.field("categories", &self.categories);
670        formatter.field("food_types", &self.food_types);
671        formatter.field("business_chains", &self.business_chains);
672        formatter.field("contacts", &self.contacts);
673        formatter.field("opening_hours", &self.opening_hours);
674        formatter.field("access_points", &self.access_points);
675        formatter.field("access_restrictions", &self.access_restrictions);
676        formatter.field("time_zone", &self.time_zone);
677        formatter.field("political_view", &"*** Sensitive Data Redacted ***");
678        formatter.field("phonemes", &self.phonemes);
679        formatter.field("main_address", &self.main_address);
680        formatter.field("secondary_addresses", &self.secondary_addresses);
681        formatter.field("_request_id", &self._request_id);
682        formatter.finish()
683    }
684}