public abstract class DirectionsResponse extends DirectionsJsonObject
Modifier and Type | Class and Description |
---|---|
static class |
DirectionsResponse.Builder
This builder can be used to set the values describing the
DirectionsResponse . |
Constructor and Description |
---|
DirectionsResponse() |
Modifier and Type | Method and Description |
---|---|
static DirectionsResponse.Builder |
builder()
Create a new instance of this class by using the
DirectionsResponse.Builder class. |
abstract java.lang.String |
code()
String indicating the state of the response.
|
static DirectionsResponse |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
abstract java.lang.String |
message()
Optionally shows up in a directions response if an error or something unexpected occurred.
|
abstract java.util.List<DirectionsRoute> |
routes()
List containing all the different route options.
|
abstract DirectionsResponse.Builder |
toBuilder()
Convert the current
DirectionsResponse to its builder holding the currently assigned
values. |
static com.google.gson.TypeAdapter<DirectionsResponse> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
abstract java.lang.String |
uuid()
A universally unique identifier (UUID) for identifying and executing a similar specific route
in the future.
|
abstract java.util.List<DirectionsWaypoint> |
waypoints()
List of
DirectionsWaypoint objects. |
toJson
@NonNull public static DirectionsResponse.Builder builder()
DirectionsResponse.Builder
class.DirectionsResponse.Builder
for creating a new instance@NonNull public abstract java.lang.String code()
@Nullable public abstract java.lang.String message()
@Nullable public abstract java.util.List<DirectionsWaypoint> waypoints()
DirectionsWaypoint
objects. Each waypoint
is an input coordinate
snapped to the road and path network. The waypoint
appear in the list in the order of
the input coordinates.DirectionsWaypoint
objects ordered from start of route till the end@NonNull public abstract java.util.List<DirectionsRoute> routes()
DirectionsRoute
objects.DirectionsRoute
objects@Nullable public abstract java.lang.String uuid()
public abstract DirectionsResponse.Builder toBuilder()
DirectionsResponse
to its builder holding the currently assigned
values. This allows you to modify a single property and then rebuild the object resulting in
an updated and modified DirectionsResponse
.DirectionsResponse.Builder
with the same values set to match the ones defined
in this DirectionsResponse
public static com.google.gson.TypeAdapter<DirectionsResponse> typeAdapter(com.google.gson.Gson gson)
gson
- the built Gson
objectpublic static DirectionsResponse fromJson(java.lang.String json)
json
- a formatted valid JSON string defining a GeoJson Directions Response