@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()
For responses, this returns true if the service returned a value for the Legs property.
|
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()
isEmpty() method on the property). This is useful
because the SDK will never return a null collection or map, but you may need to differentiate between the service
returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
if a value for the property was specified in the request builder, and false if a value was not specified.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.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasLegs() method.
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 © 2022. All rights reserved.