implements Request
Request used by PlacesClient.searchNearby(SearchNearbyRequest)
.
Nested Class Summary
class | SearchNearbyRequest.Builder | Builder for SearchNearbyRequest . |
|
enum | SearchNearbyRequest.RankPreference | How results will be ranked in the response. |
Public Constructor Summary
Public Method Summary
static SearchNearbyRequest.Builder |
builder(LocationRestriction locationRestriction, List<Place.Field> placeFields)
Returns a
SearchNearbyRequest.Builder . |
abstract CancellationToken |
getCancellationToken()
Returns the
CancellationToken used by PlacesClient to cancel any queued
requests. |
abstract List<String> |
getExcludedPrimaryTypes()
Returns the list of excluded primary place types.
|
abstract List<String> |
getExcludedTypes()
Returns the list of excluded place types.
|
abstract List<String> |
getIncludedPrimaryTypes()
Returns the list of requested primary place types.
|
abstract List<String> |
getIncludedTypes()
Returns the list of requested place types.
|
abstract LocationRestriction |
getLocationRestriction()
Returns the restricted region to search.
|
abstract Integer |
getMaxResultCount()
Returns the maximum number of results to return.
|
abstract List<Place.Field> |
getPlaceFields()
Returns the
Place.Field s that should be included in the place results. |
abstract SearchNearbyRequest.RankPreference |
getRankPreference()
Returns the
SearchNearbyRequest.RankPreference . |
abstract String |
getRegionCode()
The unicode country/region code (CLDR) of the location where the request is coming from.
|
static SearchNearbyRequest |
newInstance(LocationRestriction locationRestriction, List<Place.Field> placeFields)
Returns a
SearchNearbyRequest . |
Inherited Method Summary
Public Constructors
public SearchNearbyRequest ()
Public Methods
public static SearchNearbyRequest.Builder builder (LocationRestriction locationRestriction, List<Place.Field> placeFields)
Returns a SearchNearbyRequest.Builder
.
Parameters
locationRestriction | The LocationRestriction means results outside the given
location will not be returned. |
---|---|
placeFields | The Place.Field s that should be included in the place results. |
Throws
IllegalArgumentException | if LocationRestriction is not of type CircularBounds .
|
---|
public abstract CancellationToken getCancellationToken ()
Returns the CancellationToken
used by PlacesClient
to cancel any queued
requests.
public abstract List<String> getExcludedPrimaryTypes ()
Returns the list of excluded primary place types.
There should not be any conflicting primary types, for example, a type should not appear in both the included primary types and excluded primary types.
See new
Table A for the most up-to-date list of supported types available to PlacesClient.searchNearby(SearchNearbyRequest)
.
public abstract List<String> getExcludedTypes ()
Returns the list of excluded place types.
There should not be any conflicting types, for example, a type should not appear in both the included types and excluded types.
See new
Table A for the most up-to-date list of supported types available to PlacesClient.searchNearby(SearchNearbyRequest)
.
public abstract List<String> getIncludedPrimaryTypes ()
Returns the list of requested primary place types.
There should not be any conflicting primary types, for example, a type should not appear in both the included primary types and excluded primary types.
See new
Table A for the most up-to-date list of supported types available to PlacesClient.searchNearby(SearchNearbyRequest)
.
public abstract List<String> getIncludedTypes ()
Returns the list of requested place types.
There should not be any conflicting types, for example, a type should not appear in both the included types and excluded types.
See new
Table A for the most up-to-date list of supported types available to PlacesClient.searchNearby(SearchNearbyRequest)
.
public abstract LocationRestriction getLocationRestriction ()
Returns the restricted region to search.
This location serves as a restriction which means results outside the given location will not be returned.
The LocationRestriction for SearchNearbyRequest
only supports CircularBounds
type.
public abstract Integer getMaxResultCount ()
Returns the maximum number of results to return. It must be between 1 and 20 (default), inclusively.
public abstract List<Place.Field> getPlaceFields ()
Returns the Place.Field
s that should be included in the place results.
public abstract SearchNearbyRequest.RankPreference getRankPreference ()
Returns the SearchNearbyRequest.RankPreference
.
Default is SearchNearbyRequest.RankPreference.POPULARITY
.
public abstract String getRegionCode ()
The unicode country/region code (CLDR) of the location where the request is coming from.
The region may affect the format and type of data returned.
See Territory Containment for region codes.
public static SearchNearbyRequest newInstance (LocationRestriction locationRestriction, List<Place.Field> placeFields)
Returns a SearchNearbyRequest
.
Parameters
locationRestriction | The LocationRestriction means results outside the given
location will not be returned. |
---|---|
placeFields | The Place.Field s that should be included in the place results. |
Throws
IllegalArgumentException | if LocationRestriction is not of type CircularBounds .
|
---|