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'sStartPositionandEndPositionalong a calculated route.durationSeconds(Double durationSeconds) The estimated travel time between the leg'sStartPositionandEndPosition.endPosition(Double... endPosition) The terminating position of the leg.endPosition(Collection<Double> endPosition) The terminating position of the leg.default Leg.Buildergeometry(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
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
startPosition
The starting position of the leg. Follows the format
[longitude,latitude].If the
StartPositionisn'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
StartPositionisn'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
StartPositionisn'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
StartPositionisn'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
EndPositionisn'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
EndPositionisn'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
EndPositionisn'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
EndPositionisn'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.
-
distance
The distance between the leg's
StartPositionandEndPositionalong a calculated route.-
The default measurement is
Kilometersunless the request specifies aDistanceUnitofMiles.
- Parameters:
distance- The distance between the leg'sStartPositionandEndPositionalong a calculated route.-
The default measurement is
Kilometersunless the request specifies aDistanceUnitofMiles.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
durationSeconds
The estimated travel time between the leg's
StartPositionandEndPosition. 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'sStartPositionandEndPosition. 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.
-
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.Builderavoiding the need to create one manually viaLegGeometry.builder().When the
Consumercompletes,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:
-
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.Builderavoiding the need to create one manually viaStep.builder().When the
Consumercompletes,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:
-