@Generated(value="software.amazon.awssdk:codegen") public final class CalculateRouteResponse extends LocationResponse implements ToCopyableBuilder<CalculateRouteResponse.Builder,CalculateRouteResponse>
Returns the result of the route calculation. Metadata includes legs and route summary.
| Modifier and Type | Class and Description |
|---|---|
static interface |
CalculateRouteResponse.Builder |
| Modifier and Type | Method and Description |
|---|---|
static CalculateRouteResponse.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasLegs()
Returns true if the Legs property was specified by the sender (it may be empty), or false if the sender did not
specify the value (it will be empty).
|
List<Leg> |
legs()
Contains details about each path between a pair of positions included along a route such as:
StartPosition, EndPosition, Distance, DurationSeconds,
Geometry, and Steps. |
List<SdkField<?>> |
sdkFields() |
static Class<? extends CalculateRouteResponse.Builder> |
serializableBuilderClass() |
CalculateRouteSummary |
summary()
Contains information about the whole route, such as:
RouteBBox, DataSource,
Distance, DistanceUnit, and DurationSeconds. |
CalculateRouteResponse.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
responseMetadatasdkHttpResponseclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final boolean hasLegs()
public final List<Leg> legs()
Contains details about each path between a pair of positions included along a route such as:
StartPosition, EndPosition, Distance, DurationSeconds,
Geometry, and Steps. The number of legs returned corresponds to one fewer than the
total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition is the departure position.
The EndPosition is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition is the departure position . The EndPosition is the waypoint
positon.
Leg 2: The StartPosition is the waypoint position. The EndPosition is the destination
position.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasLegs() to see if a value was sent in this field.
StartPosition, EndPosition, Distance, DurationSeconds
, Geometry, and Steps. The number of legs returned corresponds to one fewer
than the total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition is the departure position.
The EndPosition is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition is the departure position . The EndPosition is the
waypoint positon.
Leg 2: The StartPosition is the waypoint position. The EndPosition is the
destination position.
public final CalculateRouteSummary summary()
Contains information about the whole route, such as: RouteBBox, DataSource,
Distance, DistanceUnit, and DurationSeconds.
RouteBBox, DataSource,
Distance, DistanceUnit, and DurationSeconds.public CalculateRouteResponse.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<CalculateRouteResponse.Builder,CalculateRouteResponse>toBuilder in class AwsResponsepublic static CalculateRouteResponse.Builder builder()
public static Class<? extends CalculateRouteResponse.Builder> serializableBuilderClass()
public final int hashCode()
hashCode in class AwsResponsepublic final boolean equals(Object obj)
equals in class AwsResponsepublic final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
getValueForField in class SdkResponseCopyright © 2021. All rights reserved.