Package com.google.maps
Class FindPlaceFromTextRequest
- java.lang.Object
-
- com.google.maps.FindPlaceFromTextRequest
-
- All Implemented Interfaces:
PendingResult<FindPlaceFromText>
public class FindPlaceFromTextRequest extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFindPlaceFromTextRequest.FieldMaskstatic classFindPlaceFromTextRequest.InputTypestatic interfaceFindPlaceFromTextRequest.LocationBiasstatic classFindPlaceFromTextRequest.LocationBiasCircularstatic classFindPlaceFromTextRequest.LocationBiasIPstatic classFindPlaceFromTextRequest.LocationBiasPointstatic classFindPlaceFromTextRequest.LocationBiasRectangularstatic classFindPlaceFromTextRequest.Response-
Nested classes/interfaces inherited from interface com.google.maps.PendingResult
PendingResult.Callback<T>
-
-
Constructor Summary
Constructors Constructor Description FindPlaceFromTextRequest(GeoApiContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tawait()Performs the request synchronously.TawaitIgnoreError()Performs the request synchronously, ignoring exceptions while performing the request and errors returned by the server.voidcancel()Attempts to cancel the request.Achannel(java.lang.String channel)A channel to pass with the request.Acustom(java.lang.String parameter, java.lang.String value)Custom parameter.FindPlaceFromTextRequestfields(FindPlaceFromTextRequest.FieldMask... fields)The fields specifying the types of place data to return.FindPlaceFromTextRequestinput(java.lang.String input)The text input specifying which place to search for (for example, a name, address, or phone number).FindPlaceFromTextRequestinputType(FindPlaceFromTextRequest.InputType inputType)The type of input.Alanguage(java.lang.String language)The language in which to return results.FindPlaceFromTextRequestlocationBias(FindPlaceFromTextRequest.LocationBias locationBias)Prefer results in a specified area, by specifying either a radius plus lat/lng, or two lat/lng pairs representing the points of a rectangle.protected Aparam(java.lang.String key, int val)protected Aparam(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)protected Aparam(java.lang.String key, java.lang.String val)protected AparamAddToList(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)protected AparamAddToList(java.lang.String key, java.lang.String val)protected java.util.Map<java.lang.String,java.util.List<java.lang.String>>params()voidsetCallback(PendingResult.Callback<T> callback)protected voidvalidateRequest()
-
-
-
Constructor Detail
-
FindPlaceFromTextRequest
public FindPlaceFromTextRequest(GeoApiContext context)
-
-
Method Detail
-
input
public FindPlaceFromTextRequest input(java.lang.String input)
The text input specifying which place to search for (for example, a name, address, or phone number).- Parameters:
input- The text input.- Returns:
- Returns
FindPlaceFromTextRequestfor call chaining.
-
inputType
public FindPlaceFromTextRequest inputType(FindPlaceFromTextRequest.InputType inputType)
The type of input.- Parameters:
inputType- The input type.- Returns:
- Returns
FindPlaceFromTextRequestfor call chaining.
-
fields
public FindPlaceFromTextRequest fields(FindPlaceFromTextRequest.FieldMask... fields)
The fields specifying the types of place data to return.- Parameters:
fields- The fields to return.- Returns:
- Returns
FindPlaceFromTextRequestfor call chaining.
-
locationBias
public FindPlaceFromTextRequest locationBias(FindPlaceFromTextRequest.LocationBias locationBias)
Prefer results in a specified area, by specifying either a radius plus lat/lng, or two lat/lng pairs representing the points of a rectangle.- Parameters:
locationBias- The location bias for this request.- Returns:
- Returns
FindPlaceFromTextRequestfor call chaining.
-
validateRequest
protected void validateRequest()
-
setCallback
public final void setCallback(PendingResult.Callback<T> callback)
Description copied from interface:PendingResultPerforms the request asynchronously, callingonResultoronFailureafter the request has been completed.- Specified by:
setCallbackin interfacePendingResult<T>- Parameters:
callback- The callback to call on completion.
-
await
public final T await() throws ApiException, java.lang.InterruptedException, java.io.IOExceptionDescription copied from interface:PendingResultPerforms the request synchronously.- Specified by:
awaitin interfacePendingResult<T>- Returns:
- The result.
- Throws:
ApiException- Thrown if the API Returned result is an error.java.lang.InterruptedException- Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted.java.io.IOException- Thrown when an I/O exception of some sort has occurred.
-
awaitIgnoreError
public final T awaitIgnoreError()
Description copied from interface:PendingResultPerforms the request synchronously, ignoring exceptions while performing the request and errors returned by the server.- Specified by:
awaitIgnoreErrorin interfacePendingResult<T>- Returns:
- The result, or null if there was any error or exception ignored.
-
cancel
public final void cancel()
Description copied from interface:PendingResultAttempts to cancel the request.- Specified by:
cancelin interfacePendingResult<T>
-
param
protected A param(java.lang.String key, java.lang.String val)
-
param
protected A param(java.lang.String key, int val)
-
param
protected A param(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)
-
paramAddToList
protected A paramAddToList(java.lang.String key, java.lang.String val)
-
paramAddToList
protected A paramAddToList(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)
-
params
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> params()
-
language
public final A language(java.lang.String language)
The language in which to return results. Note that we often update supported languages so this list may not be exhaustive.- Parameters:
language- The language code, e.g. "en-AU" or "es".- Returns:
- Returns the request for call chaining.
- See Also:
- List of supported domain languages
-
channel
public A channel(java.lang.String channel)
A channel to pass with the request. channel is used by Google Maps API for Work users to be able to track usage across different applications with the same clientID. See Premium Plan Usage Rates and Limits.- Parameters:
channel- String to pass with the request for analytics.- Returns:
- Returns the request for call chaining.
-
custom
public A custom(java.lang.String parameter, java.lang.String value)Custom parameter. For advanced usage only.- Parameters:
parameter- The name of the custom parameter.value- The value of the custom parameter.- Returns:
- Returns the request for call chaining.
-
-