Struct google_api_proto::google::maps::places::v1::GetPlaceRequest
source · pub struct GetPlaceRequest {
pub name: String,
pub language_code: String,
pub region_code: String,
pub session_token: String,
}
Expand description
Request for fetching a Place based on its resource name, which is a string in
the places/{place_id}
format.
Fields§
§name: String
Required. The resource name of a place, in the places/{place_id}
format.
language_code: String
Optional. Place details will be displayed with the preferred language if available.
Current list of supported languages: https://developers.google.com/maps/faq#languagesupport.
region_code: String
Optional. The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
Note that 3-digit region codes are not currently supported.
session_token: String
Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned.
The session begins when the user starts typing a query, and concludes when
they select a place and a call to Place Details or Address Validation is
made. Each session can have multiple queries, followed by one Place Details
or Address Validation request. The credentials used for each request within
a session must belong to the same Google Cloud Console project. Once a
session has concluded, the token is no longer valid; your app must generate
a fresh token for each session. If the session_token
parameter is
omitted, or if you reuse a session token, the session is charged as if no
session token was provided (each request is billed separately).
We recommend the following guidelines:
- Use session tokens for all Place Autocomplete calls.
- Generate a fresh token for each session. Using a version 4 UUID is recommended.
- Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project.
- Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.
Trait Implementations§
source§impl Clone for GetPlaceRequest
impl Clone for GetPlaceRequest
source§fn clone(&self) -> GetPlaceRequest
fn clone(&self) -> GetPlaceRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GetPlaceRequest
impl Debug for GetPlaceRequest
source§impl Default for GetPlaceRequest
impl Default for GetPlaceRequest
source§impl Message for GetPlaceRequest
impl Message for GetPlaceRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for GetPlaceRequest
impl PartialEq for GetPlaceRequest
source§fn eq(&self, other: &GetPlaceRequest) -> bool
fn eq(&self, other: &GetPlaceRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GetPlaceRequest
Auto Trait Implementations§
impl Freeze for GetPlaceRequest
impl RefUnwindSafe for GetPlaceRequest
impl Send for GetPlaceRequest
impl Sync for GetPlaceRequest
impl Unpin for GetPlaceRequest
impl UnwindSafe for GetPlaceRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request