Interface CalculateRouteResponse.Builder
-
- All Superinterfaces:
AwsResponse.Builder,Buildable,CopyableBuilder<CalculateRouteResponse.Builder,CalculateRouteResponse>,LocationResponse.Builder,SdkBuilder<CalculateRouteResponse.Builder,CalculateRouteResponse>,SdkPojo,SdkResponse.Builder
- Enclosing class:
- CalculateRouteResponse
public static interface CalculateRouteResponse.Builder extends LocationResponse.Builder, SdkPojo, CopyableBuilder<CalculateRouteResponse.Builder,CalculateRouteResponse>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CalculateRouteResponse.Builderlegs(Collection<Leg> legs)Contains details about each path between a pair of positions included along a route such as:StartPosition,EndPosition,Distance,DurationSeconds,Geometry, andSteps.CalculateRouteResponse.Builderlegs(Consumer<Leg.Builder>... legs)Contains details about each path between a pair of positions included along a route such as:StartPosition,EndPosition,Distance,DurationSeconds,Geometry, andSteps.CalculateRouteResponse.Builderlegs(Leg... legs)Contains details about each path between a pair of positions included along a route such as:StartPosition,EndPosition,Distance,DurationSeconds,Geometry, andSteps.default CalculateRouteResponse.Buildersummary(Consumer<CalculateRouteSummary.Builder> summary)Contains information about the whole route, such as:RouteBBox,DataSource,Distance,DistanceUnit, andDurationSeconds.CalculateRouteResponse.Buildersummary(CalculateRouteSummary summary)Contains information about the whole route, such as:RouteBBox,DataSource,Distance,DistanceUnit, andDurationSeconds.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.services.location.model.LocationResponse.Builder
build, responseMetadata, responseMetadata
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Methods inherited from interface software.amazon.awssdk.core.SdkResponse.Builder
sdkHttpResponse, sdkHttpResponse
-
-
-
-
Method Detail
-
legs
CalculateRouteResponse.Builder legs(Collection<Leg> legs)
Contains details about each path between a pair of positions included along a route such as:
StartPosition,EndPosition,Distance,DurationSeconds,Geometry, andSteps. 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
StartPositionis the departure position. -
The
EndPositionis 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
StartPositionis the departure position . TheEndPositionis the waypoint positon. -
Leg 2: The
StartPositionis the waypoint position. TheEndPositionis the destination position.
- Parameters:
legs- Contains details about each path between a pair of positions included along a route such as:StartPosition,EndPosition,Distance,DurationSeconds,Geometry, andSteps. 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
StartPositionis the departure position. -
The
EndPositionis 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
StartPositionis the departure position . TheEndPositionis the waypoint positon. -
Leg 2: The
StartPositionis the waypoint position. TheEndPositionis the destination position.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
legs
CalculateRouteResponse.Builder legs(Leg... legs)
Contains details about each path between a pair of positions included along a route such as:
StartPosition,EndPosition,Distance,DurationSeconds,Geometry, andSteps. 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
StartPositionis the departure position. -
The
EndPositionis 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
StartPositionis the departure position . TheEndPositionis the waypoint positon. -
Leg 2: The
StartPositionis the waypoint position. TheEndPositionis the destination position.
- Parameters:
legs- Contains details about each path between a pair of positions included along a route such as:StartPosition,EndPosition,Distance,DurationSeconds,Geometry, andSteps. 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
StartPositionis the departure position. -
The
EndPositionis 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
StartPositionis the departure position . TheEndPositionis the waypoint positon. -
Leg 2: The
StartPositionis the waypoint position. TheEndPositionis the destination position.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
legs
CalculateRouteResponse.Builder legs(Consumer<Leg.Builder>... legs)
Contains details about each path between a pair of positions included along a route such as:
StartPosition,EndPosition,Distance,DurationSeconds,Geometry, andSteps. 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
StartPositionis the departure position. -
The
EndPositionis 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
StartPositionis the departure position . TheEndPositionis the waypoint positon. -
Leg 2: The
StartPositionis the waypoint position. TheEndPositionis the destination position.
Leg.Builderavoiding the need to create one manually viaLeg.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#legs(List.) - Parameters:
legs- a consumer that will call methods onLeg.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#legs(java.util.Collection)
-
-
summary
CalculateRouteResponse.Builder summary(CalculateRouteSummary summary)
Contains information about the whole route, such as:
RouteBBox,DataSource,Distance,DistanceUnit, andDurationSeconds.- Parameters:
summary- Contains information about the whole route, such as:RouteBBox,DataSource,Distance,DistanceUnit, andDurationSeconds.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
summary
default CalculateRouteResponse.Builder summary(Consumer<CalculateRouteSummary.Builder> summary)
Contains information about the whole route, such as:
This is a convenience method that creates an instance of theRouteBBox,DataSource,Distance,DistanceUnit, andDurationSeconds.CalculateRouteSummary.Builderavoiding the need to create one manually viaCalculateRouteSummary.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosummary(CalculateRouteSummary).- Parameters:
summary- a consumer that will call methods onCalculateRouteSummary.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
summary(CalculateRouteSummary)
-
-