AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
CreateJobRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/deadline/DeadlineRequest.h>
11#include <aws/deadline/Deadline_EXPORTS.h>
12#include <aws/deadline/model/Attachments.h>
13#include <aws/deadline/model/CreateJobTargetTaskRunStatus.h>
14#include <aws/deadline/model/JobParameter.h>
15#include <aws/deadline/model/JobTemplateType.h>
16
17#include <utility>
18
19namespace Aws {
20namespace deadline {
21namespace Model {
22
26 public:
27 AWS_DEADLINE_API CreateJobRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateJob"; }
34
35 AWS_DEADLINE_API Aws::String SerializePayload() const override;
36
38
40
43 inline const Aws::String& GetFarmId() const { return m_farmId; }
44 inline bool FarmIdHasBeenSet() const { return m_farmIdHasBeenSet; }
45 template <typename FarmIdT = Aws::String>
46 void SetFarmId(FarmIdT&& value) {
47 m_farmIdHasBeenSet = true;
48 m_farmId = std::forward<FarmIdT>(value);
49 }
50 template <typename FarmIdT = Aws::String>
51 CreateJobRequest& WithFarmId(FarmIdT&& value) {
52 SetFarmId(std::forward<FarmIdT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetQueueId() const { return m_queueId; }
62 inline bool QueueIdHasBeenSet() const { return m_queueIdHasBeenSet; }
63 template <typename QueueIdT = Aws::String>
64 void SetQueueId(QueueIdT&& value) {
65 m_queueIdHasBeenSet = true;
66 m_queueId = std::forward<QueueIdT>(value);
67 }
68 template <typename QueueIdT = Aws::String>
69 CreateJobRequest& WithQueueId(QueueIdT&& value) {
70 SetQueueId(std::forward<QueueIdT>(value));
71 return *this;
72 }
74
76
80 inline const Aws::String& GetClientToken() const { return m_clientToken; }
81 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
82 template <typename ClientTokenT = Aws::String>
83 void SetClientToken(ClientTokenT&& value) {
84 m_clientTokenHasBeenSet = true;
85 m_clientToken = std::forward<ClientTokenT>(value);
86 }
87 template <typename ClientTokenT = Aws::String>
88 CreateJobRequest& WithClientToken(ClientTokenT&& value) {
89 SetClientToken(std::forward<ClientTokenT>(value));
90 return *this;
91 }
93
95
98 inline const Aws::String& GetTemplate() const { return m_template; }
99 inline bool TemplateHasBeenSet() const { return m_templateHasBeenSet; }
100 template <typename TemplateT = Aws::String>
101 void SetTemplate(TemplateT&& value) {
102 m_templateHasBeenSet = true;
103 m_template = std::forward<TemplateT>(value);
104 }
105 template <typename TemplateT = Aws::String>
106 CreateJobRequest& WithTemplate(TemplateT&& value) {
107 SetTemplate(std::forward<TemplateT>(value));
108 return *this;
109 }
111
113
116 inline JobTemplateType GetTemplateType() const { return m_templateType; }
117 inline bool TemplateTypeHasBeenSet() const { return m_templateTypeHasBeenSet; }
118 inline void SetTemplateType(JobTemplateType value) {
119 m_templateTypeHasBeenSet = true;
120 m_templateType = value;
121 }
123 SetTemplateType(value);
124 return *this;
125 }
127
129
133 inline int GetPriority() const { return m_priority; }
134 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
135 inline void SetPriority(int value) {
136 m_priorityHasBeenSet = true;
137 m_priority = value;
138 }
139 inline CreateJobRequest& WithPriority(int value) {
140 SetPriority(value);
141 return *this;
142 }
144
146
149 inline const Aws::Map<Aws::String, JobParameter>& GetParameters() const { return m_parameters; }
150 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
151 template <typename ParametersT = Aws::Map<Aws::String, JobParameter>>
152 void SetParameters(ParametersT&& value) {
153 m_parametersHasBeenSet = true;
154 m_parameters = std::forward<ParametersT>(value);
155 }
156 template <typename ParametersT = Aws::Map<Aws::String, JobParameter>>
157 CreateJobRequest& WithParameters(ParametersT&& value) {
158 SetParameters(std::forward<ParametersT>(value));
159 return *this;
160 }
161 template <typename ParametersKeyT = Aws::String, typename ParametersValueT = JobParameter>
162 CreateJobRequest& AddParameters(ParametersKeyT&& key, ParametersValueT&& value) {
163 m_parametersHasBeenSet = true;
164 m_parameters.emplace(std::forward<ParametersKeyT>(key), std::forward<ParametersValueT>(value));
165 return *this;
166 }
168
170
174 inline const Attachments& GetAttachments() const { return m_attachments; }
175 inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
176 template <typename AttachmentsT = Attachments>
177 void SetAttachments(AttachmentsT&& value) {
178 m_attachmentsHasBeenSet = true;
179 m_attachments = std::forward<AttachmentsT>(value);
180 }
181 template <typename AttachmentsT = Attachments>
182 CreateJobRequest& WithAttachments(AttachmentsT&& value) {
183 SetAttachments(std::forward<AttachmentsT>(value));
184 return *this;
185 }
187
189
192 inline const Aws::String& GetStorageProfileId() const { return m_storageProfileId; }
193 inline bool StorageProfileIdHasBeenSet() const { return m_storageProfileIdHasBeenSet; }
194 template <typename StorageProfileIdT = Aws::String>
195 void SetStorageProfileId(StorageProfileIdT&& value) {
196 m_storageProfileIdHasBeenSet = true;
197 m_storageProfileId = std::forward<StorageProfileIdT>(value);
198 }
199 template <typename StorageProfileIdT = Aws::String>
200 CreateJobRequest& WithStorageProfileId(StorageProfileIdT&& value) {
201 SetStorageProfileId(std::forward<StorageProfileIdT>(value));
202 return *this;
203 }
205
207
211 inline CreateJobTargetTaskRunStatus GetTargetTaskRunStatus() const { return m_targetTaskRunStatus; }
212 inline bool TargetTaskRunStatusHasBeenSet() const { return m_targetTaskRunStatusHasBeenSet; }
214 m_targetTaskRunStatusHasBeenSet = true;
215 m_targetTaskRunStatus = value;
216 }
219 return *this;
220 }
222
224
228 inline int GetMaxFailedTasksCount() const { return m_maxFailedTasksCount; }
229 inline bool MaxFailedTasksCountHasBeenSet() const { return m_maxFailedTasksCountHasBeenSet; }
230 inline void SetMaxFailedTasksCount(int value) {
231 m_maxFailedTasksCountHasBeenSet = true;
232 m_maxFailedTasksCount = value;
233 }
236 return *this;
237 }
239
241
244 inline int GetMaxRetriesPerTask() const { return m_maxRetriesPerTask; }
245 inline bool MaxRetriesPerTaskHasBeenSet() const { return m_maxRetriesPerTaskHasBeenSet; }
246 inline void SetMaxRetriesPerTask(int value) {
247 m_maxRetriesPerTaskHasBeenSet = true;
248 m_maxRetriesPerTask = value;
249 }
252 return *this;
253 }
255
257
266 inline int GetMaxWorkerCount() const { return m_maxWorkerCount; }
267 inline bool MaxWorkerCountHasBeenSet() const { return m_maxWorkerCountHasBeenSet; }
268 inline void SetMaxWorkerCount(int value) {
269 m_maxWorkerCountHasBeenSet = true;
270 m_maxWorkerCount = value;
271 }
273 SetMaxWorkerCount(value);
274 return *this;
275 }
277
279
282 inline const Aws::String& GetSourceJobId() const { return m_sourceJobId; }
283 inline bool SourceJobIdHasBeenSet() const { return m_sourceJobIdHasBeenSet; }
284 template <typename SourceJobIdT = Aws::String>
285 void SetSourceJobId(SourceJobIdT&& value) {
286 m_sourceJobIdHasBeenSet = true;
287 m_sourceJobId = std::forward<SourceJobIdT>(value);
288 }
289 template <typename SourceJobIdT = Aws::String>
290 CreateJobRequest& WithSourceJobId(SourceJobIdT&& value) {
291 SetSourceJobId(std::forward<SourceJobIdT>(value));
292 return *this;
293 }
295
297
300 inline const Aws::String& GetNameOverride() const { return m_nameOverride; }
301 inline bool NameOverrideHasBeenSet() const { return m_nameOverrideHasBeenSet; }
302 template <typename NameOverrideT = Aws::String>
303 void SetNameOverride(NameOverrideT&& value) {
304 m_nameOverrideHasBeenSet = true;
305 m_nameOverride = std::forward<NameOverrideT>(value);
306 }
307 template <typename NameOverrideT = Aws::String>
308 CreateJobRequest& WithNameOverride(NameOverrideT&& value) {
309 SetNameOverride(std::forward<NameOverrideT>(value));
310 return *this;
311 }
313
315
319 inline const Aws::String& GetDescriptionOverride() const { return m_descriptionOverride; }
320 inline bool DescriptionOverrideHasBeenSet() const { return m_descriptionOverrideHasBeenSet; }
321 template <typename DescriptionOverrideT = Aws::String>
322 void SetDescriptionOverride(DescriptionOverrideT&& value) {
323 m_descriptionOverrideHasBeenSet = true;
324 m_descriptionOverride = std::forward<DescriptionOverrideT>(value);
325 }
326 template <typename DescriptionOverrideT = Aws::String>
327 CreateJobRequest& WithDescriptionOverride(DescriptionOverrideT&& value) {
328 SetDescriptionOverride(std::forward<DescriptionOverrideT>(value));
329 return *this;
330 }
332
334
338 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
339 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
340 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
341 void SetTags(TagsT&& value) {
342 m_tagsHasBeenSet = true;
343 m_tags = std::forward<TagsT>(value);
344 }
345 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
346 CreateJobRequest& WithTags(TagsT&& value) {
347 SetTags(std::forward<TagsT>(value));
348 return *this;
349 }
350 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
351 CreateJobRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
352 m_tagsHasBeenSet = true;
353 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
354 return *this;
355 }
357 private:
358 Aws::String m_farmId;
359
360 Aws::String m_queueId;
361
363
364 Aws::String m_template;
365
367
368 int m_priority{0};
369
371
372 Attachments m_attachments;
373
374 Aws::String m_storageProfileId;
375
377
378 int m_maxFailedTasksCount{0};
379
380 int m_maxRetriesPerTask{0};
381
382 int m_maxWorkerCount{0};
383
384 Aws::String m_sourceJobId;
385
386 Aws::String m_nameOverride;
387
388 Aws::String m_descriptionOverride;
389
391 bool m_farmIdHasBeenSet = false;
392 bool m_queueIdHasBeenSet = false;
393 bool m_clientTokenHasBeenSet = true;
394 bool m_templateHasBeenSet = false;
395 bool m_templateTypeHasBeenSet = false;
396 bool m_priorityHasBeenSet = false;
397 bool m_parametersHasBeenSet = false;
398 bool m_attachmentsHasBeenSet = false;
399 bool m_storageProfileIdHasBeenSet = false;
400 bool m_targetTaskRunStatusHasBeenSet = false;
401 bool m_maxFailedTasksCountHasBeenSet = false;
402 bool m_maxRetriesPerTaskHasBeenSet = false;
403 bool m_maxWorkerCountHasBeenSet = false;
404 bool m_sourceJobIdHasBeenSet = false;
405 bool m_nameOverrideHasBeenSet = false;
406 bool m_descriptionOverrideHasBeenSet = false;
407 bool m_tagsHasBeenSet = false;
408};
409
410} // namespace Model
411} // namespace deadline
412} // namespace Aws
static Aws::Utils::UUID PseudoRandomUUID()
const Aws::String & GetQueueId() const
AWS_DEADLINE_API Aws::String SerializePayload() const override
CreateJobRequest & WithStorageProfileId(StorageProfileIdT &&value)
CreateJobRequest & WithDescriptionOverride(DescriptionOverrideT &&value)
CreateJobRequest & WithMaxWorkerCount(int value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateJobRequest & AddParameters(ParametersKeyT &&key, ParametersValueT &&value)
const Attachments & GetAttachments() const
CreateJobRequest & WithTemplate(TemplateT &&value)
void SetTargetTaskRunStatus(CreateJobTargetTaskRunStatus value)
CreateJobRequest & WithQueueId(QueueIdT &&value)
const Aws::Map< Aws::String, JobParameter > & GetParameters() const
void SetSourceJobId(SourceJobIdT &&value)
CreateJobRequest & WithNameOverride(NameOverrideT &&value)
const Aws::String & GetNameOverride() const
void SetDescriptionOverride(DescriptionOverrideT &&value)
void SetNameOverride(NameOverrideT &&value)
const Aws::String & GetDescriptionOverride() const
CreateJobRequest & WithTargetTaskRunStatus(CreateJobTargetTaskRunStatus value)
virtual const char * GetServiceRequestName() const override
CreateJobRequest & WithClientToken(ClientTokenT &&value)
const Aws::String & GetSourceJobId() const
CreateJobRequest & WithMaxRetriesPerTask(int value)
CreateJobRequest & WithSourceJobId(SourceJobIdT &&value)
const Aws::String & GetStorageProfileId() const
void SetParameters(ParametersT &&value)
CreateJobRequest & WithMaxFailedTasksCount(int value)
AWS_DEADLINE_API CreateJobRequest()=default
AWS_DEADLINE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetAttachments(AttachmentsT &&value)
CreateJobRequest & WithPriority(int value)
CreateJobTargetTaskRunStatus GetTargetTaskRunStatus() const
void SetClientToken(ClientTokenT &&value)
const Aws::String & GetFarmId() const
const Aws::String & GetTemplate() const
void SetStorageProfileId(StorageProfileIdT &&value)
CreateJobRequest & WithAttachments(AttachmentsT &&value)
const Aws::String & GetClientToken() const
CreateJobRequest & WithFarmId(FarmIdT &&value)
CreateJobRequest & WithTemplateType(JobTemplateType value)
void SetTemplateType(JobTemplateType value)
CreateJobRequest & WithTags(TagsT &&value)
CreateJobRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateJobRequest & WithParameters(ParametersT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
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