AWS SDK for C++

AWS SDK for C++ Version 1.11.929

Loading...
Searching...
No Matches
DataValue.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/iottwinmaker/IoTTwinMaker_EXPORTS.h>
11#include <aws/iottwinmaker/model/RelationshipValue.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace IoTTwinMaker {
23namespace Model {
24
31class DataValue {
32 public:
33 AWS_IOTTWINMAKER_API DataValue() = default;
34 AWS_IOTTWINMAKER_API DataValue(Aws::Utils::Json::JsonView jsonValue);
35 AWS_IOTTWINMAKER_API DataValue& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_IOTTWINMAKER_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline bool GetBooleanValue() const { return m_booleanValue; }
43 inline bool BooleanValueHasBeenSet() const { return m_booleanValueHasBeenSet; }
44 inline void SetBooleanValue(bool value) {
45 m_booleanValueHasBeenSet = true;
46 m_booleanValue = value;
47 }
48 inline DataValue& WithBooleanValue(bool value) {
49 SetBooleanValue(value);
50 return *this;
51 }
53
55
58 inline double GetDoubleValue() const { return m_doubleValue; }
59 inline bool DoubleValueHasBeenSet() const { return m_doubleValueHasBeenSet; }
60 inline void SetDoubleValue(double value) {
61 m_doubleValueHasBeenSet = true;
62 m_doubleValue = value;
63 }
64 inline DataValue& WithDoubleValue(double value) {
65 SetDoubleValue(value);
66 return *this;
67 }
69
71
74 inline int GetIntegerValue() const { return m_integerValue; }
75 inline bool IntegerValueHasBeenSet() const { return m_integerValueHasBeenSet; }
76 inline void SetIntegerValue(int value) {
77 m_integerValueHasBeenSet = true;
78 m_integerValue = value;
79 }
80 inline DataValue& WithIntegerValue(int value) {
81 SetIntegerValue(value);
82 return *this;
83 }
85
87
90 inline long long GetLongValue() const { return m_longValue; }
91 inline bool LongValueHasBeenSet() const { return m_longValueHasBeenSet; }
92 inline void SetLongValue(long long value) {
93 m_longValueHasBeenSet = true;
94 m_longValue = value;
95 }
96 inline DataValue& WithLongValue(long long value) {
97 SetLongValue(value);
98 return *this;
99 }
101
103
106 inline const Aws::String& GetStringValue() const { return m_stringValue; }
107 inline bool StringValueHasBeenSet() const { return m_stringValueHasBeenSet; }
108 template <typename StringValueT = Aws::String>
109 void SetStringValue(StringValueT&& value) {
110 m_stringValueHasBeenSet = true;
111 m_stringValue = std::forward<StringValueT>(value);
112 }
113 template <typename StringValueT = Aws::String>
114 DataValue& WithStringValue(StringValueT&& value) {
115 SetStringValue(std::forward<StringValueT>(value));
116 return *this;
117 }
119
121
124 inline const Aws::Vector<DataValue>& GetListValue() const { return m_listValue; }
125 inline bool ListValueHasBeenSet() const { return m_listValueHasBeenSet; }
126 template <typename ListValueT = Aws::Vector<DataValue>>
127 void SetListValue(ListValueT&& value) {
128 m_listValueHasBeenSet = true;
129 m_listValue = std::forward<ListValueT>(value);
130 }
131 template <typename ListValueT = Aws::Vector<DataValue>>
132 DataValue& WithListValue(ListValueT&& value) {
133 SetListValue(std::forward<ListValueT>(value));
134 return *this;
135 }
136 template <typename ListValueT = DataValue>
137 DataValue& AddListValue(ListValueT&& value) {
138 m_listValueHasBeenSet = true;
139 m_listValue.emplace_back(std::forward<ListValueT>(value));
140 return *this;
141 }
143
145
148 inline const Aws::Map<Aws::String, DataValue>& GetMapValue() const { return m_mapValue; }
149 inline bool MapValueHasBeenSet() const { return m_mapValueHasBeenSet; }
150 template <typename MapValueT = Aws::Map<Aws::String, DataValue>>
151 void SetMapValue(MapValueT&& value) {
152 m_mapValueHasBeenSet = true;
153 m_mapValue = std::forward<MapValueT>(value);
154 }
155 template <typename MapValueT = Aws::Map<Aws::String, DataValue>>
156 DataValue& WithMapValue(MapValueT&& value) {
157 SetMapValue(std::forward<MapValueT>(value));
158 return *this;
159 }
160 template <typename MapValueKeyT = Aws::String, typename MapValueValueT = DataValue>
161 DataValue& AddMapValue(MapValueKeyT&& key, MapValueValueT&& value) {
162 m_mapValueHasBeenSet = true;
163 m_mapValue.emplace(std::forward<MapValueKeyT>(key), std::forward<MapValueValueT>(value));
164 return *this;
165 }
167
169
172 inline const RelationshipValue& GetRelationshipValue() const { return m_relationshipValue; }
173 inline bool RelationshipValueHasBeenSet() const { return m_relationshipValueHasBeenSet; }
174 template <typename RelationshipValueT = RelationshipValue>
175 void SetRelationshipValue(RelationshipValueT&& value) {
176 m_relationshipValueHasBeenSet = true;
177 m_relationshipValue = std::forward<RelationshipValueT>(value);
178 }
179 template <typename RelationshipValueT = RelationshipValue>
180 DataValue& WithRelationshipValue(RelationshipValueT&& value) {
181 SetRelationshipValue(std::forward<RelationshipValueT>(value));
182 return *this;
183 }
185
187
190 inline const Aws::String& GetExpression() const { return m_expression; }
191 inline bool ExpressionHasBeenSet() const { return m_expressionHasBeenSet; }
192 template <typename ExpressionT = Aws::String>
193 void SetExpression(ExpressionT&& value) {
194 m_expressionHasBeenSet = true;
195 m_expression = std::forward<ExpressionT>(value);
196 }
197 template <typename ExpressionT = Aws::String>
198 DataValue& WithExpression(ExpressionT&& value) {
199 SetExpression(std::forward<ExpressionT>(value));
200 return *this;
201 }
203 private:
204 bool m_booleanValue{false};
205
206 double m_doubleValue{0.0};
207
208 int m_integerValue{0};
209
210 long long m_longValue{0};
211
212 Aws::String m_stringValue;
213
214 Aws::Vector<DataValue> m_listValue;
215
217
218 RelationshipValue m_relationshipValue;
219
220 Aws::String m_expression;
221 bool m_booleanValueHasBeenSet = false;
222 bool m_doubleValueHasBeenSet = false;
223 bool m_integerValueHasBeenSet = false;
224 bool m_longValueHasBeenSet = false;
225 bool m_stringValueHasBeenSet = false;
226 bool m_listValueHasBeenSet = false;
227 bool m_mapValueHasBeenSet = false;
228 bool m_relationshipValueHasBeenSet = false;
229 bool m_expressionHasBeenSet = false;
230};
231
232} // namespace Model
233} // namespace IoTTwinMaker
234} // namespace Aws
const Aws::Map< Aws::String, DataValue > & GetMapValue() const
Definition DataValue.h:148
void SetExpression(ExpressionT &&value)
Definition DataValue.h:193
void SetMapValue(MapValueT &&value)
Definition DataValue.h:151
DataValue & WithLongValue(long long value)
Definition DataValue.h:96
DataValue & WithIntegerValue(int value)
Definition DataValue.h:80
DataValue & WithStringValue(StringValueT &&value)
Definition DataValue.h:114
void SetListValue(ListValueT &&value)
Definition DataValue.h:127
DataValue & WithListValue(ListValueT &&value)
Definition DataValue.h:132
void SetRelationshipValue(RelationshipValueT &&value)
Definition DataValue.h:175
const Aws::String & GetStringValue() const
Definition DataValue.h:106
void SetStringValue(StringValueT &&value)
Definition DataValue.h:109
DataValue & WithBooleanValue(bool value)
Definition DataValue.h:48
DataValue & WithExpression(ExpressionT &&value)
Definition DataValue.h:198
AWS_IOTTWINMAKER_API DataValue(Aws::Utils::Json::JsonView jsonValue)
DataValue & WithRelationshipValue(RelationshipValueT &&value)
Definition DataValue.h:180
DataValue & AddListValue(ListValueT &&value)
Definition DataValue.h:137
const Aws::String & GetExpression() const
Definition DataValue.h:190
void SetLongValue(long long value)
Definition DataValue.h:92
AWS_IOTTWINMAKER_API Aws::Utils::Json::JsonValue Jsonize() const
DataValue & WithDoubleValue(double value)
Definition DataValue.h:64
DataValue & AddMapValue(MapValueKeyT &&key, MapValueValueT &&value)
Definition DataValue.h:161
void SetDoubleValue(double value)
Definition DataValue.h:60
AWS_IOTTWINMAKER_API DataValue()=default
AWS_IOTTWINMAKER_API DataValue & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< DataValue > & GetListValue() const
Definition DataValue.h:124
const RelationshipValue & GetRelationshipValue() const
Definition DataValue.h:172
DataValue & WithMapValue(MapValueT &&value)
Definition DataValue.h:156
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue