public abstract static class DirectionsResponse.Builder
extends java.lang.Object
DirectionsResponse
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract DirectionsResponse |
build()
Build a new
DirectionsResponse object. |
abstract DirectionsResponse.Builder |
code(java.lang.String code)
String indicating the state of the response.
|
abstract DirectionsResponse.Builder |
message(java.lang.String message)
Optionally shows up in a directions response if an error or something unexpected occurred.
|
abstract DirectionsResponse.Builder |
routes(java.util.List<DirectionsRoute> routes)
List containing all the different route options.
|
abstract DirectionsResponse.Builder |
uuid(java.lang.String uuid)
A universally unique identifier (UUID) for identifying and executing a similar specific route
in the future.
|
abstract DirectionsResponse.Builder |
waypoints(java.util.List<DirectionsWaypoint> waypoints)
List of
DirectionsWaypoint objects. |
public abstract DirectionsResponse.Builder code(@NonNull java.lang.String code)
DirectionsResponse.code()
.code
- a string with one of the given values described in the list abovepublic abstract DirectionsResponse.Builder message(@Nullable java.lang.String message)
message
- a string containing the message API Directions response with if an error
occurredpublic abstract DirectionsResponse.Builder waypoints(@Nullable 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.waypoints
- list of DirectionsWaypoint
objects ordered from start of route till
the endpublic abstract DirectionsResponse.Builder routes(@NonNull java.util.List<DirectionsRoute> routes)
DirectionsRoute
objects.routes
- list of DirectionsRoute
objectspublic abstract DirectionsResponse.Builder uuid(@Nullable java.lang.String uuid)
uuid
- a String representing the UUID given by the directions requestpublic abstract DirectionsResponse build()
DirectionsResponse
object.DirectionsResponse
using the provided values in this builder