public class PlaceDetailsRequest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PlaceDetailsRequest.FieldMask |
static class |
PlaceDetailsRequest.Response |
PendingResult.Callback<T>
Constructor and Description |
---|
PlaceDetailsRequest(GeoApiContext context) |
Modifier and Type | Method and Description |
---|---|
T |
await()
Performs the request synchronously.
|
T |
awaitIgnoreError()
Performs the request synchronously, ignoring exceptions while performing the request and errors
returned by the server.
|
void |
cancel()
Attempts to cancel the request.
|
A |
channel(java.lang.String channel)
A channel to pass with the request.
|
A |
custom(java.lang.String parameter,
java.lang.String value)
Custom parameter.
|
PlaceDetailsRequest |
fields(PlaceDetailsRequest.FieldMask... fields)
Specifies the field masks of the details to be returned by PlaceDetails.
|
A |
language(java.lang.String language)
The language in which to return results.
|
protected A |
param(java.lang.String key,
int val) |
protected A |
param(java.lang.String key,
java.lang.String val) |
protected A |
param(java.lang.String key,
com.google.maps.internal.StringJoin.UrlValue val) |
protected A |
paramAddToList(java.lang.String key,
java.lang.String val) |
protected A |
paramAddToList(java.lang.String key,
com.google.maps.internal.StringJoin.UrlValue val) |
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
params() |
PlaceDetailsRequest |
placeId(java.lang.String placeId)
Specifies the Place ID to get Place Details for.
|
PlaceDetailsRequest |
region(java.lang.String region)
Sets the Region for this request.
|
PlaceDetailsRequest |
sessionToken(PlaceAutocompleteRequest.SessionToken sessionToken)
Sets the SessionToken for this request.
|
void |
setCallback(PendingResult.Callback<T> callback)
|
protected void |
validateRequest() |
public PlaceDetailsRequest(GeoApiContext context)
public PlaceDetailsRequest placeId(java.lang.String placeId)
placeId
- The Place ID to retrieve details for.PlaceDetailsRequest
for call chaining.public PlaceDetailsRequest sessionToken(PlaceAutocompleteRequest.SessionToken sessionToken)
sessionToken
- Session Token is the session identifier.PlaceDetailsRequest
for call chaining.public PlaceDetailsRequest region(java.lang.String region)
region
- The region code.PlaceDetailsRequest
for call chaining.public PlaceDetailsRequest fields(PlaceDetailsRequest.FieldMask... fields)
fields
- The Field Masks of the fields to return.PlaceDetailsRequest
for call chaining.protected void validateRequest()
public final void setCallback(PendingResult.Callback<T> callback)
PendingResult
onResult
or onFailure
after the request has been
completed.setCallback
in interface PendingResult<T>
callback
- The callback to call on completion.public final T await() throws ApiException, java.lang.InterruptedException, java.io.IOException
PendingResult
await
in interface PendingResult<T>
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.public final T awaitIgnoreError()
PendingResult
awaitIgnoreError
in interface PendingResult<T>
public final void cancel()
PendingResult
cancel
in interface PendingResult<T>
protected A param(java.lang.String key, java.lang.String val)
protected A param(java.lang.String key, int val)
protected A param(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)
protected A paramAddToList(java.lang.String key, java.lang.String val)
protected A paramAddToList(java.lang.String key, com.google.maps.internal.StringJoin.UrlValue val)
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> params()
public final A language(java.lang.String language)
language
- The language code, e.g. "en-AU" or "es".public A channel(java.lang.String channel)
channel
- String to pass with the request for analytics.public A custom(java.lang.String parameter, java.lang.String value)
parameter
- The name of the custom parameter.value
- The value of the custom parameter.