FindAutocompletePredictionsRequest

public abstract class FindAutocompletePredictionsRequest extends Object
implements Request

Nested Class Summary

class FindAutocompletePredictionsRequest.Builder Builder for FindAutocompletePredictionsRequest

Public Constructor Summary

Public Method Summary

static FindAutocompletePredictionsRequest.Builder
abstract CancellationToken
getCancellationToken()
Returns the CancellationToken used by PlacesClient to cancel any queued requests.
abstract List<String>
getCountries()
Returns a list of countries to which results will be restricted.
String
abstract LocationBias
getLocationBias()
Returns the location bias applied for autocomplete predictions.
abstract LocationRestriction
getLocationRestriction()
Returns the location restriction applied for autocomplete predictions.
abstract LatLng
getOrigin()
Returns the location where AutocompletePrediction.getDistanceMeters() is calculated from.
abstract String
getQuery()
Returns the user query string used to generate autocomplete predictions.
abstract AutocompleteSessionToken
getSessionToken()
Returns the AutocompleteSessionToken for this request.
abstract TypeFilter
abstract List<String>
getTypesFilter()
Returns the filter used to restrict the type(s) of the results returned.
static FindAutocompletePredictionsRequest

Inherited Method Summary

Public Constructors

public FindAutocompletePredictionsRequest ()

Public Methods

public abstract CancellationToken getCancellationToken ()

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

public abstract List<String> getCountries ()

Returns a list of countries to which results will be restricted. See FindAutocompletePredictionsRequest.Builder.setCountries(List) for details.

public String getCountry ()

This method is deprecated.
Use FindAutocompletePredictionsRequest.Builder.setCountries(List) & getCountries() instead.

Returns the country to which results will be restricted.

This should be a ISO 3166-1 Alpha-2 country code (case insensitive). If null or empty, country restrictions will not be applied.

Throws
UnsupportedOperationException if multiple countries were set on this request.

public abstract LocationBias getLocationBias ()

Returns the location bias applied for autocomplete predictions. See FindAutocompletePredictionsRequest.Builder.setLocationBias(LocationBias) for details.

public abstract LocationRestriction getLocationRestriction ()

Returns the location restriction applied for autocomplete predictions. See FindAutocompletePredictionsRequest.Builder.setLocationRestriction(LocationRestriction) for details.

public abstract LatLng getOrigin ()

Returns the location where AutocompletePrediction.getDistanceMeters() is calculated from. If null, no distances will be included in the response.

public abstract String getQuery ()

Returns the user query string used to generate autocomplete predictions. If null or empty, no predictions will be included in the response.

public abstract AutocompleteSessionToken getSessionToken ()

Returns the AutocompleteSessionToken for this request.

public abstract TypeFilter getTypeFilter ()

This method is deprecated.
Use FindAutocompletePredictionsRequest.Builder.setTypesFilter(List) and getTypesFilter() instead.

Returns the filter used to restrict the type of the results returned.

public abstract List<String> getTypesFilter ()

Returns the filter used to restrict the type(s) of the results returned.

A comprehensive list of the supported types can be found in PlaceTypes.

public static FindAutocompletePredictionsRequest newInstance (String query)

Parameters
query