Interface Leg.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<Leg.Builder,Leg>,SdkBuilder<Leg.Builder,Leg>,SdkPojo
- Enclosing class:
- Leg
public static interface Leg.Builder extends SdkPojo, CopyableBuilder<Leg.Builder,Leg>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Leg.Builderdistance(Double distance)The distance between the leg'sStartPositionandEndPositionalong a calculated route.Leg.BuilderdurationSeconds(Double durationSeconds)The estimated travel time between the leg'sStartPositionandEndPosition.Leg.BuilderendPosition(Double... endPosition)The terminating position of the leg.Leg.BuilderendPosition(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.Leg.Buildergeometry(LegGeometry geometry)Contains the calculated route's path as a linestring geometry.Leg.BuilderstartPosition(Double... startPosition)The starting position of the leg.Leg.BuilderstartPosition(Collection<Double> startPosition)The starting position of the leg.Leg.Buildersteps(Collection<Step> steps)Contains a list of steps, which represent subsections of a leg.Leg.Buildersteps(Consumer<Step.Builder>... steps)Contains a list of steps, which represent subsections of a leg.Leg.Buildersteps(Step... steps)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 Detail
-
startPosition
Leg.Builder startPosition(Collection<Double> 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
Leg.Builder startPosition(Double... 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
Leg.Builder endPosition(Collection<Double> 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
Leg.Builder endPosition(Double... 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
Leg.Builder distance(Double 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
Leg.Builder durationSeconds(Double 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
Leg.Builder geometry(LegGeometry 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
default Leg.Builder geometry(Consumer<LegGeometry.Builder> 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:
geometry(LegGeometry)
-
steps
Leg.Builder steps(Collection<Step> 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
Leg.Builder steps(Step... 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
Leg.Builder steps(Consumer<Step.Builder>... 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 to#steps(List.) - 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:
#steps(java.util.Collection)
-
-