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 Details

    • 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      This is a convenience method that creates an instance of the Leg.Builder avoiding the need to create one manually via Leg.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to legs(List<Leg>).

      Parameters:
      legs - a consumer that will call methods on Leg.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • summary

      Contains information about the whole route, such as: RouteBBox, DataSource, Distance, DistanceUnit, and DurationSeconds.

      Parameters:
      summary - Contains information about the whole route, such as: RouteBBox, DataSource, Distance, DistanceUnit, and DurationSeconds.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • summary

      Contains information about the whole route, such as: RouteBBox, DataSource, Distance, DistanceUnit, and DurationSeconds.

      This is a convenience method that creates an instance of the CalculateRouteSummary.Builder avoiding the need to create one manually via CalculateRouteSummary.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to summary(CalculateRouteSummary).

      Parameters:
      summary - a consumer that will call methods on CalculateRouteSummary.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: