Struct google_api_proto::google::maps::places::v1::SearchNearbyRequest
source · pub struct SearchNearbyRequest {
pub language_code: String,
pub region_code: String,
pub included_types: Vec<String>,
pub excluded_types: Vec<String>,
pub included_primary_types: Vec<String>,
pub excluded_primary_types: Vec<String>,
pub max_result_count: i32,
pub location_restriction: Option<LocationRestriction>,
pub rank_preference: i32,
}
Expand description
Request proto for Search Nearby.
Fields§
§language_code: String
Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist.
Current list of supported languages: https://developers.google.com/maps/faq#languagesupport.
region_code: String
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.
included_types: Vec<String>
Included Place type (eg, “restaurant” or “gas_station”) from https://developers.google.com/maps/documentation/places/web-service/place-types.
Up to 50 types from Table A may be specified.
If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned.
If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [“restaurant”], excluded_primary_types = [“restaurant”]}, the returned places provide “restaurant” related services but do not operate primarily as “restaurants”.
excluded_types: Vec<String>
Excluded Place type (eg, “restaurant” or “gas_station”) from https://developers.google.com/maps/documentation/places/web-service/place-types.
Up to 50 types from Table A may be specified.
If the client provides both included_types (e.g. restaurant) and excluded_types (e.g. cafe), then the response should include places that are restaurant but not cafe. The response includes places that match at least one of the included_types and none of the excluded_types.
If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned.
If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [“restaurant”], excluded_primary_types = [“restaurant”]}, the returned places provide “restaurant” related services but do not operate primarily as “restaurants”.
included_primary_types: Vec<String>
Included primary Place type (e.g. “restaurant” or “gas_station”) from https://developers.google.com/maps/documentation/places/web-service/place-types. A place can only have a single primary type from the supported types table associated with it.
Up to 50 types from Table A may be specified.
If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.
If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [“restaurant”], excluded_primary_types = [“restaurant”]}, the returned places provide “restaurant” related services but do not operate primarily as “restaurants”.
excluded_primary_types: Vec<String>
Excluded primary Place type (e.g. “restaurant” or “gas_station”) from https://developers.google.com/maps/documentation/places/web-service/place-types.
Up to 50 types from Table A may be specified.
If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.
If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [“restaurant”], excluded_primary_types = [“restaurant”]}, the returned places provide “restaurant” related services but do not operate primarily as “restaurants”.
max_result_count: i32
Maximum number of results to return. It must be between 1 and 20 (default), inclusively. If the number is unset, it falls back to the upper limit. If the number is set to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.
location_restriction: Option<LocationRestriction>
Required. The region to search.
rank_preference: i32
How results will be ranked in the response.
Implementations§
source§impl SearchNearbyRequest
impl SearchNearbyRequest
sourcepub fn rank_preference(&self) -> RankPreference
pub fn rank_preference(&self) -> RankPreference
Returns the enum value of rank_preference
, or the default if the field is set to an invalid enum value.
sourcepub fn set_rank_preference(&mut self, value: RankPreference)
pub fn set_rank_preference(&mut self, value: RankPreference)
Sets rank_preference
to the provided enum value.
Trait Implementations§
source§impl Clone for SearchNearbyRequest
impl Clone for SearchNearbyRequest
source§fn clone(&self) -> SearchNearbyRequest
fn clone(&self) -> SearchNearbyRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SearchNearbyRequest
impl Debug for SearchNearbyRequest
source§impl Default for SearchNearbyRequest
impl Default for SearchNearbyRequest
source§impl Message for SearchNearbyRequest
impl Message for SearchNearbyRequest
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 SearchNearbyRequest
impl PartialEq for SearchNearbyRequest
source§fn eq(&self, other: &SearchNearbyRequest) -> bool
fn eq(&self, other: &SearchNearbyRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SearchNearbyRequest
Auto Trait Implementations§
impl Freeze for SearchNearbyRequest
impl RefUnwindSafe for SearchNearbyRequest
impl Send for SearchNearbyRequest
impl Sync for SearchNearbyRequest
impl Unpin for SearchNearbyRequest
impl UnwindSafe for SearchNearbyRequest
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