AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
Leg.h
1
6#pragma once
7#include <aws/location/LocationService_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/location/model/LegGeometry.h>
10#include <aws/location/model/Step.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace LocationService
24{
25namespace Model
26{
27
47 class Leg
48 {
49 public:
50 AWS_LOCATIONSERVICE_API Leg() = default;
51 AWS_LOCATIONSERVICE_API Leg(Aws::Utils::Json::JsonView jsonValue);
52 AWS_LOCATIONSERVICE_API Leg& operator=(Aws::Utils::Json::JsonView jsonValue);
53 AWS_LOCATIONSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
54
55
57
64 inline const Aws::Vector<double>& GetStartPosition() const { return m_startPosition; }
65 inline bool StartPositionHasBeenSet() const { return m_startPositionHasBeenSet; }
66 template<typename StartPositionT = Aws::Vector<double>>
67 void SetStartPosition(StartPositionT&& value) { m_startPositionHasBeenSet = true; m_startPosition = std::forward<StartPositionT>(value); }
68 template<typename StartPositionT = Aws::Vector<double>>
69 Leg& WithStartPosition(StartPositionT&& value) { SetStartPosition(std::forward<StartPositionT>(value)); return *this;}
70 inline Leg& AddStartPosition(double value) { m_startPositionHasBeenSet = true; m_startPosition.push_back(value); return *this; }
72
74
81 inline const Aws::Vector<double>& GetEndPosition() const { return m_endPosition; }
82 inline bool EndPositionHasBeenSet() const { return m_endPositionHasBeenSet; }
83 template<typename EndPositionT = Aws::Vector<double>>
84 void SetEndPosition(EndPositionT&& value) { m_endPositionHasBeenSet = true; m_endPosition = std::forward<EndPositionT>(value); }
85 template<typename EndPositionT = Aws::Vector<double>>
86 Leg& WithEndPosition(EndPositionT&& value) { SetEndPosition(std::forward<EndPositionT>(value)); return *this;}
87 inline Leg& AddEndPosition(double value) { m_endPositionHasBeenSet = true; m_endPosition.push_back(value); return *this; }
89
91
97 inline double GetDistance() const { return m_distance; }
98 inline bool DistanceHasBeenSet() const { return m_distanceHasBeenSet; }
99 inline void SetDistance(double value) { m_distanceHasBeenSet = true; m_distance = value; }
100 inline Leg& WithDistance(double value) { SetDistance(value); return *this;}
102
104
109 inline double GetDurationSeconds() const { return m_durationSeconds; }
110 inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
111 inline void SetDurationSeconds(double value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; }
112 inline Leg& WithDurationSeconds(double value) { SetDurationSeconds(value); return *this;}
114
116
119 inline const LegGeometry& GetGeometry() const { return m_geometry; }
120 inline bool GeometryHasBeenSet() const { return m_geometryHasBeenSet; }
121 template<typename GeometryT = LegGeometry>
122 void SetGeometry(GeometryT&& value) { m_geometryHasBeenSet = true; m_geometry = std::forward<GeometryT>(value); }
123 template<typename GeometryT = LegGeometry>
124 Leg& WithGeometry(GeometryT&& value) { SetGeometry(std::forward<GeometryT>(value)); return *this;}
126
128
134 inline const Aws::Vector<Step>& GetSteps() const { return m_steps; }
135 inline bool StepsHasBeenSet() const { return m_stepsHasBeenSet; }
136 template<typename StepsT = Aws::Vector<Step>>
137 void SetSteps(StepsT&& value) { m_stepsHasBeenSet = true; m_steps = std::forward<StepsT>(value); }
138 template<typename StepsT = Aws::Vector<Step>>
139 Leg& WithSteps(StepsT&& value) { SetSteps(std::forward<StepsT>(value)); return *this;}
140 template<typename StepsT = Step>
141 Leg& AddSteps(StepsT&& value) { m_stepsHasBeenSet = true; m_steps.emplace_back(std::forward<StepsT>(value)); return *this; }
143 private:
144
145 Aws::Vector<double> m_startPosition;
146 bool m_startPositionHasBeenSet = false;
147
148 Aws::Vector<double> m_endPosition;
149 bool m_endPositionHasBeenSet = false;
150
151 double m_distance{0.0};
152 bool m_distanceHasBeenSet = false;
153
154 double m_durationSeconds{0.0};
155 bool m_durationSecondsHasBeenSet = false;
156
157 LegGeometry m_geometry;
158 bool m_geometryHasBeenSet = false;
159
160 Aws::Vector<Step> m_steps;
161 bool m_stepsHasBeenSet = false;
162 };
163
164} // namespace Model
165} // namespace LocationService
166} // namespace Aws
AWS_LOCATIONSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
void SetStartPosition(StartPositionT &&value)
Definition Leg.h:67
double GetDurationSeconds() const
Definition Leg.h:109
AWS_LOCATIONSERVICE_API Leg()=default
bool StartPositionHasBeenSet() const
Definition Leg.h:65
Leg & WithDurationSeconds(double value)
Definition Leg.h:112
bool EndPositionHasBeenSet() const
Definition Leg.h:82
void SetDurationSeconds(double value)
Definition Leg.h:111
void SetGeometry(GeometryT &&value)
Definition Leg.h:122
Leg & WithStartPosition(StartPositionT &&value)
Definition Leg.h:69
bool GeometryHasBeenSet() const
Definition Leg.h:120
Leg & AddSteps(StepsT &&value)
Definition Leg.h:141
void SetSteps(StepsT &&value)
Definition Leg.h:137
Leg & AddEndPosition(double value)
Definition Leg.h:87
bool DistanceHasBeenSet() const
Definition Leg.h:98
const LegGeometry & GetGeometry() const
Definition Leg.h:119
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:135
bool DurationSecondsHasBeenSet() const
Definition Leg.h:110
Leg & WithGeometry(GeometryT &&value)
Definition Leg.h:124
Leg & WithDistance(double value)
Definition Leg.h:100
double GetDistance() const
Definition Leg.h:97
Leg & WithSteps(StepsT &&value)
Definition Leg.h:139
Leg & AddStartPosition(double value)
Definition Leg.h:70
const Aws::Vector< Step > & GetSteps() const
Definition Leg.h:134
void SetEndPosition(EndPositionT &&value)
Definition Leg.h:84
Leg & WithEndPosition(EndPositionT &&value)
Definition Leg.h:86
void SetDistance(double value)
Definition Leg.h:99
const Aws::Vector< double > & GetEndPosition() const
Definition Leg.h:81
const Aws::Vector< double > & GetStartPosition() const
Definition Leg.h:64
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue