/* * Copyright 2018-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.location.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Represents an element of a leg within a route. A step contains instructions for how to move to the next step in the * leg. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Step implements Serializable, Cloneable, StructuredPojo { /** *
* 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.
*
* 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
.
*
* 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
.
*
StartPosition
and EndPosition
.
*/
public void setDistance(Double distance) {
this.distance = distance;
}
/**
*
* The travel distance between the step's StartPosition
and EndPosition
.
*
StartPosition
and EndPosition
.
*/
public Double getDistance() {
return this.distance;
}
/**
*
* The travel distance between the step's StartPosition
and EndPosition
.
*
StartPosition
and EndPosition
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Step withDistance(Double distance) {
setDistance(distance);
return this;
}
/**
*
* 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.
*
StartPosition
to the
* EndPosition
. . The travel mode and departure time that you specify in the request determines
* the calculated time.
*/
public void setDurationSeconds(Double durationSeconds) {
this.durationSeconds = 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.
*
StartPosition
to the
* EndPosition
. . The travel mode and departure time that you specify in the request determines
* the calculated time.
*/
public Double getDurationSeconds() {
return this.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.
*
StartPosition
to the
* EndPosition
. . The travel mode and departure time that you specify in the request determines
* the calculated time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Step withDurationSeconds(Double durationSeconds) {
setDurationSeconds(durationSeconds);
return this;
}
/**
* * 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEndPosition(java.util.Collection)} or {@link #withEndPosition(java.util.Collection)} if you want to * override the existing values. *
* * @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 Returns a reference to this object so that method calls can be chained together. */ public Step withEndPosition(Double... endPosition) { if (this.endPosition == null) { setEndPosition(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. *
* * @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 Returns a reference to this 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
.
*
0
.
*
* Included in the response for queries that set IncludeLegGeometry
to True
.
*/
public void setGeometryOffset(Integer geometryOffset) {
this.geometryOffset = 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
.
*
0
.
*
* Included in the response for queries that set IncludeLegGeometry
to True
.
*/
public Integer getGeometryOffset() {
return this.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
.
*
0
.
*
* Included in the response for queries that set IncludeLegGeometry
to True
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Step withGeometryOffset(Integer geometryOffset) {
setGeometryOffset(geometryOffset);
return this;
}
/**
*
* 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setStartPosition(java.util.Collection)} or {@link #withStartPosition(java.util.Collection)} if you want * to override the existing values. *
* * @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 Returns a reference to this object so that method calls can be chained together. */ public Step withStartPosition(Double... startPosition) { if (this.startPosition == null) { setStartPosition(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. *
* * @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 Returns a reference to this object so that method calls can be chained together. */ public Step withStartPosition(java.util.Collection