AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
Leg.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/location/LocationService_EXPORTS.h>
9#include <aws/location/model/LegGeometry.h>
10#include <aws/location/model/Step.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace LocationService {
22namespace Model {
23
43class Leg {
44 public:
45 AWS_LOCATIONSERVICE_API Leg() = default;
46 AWS_LOCATIONSERVICE_API Leg(Aws::Utils::Json::JsonView jsonValue);
47 AWS_LOCATIONSERVICE_API Leg& operator=(Aws::Utils::Json::JsonView jsonValue);
48 AWS_LOCATIONSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
49
51
58 inline const Aws::Vector<double>& GetStartPosition() const { return m_startPosition; }
59 inline bool StartPositionHasBeenSet() const { return m_startPositionHasBeenSet; }
60 template <typename StartPositionT = Aws::Vector<double>>
61 void SetStartPosition(StartPositionT&& value) {
62 m_startPositionHasBeenSet = true;
63 m_startPosition = std::forward<StartPositionT>(value);
64 }
65 template <typename StartPositionT = Aws::Vector<double>>
66 Leg& WithStartPosition(StartPositionT&& value) {
67 SetStartPosition(std::forward<StartPositionT>(value));
68 return *this;
69 }
70 inline Leg& AddStartPosition(double value) {
71 m_startPositionHasBeenSet = true;
72 m_startPosition.push_back(value);
73 return *this;
74 }
76
78
85 inline const Aws::Vector<double>& GetEndPosition() const { return m_endPosition; }
86 inline bool EndPositionHasBeenSet() const { return m_endPositionHasBeenSet; }
87 template <typename EndPositionT = Aws::Vector<double>>
88 void SetEndPosition(EndPositionT&& value) {
89 m_endPositionHasBeenSet = true;
90 m_endPosition = std::forward<EndPositionT>(value);
91 }
92 template <typename EndPositionT = Aws::Vector<double>>
93 Leg& WithEndPosition(EndPositionT&& value) {
94 SetEndPosition(std::forward<EndPositionT>(value));
95 return *this;
96 }
97 inline Leg& AddEndPosition(double value) {
98 m_endPositionHasBeenSet = true;
99 m_endPosition.push_back(value);
100 return *this;
101 }
103
105
111 inline double GetDistance() const { return m_distance; }
112 inline bool DistanceHasBeenSet() const { return m_distanceHasBeenSet; }
113 inline void SetDistance(double value) {
114 m_distanceHasBeenSet = true;
115 m_distance = value;
116 }
117 inline Leg& WithDistance(double value) {
118 SetDistance(value);
119 return *this;
120 }
122
124
129 inline double GetDurationSeconds() const { return m_durationSeconds; }
130 inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
131 inline void SetDurationSeconds(double value) {
132 m_durationSecondsHasBeenSet = true;
133 m_durationSeconds = value;
134 }
135 inline Leg& WithDurationSeconds(double value) {
136 SetDurationSeconds(value);
137 return *this;
138 }
140
142
145 inline const LegGeometry& GetGeometry() const { return m_geometry; }
146 inline bool GeometryHasBeenSet() const { return m_geometryHasBeenSet; }
147 template <typename GeometryT = LegGeometry>
148 void SetGeometry(GeometryT&& value) {
149 m_geometryHasBeenSet = true;
150 m_geometry = std::forward<GeometryT>(value);
151 }
152 template <typename GeometryT = LegGeometry>
153 Leg& WithGeometry(GeometryT&& value) {
154 SetGeometry(std::forward<GeometryT>(value));
155 return *this;
156 }
158
160
166 inline const Aws::Vector<Step>& GetSteps() const { return m_steps; }
167 inline bool StepsHasBeenSet() const { return m_stepsHasBeenSet; }
168 template <typename StepsT = Aws::Vector<Step>>
169 void SetSteps(StepsT&& value) {
170 m_stepsHasBeenSet = true;
171 m_steps = std::forward<StepsT>(value);
172 }
173 template <typename StepsT = Aws::Vector<Step>>
174 Leg& WithSteps(StepsT&& value) {
175 SetSteps(std::forward<StepsT>(value));
176 return *this;
177 }
178 template <typename StepsT = Step>
179 Leg& AddSteps(StepsT&& value) {
180 m_stepsHasBeenSet = true;
181 m_steps.emplace_back(std::forward<StepsT>(value));
182 return *this;
183 }
185 private:
186 Aws::Vector<double> m_startPosition;
187
188 Aws::Vector<double> m_endPosition;
189
190 double m_distance{0.0};
191
192 double m_durationSeconds{0.0};
193
194 LegGeometry m_geometry;
195
196 Aws::Vector<Step> m_steps;
197 bool m_startPositionHasBeenSet = false;
198 bool m_endPositionHasBeenSet = false;
199 bool m_distanceHasBeenSet = false;
200 bool m_durationSecondsHasBeenSet = false;
201 bool m_geometryHasBeenSet = false;
202 bool m_stepsHasBeenSet = false;
203};
204
205} // namespace Model
206} // namespace LocationService
207} // namespace Aws
AWS_LOCATIONSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
void SetStartPosition(StartPositionT &&value)
Definition Leg.h:61
double GetDurationSeconds() const
Definition Leg.h:129
AWS_LOCATIONSERVICE_API Leg()=default
bool StartPositionHasBeenSet() const
Definition Leg.h:59
Leg & WithDurationSeconds(double value)
Definition Leg.h:135
bool EndPositionHasBeenSet() const
Definition Leg.h:86
void SetDurationSeconds(double value)
Definition Leg.h:131
void SetGeometry(GeometryT &&value)
Definition Leg.h:148
Leg & WithStartPosition(StartPositionT &&value)
Definition Leg.h:66
bool GeometryHasBeenSet() const
Definition Leg.h:146
Leg & AddSteps(StepsT &&value)
Definition Leg.h:179
void SetSteps(StepsT &&value)
Definition Leg.h:169
Leg & AddEndPosition(double value)
Definition Leg.h:97
bool DistanceHasBeenSet() const
Definition Leg.h:112
const LegGeometry & GetGeometry() const
Definition Leg.h:145
AWS_LOCATIONSERVICE_API Leg & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_LOCATIONSERVICE_API Leg(Aws::Utils::Json::JsonView jsonValue)
bool StepsHasBeenSet() const
Definition Leg.h:167
bool DurationSecondsHasBeenSet() const
Definition Leg.h:130
Leg & WithGeometry(GeometryT &&value)
Definition Leg.h:153
Leg & WithDistance(double value)
Definition Leg.h:117
double GetDistance() const
Definition Leg.h:111
Leg & WithSteps(StepsT &&value)
Definition Leg.h:174
Leg & AddStartPosition(double value)
Definition Leg.h:70
const Aws::Vector< Step > & GetSteps() const
Definition Leg.h:166
void SetEndPosition(EndPositionT &&value)
Definition Leg.h:88
Leg & WithEndPosition(EndPositionT &&value)
Definition Leg.h:93
void SetDistance(double value)
Definition Leg.h:113
const Aws::Vector< double > & GetEndPosition() const
Definition Leg.h:85
const Aws::Vector< double > & GetStartPosition() const
Definition Leg.h:58
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue