Interface Leg.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<Leg.Builder,
,Leg> SdkBuilder<Leg.Builder,
,Leg> SdkPojo
- Enclosing class:
Leg
-
Method Summary
Modifier and TypeMethodDescriptionThe distance between the leg'sStartPosition
andEndPosition
along a calculated route.durationSeconds
(Double durationSeconds) The estimated travel time between the leg'sStartPosition
andEndPosition
.endPosition
(Double... endPosition) The terminating position of the leg.endPosition
(Collection<Double> endPosition) The terminating position of the leg.default Leg.Builder
geometry
(Consumer<LegGeometry.Builder> geometry) Contains the calculated route's path as a linestring geometry.geometry
(LegGeometry geometry) Contains the calculated route's path as a linestring geometry.startPosition
(Double... startPosition) The starting position of the leg.startPosition
(Collection<Double> startPosition) The starting position of the leg.steps
(Collection<Step> steps) Contains a list of steps, which represent subsections of a leg.steps
(Consumer<Step.Builder>... steps) Contains a list of steps, which represent subsections of a leg.Contains a list of steps, which represent subsections of a leg.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
distance
The distance between the leg's
StartPosition
andEndPosition
along a calculated route.-
The default measurement is
Kilometers
unless the request specifies aDistanceUnit
ofMiles
.
- Parameters:
distance
- The distance between the leg'sStartPosition
andEndPosition
along a calculated route.-
The default measurement is
Kilometers
unless the request specifies aDistanceUnit
ofMiles
.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
durationSeconds
The estimated travel time between the leg's
StartPosition
andEndPosition
. The travel mode and departure time that you specify in the request determines the calculated time.- Parameters:
durationSeconds
- The estimated travel time between the leg'sStartPosition
andEndPosition
. The travel mode and departure time that you specify in the request determines the calculated time.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
endPosition
The terminating position of the leg. Follows the format
[longitude,latitude]
.If the
EndPosition
isn't located on a road, it's snapped to a nearby road.- Parameters:
endPosition
- The terminating position of the leg. Follows the format[longitude,latitude]
.If the
EndPosition
isn't located on a road, it's snapped to a nearby road.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
endPosition
The terminating position of the leg. Follows the format
[longitude,latitude]
.If the
EndPosition
isn't located on a road, it's snapped to a nearby road.- Parameters:
endPosition
- The terminating position of the leg. Follows the format[longitude,latitude]
.If the
EndPosition
isn't located on a road, it's snapped to a nearby road.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
geometry
Contains the calculated route's path as a linestring geometry.
- Parameters:
geometry
- Contains the calculated route's path as a linestring geometry.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
geometry
Contains the calculated route's path as a linestring geometry.
This is a convenience method that creates an instance of theLegGeometry.Builder
avoiding the need to create one manually viaLegGeometry.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed togeometry(LegGeometry)
.- Parameters:
geometry
- a consumer that will call methods onLegGeometry.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
startPosition
The starting position of the leg. Follows the format
[longitude,latitude]
.If the
StartPosition
isn't located on a road, it's snapped to a nearby road.- Parameters:
startPosition
- The starting position of the leg. Follows the format[longitude,latitude]
.If the
StartPosition
isn't located on a road, it's snapped to a nearby road.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
startPosition
The starting position of the leg. Follows the format
[longitude,latitude]
.If the
StartPosition
isn't located on a road, it's snapped to a nearby road.- Parameters:
startPosition
- The starting position of the leg. Follows the format[longitude,latitude]
.If the
StartPosition
isn't located on a road, it's snapped to a nearby road.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
steps
Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.
- Parameters:
steps
- Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
steps
Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.
- Parameters:
steps
- Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
steps
Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.
This is a convenience method that creates an instance of theStep.Builder
avoiding the need to create one manually viaStep.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tosteps(List<Step>)
.- Parameters:
steps
- a consumer that will call methods onStep.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-