AWS SDK for C++

AWS SDK for C++ Version 1.11.685

Loading...
Searching...
No Matches
CreateJobRequest.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/IoTRequest.h>
11#include <aws/iot/IoT_EXPORTS.h>
12#include <aws/iot/model/AbortConfig.h>
13#include <aws/iot/model/JobExecutionsRetryConfig.h>
14#include <aws/iot/model/JobExecutionsRolloutConfig.h>
15#include <aws/iot/model/PresignedUrlConfig.h>
16#include <aws/iot/model/SchedulingConfig.h>
17#include <aws/iot/model/Tag.h>
18#include <aws/iot/model/TargetSelection.h>
19#include <aws/iot/model/TimeoutConfig.h>
20
21#include <utility>
22
23namespace Aws {
24namespace IoT {
25namespace Model {
26
30 public:
31 AWS_IOT_API CreateJobRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "CreateJob"; }
38
39 AWS_IOT_API Aws::String SerializePayload() const override;
40
42
46 inline const Aws::String& GetJobId() const { return m_jobId; }
47 inline bool JobIdHasBeenSet() const { return m_jobIdHasBeenSet; }
48 template <typename JobIdT = Aws::String>
49 void SetJobId(JobIdT&& value) {
50 m_jobIdHasBeenSet = true;
51 m_jobId = std::forward<JobIdT>(value);
52 }
53 template <typename JobIdT = Aws::String>
54 CreateJobRequest& WithJobId(JobIdT&& value) {
55 SetJobId(std::forward<JobIdT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::Vector<Aws::String>& GetTargets() const { return m_targets; }
65 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
66 template <typename TargetsT = Aws::Vector<Aws::String>>
67 void SetTargets(TargetsT&& value) {
68 m_targetsHasBeenSet = true;
69 m_targets = std::forward<TargetsT>(value);
70 }
71 template <typename TargetsT = Aws::Vector<Aws::String>>
72 CreateJobRequest& WithTargets(TargetsT&& value) {
73 SetTargets(std::forward<TargetsT>(value));
74 return *this;
75 }
76 template <typename TargetsT = Aws::String>
77 CreateJobRequest& AddTargets(TargetsT&& value) {
78 m_targetsHasBeenSet = true;
79 m_targets.emplace_back(std::forward<TargetsT>(value));
80 return *this;
81 }
83
85
94 inline const Aws::String& GetDocumentSource() const { return m_documentSource; }
95 inline bool DocumentSourceHasBeenSet() const { return m_documentSourceHasBeenSet; }
96 template <typename DocumentSourceT = Aws::String>
97 void SetDocumentSource(DocumentSourceT&& value) {
98 m_documentSourceHasBeenSet = true;
99 m_documentSource = std::forward<DocumentSourceT>(value);
100 }
101 template <typename DocumentSourceT = Aws::String>
102 CreateJobRequest& WithDocumentSource(DocumentSourceT&& value) {
103 SetDocumentSource(std::forward<DocumentSourceT>(value));
104 return *this;
105 }
107
109
113 inline const Aws::String& GetDocument() const { return m_document; }
114 inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; }
115 template <typename DocumentT = Aws::String>
116 void SetDocument(DocumentT&& value) {
117 m_documentHasBeenSet = true;
118 m_document = std::forward<DocumentT>(value);
119 }
120 template <typename DocumentT = Aws::String>
121 CreateJobRequest& WithDocument(DocumentT&& value) {
122 SetDocument(std::forward<DocumentT>(value));
123 return *this;
124 }
126
128
131 inline const Aws::String& GetDescription() const { return m_description; }
132 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
133 template <typename DescriptionT = Aws::String>
134 void SetDescription(DescriptionT&& value) {
135 m_descriptionHasBeenSet = true;
136 m_description = std::forward<DescriptionT>(value);
137 }
138 template <typename DescriptionT = Aws::String>
139 CreateJobRequest& WithDescription(DescriptionT&& value) {
140 SetDescription(std::forward<DescriptionT>(value));
141 return *this;
142 }
144
146
149 inline const PresignedUrlConfig& GetPresignedUrlConfig() const { return m_presignedUrlConfig; }
150 inline bool PresignedUrlConfigHasBeenSet() const { return m_presignedUrlConfigHasBeenSet; }
151 template <typename PresignedUrlConfigT = PresignedUrlConfig>
152 void SetPresignedUrlConfig(PresignedUrlConfigT&& value) {
153 m_presignedUrlConfigHasBeenSet = true;
154 m_presignedUrlConfig = std::forward<PresignedUrlConfigT>(value);
155 }
156 template <typename PresignedUrlConfigT = PresignedUrlConfig>
157 CreateJobRequest& WithPresignedUrlConfig(PresignedUrlConfigT&& value) {
158 SetPresignedUrlConfig(std::forward<PresignedUrlConfigT>(value));
159 return *this;
160 }
162
164
175 inline TargetSelection GetTargetSelection() const { return m_targetSelection; }
176 inline bool TargetSelectionHasBeenSet() const { return m_targetSelectionHasBeenSet; }
178 m_targetSelectionHasBeenSet = true;
179 m_targetSelection = value;
180 }
182 SetTargetSelection(value);
183 return *this;
184 }
186
188
191 inline const JobExecutionsRolloutConfig& GetJobExecutionsRolloutConfig() const { return m_jobExecutionsRolloutConfig; }
192 inline bool JobExecutionsRolloutConfigHasBeenSet() const { return m_jobExecutionsRolloutConfigHasBeenSet; }
193 template <typename JobExecutionsRolloutConfigT = JobExecutionsRolloutConfig>
194 void SetJobExecutionsRolloutConfig(JobExecutionsRolloutConfigT&& value) {
195 m_jobExecutionsRolloutConfigHasBeenSet = true;
196 m_jobExecutionsRolloutConfig = std::forward<JobExecutionsRolloutConfigT>(value);
197 }
198 template <typename JobExecutionsRolloutConfigT = JobExecutionsRolloutConfig>
199 CreateJobRequest& WithJobExecutionsRolloutConfig(JobExecutionsRolloutConfigT&& value) {
200 SetJobExecutionsRolloutConfig(std::forward<JobExecutionsRolloutConfigT>(value));
201 return *this;
202 }
204
206
209 inline const AbortConfig& GetAbortConfig() const { return m_abortConfig; }
210 inline bool AbortConfigHasBeenSet() const { return m_abortConfigHasBeenSet; }
211 template <typename AbortConfigT = AbortConfig>
212 void SetAbortConfig(AbortConfigT&& value) {
213 m_abortConfigHasBeenSet = true;
214 m_abortConfig = std::forward<AbortConfigT>(value);
215 }
216 template <typename AbortConfigT = AbortConfig>
217 CreateJobRequest& WithAbortConfig(AbortConfigT&& value) {
218 SetAbortConfig(std::forward<AbortConfigT>(value));
219 return *this;
220 }
222
224
231 inline const TimeoutConfig& GetTimeoutConfig() const { return m_timeoutConfig; }
232 inline bool TimeoutConfigHasBeenSet() const { return m_timeoutConfigHasBeenSet; }
233 template <typename TimeoutConfigT = TimeoutConfig>
234 void SetTimeoutConfig(TimeoutConfigT&& value) {
235 m_timeoutConfigHasBeenSet = true;
236 m_timeoutConfig = std::forward<TimeoutConfigT>(value);
237 }
238 template <typename TimeoutConfigT = TimeoutConfig>
239 CreateJobRequest& WithTimeoutConfig(TimeoutConfigT&& value) {
240 SetTimeoutConfig(std::forward<TimeoutConfigT>(value));
241 return *this;
242 }
244
246
249 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
250 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
251 template <typename TagsT = Aws::Vector<Tag>>
252 void SetTags(TagsT&& value) {
253 m_tagsHasBeenSet = true;
254 m_tags = std::forward<TagsT>(value);
255 }
256 template <typename TagsT = Aws::Vector<Tag>>
257 CreateJobRequest& WithTags(TagsT&& value) {
258 SetTags(std::forward<TagsT>(value));
259 return *this;
260 }
261 template <typename TagsT = Tag>
262 CreateJobRequest& AddTags(TagsT&& value) {
263 m_tagsHasBeenSet = true;
264 m_tags.emplace_back(std::forward<TagsT>(value));
265 return *this;
266 }
268
270
281 inline const Aws::String& GetNamespaceId() const { return m_namespaceId; }
282 inline bool NamespaceIdHasBeenSet() const { return m_namespaceIdHasBeenSet; }
283 template <typename NamespaceIdT = Aws::String>
284 void SetNamespaceId(NamespaceIdT&& value) {
285 m_namespaceIdHasBeenSet = true;
286 m_namespaceId = std::forward<NamespaceIdT>(value);
287 }
288 template <typename NamespaceIdT = Aws::String>
289 CreateJobRequest& WithNamespaceId(NamespaceIdT&& value) {
290 SetNamespaceId(std::forward<NamespaceIdT>(value));
291 return *this;
292 }
294
296
299 inline const Aws::String& GetJobTemplateArn() const { return m_jobTemplateArn; }
300 inline bool JobTemplateArnHasBeenSet() const { return m_jobTemplateArnHasBeenSet; }
301 template <typename JobTemplateArnT = Aws::String>
302 void SetJobTemplateArn(JobTemplateArnT&& value) {
303 m_jobTemplateArnHasBeenSet = true;
304 m_jobTemplateArn = std::forward<JobTemplateArnT>(value);
305 }
306 template <typename JobTemplateArnT = Aws::String>
307 CreateJobRequest& WithJobTemplateArn(JobTemplateArnT&& value) {
308 SetJobTemplateArn(std::forward<JobTemplateArnT>(value));
309 return *this;
310 }
312
314
317 inline const JobExecutionsRetryConfig& GetJobExecutionsRetryConfig() const { return m_jobExecutionsRetryConfig; }
318 inline bool JobExecutionsRetryConfigHasBeenSet() const { return m_jobExecutionsRetryConfigHasBeenSet; }
319 template <typename JobExecutionsRetryConfigT = JobExecutionsRetryConfig>
320 void SetJobExecutionsRetryConfig(JobExecutionsRetryConfigT&& value) {
321 m_jobExecutionsRetryConfigHasBeenSet = true;
322 m_jobExecutionsRetryConfig = std::forward<JobExecutionsRetryConfigT>(value);
323 }
324 template <typename JobExecutionsRetryConfigT = JobExecutionsRetryConfig>
325 CreateJobRequest& WithJobExecutionsRetryConfig(JobExecutionsRetryConfigT&& value) {
326 SetJobExecutionsRetryConfig(std::forward<JobExecutionsRetryConfigT>(value));
327 return *this;
328 }
330
332
339 inline const Aws::Map<Aws::String, Aws::String>& GetDocumentParameters() const { return m_documentParameters; }
340 inline bool DocumentParametersHasBeenSet() const { return m_documentParametersHasBeenSet; }
341 template <typename DocumentParametersT = Aws::Map<Aws::String, Aws::String>>
342 void SetDocumentParameters(DocumentParametersT&& value) {
343 m_documentParametersHasBeenSet = true;
344 m_documentParameters = std::forward<DocumentParametersT>(value);
345 }
346 template <typename DocumentParametersT = Aws::Map<Aws::String, Aws::String>>
347 CreateJobRequest& WithDocumentParameters(DocumentParametersT&& value) {
348 SetDocumentParameters(std::forward<DocumentParametersT>(value));
349 return *this;
350 }
351 template <typename DocumentParametersKeyT = Aws::String, typename DocumentParametersValueT = Aws::String>
352 CreateJobRequest& AddDocumentParameters(DocumentParametersKeyT&& key, DocumentParametersValueT&& value) {
353 m_documentParametersHasBeenSet = true;
354 m_documentParameters.emplace(std::forward<DocumentParametersKeyT>(key), std::forward<DocumentParametersValueT>(value));
355 return *this;
356 }
358
360
364 inline const SchedulingConfig& GetSchedulingConfig() const { return m_schedulingConfig; }
365 inline bool SchedulingConfigHasBeenSet() const { return m_schedulingConfigHasBeenSet; }
366 template <typename SchedulingConfigT = SchedulingConfig>
367 void SetSchedulingConfig(SchedulingConfigT&& value) {
368 m_schedulingConfigHasBeenSet = true;
369 m_schedulingConfig = std::forward<SchedulingConfigT>(value);
370 }
371 template <typename SchedulingConfigT = SchedulingConfig>
372 CreateJobRequest& WithSchedulingConfig(SchedulingConfigT&& value) {
373 SetSchedulingConfig(std::forward<SchedulingConfigT>(value));
374 return *this;
375 }
377
379
388 inline const Aws::Vector<Aws::String>& GetDestinationPackageVersions() const { return m_destinationPackageVersions; }
389 inline bool DestinationPackageVersionsHasBeenSet() const { return m_destinationPackageVersionsHasBeenSet; }
390 template <typename DestinationPackageVersionsT = Aws::Vector<Aws::String>>
391 void SetDestinationPackageVersions(DestinationPackageVersionsT&& value) {
392 m_destinationPackageVersionsHasBeenSet = true;
393 m_destinationPackageVersions = std::forward<DestinationPackageVersionsT>(value);
394 }
395 template <typename DestinationPackageVersionsT = Aws::Vector<Aws::String>>
396 CreateJobRequest& WithDestinationPackageVersions(DestinationPackageVersionsT&& value) {
397 SetDestinationPackageVersions(std::forward<DestinationPackageVersionsT>(value));
398 return *this;
399 }
400 template <typename DestinationPackageVersionsT = Aws::String>
401 CreateJobRequest& AddDestinationPackageVersions(DestinationPackageVersionsT&& value) {
402 m_destinationPackageVersionsHasBeenSet = true;
403 m_destinationPackageVersions.emplace_back(std::forward<DestinationPackageVersionsT>(value));
404 return *this;
405 }
407 private:
408 Aws::String m_jobId;
409 bool m_jobIdHasBeenSet = false;
410
411 Aws::Vector<Aws::String> m_targets;
412 bool m_targetsHasBeenSet = false;
413
414 Aws::String m_documentSource;
415 bool m_documentSourceHasBeenSet = false;
416
417 Aws::String m_document;
418 bool m_documentHasBeenSet = false;
419
420 Aws::String m_description;
421 bool m_descriptionHasBeenSet = false;
422
423 PresignedUrlConfig m_presignedUrlConfig;
424 bool m_presignedUrlConfigHasBeenSet = false;
425
426 TargetSelection m_targetSelection{TargetSelection::NOT_SET};
427 bool m_targetSelectionHasBeenSet = false;
428
429 JobExecutionsRolloutConfig m_jobExecutionsRolloutConfig;
430 bool m_jobExecutionsRolloutConfigHasBeenSet = false;
431
432 AbortConfig m_abortConfig;
433 bool m_abortConfigHasBeenSet = false;
434
435 TimeoutConfig m_timeoutConfig;
436 bool m_timeoutConfigHasBeenSet = false;
437
438 Aws::Vector<Tag> m_tags;
439 bool m_tagsHasBeenSet = false;
440
441 Aws::String m_namespaceId;
442 bool m_namespaceIdHasBeenSet = false;
443
444 Aws::String m_jobTemplateArn;
445 bool m_jobTemplateArnHasBeenSet = false;
446
447 JobExecutionsRetryConfig m_jobExecutionsRetryConfig;
448 bool m_jobExecutionsRetryConfigHasBeenSet = false;
449
450 Aws::Map<Aws::String, Aws::String> m_documentParameters;
451 bool m_documentParametersHasBeenSet = false;
452
453 SchedulingConfig m_schedulingConfig;
454 bool m_schedulingConfigHasBeenSet = false;
455
456 Aws::Vector<Aws::String> m_destinationPackageVersions;
457 bool m_destinationPackageVersionsHasBeenSet = false;
458};
459
460} // namespace Model
461} // namespace IoT
462} // namespace Aws
void SetJobExecutionsRolloutConfig(JobExecutionsRolloutConfigT &&value)
AWS_IOT_API CreateJobRequest()=default
CreateJobRequest & WithDocumentSource(DocumentSourceT &&value)
const Aws::String & GetNamespaceId() const
void SetPresignedUrlConfig(PresignedUrlConfigT &&value)
const TimeoutConfig & GetTimeoutConfig() const
CreateJobRequest & WithDescription(DescriptionT &&value)
CreateJobRequest & AddDocumentParameters(DocumentParametersKeyT &&key, DocumentParametersValueT &&value)
void SetNamespaceId(NamespaceIdT &&value)
void SetSchedulingConfig(SchedulingConfigT &&value)
CreateJobRequest & WithDocumentParameters(DocumentParametersT &&value)
const PresignedUrlConfig & GetPresignedUrlConfig() const
CreateJobRequest & WithJobId(JobIdT &&value)
const Aws::String & GetDocumentSource() const
CreateJobRequest & WithAbortConfig(AbortConfigT &&value)
CreateJobRequest & WithNamespaceId(NamespaceIdT &&value)
void SetTimeoutConfig(TimeoutConfigT &&value)
void SetDestinationPackageVersions(DestinationPackageVersionsT &&value)
CreateJobRequest & WithDocument(DocumentT &&value)
CreateJobRequest & WithTargetSelection(TargetSelection value)
const Aws::String & GetDescription() const
const JobExecutionsRolloutConfig & GetJobExecutionsRolloutConfig() const
void SetAbortConfig(AbortConfigT &&value)
void SetJobTemplateArn(JobTemplateArnT &&value)
AWS_IOT_API Aws::String SerializePayload() const override
CreateJobRequest & WithJobTemplateArn(JobTemplateArnT &&value)
const Aws::Vector< Aws::String > & GetDestinationPackageVersions() const
void SetDocumentSource(DocumentSourceT &&value)
const Aws::String & GetDocument() const
CreateJobRequest & WithJobExecutionsRetryConfig(JobExecutionsRetryConfigT &&value)
CreateJobRequest & WithTimeoutConfig(TimeoutConfigT &&value)
const SchedulingConfig & GetSchedulingConfig() const
virtual const char * GetServiceRequestName() const override
CreateJobRequest & AddDestinationPackageVersions(DestinationPackageVersionsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetDocumentParameters() const
void SetDocument(DocumentT &&value)
const AbortConfig & GetAbortConfig() const
void SetDocumentParameters(DocumentParametersT &&value)
CreateJobRequest & AddTargets(TargetsT &&value)
CreateJobRequest & WithTags(TagsT &&value)
CreateJobRequest & WithSchedulingConfig(SchedulingConfigT &&value)
const JobExecutionsRetryConfig & GetJobExecutionsRetryConfig() const
TargetSelection GetTargetSelection() const
void SetDescription(DescriptionT &&value)
CreateJobRequest & WithDestinationPackageVersions(DestinationPackageVersionsT &&value)
void SetJobExecutionsRetryConfig(JobExecutionsRetryConfigT &&value)
void SetTargetSelection(TargetSelection value)
const Aws::String & GetJobId() const
const Aws::String & GetJobTemplateArn() const
CreateJobRequest & WithJobExecutionsRolloutConfig(JobExecutionsRolloutConfigT &&value)
const Aws::Vector< Aws::String > & GetTargets() const
CreateJobRequest & WithTargets(TargetsT &&value)
void SetTargets(TargetsT &&value)
CreateJobRequest & AddTags(TagsT &&value)
CreateJobRequest & WithPresignedUrlConfig(PresignedUrlConfigT &&value)
const Aws::Vector< Tag > & GetTags() 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