FetchPlaceRequest

public abstract class FetchPlaceRequest implements Request


Request used by fetchPlace.

Use builder to get the Builder that constructs the .

Summary

Nested types

public abstract class FetchPlaceRequest.Builder

Builder for FetchPlaceRequest.

Public constructors

Public methods

static FetchPlaceRequest.Builder
builder(String placeId, List<Place.Field> placeFields)

Returns a Builder.

abstract @Nullable CancellationToken

Returns the CancellationToken used by PlacesClient to cancel any queued requests.

abstract List<Place.Field>

Returns the Place.Field list to be requested.

abstract String

Returns the ID of the place to be requested.

abstract @Nullable String

The unicode country/region code (CLDR) of the location where the request is coming from.

abstract @Nullable AutocompleteSessionToken

Returns the AutocompleteSessionToken used for sessionizing multiple instances of.

static FetchPlaceRequest
newInstance(String placeId, List<Place.Field> placeFields)

Returns a FetchPlaceRequest.

Public constructors

FetchPlaceRequest

public FetchPlaceRequest()

Public methods

builder

public static FetchPlaceRequest.Builder builder(String placeId, List<Place.Field> placeFields)

Returns a Builder.

Parameters
String placeId

the ID of the place to be requested. See getId for more details about the place ID.

List<Place.Field> placeFields

the fields of the place to be requested. See Place.Field for the specifiable fields. Read more about Place Data Fields.

getCancellationToken

public abstract @Nullable CancellationToken getCancellationToken()

Returns the CancellationToken used by PlacesClient to cancel any queued requests.

getPlaceFields

public abstract List<Place.FieldgetPlaceFields()

Returns the Place.Field list to be requested.

This list should not be modified.

getPlaceId

public abstract String getPlaceId()

Returns the ID of the place to be requested. See getId.

getRegionCode

public abstract @Nullable 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.

getSessionToken

public abstract @Nullable AutocompleteSessionToken getSessionToken()

Returns the AutocompleteSessionToken used for sessionizing multiple instances of. This same token can also be used here for a subsequent FetchPlaceRequest on one of the autocomplete prediction results returned.

newInstance

public static FetchPlaceRequest newInstance(String placeId, List<Place.Field> placeFields)

Returns a FetchPlaceRequest.

Parameters
String placeId

the ID of the place to be requested. See getId for more details about the place ID.

List<Place.Field> placeFields

the fields of the place to be requested. See Place.Field for the specifiable fields. Read more about Place Data Fields.