Struct google_api_proto::google::maps::places::v1::Place

source ·
pub struct Place {
Show 63 fields pub name: String, pub id: String, pub display_name: Option<LocalizedText>, pub types: Vec<String>, pub primary_type: String, pub primary_type_display_name: Option<LocalizedText>, pub national_phone_number: String, pub international_phone_number: String, pub formatted_address: String, pub short_formatted_address: String, pub address_components: Vec<AddressComponent>, pub plus_code: Option<PlusCode>, pub location: Option<LatLng>, pub viewport: Option<Viewport>, pub rating: f64, pub google_maps_uri: String, pub website_uri: String, pub reviews: Vec<Review>, pub regular_opening_hours: Option<OpeningHours>, pub utc_offset_minutes: Option<i32>, pub photos: Vec<Photo>, pub adr_format_address: String, pub business_status: i32, pub price_level: i32, pub attributions: Vec<Attribution>, pub user_rating_count: Option<i32>, pub icon_mask_base_uri: String, pub icon_background_color: String, pub takeout: Option<bool>, pub delivery: Option<bool>, pub dine_in: Option<bool>, pub curbside_pickup: Option<bool>, pub reservable: Option<bool>, pub serves_breakfast: Option<bool>, pub serves_lunch: Option<bool>, pub serves_dinner: Option<bool>, pub serves_beer: Option<bool>, pub serves_wine: Option<bool>, pub serves_brunch: Option<bool>, pub serves_vegetarian_food: Option<bool>, pub current_opening_hours: Option<OpeningHours>, pub current_secondary_opening_hours: Vec<OpeningHours>, pub regular_secondary_opening_hours: Vec<OpeningHours>, pub editorial_summary: Option<LocalizedText>, pub outdoor_seating: Option<bool>, pub live_music: Option<bool>, pub menu_for_children: Option<bool>, pub serves_cocktails: Option<bool>, pub serves_dessert: Option<bool>, pub serves_coffee: Option<bool>, pub good_for_children: Option<bool>, pub allows_dogs: Option<bool>, pub restroom: Option<bool>, pub good_for_groups: Option<bool>, pub good_for_watching_sports: Option<bool>, pub payment_options: Option<PaymentOptions>, pub parking_options: Option<ParkingOptions>, pub sub_destinations: Vec<SubDestination>, pub accessibility_options: Option<AccessibilityOptions>, pub fuel_options: Option<FuelOptions>, pub ev_charge_options: Option<EvChargeOptions>, pub generative_summary: Option<GenerativeSummary>, pub area_summary: Option<AreaSummary>,
}
Expand description

All the information representing a Place.

Fields§

§name: String

This Place’s resource name, in places/{place_id} format. Can be used to look up the Place.

§id: String

The unique identifier of a place.

§display_name: Option<LocalizedText>

The localized name of the place, suitable as a short human-readable description. For example, “Google Sydney”, “Starbucks”, “Pyrmont”, etc.

§types: Vec<String>

A set of type tags for this result. For example, “political” and “locality”. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types

§primary_type: String

The primary type of the given result. This type must one of the Places API supported types. For example, “restaurant”, “cafe”, “airport”, etc. A place can only have a single primary type. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types

§primary_type_display_name: Option<LocalizedText>

The display name of the primary type, localized to the request language if applicable. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types

§national_phone_number: String

A human-readable phone number for the place, in national format.

§international_phone_number: String

A human-readable phone number for the place, in international format.

§formatted_address: String

A full, human-readable address for this place.

§short_formatted_address: String

A short, human-readable address for this place.

§address_components: Vec<AddressComponent>

Repeated components for each locality level. Note the following facts about the address_components[] array:

  • The array of address components may contain more components than the formatted_address.
  • The array does not necessarily include all the political entities that contain an address, apart from those included in the formatted_address. To retrieve all the political entities that contain a specific address, you should use reverse geocoding, passing the latitude/longitude of the address as a parameter to the request.
  • The format of the response is not guaranteed to remain the same between requests. In particular, the number of address_components varies based on the address requested and can change over time for the same address. A component can change position in the array. The type of the component can change. A particular component may be missing in a later response.
§plus_code: Option<PlusCode>

Plus code of the place location lat/long.

§location: Option<LatLng>

The position of this place.

§viewport: Option<Viewport>

A viewport suitable for displaying the place on an average-sized map.

§rating: f64

A rating between 1.0 and 5.0, based on user reviews of this place.

§google_maps_uri: String

A URL providing more information about this place.

§website_uri: String

The authoritative website for this place, e.g. a business’ homepage. Note that for places that are part of a chain (e.g. an IKEA store), this will usually be the website for the individual store, not the overall chain.

§reviews: Vec<Review>

List of reviews about this place, sorted by relevance. A maximum of 5 reviews can be returned.

§regular_opening_hours: Option<OpeningHours>

The regular hours of operation.

§utc_offset_minutes: Option<i32>

Number of minutes this place’s timezone is currently offset from UTC. This is expressed in minutes to support timezones that are offset by fractions of an hour, e.g. X hours and 15 minutes.

§photos: Vec<Photo>

Information (including references) about photos of this place. A maximum of 10 photos can be returned.

§adr_format_address: String

The place’s address in adr microformat: http://microformats.org/wiki/adr.

§business_status: i32

The business status for the place.

§price_level: i32

Price level of the place.

§attributions: Vec<Attribution>

A set of data provider that must be shown with this result.

§user_rating_count: Option<i32>

The total number of reviews (with or without text) for this place.

§icon_mask_base_uri: String

A truncated URL to an icon mask. User can access different icon type by appending type suffix to the end (eg, “.svg” or “.png”).

§icon_background_color: String

Background color for icon_mask in hex format, e.g. #909CE1.

§takeout: Option<bool>

Specifies if the business supports takeout.

§delivery: Option<bool>

Specifies if the business supports delivery.

§dine_in: Option<bool>

Specifies if the business supports indoor or outdoor seating options.

§curbside_pickup: Option<bool>

Specifies if the business supports curbside pickup.

§reservable: Option<bool>

Specifies if the place supports reservations.

§serves_breakfast: Option<bool>

Specifies if the place serves breakfast.

§serves_lunch: Option<bool>

Specifies if the place serves lunch.

§serves_dinner: Option<bool>

Specifies if the place serves dinner.

§serves_beer: Option<bool>

Specifies if the place serves beer.

§serves_wine: Option<bool>

Specifies if the place serves wine.

§serves_brunch: Option<bool>

Specifies if the place serves brunch.

§serves_vegetarian_food: Option<bool>

Specifies if the place serves vegetarian food.

§current_opening_hours: Option<OpeningHours>

The hours of operation for the next seven days (including today). The time period starts at midnight on the date of the request and ends at 11:59 pm six days later. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.

§current_secondary_opening_hours: Vec<OpeningHours>

Contains an array of entries for the next seven days including information about secondary hours of a business. Secondary hours are different from a business’s main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.

§regular_secondary_opening_hours: Vec<OpeningHours>

Contains an array of entries for information about regular secondary hours of a business. Secondary hours are different from a business’s main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.

§editorial_summary: Option<LocalizedText>

Contains a summary of the place. A summary is comprised of a textual overview, and also includes the language code for these if applicable. Summary text must be presented as-is and can not be modified or altered.

§outdoor_seating: Option<bool>

Place provides outdoor seating.

§live_music: Option<bool>

Place provides live music.

§menu_for_children: Option<bool>

Place has a children’s menu.

§serves_cocktails: Option<bool>

Place serves cocktails.

§serves_dessert: Option<bool>

Place serves dessert.

§serves_coffee: Option<bool>

Place serves coffee.

§good_for_children: Option<bool>

Place is good for children.

§allows_dogs: Option<bool>

Place allows dogs.

§restroom: Option<bool>

Place has restroom.

§good_for_groups: Option<bool>

Place accommodates groups.

§good_for_watching_sports: Option<bool>

Place is suitable for watching sports.

§payment_options: Option<PaymentOptions>

Payment options the place accepts. If a payment option data is not available, the payment option field will be unset.

§parking_options: Option<ParkingOptions>

Options of parking provided by the place.

§sub_destinations: Vec<SubDestination>

A list of sub destinations related to the place.

§accessibility_options: Option<AccessibilityOptions>

Information about the accessibility options a place offers.

§fuel_options: Option<FuelOptions>

The most recent information about fuel options in a gas station. This information is updated regularly.

§ev_charge_options: Option<EvChargeOptions>

Information of ev charging options.

§generative_summary: Option<GenerativeSummary>

Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.

AI-generated summary of the place.

§area_summary: Option<AreaSummary>

Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.

AI-generated summary of the area that the place is in.

Implementations§

source§

impl Place

source

pub fn utc_offset_minutes(&self) -> i32

Returns the value of utc_offset_minutes, or the default value if utc_offset_minutes is unset.

source

pub fn business_status(&self) -> BusinessStatus

Returns the enum value of business_status, or the default if the field is set to an invalid enum value.

source

pub fn set_business_status(&mut self, value: BusinessStatus)

Sets business_status to the provided enum value.

source

pub fn price_level(&self) -> PriceLevel

Returns the enum value of price_level, or the default if the field is set to an invalid enum value.

source

pub fn set_price_level(&mut self, value: PriceLevel)

Sets price_level to the provided enum value.

source

pub fn user_rating_count(&self) -> i32

Returns the value of user_rating_count, or the default value if user_rating_count is unset.

source

pub fn takeout(&self) -> bool

Returns the value of takeout, or the default value if takeout is unset.

source

pub fn delivery(&self) -> bool

Returns the value of delivery, or the default value if delivery is unset.

source

pub fn dine_in(&self) -> bool

Returns the value of dine_in, or the default value if dine_in is unset.

source

pub fn curbside_pickup(&self) -> bool

Returns the value of curbside_pickup, or the default value if curbside_pickup is unset.

source

pub fn reservable(&self) -> bool

Returns the value of reservable, or the default value if reservable is unset.

source

pub fn serves_breakfast(&self) -> bool

Returns the value of serves_breakfast, or the default value if serves_breakfast is unset.

source

pub fn serves_lunch(&self) -> bool

Returns the value of serves_lunch, or the default value if serves_lunch is unset.

source

pub fn serves_dinner(&self) -> bool

Returns the value of serves_dinner, or the default value if serves_dinner is unset.

source

pub fn serves_beer(&self) -> bool

Returns the value of serves_beer, or the default value if serves_beer is unset.

source

pub fn serves_wine(&self) -> bool

Returns the value of serves_wine, or the default value if serves_wine is unset.

source

pub fn serves_brunch(&self) -> bool

Returns the value of serves_brunch, or the default value if serves_brunch is unset.

source

pub fn serves_vegetarian_food(&self) -> bool

Returns the value of serves_vegetarian_food, or the default value if serves_vegetarian_food is unset.

source

pub fn outdoor_seating(&self) -> bool

Returns the value of outdoor_seating, or the default value if outdoor_seating is unset.

source

pub fn live_music(&self) -> bool

Returns the value of live_music, or the default value if live_music is unset.

source

pub fn menu_for_children(&self) -> bool

Returns the value of menu_for_children, or the default value if menu_for_children is unset.

source

pub fn serves_cocktails(&self) -> bool

Returns the value of serves_cocktails, or the default value if serves_cocktails is unset.

source

pub fn serves_dessert(&self) -> bool

Returns the value of serves_dessert, or the default value if serves_dessert is unset.

source

pub fn serves_coffee(&self) -> bool

Returns the value of serves_coffee, or the default value if serves_coffee is unset.

source

pub fn good_for_children(&self) -> bool

Returns the value of good_for_children, or the default value if good_for_children is unset.

source

pub fn allows_dogs(&self) -> bool

Returns the value of allows_dogs, or the default value if allows_dogs is unset.

source

pub fn restroom(&self) -> bool

Returns the value of restroom, or the default value if restroom is unset.

source

pub fn good_for_groups(&self) -> bool

Returns the value of good_for_groups, or the default value if good_for_groups is unset.

source

pub fn good_for_watching_sports(&self) -> bool

Returns the value of good_for_watching_sports, or the default value if good_for_watching_sports is unset.

Trait Implementations§

source§

impl Clone for Place

source§

fn clone(&self) -> Place

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Place

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Place

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for Place

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Place

source§

fn eq(&self, other: &Place) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Place

Auto Trait Implementations§

§

impl Freeze for Place

§

impl RefUnwindSafe for Place

§

impl Send for Place

§

impl Sync for Place

§

impl Unpin for Place

§

impl UnwindSafe for Place

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more