/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace LocationService { namespace Model { /** *

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 Also:

AWS API * Reference

*/ class Step { public: AWS_LOCATIONSERVICE_API Step(); AWS_LOCATIONSERVICE_API Step(Aws::Utils::Json::JsonView jsonValue); AWS_LOCATIONSERVICE_API Step& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LOCATIONSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The travel distance between the step's StartPosition and * EndPosition.

*/ inline double GetDistance() const{ return m_distance; } /** *

The travel distance between the step's StartPosition and * EndPosition.

*/ inline bool DistanceHasBeenSet() const { return m_distanceHasBeenSet; } /** *

The travel distance between the step's StartPosition and * EndPosition.

*/ inline void SetDistance(double value) { m_distanceHasBeenSet = true; m_distance = value; } /** *

The travel distance between the step's StartPosition and * EndPosition.

*/ inline Step& WithDistance(double value) { SetDistance(value); 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.

*/ inline double GetDurationSeconds() const{ return m_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.

*/ inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; } /** *

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.

*/ inline void SetDurationSeconds(double value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; } /** *

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.

*/ inline Step& WithDurationSeconds(double value) { SetDurationSeconds(value); 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.

*/ inline const Aws::Vector& GetEndPosition() const{ return m_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.

*/ inline bool EndPositionHasBeenSet() const { return m_endPositionHasBeenSet; } /** *

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.

*/ inline void SetEndPosition(const Aws::Vector& value) { m_endPositionHasBeenSet = true; m_endPosition = value; } /** *

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.

*/ inline void SetEndPosition(Aws::Vector&& value) { m_endPositionHasBeenSet = true; m_endPosition = std::move(value); } /** *

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.

*/ inline Step& WithEndPosition(const Aws::Vector& value) { SetEndPosition(value); 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.

*/ inline Step& WithEndPosition(Aws::Vector&& value) { SetEndPosition(std::move(value)); 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.

*/ inline Step& AddEndPosition(double value) { m_endPositionHasBeenSet = true; m_endPosition.push_back(value); return *this; } /** *

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.

*/ inline int GetGeometryOffset() const{ return m_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.

*/ inline bool GeometryOffsetHasBeenSet() const { return m_geometryOffsetHasBeenSet; } /** *

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.

*/ inline void SetGeometryOffset(int value) { m_geometryOffsetHasBeenSet = true; m_geometryOffset = value; } /** *

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.

*/ inline Step& WithGeometryOffset(int value) { SetGeometryOffset(value); 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.

*/ inline const Aws::Vector& GetStartPosition() const{ return m_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.

*/ inline bool StartPositionHasBeenSet() const { return m_startPositionHasBeenSet; } /** *

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.

*/ inline void SetStartPosition(const Aws::Vector& value) { m_startPositionHasBeenSet = true; m_startPosition = value; } /** *

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.

*/ inline void SetStartPosition(Aws::Vector&& value) { m_startPositionHasBeenSet = true; m_startPosition = std::move(value); } /** *

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.

*/ inline Step& WithStartPosition(const Aws::Vector& value) { SetStartPosition(value); 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.

*/ inline Step& WithStartPosition(Aws::Vector&& value) { SetStartPosition(std::move(value)); 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.

*/ inline Step& AddStartPosition(double value) { m_startPositionHasBeenSet = true; m_startPosition.push_back(value); return *this; } private: double m_distance; bool m_distanceHasBeenSet = false; double m_durationSeconds; bool m_durationSecondsHasBeenSet = false; Aws::Vector m_endPosition; bool m_endPositionHasBeenSet = false; int m_geometryOffset; bool m_geometryOffsetHasBeenSet = false; Aws::Vector m_startPosition; bool m_startPositionHasBeenSet = false; }; } // namespace Model } // namespace LocationService } // namespace Aws