AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
DataValue.h
1
6#pragma once
7#include <aws/iottwinmaker/IoTTwinMaker_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/iottwinmaker/model/RelationshipValue.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace IoTTwinMaker
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_IOTTWINMAKER_API DataValue() = default;
39 AWS_IOTTWINMAKER_API DataValue(Aws::Utils::Json::JsonView jsonValue);
40 AWS_IOTTWINMAKER_API DataValue& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_IOTTWINMAKER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline bool GetBooleanValue() const { return m_booleanValue; }
49 inline bool BooleanValueHasBeenSet() const { return m_booleanValueHasBeenSet; }
50 inline void SetBooleanValue(bool value) { m_booleanValueHasBeenSet = true; m_booleanValue = value; }
51 inline DataValue& WithBooleanValue(bool value) { SetBooleanValue(value); return *this;}
53
55
58 inline double GetDoubleValue() const { return m_doubleValue; }
59 inline bool DoubleValueHasBeenSet() const { return m_doubleValueHasBeenSet; }
60 inline void SetDoubleValue(double value) { m_doubleValueHasBeenSet = true; m_doubleValue = value; }
61 inline DataValue& WithDoubleValue(double value) { SetDoubleValue(value); return *this;}
63
65
68 inline int GetIntegerValue() const { return m_integerValue; }
69 inline bool IntegerValueHasBeenSet() const { return m_integerValueHasBeenSet; }
70 inline void SetIntegerValue(int value) { m_integerValueHasBeenSet = true; m_integerValue = value; }
71 inline DataValue& WithIntegerValue(int value) { SetIntegerValue(value); return *this;}
73
75
78 inline long long GetLongValue() const { return m_longValue; }
79 inline bool LongValueHasBeenSet() const { return m_longValueHasBeenSet; }
80 inline void SetLongValue(long long value) { m_longValueHasBeenSet = true; m_longValue = value; }
81 inline DataValue& WithLongValue(long long value) { SetLongValue(value); return *this;}
83
85
88 inline const Aws::String& GetStringValue() const { return m_stringValue; }
89 inline bool StringValueHasBeenSet() const { return m_stringValueHasBeenSet; }
90 template<typename StringValueT = Aws::String>
91 void SetStringValue(StringValueT&& value) { m_stringValueHasBeenSet = true; m_stringValue = std::forward<StringValueT>(value); }
92 template<typename StringValueT = Aws::String>
93 DataValue& WithStringValue(StringValueT&& value) { SetStringValue(std::forward<StringValueT>(value)); return *this;}
95
97
100 inline const Aws::Vector<DataValue>& GetListValue() const { return m_listValue; }
101 inline bool ListValueHasBeenSet() const { return m_listValueHasBeenSet; }
102 template<typename ListValueT = Aws::Vector<DataValue>>
103 void SetListValue(ListValueT&& value) { m_listValueHasBeenSet = true; m_listValue = std::forward<ListValueT>(value); }
104 template<typename ListValueT = Aws::Vector<DataValue>>
105 DataValue& WithListValue(ListValueT&& value) { SetListValue(std::forward<ListValueT>(value)); return *this;}
106 template<typename ListValueT = DataValue>
107 DataValue& AddListValue(ListValueT&& value) { m_listValueHasBeenSet = true; m_listValue.emplace_back(std::forward<ListValueT>(value)); return *this; }
109
111
114 inline const Aws::Map<Aws::String, DataValue>& GetMapValue() const { return m_mapValue; }
115 inline bool MapValueHasBeenSet() const { return m_mapValueHasBeenSet; }
116 template<typename MapValueT = Aws::Map<Aws::String, DataValue>>
117 void SetMapValue(MapValueT&& value) { m_mapValueHasBeenSet = true; m_mapValue = std::forward<MapValueT>(value); }
118 template<typename MapValueT = Aws::Map<Aws::String, DataValue>>
119 DataValue& WithMapValue(MapValueT&& value) { SetMapValue(std::forward<MapValueT>(value)); return *this;}
120 template<typename MapValueKeyT = Aws::String, typename MapValueValueT = DataValue>
121 DataValue& AddMapValue(MapValueKeyT&& key, MapValueValueT&& value) {
122 m_mapValueHasBeenSet = true; m_mapValue.emplace(std::forward<MapValueKeyT>(key), std::forward<MapValueValueT>(value)); return *this;
123 }
125
127
130 inline const RelationshipValue& GetRelationshipValue() const { return m_relationshipValue; }
131 inline bool RelationshipValueHasBeenSet() const { return m_relationshipValueHasBeenSet; }
132 template<typename RelationshipValueT = RelationshipValue>
133 void SetRelationshipValue(RelationshipValueT&& value) { m_relationshipValueHasBeenSet = true; m_relationshipValue = std::forward<RelationshipValueT>(value); }
134 template<typename RelationshipValueT = RelationshipValue>
135 DataValue& WithRelationshipValue(RelationshipValueT&& value) { SetRelationshipValue(std::forward<RelationshipValueT>(value)); return *this;}
137
139
142 inline const Aws::String& GetExpression() const { return m_expression; }
143 inline bool ExpressionHasBeenSet() const { return m_expressionHasBeenSet; }
144 template<typename ExpressionT = Aws::String>
145 void SetExpression(ExpressionT&& value) { m_expressionHasBeenSet = true; m_expression = std::forward<ExpressionT>(value); }
146 template<typename ExpressionT = Aws::String>
147 DataValue& WithExpression(ExpressionT&& value) { SetExpression(std::forward<ExpressionT>(value)); return *this;}
149 private:
150
151 bool m_booleanValue{false};
152 bool m_booleanValueHasBeenSet = false;
153
154 double m_doubleValue{0.0};
155 bool m_doubleValueHasBeenSet = false;
156
157 int m_integerValue{0};
158 bool m_integerValueHasBeenSet = false;
159
160 long long m_longValue{0};
161 bool m_longValueHasBeenSet = false;
162
163 Aws::String m_stringValue;
164 bool m_stringValueHasBeenSet = false;
165
166 Aws::Vector<DataValue> m_listValue;
167 bool m_listValueHasBeenSet = false;
168
170 bool m_mapValueHasBeenSet = false;
171
172 RelationshipValue m_relationshipValue;
173 bool m_relationshipValueHasBeenSet = false;
174
175 Aws::String m_expression;
176 bool m_expressionHasBeenSet = false;
177 };
178
179} // namespace Model
180} // namespace IoTTwinMaker
181} // namespace Aws
const Aws::Map< Aws::String, DataValue > & GetMapValue() const
Definition DataValue.h:114
void SetExpression(ExpressionT &&value)
Definition DataValue.h:145
void SetMapValue(MapValueT &&value)
Definition DataValue.h:117
DataValue & WithLongValue(long long value)
Definition DataValue.h:81
DataValue & WithIntegerValue(int value)
Definition DataValue.h:71
DataValue & WithStringValue(StringValueT &&value)
Definition DataValue.h:93
void SetListValue(ListValueT &&value)
Definition DataValue.h:103
DataValue & WithListValue(ListValueT &&value)
Definition DataValue.h:105
void SetRelationshipValue(RelationshipValueT &&value)
Definition DataValue.h:133
const Aws::String & GetStringValue() const
Definition DataValue.h:88
void SetStringValue(StringValueT &&value)
Definition DataValue.h:91
DataValue & WithBooleanValue(bool value)
Definition DataValue.h:51
DataValue & WithExpression(ExpressionT &&value)
Definition DataValue.h:147
AWS_IOTTWINMAKER_API DataValue(Aws::Utils::Json::JsonView jsonValue)
DataValue & WithRelationshipValue(RelationshipValueT &&value)
Definition DataValue.h:135
DataValue & AddListValue(ListValueT &&value)
Definition DataValue.h:107
const Aws::String & GetExpression() const
Definition DataValue.h:142
void SetLongValue(long long value)
Definition DataValue.h:80
AWS_IOTTWINMAKER_API Aws::Utils::Json::JsonValue Jsonize() const
DataValue & WithDoubleValue(double value)
Definition DataValue.h:61
DataValue & AddMapValue(MapValueKeyT &&key, MapValueValueT &&value)
Definition DataValue.h:121
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:100
const RelationshipValue & GetRelationshipValue() const
Definition DataValue.h:130
DataValue & WithMapValue(MapValueT &&value)
Definition DataValue.h:119
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