AWS SDK for C++

AWS SDK for C++ Version 1.11.761

Loading...
Searching...
No Matches
OTAUpdateInfo.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/iot/IoT_EXPORTS.h>
12#include <aws/iot/model/AwsJobExecutionsRolloutConfig.h>
13#include <aws/iot/model/AwsJobPresignedUrlConfig.h>
14#include <aws/iot/model/ErrorInfo.h>
15#include <aws/iot/model/OTAUpdateFile.h>
16#include <aws/iot/model/OTAUpdateStatus.h>
17#include <aws/iot/model/Protocol.h>
18#include <aws/iot/model/TargetSelection.h>
19
20#include <utility>
21
22namespace Aws {
23namespace Utils {
24namespace Json {
25class JsonValue;
26class JsonView;
27} // namespace Json
28} // namespace Utils
29namespace IoT {
30namespace Model {
31
38 public:
39 AWS_IOT_API OTAUpdateInfo() = default;
43
45
48 inline const Aws::String& GetOtaUpdateId() const { return m_otaUpdateId; }
49 inline bool OtaUpdateIdHasBeenSet() const { return m_otaUpdateIdHasBeenSet; }
50 template <typename OtaUpdateIdT = Aws::String>
51 void SetOtaUpdateId(OtaUpdateIdT&& value) {
52 m_otaUpdateIdHasBeenSet = true;
53 m_otaUpdateId = std::forward<OtaUpdateIdT>(value);
54 }
55 template <typename OtaUpdateIdT = Aws::String>
56 OTAUpdateInfo& WithOtaUpdateId(OtaUpdateIdT&& value) {
57 SetOtaUpdateId(std::forward<OtaUpdateIdT>(value));
58 return *this;
59 }
61
63
66 inline const Aws::String& GetOtaUpdateArn() const { return m_otaUpdateArn; }
67 inline bool OtaUpdateArnHasBeenSet() const { return m_otaUpdateArnHasBeenSet; }
68 template <typename OtaUpdateArnT = Aws::String>
69 void SetOtaUpdateArn(OtaUpdateArnT&& value) {
70 m_otaUpdateArnHasBeenSet = true;
71 m_otaUpdateArn = std::forward<OtaUpdateArnT>(value);
72 }
73 template <typename OtaUpdateArnT = Aws::String>
74 OTAUpdateInfo& WithOtaUpdateArn(OtaUpdateArnT&& value) {
75 SetOtaUpdateArn(std::forward<OtaUpdateArnT>(value));
76 return *this;
77 }
79
81
84 inline const Aws::Utils::DateTime& GetCreationDate() const { return m_creationDate; }
85 inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; }
86 template <typename CreationDateT = Aws::Utils::DateTime>
87 void SetCreationDate(CreationDateT&& value) {
88 m_creationDateHasBeenSet = true;
89 m_creationDate = std::forward<CreationDateT>(value);
90 }
91 template <typename CreationDateT = Aws::Utils::DateTime>
92 OTAUpdateInfo& WithCreationDate(CreationDateT&& value) {
93 SetCreationDate(std::forward<CreationDateT>(value));
94 return *this;
95 }
97
99
102 inline const Aws::Utils::DateTime& GetLastModifiedDate() const { return m_lastModifiedDate; }
103 inline bool LastModifiedDateHasBeenSet() const { return m_lastModifiedDateHasBeenSet; }
104 template <typename LastModifiedDateT = Aws::Utils::DateTime>
105 void SetLastModifiedDate(LastModifiedDateT&& value) {
106 m_lastModifiedDateHasBeenSet = true;
107 m_lastModifiedDate = std::forward<LastModifiedDateT>(value);
108 }
109 template <typename LastModifiedDateT = Aws::Utils::DateTime>
110 OTAUpdateInfo& WithLastModifiedDate(LastModifiedDateT&& value) {
111 SetLastModifiedDate(std::forward<LastModifiedDateT>(value));
112 return *this;
113 }
115
117
120 inline const Aws::String& GetDescription() const { return m_description; }
121 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
122 template <typename DescriptionT = Aws::String>
123 void SetDescription(DescriptionT&& value) {
124 m_descriptionHasBeenSet = true;
125 m_description = std::forward<DescriptionT>(value);
126 }
127 template <typename DescriptionT = Aws::String>
128 OTAUpdateInfo& WithDescription(DescriptionT&& value) {
129 SetDescription(std::forward<DescriptionT>(value));
130 return *this;
131 }
133
135
138 inline const Aws::Vector<Aws::String>& GetTargets() const { return m_targets; }
139 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
140 template <typename TargetsT = Aws::Vector<Aws::String>>
141 void SetTargets(TargetsT&& value) {
142 m_targetsHasBeenSet = true;
143 m_targets = std::forward<TargetsT>(value);
144 }
145 template <typename TargetsT = Aws::Vector<Aws::String>>
146 OTAUpdateInfo& WithTargets(TargetsT&& value) {
147 SetTargets(std::forward<TargetsT>(value));
148 return *this;
149 }
150 template <typename TargetsT = Aws::String>
151 OTAUpdateInfo& AddTargets(TargetsT&& value) {
152 m_targetsHasBeenSet = true;
153 m_targets.emplace_back(std::forward<TargetsT>(value));
154 return *this;
155 }
157
159
164 inline const Aws::Vector<Protocol>& GetProtocols() const { return m_protocols; }
165 inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; }
166 template <typename ProtocolsT = Aws::Vector<Protocol>>
167 void SetProtocols(ProtocolsT&& value) {
168 m_protocolsHasBeenSet = true;
169 m_protocols = std::forward<ProtocolsT>(value);
170 }
171 template <typename ProtocolsT = Aws::Vector<Protocol>>
172 OTAUpdateInfo& WithProtocols(ProtocolsT&& value) {
173 SetProtocols(std::forward<ProtocolsT>(value));
174 return *this;
175 }
177 m_protocolsHasBeenSet = true;
178 m_protocols.push_back(value);
179 return *this;
180 }
182
184
187 inline const AwsJobExecutionsRolloutConfig& GetAwsJobExecutionsRolloutConfig() const { return m_awsJobExecutionsRolloutConfig; }
188 inline bool AwsJobExecutionsRolloutConfigHasBeenSet() const { return m_awsJobExecutionsRolloutConfigHasBeenSet; }
189 template <typename AwsJobExecutionsRolloutConfigT = AwsJobExecutionsRolloutConfig>
190 void SetAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfigT&& value) {
191 m_awsJobExecutionsRolloutConfigHasBeenSet = true;
192 m_awsJobExecutionsRolloutConfig = std::forward<AwsJobExecutionsRolloutConfigT>(value);
193 }
194 template <typename AwsJobExecutionsRolloutConfigT = AwsJobExecutionsRolloutConfig>
195 OTAUpdateInfo& WithAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfigT&& value) {
196 SetAwsJobExecutionsRolloutConfig(std::forward<AwsJobExecutionsRolloutConfigT>(value));
197 return *this;
198 }
200
202
206 inline const AwsJobPresignedUrlConfig& GetAwsJobPresignedUrlConfig() const { return m_awsJobPresignedUrlConfig; }
207 inline bool AwsJobPresignedUrlConfigHasBeenSet() const { return m_awsJobPresignedUrlConfigHasBeenSet; }
208 template <typename AwsJobPresignedUrlConfigT = AwsJobPresignedUrlConfig>
209 void SetAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfigT&& value) {
210 m_awsJobPresignedUrlConfigHasBeenSet = true;
211 m_awsJobPresignedUrlConfig = std::forward<AwsJobPresignedUrlConfigT>(value);
212 }
213 template <typename AwsJobPresignedUrlConfigT = AwsJobPresignedUrlConfig>
214 OTAUpdateInfo& WithAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfigT&& value) {
215 SetAwsJobPresignedUrlConfig(std::forward<AwsJobPresignedUrlConfigT>(value));
216 return *this;
217 }
219
221
229 inline TargetSelection GetTargetSelection() const { return m_targetSelection; }
230 inline bool TargetSelectionHasBeenSet() const { return m_targetSelectionHasBeenSet; }
232 m_targetSelectionHasBeenSet = true;
233 m_targetSelection = value;
234 }
236 SetTargetSelection(value);
237 return *this;
238 }
240
242
245 inline const Aws::Vector<OTAUpdateFile>& GetOtaUpdateFiles() const { return m_otaUpdateFiles; }
246 inline bool OtaUpdateFilesHasBeenSet() const { return m_otaUpdateFilesHasBeenSet; }
247 template <typename OtaUpdateFilesT = Aws::Vector<OTAUpdateFile>>
248 void SetOtaUpdateFiles(OtaUpdateFilesT&& value) {
249 m_otaUpdateFilesHasBeenSet = true;
250 m_otaUpdateFiles = std::forward<OtaUpdateFilesT>(value);
251 }
252 template <typename OtaUpdateFilesT = Aws::Vector<OTAUpdateFile>>
253 OTAUpdateInfo& WithOtaUpdateFiles(OtaUpdateFilesT&& value) {
254 SetOtaUpdateFiles(std::forward<OtaUpdateFilesT>(value));
255 return *this;
256 }
257 template <typename OtaUpdateFilesT = OTAUpdateFile>
258 OTAUpdateInfo& AddOtaUpdateFiles(OtaUpdateFilesT&& value) {
259 m_otaUpdateFilesHasBeenSet = true;
260 m_otaUpdateFiles.emplace_back(std::forward<OtaUpdateFilesT>(value));
261 return *this;
262 }
264
266
269 inline OTAUpdateStatus GetOtaUpdateStatus() const { return m_otaUpdateStatus; }
270 inline bool OtaUpdateStatusHasBeenSet() const { return m_otaUpdateStatusHasBeenSet; }
272 m_otaUpdateStatusHasBeenSet = true;
273 m_otaUpdateStatus = value;
274 }
276 SetOtaUpdateStatus(value);
277 return *this;
278 }
280
282
285 inline const Aws::String& GetAwsIotJobId() const { return m_awsIotJobId; }
286 inline bool AwsIotJobIdHasBeenSet() const { return m_awsIotJobIdHasBeenSet; }
287 template <typename AwsIotJobIdT = Aws::String>
288 void SetAwsIotJobId(AwsIotJobIdT&& value) {
289 m_awsIotJobIdHasBeenSet = true;
290 m_awsIotJobId = std::forward<AwsIotJobIdT>(value);
291 }
292 template <typename AwsIotJobIdT = Aws::String>
293 OTAUpdateInfo& WithAwsIotJobId(AwsIotJobIdT&& value) {
294 SetAwsIotJobId(std::forward<AwsIotJobIdT>(value));
295 return *this;
296 }
298
300
303 inline const Aws::String& GetAwsIotJobArn() const { return m_awsIotJobArn; }
304 inline bool AwsIotJobArnHasBeenSet() const { return m_awsIotJobArnHasBeenSet; }
305 template <typename AwsIotJobArnT = Aws::String>
306 void SetAwsIotJobArn(AwsIotJobArnT&& value) {
307 m_awsIotJobArnHasBeenSet = true;
308 m_awsIotJobArn = std::forward<AwsIotJobArnT>(value);
309 }
310 template <typename AwsIotJobArnT = Aws::String>
311 OTAUpdateInfo& WithAwsIotJobArn(AwsIotJobArnT&& value) {
312 SetAwsIotJobArn(std::forward<AwsIotJobArnT>(value));
313 return *this;
314 }
316
318
321 inline const ErrorInfo& GetErrorInfo() const { return m_errorInfo; }
322 inline bool ErrorInfoHasBeenSet() const { return m_errorInfoHasBeenSet; }
323 template <typename ErrorInfoT = ErrorInfo>
324 void SetErrorInfo(ErrorInfoT&& value) {
325 m_errorInfoHasBeenSet = true;
326 m_errorInfo = std::forward<ErrorInfoT>(value);
327 }
328 template <typename ErrorInfoT = ErrorInfo>
329 OTAUpdateInfo& WithErrorInfo(ErrorInfoT&& value) {
330 SetErrorInfo(std::forward<ErrorInfoT>(value));
331 return *this;
332 }
334
336
339 inline const Aws::Map<Aws::String, Aws::String>& GetAdditionalParameters() const { return m_additionalParameters; }
340 inline bool AdditionalParametersHasBeenSet() const { return m_additionalParametersHasBeenSet; }
341 template <typename AdditionalParametersT = Aws::Map<Aws::String, Aws::String>>
342 void SetAdditionalParameters(AdditionalParametersT&& value) {
343 m_additionalParametersHasBeenSet = true;
344 m_additionalParameters = std::forward<AdditionalParametersT>(value);
345 }
346 template <typename AdditionalParametersT = Aws::Map<Aws::String, Aws::String>>
347 OTAUpdateInfo& WithAdditionalParameters(AdditionalParametersT&& value) {
348 SetAdditionalParameters(std::forward<AdditionalParametersT>(value));
349 return *this;
350 }
351 template <typename AdditionalParametersKeyT = Aws::String, typename AdditionalParametersValueT = Aws::String>
352 OTAUpdateInfo& AddAdditionalParameters(AdditionalParametersKeyT&& key, AdditionalParametersValueT&& value) {
353 m_additionalParametersHasBeenSet = true;
354 m_additionalParameters.emplace(std::forward<AdditionalParametersKeyT>(key), std::forward<AdditionalParametersValueT>(value));
355 return *this;
356 }
358 private:
359 Aws::String m_otaUpdateId;
360
361 Aws::String m_otaUpdateArn;
362
363 Aws::Utils::DateTime m_creationDate{};
364
365 Aws::Utils::DateTime m_lastModifiedDate{};
366
367 Aws::String m_description;
368
369 Aws::Vector<Aws::String> m_targets;
370
371 Aws::Vector<Protocol> m_protocols;
372
373 AwsJobExecutionsRolloutConfig m_awsJobExecutionsRolloutConfig;
374
375 AwsJobPresignedUrlConfig m_awsJobPresignedUrlConfig;
376
377 TargetSelection m_targetSelection{TargetSelection::NOT_SET};
378
379 Aws::Vector<OTAUpdateFile> m_otaUpdateFiles;
380
381 OTAUpdateStatus m_otaUpdateStatus{OTAUpdateStatus::NOT_SET};
382
383 Aws::String m_awsIotJobId;
384
385 Aws::String m_awsIotJobArn;
386
387 ErrorInfo m_errorInfo;
388
389 Aws::Map<Aws::String, Aws::String> m_additionalParameters;
390 bool m_otaUpdateIdHasBeenSet = false;
391 bool m_otaUpdateArnHasBeenSet = false;
392 bool m_creationDateHasBeenSet = false;
393 bool m_lastModifiedDateHasBeenSet = false;
394 bool m_descriptionHasBeenSet = false;
395 bool m_targetsHasBeenSet = false;
396 bool m_protocolsHasBeenSet = false;
397 bool m_awsJobExecutionsRolloutConfigHasBeenSet = false;
398 bool m_awsJobPresignedUrlConfigHasBeenSet = false;
399 bool m_targetSelectionHasBeenSet = false;
400 bool m_otaUpdateFilesHasBeenSet = false;
401 bool m_otaUpdateStatusHasBeenSet = false;
402 bool m_awsIotJobIdHasBeenSet = false;
403 bool m_awsIotJobArnHasBeenSet = false;
404 bool m_errorInfoHasBeenSet = false;
405 bool m_additionalParametersHasBeenSet = false;
406};
407
408} // namespace Model
409} // namespace IoT
410} // namespace Aws
bool AwsJobExecutionsRolloutConfigHasBeenSet() const
bool AdditionalParametersHasBeenSet() const
OTAUpdateInfo & AddOtaUpdateFiles(OtaUpdateFilesT &&value)
void SetOtaUpdateId(OtaUpdateIdT &&value)
OTAUpdateInfo & WithOtaUpdateFiles(OtaUpdateFilesT &&value)
const Aws::Vector< Protocol > & GetProtocols() const
AWS_IOT_API OTAUpdateInfo(Aws::Utils::Json::JsonView jsonValue)
AWS_IOT_API OTAUpdateInfo & operator=(Aws::Utils::Json::JsonView jsonValue)
OTAUpdateInfo & WithDescription(DescriptionT &&value)
OTAUpdateInfo & WithAwsIotJobArn(AwsIotJobArnT &&value)
void SetOtaUpdateStatus(OTAUpdateStatus value)
const Aws::Vector< Aws::String > & GetTargets() const
void SetTargetSelection(TargetSelection value)
void SetAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfigT &&value)
OTAUpdateStatus GetOtaUpdateStatus() const
const Aws::String & GetOtaUpdateId() const
OTAUpdateInfo & AddTargets(TargetsT &&value)
const Aws::String & GetAwsIotJobId() const
const Aws::String & GetAwsIotJobArn() const
OTAUpdateInfo & WithProtocols(ProtocolsT &&value)
const ErrorInfo & GetErrorInfo() const
const Aws::String & GetOtaUpdateArn() const
OTAUpdateInfo & WithAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfigT &&value)
void SetLastModifiedDate(LastModifiedDateT &&value)
const Aws::Utils::DateTime & GetCreationDate() const
void SetCreationDate(CreationDateT &&value)
OTAUpdateInfo & WithOtaUpdateStatus(OTAUpdateStatus value)
void SetAwsIotJobArn(AwsIotJobArnT &&value)
void SetOtaUpdateFiles(OtaUpdateFilesT &&value)
const Aws::String & GetDescription() const
void SetProtocols(ProtocolsT &&value)
void SetAwsIotJobId(AwsIotJobIdT &&value)
OTAUpdateInfo & WithAwsIotJobId(AwsIotJobIdT &&value)
const Aws::Utils::DateTime & GetLastModifiedDate() const
void SetDescription(DescriptionT &&value)
void SetTargets(TargetsT &&value)
bool AwsJobPresignedUrlConfigHasBeenSet() const
OTAUpdateInfo & WithAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfigT &&value)
OTAUpdateInfo & WithLastModifiedDate(LastModifiedDateT &&value)
void SetAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfigT &&value)
const Aws::Vector< OTAUpdateFile > & GetOtaUpdateFiles() const
OTAUpdateInfo & WithOtaUpdateArn(OtaUpdateArnT &&value)
OTAUpdateInfo & WithAdditionalParameters(AdditionalParametersT &&value)
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
void SetOtaUpdateArn(OtaUpdateArnT &&value)
void SetAdditionalParameters(AdditionalParametersT &&value)
OTAUpdateInfo & WithTargets(TargetsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetAdditionalParameters() const
OTAUpdateInfo & AddProtocols(Protocol value)
AWS_IOT_API OTAUpdateInfo()=default
TargetSelection GetTargetSelection() const
OTAUpdateInfo & WithOtaUpdateId(OtaUpdateIdT &&value)
const AwsJobPresignedUrlConfig & GetAwsJobPresignedUrlConfig() const
OTAUpdateInfo & AddAdditionalParameters(AdditionalParametersKeyT &&key, AdditionalParametersValueT &&value)
void SetErrorInfo(ErrorInfoT &&value)
OTAUpdateInfo & WithTargetSelection(TargetSelection value)
OTAUpdateInfo & WithCreationDate(CreationDateT &&value)
OTAUpdateInfo & WithErrorInfo(ErrorInfoT &&value)
const AwsJobExecutionsRolloutConfig & GetAwsJobExecutionsRolloutConfig() const
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