AWS SDK for C++

AWS SDK for C++ Version 1.11.763

Loading...
Searching...
No Matches
ThingDocument.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/iot/IoT_EXPORTS.h>
11#include <aws/iot/model/ThingConnectivity.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace IoT {
23namespace Model {
24
31 public:
32 AWS_IOT_API ThingDocument() = default;
36
38
41 inline const Aws::String& GetThingName() const { return m_thingName; }
42 inline bool ThingNameHasBeenSet() const { return m_thingNameHasBeenSet; }
43 template <typename ThingNameT = Aws::String>
44 void SetThingName(ThingNameT&& value) {
45 m_thingNameHasBeenSet = true;
46 m_thingName = std::forward<ThingNameT>(value);
47 }
48 template <typename ThingNameT = Aws::String>
49 ThingDocument& WithThingName(ThingNameT&& value) {
50 SetThingName(std::forward<ThingNameT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::String& GetThingId() const { return m_thingId; }
60 inline bool ThingIdHasBeenSet() const { return m_thingIdHasBeenSet; }
61 template <typename ThingIdT = Aws::String>
62 void SetThingId(ThingIdT&& value) {
63 m_thingIdHasBeenSet = true;
64 m_thingId = std::forward<ThingIdT>(value);
65 }
66 template <typename ThingIdT = Aws::String>
67 ThingDocument& WithThingId(ThingIdT&& value) {
68 SetThingId(std::forward<ThingIdT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::String& GetThingTypeName() const { return m_thingTypeName; }
78 inline bool ThingTypeNameHasBeenSet() const { return m_thingTypeNameHasBeenSet; }
79 template <typename ThingTypeNameT = Aws::String>
80 void SetThingTypeName(ThingTypeNameT&& value) {
81 m_thingTypeNameHasBeenSet = true;
82 m_thingTypeName = std::forward<ThingTypeNameT>(value);
83 }
84 template <typename ThingTypeNameT = Aws::String>
85 ThingDocument& WithThingTypeName(ThingTypeNameT&& value) {
86 SetThingTypeName(std::forward<ThingTypeNameT>(value));
87 return *this;
88 }
90
92
95 inline const Aws::Vector<Aws::String>& GetThingGroupNames() const { return m_thingGroupNames; }
96 inline bool ThingGroupNamesHasBeenSet() const { return m_thingGroupNamesHasBeenSet; }
97 template <typename ThingGroupNamesT = Aws::Vector<Aws::String>>
98 void SetThingGroupNames(ThingGroupNamesT&& value) {
99 m_thingGroupNamesHasBeenSet = true;
100 m_thingGroupNames = std::forward<ThingGroupNamesT>(value);
101 }
102 template <typename ThingGroupNamesT = Aws::Vector<Aws::String>>
103 ThingDocument& WithThingGroupNames(ThingGroupNamesT&& value) {
104 SetThingGroupNames(std::forward<ThingGroupNamesT>(value));
105 return *this;
106 }
107 template <typename ThingGroupNamesT = Aws::String>
108 ThingDocument& AddThingGroupNames(ThingGroupNamesT&& value) {
109 m_thingGroupNamesHasBeenSet = true;
110 m_thingGroupNames.emplace_back(std::forward<ThingGroupNamesT>(value));
111 return *this;
112 }
114
116
119 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
120 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
121 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
122 void SetAttributes(AttributesT&& value) {
123 m_attributesHasBeenSet = true;
124 m_attributes = std::forward<AttributesT>(value);
125 }
126 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
127 ThingDocument& WithAttributes(AttributesT&& value) {
128 SetAttributes(std::forward<AttributesT>(value));
129 return *this;
130 }
131 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
132 ThingDocument& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
133 m_attributesHasBeenSet = true;
134 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
135 return *this;
136 }
138
140
146 inline const Aws::String& GetShadow() const { return m_shadow; }
147 inline bool ShadowHasBeenSet() const { return m_shadowHasBeenSet; }
148 template <typename ShadowT = Aws::String>
149 void SetShadow(ShadowT&& value) {
150 m_shadowHasBeenSet = true;
151 m_shadow = std::forward<ShadowT>(value);
152 }
153 template <typename ShadowT = Aws::String>
154 ThingDocument& WithShadow(ShadowT&& value) {
155 SetShadow(std::forward<ShadowT>(value));
156 return *this;
157 }
159
161
167 inline const Aws::String& GetDeviceDefender() const { return m_deviceDefender; }
168 inline bool DeviceDefenderHasBeenSet() const { return m_deviceDefenderHasBeenSet; }
169 template <typename DeviceDefenderT = Aws::String>
170 void SetDeviceDefender(DeviceDefenderT&& value) {
171 m_deviceDefenderHasBeenSet = true;
172 m_deviceDefender = std::forward<DeviceDefenderT>(value);
173 }
174 template <typename DeviceDefenderT = Aws::String>
175 ThingDocument& WithDeviceDefender(DeviceDefenderT&& value) {
176 SetDeviceDefender(std::forward<DeviceDefenderT>(value));
177 return *this;
178 }
180
182
186 inline const ThingConnectivity& GetConnectivity() const { return m_connectivity; }
187 inline bool ConnectivityHasBeenSet() const { return m_connectivityHasBeenSet; }
188 template <typename ConnectivityT = ThingConnectivity>
189 void SetConnectivity(ConnectivityT&& value) {
190 m_connectivityHasBeenSet = true;
191 m_connectivity = std::forward<ConnectivityT>(value);
192 }
193 template <typename ConnectivityT = ThingConnectivity>
194 ThingDocument& WithConnectivity(ConnectivityT&& value) {
195 SetConnectivity(std::forward<ConnectivityT>(value));
196 return *this;
197 }
199 private:
200 Aws::String m_thingName;
201
202 Aws::String m_thingId;
203
204 Aws::String m_thingTypeName;
205
206 Aws::Vector<Aws::String> m_thingGroupNames;
207
209
210 Aws::String m_shadow;
211
212 Aws::String m_deviceDefender;
213
214 ThingConnectivity m_connectivity;
215 bool m_thingNameHasBeenSet = false;
216 bool m_thingIdHasBeenSet = false;
217 bool m_thingTypeNameHasBeenSet = false;
218 bool m_thingGroupNamesHasBeenSet = false;
219 bool m_attributesHasBeenSet = false;
220 bool m_shadowHasBeenSet = false;
221 bool m_deviceDefenderHasBeenSet = false;
222 bool m_connectivityHasBeenSet = false;
223};
224
225} // namespace Model
226} // namespace IoT
227} // namespace Aws
ThingDocument & WithConnectivity(ConnectivityT &&value)
const Aws::String & GetShadow() const
ThingDocument & WithThingId(ThingIdT &&value)
const Aws::String & GetThingTypeName() const
AWS_IOT_API ThingDocument(Aws::Utils::Json::JsonView jsonValue)
void SetConnectivity(ConnectivityT &&value)
AWS_IOT_API ThingDocument & operator=(Aws::Utils::Json::JsonView jsonValue)
const ThingConnectivity & GetConnectivity() const
const Aws::String & GetThingId() const
void SetDeviceDefender(DeviceDefenderT &&value)
ThingDocument & WithThingTypeName(ThingTypeNameT &&value)
void SetThingTypeName(ThingTypeNameT &&value)
const Aws::String & GetThingName() const
void SetThingId(ThingIdT &&value)
const Aws::Vector< Aws::String > & GetThingGroupNames() const
ThingDocument & AddThingGroupNames(ThingGroupNamesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
void SetThingGroupNames(ThingGroupNamesT &&value)
ThingDocument & WithAttributes(AttributesT &&value)
void SetShadow(ShadowT &&value)
const Aws::String & GetDeviceDefender() const
void SetThingName(ThingNameT &&value)
ThingDocument & AddAttributes(AttributesKeyT &&key, AttributesValueT &&value)
ThingDocument & WithShadow(ShadowT &&value)
ThingDocument & WithDeviceDefender(DeviceDefenderT &&value)
ThingDocument & WithThingGroupNames(ThingGroupNamesT &&value)
AWS_IOT_API ThingDocument()=default
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
ThingDocument & WithThingName(ThingNameT &&value)
void SetAttributes(AttributesT &&value)
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