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