1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetPlaceOutput {
6 pub place_id: ::std::string::String,
8 pub place_type: crate::types::PlaceType,
10 pub title: ::std::string::String,
12 pub pricing_bucket: ::std::string::String,
15 pub address: ::std::option::Option<crate::types::Address>,
17 pub address_number_corrected: ::std::option::Option<bool>,
19 pub postal_code_details: ::std::option::Option<::std::vec::Vec<crate::types::PostalCodeDetails>>,
21 pub position: ::std::option::Option<::std::vec::Vec<f64>>,
23 pub map_view: ::std::option::Option<::std::vec::Vec<f64>>,
26 pub categories: ::std::option::Option<::std::vec::Vec<crate::types::Category>>,
28 pub food_types: ::std::option::Option<::std::vec::Vec<crate::types::FoodType>>,
30 pub business_chains: ::std::option::Option<::std::vec::Vec<crate::types::BusinessChain>>,
32 pub contacts: ::std::option::Option<crate::types::Contacts>,
34 pub opening_hours: ::std::option::Option<::std::vec::Vec<crate::types::OpeningHours>>,
36 pub access_points: ::std::option::Option<::std::vec::Vec<crate::types::AccessPoint>>,
38 pub access_restrictions: ::std::option::Option<::std::vec::Vec<crate::types::AccessRestriction>>,
40 pub time_zone: ::std::option::Option<crate::types::TimeZone>,
42 pub political_view: ::std::option::Option<::std::string::String>,
44 pub phonemes: ::std::option::Option<crate::types::PhonemeDetails>,
46 pub main_address: ::std::option::Option<crate::types::RelatedPlace>,
48 pub secondary_addresses: ::std::option::Option<::std::vec::Vec<crate::types::RelatedPlace>>,
50 _request_id: Option<String>,
51}
52impl GetPlaceOutput {
53 pub fn place_id(&self) -> &str {
55 use std::ops::Deref;
56 self.place_id.deref()
57 }
58 pub fn place_type(&self) -> &crate::types::PlaceType {
60 &self.place_type
61 }
62 pub fn title(&self) -> &str {
64 use std::ops::Deref;
65 self.title.deref()
66 }
67 pub fn pricing_bucket(&self) -> &str {
70 use std::ops::Deref;
71 self.pricing_bucket.deref()
72 }
73 pub fn address(&self) -> ::std::option::Option<&crate::types::Address> {
75 self.address.as_ref()
76 }
77 pub fn address_number_corrected(&self) -> ::std::option::Option<bool> {
79 self.address_number_corrected
80 }
81 pub fn postal_code_details(&self) -> &[crate::types::PostalCodeDetails] {
85 self.postal_code_details.as_deref().unwrap_or_default()
86 }
87 pub fn position(&self) -> &[f64] {
91 self.position.as_deref().unwrap_or_default()
92 }
93 pub fn map_view(&self) -> &[f64] {
98 self.map_view.as_deref().unwrap_or_default()
99 }
100 pub fn categories(&self) -> &[crate::types::Category] {
104 self.categories.as_deref().unwrap_or_default()
105 }
106 pub fn food_types(&self) -> &[crate::types::FoodType] {
110 self.food_types.as_deref().unwrap_or_default()
111 }
112 pub fn business_chains(&self) -> &[crate::types::BusinessChain] {
116 self.business_chains.as_deref().unwrap_or_default()
117 }
118 pub fn contacts(&self) -> ::std::option::Option<&crate::types::Contacts> {
120 self.contacts.as_ref()
121 }
122 pub fn opening_hours(&self) -> &[crate::types::OpeningHours] {
126 self.opening_hours.as_deref().unwrap_or_default()
127 }
128 pub fn access_points(&self) -> &[crate::types::AccessPoint] {
132 self.access_points.as_deref().unwrap_or_default()
133 }
134 pub fn access_restrictions(&self) -> &[crate::types::AccessRestriction] {
138 self.access_restrictions.as_deref().unwrap_or_default()
139 }
140 pub fn time_zone(&self) -> ::std::option::Option<&crate::types::TimeZone> {
142 self.time_zone.as_ref()
143 }
144 pub fn political_view(&self) -> ::std::option::Option<&str> {
146 self.political_view.as_deref()
147 }
148 pub fn phonemes(&self) -> ::std::option::Option<&crate::types::PhonemeDetails> {
150 self.phonemes.as_ref()
151 }
152 pub fn main_address(&self) -> ::std::option::Option<&crate::types::RelatedPlace> {
154 self.main_address.as_ref()
155 }
156 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 pub fn builder() -> crate::operation::get_place::builders::GetPlaceOutputBuilder {
199 crate::operation::get_place::builders::GetPlaceOutputBuilder::default()
200 }
201}
202
203#[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 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 pub fn set_place_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
239 self.place_id = input;
240 self
241 }
242 pub fn get_place_id(&self) -> &::std::option::Option<::std::string::String> {
244 &self.place_id
245 }
246 pub fn place_type(mut self, input: crate::types::PlaceType) -> Self {
249 self.place_type = ::std::option::Option::Some(input);
250 self
251 }
252 pub fn set_place_type(mut self, input: ::std::option::Option<crate::types::PlaceType>) -> Self {
254 self.place_type = input;
255 self
256 }
257 pub fn get_place_type(&self) -> &::std::option::Option<crate::types::PlaceType> {
259 &self.place_type
260 }
261 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 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269 self.title = input;
270 self
271 }
272 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
274 &self.title
275 }
276 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 pub fn set_pricing_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
286 self.pricing_bucket = input;
287 self
288 }
289 pub fn get_pricing_bucket(&self) -> &::std::option::Option<::std::string::String> {
292 &self.pricing_bucket
293 }
294 pub fn address(mut self, input: crate::types::Address) -> Self {
296 self.address = ::std::option::Option::Some(input);
297 self
298 }
299 pub fn set_address(mut self, input: ::std::option::Option<crate::types::Address>) -> Self {
301 self.address = input;
302 self
303 }
304 pub fn get_address(&self) -> &::std::option::Option<crate::types::Address> {
306 &self.address
307 }
308 pub fn address_number_corrected(mut self, input: bool) -> Self {
310 self.address_number_corrected = ::std::option::Option::Some(input);
311 self
312 }
313 pub fn set_address_number_corrected(mut self, input: ::std::option::Option<bool>) -> Self {
315 self.address_number_corrected = input;
316 self
317 }
318 pub fn get_address_number_corrected(&self) -> &::std::option::Option<bool> {
320 &self.address_number_corrected
321 }
322 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 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 pub fn get_postal_code_details(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PostalCodeDetails>> {
340 &self.postal_code_details
341 }
342 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 pub fn set_position(mut self, input: ::std::option::Option<::std::vec::Vec<f64>>) -> Self {
355 self.position = input;
356 self
357 }
358 pub fn get_position(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
360 &self.position
361 }
362 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 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 pub fn get_map_view(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
383 &self.map_view
384 }
385 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 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 pub fn get_categories(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Category>> {
403 &self.categories
404 }
405 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 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 pub fn get_food_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FoodType>> {
423 &self.food_types
424 }
425 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 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 pub fn get_business_chains(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BusinessChain>> {
443 &self.business_chains
444 }
445 pub fn contacts(mut self, input: crate::types::Contacts) -> Self {
447 self.contacts = ::std::option::Option::Some(input);
448 self
449 }
450 pub fn set_contacts(mut self, input: ::std::option::Option<crate::types::Contacts>) -> Self {
452 self.contacts = input;
453 self
454 }
455 pub fn get_contacts(&self) -> &::std::option::Option<crate::types::Contacts> {
457 &self.contacts
458 }
459 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 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 pub fn get_opening_hours(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OpeningHours>> {
477 &self.opening_hours
478 }
479 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 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 pub fn get_access_points(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessPoint>> {
497 &self.access_points
498 }
499 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 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 pub fn get_access_restrictions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessRestriction>> {
517 &self.access_restrictions
518 }
519 pub fn time_zone(mut self, input: crate::types::TimeZone) -> Self {
521 self.time_zone = ::std::option::Option::Some(input);
522 self
523 }
524 pub fn set_time_zone(mut self, input: ::std::option::Option<crate::types::TimeZone>) -> Self {
526 self.time_zone = input;
527 self
528 }
529 pub fn get_time_zone(&self) -> &::std::option::Option<crate::types::TimeZone> {
531 &self.time_zone
532 }
533 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 pub fn set_political_view(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
540 self.political_view = input;
541 self
542 }
543 pub fn get_political_view(&self) -> &::std::option::Option<::std::string::String> {
545 &self.political_view
546 }
547 pub fn phonemes(mut self, input: crate::types::PhonemeDetails) -> Self {
549 self.phonemes = ::std::option::Option::Some(input);
550 self
551 }
552 pub fn set_phonemes(mut self, input: ::std::option::Option<crate::types::PhonemeDetails>) -> Self {
554 self.phonemes = input;
555 self
556 }
557 pub fn get_phonemes(&self) -> &::std::option::Option<crate::types::PhonemeDetails> {
559 &self.phonemes
560 }
561 pub fn main_address(mut self, input: crate::types::RelatedPlace) -> Self {
563 self.main_address = ::std::option::Option::Some(input);
564 self
565 }
566 pub fn set_main_address(mut self, input: ::std::option::Option<crate::types::RelatedPlace>) -> Self {
568 self.main_address = input;
569 self
570 }
571 pub fn get_main_address(&self) -> &::std::option::Option<crate::types::RelatedPlace> {
573 &self.main_address
574 }
575 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 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 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 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}