AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
JobDefinition.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/ConsumableResourceProperties.h>
9#include <aws/batch/model/ContainerProperties.h>
10#include <aws/batch/model/EcsProperties.h>
11#include <aws/batch/model/EksProperties.h>
12#include <aws/batch/model/JobTimeout.h>
13#include <aws/batch/model/NodeProperties.h>
14#include <aws/batch/model/OrchestrationType.h>
15#include <aws/batch/model/PlatformCapability.h>
16#include <aws/batch/model/RetryStrategy.h>
17#include <aws/core/utils/memory/stl/AWSMap.h>
18#include <aws/core/utils/memory/stl/AWSString.h>
19#include <aws/core/utils/memory/stl/AWSVector.h>
20
21#include <utility>
22
23namespace Aws {
24namespace Utils {
25namespace Json {
26class JsonValue;
27class JsonView;
28} // namespace Json
29} // namespace Utils
30namespace Batch {
31namespace Model {
32
40 public:
41 AWS_BATCH_API JobDefinition() = default;
42 AWS_BATCH_API JobDefinition(Aws::Utils::Json::JsonView jsonValue);
44 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
45
47
50 inline const Aws::String& GetJobDefinitionName() const { return m_jobDefinitionName; }
51 inline bool JobDefinitionNameHasBeenSet() const { return m_jobDefinitionNameHasBeenSet; }
52 template <typename JobDefinitionNameT = Aws::String>
53 void SetJobDefinitionName(JobDefinitionNameT&& value) {
54 m_jobDefinitionNameHasBeenSet = true;
55 m_jobDefinitionName = std::forward<JobDefinitionNameT>(value);
56 }
57 template <typename JobDefinitionNameT = Aws::String>
58 JobDefinition& WithJobDefinitionName(JobDefinitionNameT&& value) {
59 SetJobDefinitionName(std::forward<JobDefinitionNameT>(value));
60 return *this;
61 }
63
65
68 inline const Aws::String& GetJobDefinitionArn() const { return m_jobDefinitionArn; }
69 inline bool JobDefinitionArnHasBeenSet() const { return m_jobDefinitionArnHasBeenSet; }
70 template <typename JobDefinitionArnT = Aws::String>
71 void SetJobDefinitionArn(JobDefinitionArnT&& value) {
72 m_jobDefinitionArnHasBeenSet = true;
73 m_jobDefinitionArn = std::forward<JobDefinitionArnT>(value);
74 }
75 template <typename JobDefinitionArnT = Aws::String>
76 JobDefinition& WithJobDefinitionArn(JobDefinitionArnT&& value) {
77 SetJobDefinitionArn(std::forward<JobDefinitionArnT>(value));
78 return *this;
79 }
81
83
86 inline int GetRevision() const { return m_revision; }
87 inline bool RevisionHasBeenSet() const { return m_revisionHasBeenSet; }
88 inline void SetRevision(int value) {
89 m_revisionHasBeenSet = true;
90 m_revision = value;
91 }
92 inline JobDefinition& WithRevision(int value) {
93 SetRevision(value);
94 return *this;
95 }
97
99
102 inline const Aws::String& GetStatus() const { return m_status; }
103 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
104 template <typename StatusT = Aws::String>
105 void SetStatus(StatusT&& value) {
106 m_statusHasBeenSet = true;
107 m_status = std::forward<StatusT>(value);
108 }
109 template <typename StatusT = Aws::String>
110 JobDefinition& WithStatus(StatusT&& value) {
111 SetStatus(std::forward<StatusT>(value));
112 return *this;
113 }
115
117
125 inline const Aws::String& GetType() const { return m_type; }
126 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
127 template <typename TypeT = Aws::String>
128 void SetType(TypeT&& value) {
129 m_typeHasBeenSet = true;
130 m_type = std::forward<TypeT>(value);
131 }
132 template <typename TypeT = Aws::String>
133 JobDefinition& WithType(TypeT&& value) {
134 SetType(std::forward<TypeT>(value));
135 return *this;
136 }
138
140
145 inline int GetSchedulingPriority() const { return m_schedulingPriority; }
146 inline bool SchedulingPriorityHasBeenSet() const { return m_schedulingPriorityHasBeenSet; }
147 inline void SetSchedulingPriority(int value) {
148 m_schedulingPriorityHasBeenSet = true;
149 m_schedulingPriority = value;
150 }
153 return *this;
154 }
156
158
167 inline const Aws::Map<Aws::String, Aws::String>& GetParameters() const { return m_parameters; }
168 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
169 template <typename ParametersT = Aws::Map<Aws::String, Aws::String>>
170 void SetParameters(ParametersT&& value) {
171 m_parametersHasBeenSet = true;
172 m_parameters = std::forward<ParametersT>(value);
173 }
174 template <typename ParametersT = Aws::Map<Aws::String, Aws::String>>
175 JobDefinition& WithParameters(ParametersT&& value) {
176 SetParameters(std::forward<ParametersT>(value));
177 return *this;
178 }
179 template <typename ParametersKeyT = Aws::String, typename ParametersValueT = Aws::String>
180 JobDefinition& AddParameters(ParametersKeyT&& key, ParametersValueT&& value) {
181 m_parametersHasBeenSet = true;
182 m_parameters.emplace(std::forward<ParametersKeyT>(key), std::forward<ParametersValueT>(value));
183 return *this;
184 }
186
188
192 inline const RetryStrategy& GetRetryStrategy() const { return m_retryStrategy; }
193 inline bool RetryStrategyHasBeenSet() const { return m_retryStrategyHasBeenSet; }
194 template <typename RetryStrategyT = RetryStrategy>
195 void SetRetryStrategy(RetryStrategyT&& value) {
196 m_retryStrategyHasBeenSet = true;
197 m_retryStrategy = std::forward<RetryStrategyT>(value);
198 }
199 template <typename RetryStrategyT = RetryStrategy>
200 JobDefinition& WithRetryStrategy(RetryStrategyT&& value) {
201 SetRetryStrategy(std::forward<RetryStrategyT>(value));
202 return *this;
203 }
205
207
213 inline const ContainerProperties& GetContainerProperties() const { return m_containerProperties; }
214 inline bool ContainerPropertiesHasBeenSet() const { return m_containerPropertiesHasBeenSet; }
215 template <typename ContainerPropertiesT = ContainerProperties>
216 void SetContainerProperties(ContainerPropertiesT&& value) {
217 m_containerPropertiesHasBeenSet = true;
218 m_containerProperties = std::forward<ContainerPropertiesT>(value);
219 }
220 template <typename ContainerPropertiesT = ContainerProperties>
221 JobDefinition& WithContainerProperties(ContainerPropertiesT&& value) {
222 SetContainerProperties(std::forward<ContainerPropertiesT>(value));
223 return *this;
224 }
226
228
233 inline const JobTimeout& GetTimeout() const { return m_timeout; }
234 inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; }
235 template <typename TimeoutT = JobTimeout>
236 void SetTimeout(TimeoutT&& value) {
237 m_timeoutHasBeenSet = true;
238 m_timeout = std::forward<TimeoutT>(value);
239 }
240 template <typename TimeoutT = JobTimeout>
241 JobDefinition& WithTimeout(TimeoutT&& value) {
242 SetTimeout(std::forward<TimeoutT>(value));
243 return *this;
244 }
246
248
256 inline const NodeProperties& GetNodeProperties() const { return m_nodeProperties; }
257 inline bool NodePropertiesHasBeenSet() const { return m_nodePropertiesHasBeenSet; }
258 template <typename NodePropertiesT = NodeProperties>
259 void SetNodeProperties(NodePropertiesT&& value) {
260 m_nodePropertiesHasBeenSet = true;
261 m_nodeProperties = std::forward<NodePropertiesT>(value);
262 }
263 template <typename NodePropertiesT = NodeProperties>
264 JobDefinition& WithNodeProperties(NodePropertiesT&& value) {
265 SetNodeProperties(std::forward<NodePropertiesT>(value));
266 return *this;
267 }
269
271
274 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
275 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
276 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
277 void SetTags(TagsT&& value) {
278 m_tagsHasBeenSet = true;
279 m_tags = std::forward<TagsT>(value);
280 }
281 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
282 JobDefinition& WithTags(TagsT&& value) {
283 SetTags(std::forward<TagsT>(value));
284 return *this;
285 }
286 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
287 JobDefinition& AddTags(TagsKeyT&& key, TagsValueT&& value) {
288 m_tagsHasBeenSet = true;
289 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
290 return *this;
291 }
293
295
303 inline bool GetPropagateTags() const { return m_propagateTags; }
304 inline bool PropagateTagsHasBeenSet() const { return m_propagateTagsHasBeenSet; }
305 inline void SetPropagateTags(bool value) {
306 m_propagateTagsHasBeenSet = true;
307 m_propagateTags = value;
308 }
309 inline JobDefinition& WithPropagateTags(bool value) {
310 SetPropagateTags(value);
311 return *this;
312 }
314
316
321 inline const Aws::Vector<PlatformCapability>& GetPlatformCapabilities() const { return m_platformCapabilities; }
322 inline bool PlatformCapabilitiesHasBeenSet() const { return m_platformCapabilitiesHasBeenSet; }
323 template <typename PlatformCapabilitiesT = Aws::Vector<PlatformCapability>>
324 void SetPlatformCapabilities(PlatformCapabilitiesT&& value) {
325 m_platformCapabilitiesHasBeenSet = true;
326 m_platformCapabilities = std::forward<PlatformCapabilitiesT>(value);
327 }
328 template <typename PlatformCapabilitiesT = Aws::Vector<PlatformCapability>>
329 JobDefinition& WithPlatformCapabilities(PlatformCapabilitiesT&& value) {
330 SetPlatformCapabilities(std::forward<PlatformCapabilitiesT>(value));
331 return *this;
332 }
334 m_platformCapabilitiesHasBeenSet = true;
335 m_platformCapabilities.push_back(value);
336 return *this;
337 }
339
341
347 inline const EcsProperties& GetEcsProperties() const { return m_ecsProperties; }
348 inline bool EcsPropertiesHasBeenSet() const { return m_ecsPropertiesHasBeenSet; }
349 template <typename EcsPropertiesT = EcsProperties>
350 void SetEcsProperties(EcsPropertiesT&& value) {
351 m_ecsPropertiesHasBeenSet = true;
352 m_ecsProperties = std::forward<EcsPropertiesT>(value);
353 }
354 template <typename EcsPropertiesT = EcsProperties>
355 JobDefinition& WithEcsProperties(EcsPropertiesT&& value) {
356 SetEcsProperties(std::forward<EcsPropertiesT>(value));
357 return *this;
358 }
360
362
368 inline const EksProperties& GetEksProperties() const { return m_eksProperties; }
369 inline bool EksPropertiesHasBeenSet() const { return m_eksPropertiesHasBeenSet; }
370 template <typename EksPropertiesT = EksProperties>
371 void SetEksProperties(EksPropertiesT&& value) {
372 m_eksPropertiesHasBeenSet = true;
373 m_eksProperties = std::forward<EksPropertiesT>(value);
374 }
375 template <typename EksPropertiesT = EksProperties>
376 JobDefinition& WithEksProperties(EksPropertiesT&& value) {
377 SetEksProperties(std::forward<EksPropertiesT>(value));
378 return *this;
379 }
381
383
387 inline OrchestrationType GetContainerOrchestrationType() const { return m_containerOrchestrationType; }
388 inline bool ContainerOrchestrationTypeHasBeenSet() const { return m_containerOrchestrationTypeHasBeenSet; }
390 m_containerOrchestrationTypeHasBeenSet = true;
391 m_containerOrchestrationType = value;
392 }
395 return *this;
396 }
398
400
403 inline const ConsumableResourceProperties& GetConsumableResourceProperties() const { return m_consumableResourceProperties; }
404 inline bool ConsumableResourcePropertiesHasBeenSet() const { return m_consumableResourcePropertiesHasBeenSet; }
405 template <typename ConsumableResourcePropertiesT = ConsumableResourceProperties>
406 void SetConsumableResourceProperties(ConsumableResourcePropertiesT&& value) {
407 m_consumableResourcePropertiesHasBeenSet = true;
408 m_consumableResourceProperties = std::forward<ConsumableResourcePropertiesT>(value);
409 }
410 template <typename ConsumableResourcePropertiesT = ConsumableResourceProperties>
411 JobDefinition& WithConsumableResourceProperties(ConsumableResourcePropertiesT&& value) {
412 SetConsumableResourceProperties(std::forward<ConsumableResourcePropertiesT>(value));
413 return *this;
414 }
416 private:
417 Aws::String m_jobDefinitionName;
418
419 Aws::String m_jobDefinitionArn;
420
421 int m_revision{0};
422
423 Aws::String m_status;
424
425 Aws::String m_type;
426
427 int m_schedulingPriority{0};
428
430
431 RetryStrategy m_retryStrategy;
432
433 ContainerProperties m_containerProperties;
434
435 JobTimeout m_timeout;
436
437 NodeProperties m_nodeProperties;
438
440
441 bool m_propagateTags{false};
442
443 Aws::Vector<PlatformCapability> m_platformCapabilities;
444
445 EcsProperties m_ecsProperties;
446
447 EksProperties m_eksProperties;
448
449 OrchestrationType m_containerOrchestrationType{OrchestrationType::NOT_SET};
450
451 ConsumableResourceProperties m_consumableResourceProperties;
452 bool m_jobDefinitionNameHasBeenSet = false;
453 bool m_jobDefinitionArnHasBeenSet = false;
454 bool m_revisionHasBeenSet = false;
455 bool m_statusHasBeenSet = false;
456 bool m_typeHasBeenSet = false;
457 bool m_schedulingPriorityHasBeenSet = false;
458 bool m_parametersHasBeenSet = false;
459 bool m_retryStrategyHasBeenSet = false;
460 bool m_containerPropertiesHasBeenSet = false;
461 bool m_timeoutHasBeenSet = false;
462 bool m_nodePropertiesHasBeenSet = false;
463 bool m_tagsHasBeenSet = false;
464 bool m_propagateTagsHasBeenSet = false;
465 bool m_platformCapabilitiesHasBeenSet = false;
466 bool m_ecsPropertiesHasBeenSet = false;
467 bool m_eksPropertiesHasBeenSet = false;
468 bool m_containerOrchestrationTypeHasBeenSet = false;
469 bool m_consumableResourcePropertiesHasBeenSet = false;
470};
471
472} // namespace Model
473} // namespace Batch
474} // namespace Aws
const NodeProperties & GetNodeProperties() const
const Aws::String & GetJobDefinitionName() const
JobDefinition & WithContainerOrchestrationType(OrchestrationType value)
JobDefinition & WithContainerProperties(ContainerPropertiesT &&value)
void SetContainerProperties(ContainerPropertiesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
const ConsumableResourceProperties & GetConsumableResourceProperties() const
bool ConsumableResourcePropertiesHasBeenSet() const
AWS_BATCH_API JobDefinition(Aws::Utils::Json::JsonView jsonValue)
JobDefinition & AddPlatformCapabilities(PlatformCapability value)
JobDefinition & WithParameters(ParametersT &&value)
JobDefinition & WithJobDefinitionArn(JobDefinitionArnT &&value)
void SetContainerOrchestrationType(OrchestrationType value)
void SetTimeout(TimeoutT &&value)
void SetStatus(StatusT &&value)
void SetPlatformCapabilities(PlatformCapabilitiesT &&value)
void SetJobDefinitionName(JobDefinitionNameT &&value)
void SetEksProperties(EksPropertiesT &&value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
const EksProperties & GetEksProperties() const
AWS_BATCH_API JobDefinition & operator=(Aws::Utils::Json::JsonView jsonValue)
const JobTimeout & GetTimeout() const
void SetEcsProperties(EcsPropertiesT &&value)
void SetJobDefinitionArn(JobDefinitionArnT &&value)
JobDefinition & WithEksProperties(EksPropertiesT &&value)
JobDefinition & AddTags(TagsKeyT &&key, TagsValueT &&value)
JobDefinition & WithStatus(StatusT &&value)
JobDefinition & WithSchedulingPriority(int value)
const Aws::Vector< PlatformCapability > & GetPlatformCapabilities() const
JobDefinition & WithType(TypeT &&value)
const Aws::String & GetJobDefinitionArn() const
void SetParameters(ParametersT &&value)
JobDefinition & WithRevision(int value)
void SetNodeProperties(NodePropertiesT &&value)
const EcsProperties & GetEcsProperties() const
const ContainerProperties & GetContainerProperties() const
bool ContainerOrchestrationTypeHasBeenSet() const
JobDefinition & WithRetryStrategy(RetryStrategyT &&value)
const RetryStrategy & GetRetryStrategy() const
void SetConsumableResourceProperties(ConsumableResourcePropertiesT &&value)
JobDefinition & WithEcsProperties(EcsPropertiesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetParameters() const
const Aws::String & GetType() const
OrchestrationType GetContainerOrchestrationType() const
const Aws::String & GetStatus() const
JobDefinition & WithTimeout(TimeoutT &&value)
JobDefinition & WithJobDefinitionName(JobDefinitionNameT &&value)
JobDefinition & WithTags(TagsT &&value)
JobDefinition & WithConsumableResourceProperties(ConsumableResourcePropertiesT &&value)
JobDefinition & WithPropagateTags(bool value)
JobDefinition & WithPlatformCapabilities(PlatformCapabilitiesT &&value)
void SetRetryStrategy(RetryStrategyT &&value)
AWS_BATCH_API JobDefinition()=default
JobDefinition & WithNodeProperties(NodePropertiesT &&value)
JobDefinition & AddParameters(ParametersKeyT &&key, ParametersValueT &&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