/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.geo.model; import java.io.Serializable; /** *
* Represents an element of a leg within a route. A step contains instructions * for how to move to the next step in the leg. *
*/ public class Step implements Serializable { /** *
* The travel distance between the step's StartPosition
and
* EndPosition
.
*
* Constraints:
* Range: 0.0 -
*/
private Double distance;
/**
*
* The estimated travel time, in seconds, from the step's
* StartPosition
to the EndPosition
. . The travel
* mode and departure time that you specify in the request determines the
* calculated time.
*
* Constraints:
* Range: 0.0 -
*/
private Double durationSeconds;
/**
*
* The end position of a step. If the position the last step in the leg, * this position is the same as the end position of the leg. *
*/ private java.util.List
* Represents the start position, or index, in a sequence of steps within
* the leg's line string geometry. For example, the index of the first step
* in a leg geometry is 0
.
*
* Included in the response for queries that set
* IncludeLegGeometry
to True
.
*
* Constraints:
* Range: 0 -
*/
private Integer geometryOffset;
/**
*
* The starting position of a step. If the position is the first step in the * leg, this position is the same as the start position of the leg. *
*/ private java.util.List
* The travel distance between the step's StartPosition
and
* EndPosition
.
*
* Constraints:
* Range: 0.0 -
*
* @return
* The travel distance between the step's StartPosition
* and EndPosition
.
*
* The travel distance between the step's StartPosition
and
* EndPosition
.
*
* Constraints:
* Range: 0.0 -
*
* @param distance
* The travel distance between the step's
* StartPosition
and EndPosition
.
*
* The travel distance between the step's StartPosition
and
* EndPosition
.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0.0 -
*
* @param distance
* The travel distance between the step's
* StartPosition
and EndPosition
.
*
* The estimated travel time, in seconds, from the step's
* StartPosition
to the EndPosition
. . The travel
* mode and departure time that you specify in the request determines the
* calculated time.
*
* Constraints:
* Range: 0.0 -
*
* @return
* The estimated travel time, in seconds, from the step's
* StartPosition
to the EndPosition
. . The
* travel mode and departure time that you specify in the request
* determines the calculated time.
*
* The estimated travel time, in seconds, from the step's
* StartPosition
to the EndPosition
. . The travel
* mode and departure time that you specify in the request determines the
* calculated time.
*
* Constraints:
* Range: 0.0 -
*
* @param durationSeconds
* The estimated travel time, in seconds, from the step's
* StartPosition
to the EndPosition
. .
* The travel mode and departure time that you specify in the
* request determines the calculated time.
*
* The estimated travel time, in seconds, from the step's
* StartPosition
to the EndPosition
. . The travel
* mode and departure time that you specify in the request determines the
* calculated time.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0.0 -
*
* @param durationSeconds
* The estimated travel time, in seconds, from the step's
* StartPosition
to the EndPosition
. .
* The travel mode and departure time that you specify in the
* request determines the calculated time.
*
* The end position of a step. If the position the last step in the leg, * this position is the same as the end position of the leg. *
* * @return* The end position of a step. If the position the last step in the * leg, this position is the same as the end position of the leg. *
*/ public java.util.List* The end position of a step. If the position the last step in the leg, * this position is the same as the end position of the leg. *
* * @param endPosition* The end position of a step. If the position the last step in * the leg, this position is the same as the end position of the * leg. *
*/ public void setEndPosition(java.util.Collection* The end position of a step. If the position the last step in the leg, * this position is the same as the end position of the leg. *
** Returns a reference to this object so that method calls can be chained * together. * * @param endPosition
* The end position of a step. If the position the last step in * the leg, this position is the same as the end position of the * leg. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Step withEndPosition(Double... endPosition) { if (getEndPosition() == null) { this.endPosition = new java.util.ArrayList* The end position of a step. If the position the last step in the leg, * this position is the same as the end position of the leg. *
** Returns a reference to this object so that method calls can be chained * together. * * @param endPosition
* The end position of a step. If the position the last step in * the leg, this position is the same as the end position of the * leg. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Step withEndPosition(java.util.Collection
* Represents the start position, or index, in a sequence of steps within
* the leg's line string geometry. For example, the index of the first step
* in a leg geometry is 0
.
*
* Included in the response for queries that set
* IncludeLegGeometry
to True
.
*
* Constraints:
* Range: 0 -
*
* @return
* Represents the start position, or index, in a sequence of steps
* within the leg's line string geometry. For example, the index of
* the first step in a leg geometry is 0
.
*
* Included in the response for queries that set
* IncludeLegGeometry
to True
.
*
* Represents the start position, or index, in a sequence of steps within
* the leg's line string geometry. For example, the index of the first step
* in a leg geometry is 0
.
*
* Included in the response for queries that set
* IncludeLegGeometry
to True
.
*
* Constraints:
* Range: 0 -
*
* @param geometryOffset
* Represents the start position, or index, in a sequence of
* steps within the leg's line string geometry. For example, the
* index of the first step in a leg geometry is 0
.
*
* Included in the response for queries that set
* IncludeLegGeometry
to True
.
*
* Represents the start position, or index, in a sequence of steps within
* the leg's line string geometry. For example, the index of the first step
* in a leg geometry is 0
.
*
* Included in the response for queries that set
* IncludeLegGeometry
to True
.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0 -
*
* @param geometryOffset
* Represents the start position, or index, in a sequence of
* steps within the leg's line string geometry. For example, the
* index of the first step in a leg geometry is 0
.
*
* Included in the response for queries that set
* IncludeLegGeometry
to True
.
*
* The starting position of a step. If the position is the first step in the * leg, this position is the same as the start position of the leg. *
* * @return* The starting position of a step. If the position is the first * step in the leg, this position is the same as the start position * of the leg. *
*/ public java.util.List* The starting position of a step. If the position is the first step in the * leg, this position is the same as the start position of the leg. *
* * @param startPosition* The starting position of a step. If the position is the first * step in the leg, this position is the same as the start * position of the leg. *
*/ public void setStartPosition(java.util.Collection* The starting position of a step. If the position is the first step in the * leg, this position is the same as the start position of the leg. *
** Returns a reference to this object so that method calls can be chained * together. * * @param startPosition
* The starting position of a step. If the position is the first * step in the leg, this position is the same as the start * position of the leg. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Step withStartPosition(Double... startPosition) { if (getStartPosition() == null) { this.startPosition = new java.util.ArrayList* The starting position of a step. If the position is the first step in the * leg, this position is the same as the start position of the leg. *
** Returns a reference to this object so that method calls can be chained * together. * * @param startPosition
* The starting position of a step. If the position is the first * step in the leg, this position is the same as the start * position of the leg. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Step withStartPosition(java.util.Collection