public class OptimizedTripsResponse
extends java.lang.Object
| Constructor and Description |
|---|
OptimizedTripsResponse()
Empty constructor
|
OptimizedTripsResponse(java.util.List<DirectionsRoute> trips,
java.util.List<OptimizationWaypoint> waypoints)
Constructor taking in a list of
DirectionsRoutes along with a list of DirectionsWaypoints. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCode()
String indicating the state of the response.
|
java.util.List<DirectionsRoute> |
getTrips()
List of trip
DirectionsRoute objects. |
java.util.List<OptimizationWaypoint> |
getWaypoints()
List of
OptimizationWaypoint objects. |
void |
setCode(java.lang.String code)
A
String representing the response code the API typically returns. |
void |
setTrips(java.util.List<DirectionsRoute> trips)
List of trip
DirectionsRoute objects. |
void |
setWaypoints(java.util.List<OptimizationWaypoint> waypoints)
List of
OptimizationWaypoint objects. |
public OptimizedTripsResponse()
public OptimizedTripsResponse(java.util.List<DirectionsRoute> trips, java.util.List<OptimizationWaypoint> waypoints)
DirectionsRoutes along with a list of DirectionsWaypoints.trips - a list of DirectionsRoutes used for building this object.waypoints - a list of DirectionsWaypoints used for building this object. In typical cases, you'll
want the waypoints to match the ones making up the directions route.public java.lang.String getCode()
Ok.
On error, the server responds with different HTTP status codes. For responses with HTTP status codes lower than 500, the JSON response body includes the code property, which may be used by client programs to manage control flow. The response body may also include a message property, with a human-readable explanation of the error. If a server error occurs, the HTTP status code will be 500 or higher and the response will not include a code property. Possible errors include:
200 Normal success case200 For one coordinate no route to other coordinates could be found. Check
for impossible routes (e.g. routes over oceans without ferry connections).200 For the given combination of source, destination
and roundtrip, this request is not supported.404 Use a valid profile422 The given request was not valid. The message key of the response
will hold an explanation of the invalid input.OK.public void setCode(java.lang.String code)
String representing the response code the API typically returns. See
getCode() for a list of responses the API provides.code - a String representing the response code the API typically returns.public java.util.List<OptimizationWaypoint> getWaypoints()
OptimizationWaypoint objects. Each waypoint is an input coordinate snapped to the road and path
network. The waypoints appear in the list in the order of the input coordinates.OptimizationWaypoints in the order of the input coordinates.public void setWaypoints(java.util.List<OptimizationWaypoint> waypoints)
OptimizationWaypoint objects. Each waypoint should be an input coordinate snapped to the road and
path network. The waypoints should appear in the list in the order of the input coordinates.waypoints - a list of OptimizationWaypoints in the order of the input coordinates.public java.util.List<DirectionsRoute> getTrips()
DirectionsRoute objects. Will have zero or one trip.DirectionsRoute either having a size zero or one.public void setTrips(java.util.List<DirectionsRoute> trips)
DirectionsRoute objects. Should have either zero or one trip.trips - list of DirectionsRoute either having a size zero or one.