implements Request
Request used by PlacesClient.fetchPlace(FetchPlaceRequest)
.
Use builder(String, List)
to get the FetchPlaceRequest.Builder
that constructs the FetchPlaceRequest
.
Nested Class Summary
class | FetchPlaceRequest.Builder | Builder for FetchPlaceRequest . |
Public Constructor Summary
Public Method Summary
static FetchPlaceRequest.Builder | |
abstract CancellationToken |
getCancellationToken()
Returns the
CancellationToken used by PlacesClient to cancel any queued
requests. |
abstract List<Place.Field> |
getPlaceFields()
Returns the
Place.Field list to be requested. |
abstract String |
getPlaceId()
Returns the ID of the place to be requested.
|
abstract String |
getRegionCode()
The unicode country/region code (CLDR) of the location where the request is coming from.
|
abstract AutocompleteSessionToken |
getSessionToken()
Returns the
AutocompleteSessionToken used for sessionizing multiple instances ofFindAutocompletePredictionsRequest . |
static FetchPlaceRequest |
Inherited Method Summary
Public Constructors
public FetchPlaceRequest ()
Public Methods
public static FetchPlaceRequest.Builder builder (String placeId, List<Place.Field> placeFields)
Returns a FetchPlaceRequest.Builder
.
Parameters
placeId | the ID of the place to be requested. See Place.getId() for more details
about the place ID. |
---|---|
placeFields | the fields of the place to be requested. See Place.Field for the
specifiable fields. Read more about Place
Data Fields.
|
public abstract CancellationToken getCancellationToken ()
Returns the CancellationToken
used by PlacesClient
to cancel any queued
requests.
public abstract List<Place.Field> getPlaceFields ()
Returns the Place.Field
list to be requested.
This list should not be modified.
public abstract String getPlaceId ()
Returns the ID of the place to be requested. See Place.getId()
.
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. If no code is provided, there is no bias towards any country/region.
The region code field is only supported by Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to use region code. If you do not enable your API key for the Places API (New), the region code will not affect the results.
See Territory Containment for region codes.
public abstract AutocompleteSessionToken getSessionToken ()
Returns the AutocompleteSessionToken
used for sessionizing multiple instances ofFindAutocompletePredictionsRequest
. This same token can also be used here for a subsequent
FetchPlaceRequest
on one of the autocomplete prediction results returned.
public static FetchPlaceRequest newInstance (String placeId, List<Place.Field> placeFields)
Returns a FetchPlaceRequest
.
Parameters
placeId | the ID of the place to be requested. See Place.getId() for more details
about the place ID. |
---|---|
placeFields | the fields of the place to be requested. See Place.Field for the
specifiable fields. Read more about Place
Data Fields.
|