AWS SDK for C++

AWS SDK for C++ Version 1.11.875

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
322 inline const Aws::Vector<PlatformCapability>& GetPlatformCapabilities() const { return m_platformCapabilities; }
323 inline bool PlatformCapabilitiesHasBeenSet() const { return m_platformCapabilitiesHasBeenSet; }
324 template <typename PlatformCapabilitiesT = Aws::Vector<PlatformCapability>>
325 void SetPlatformCapabilities(PlatformCapabilitiesT&& value) {
326 m_platformCapabilitiesHasBeenSet = true;
327 m_platformCapabilities = std::forward<PlatformCapabilitiesT>(value);
328 }
329 template <typename PlatformCapabilitiesT = Aws::Vector<PlatformCapability>>
330 JobDefinition& WithPlatformCapabilities(PlatformCapabilitiesT&& value) {
331 SetPlatformCapabilities(std::forward<PlatformCapabilitiesT>(value));
332 return *this;
333 }
335 m_platformCapabilitiesHasBeenSet = true;
336 m_platformCapabilities.push_back(value);
337 return *this;
338 }
340
342
348 inline const EcsProperties& GetEcsProperties() const { return m_ecsProperties; }
349 inline bool EcsPropertiesHasBeenSet() const { return m_ecsPropertiesHasBeenSet; }
350 template <typename EcsPropertiesT = EcsProperties>
351 void SetEcsProperties(EcsPropertiesT&& value) {
352 m_ecsPropertiesHasBeenSet = true;
353 m_ecsProperties = std::forward<EcsPropertiesT>(value);
354 }
355 template <typename EcsPropertiesT = EcsProperties>
356 JobDefinition& WithEcsProperties(EcsPropertiesT&& value) {
357 SetEcsProperties(std::forward<EcsPropertiesT>(value));
358 return *this;
359 }
361
363
369 inline const EksProperties& GetEksProperties() const { return m_eksProperties; }
370 inline bool EksPropertiesHasBeenSet() const { return m_eksPropertiesHasBeenSet; }
371 template <typename EksPropertiesT = EksProperties>
372 void SetEksProperties(EksPropertiesT&& value) {
373 m_eksPropertiesHasBeenSet = true;
374 m_eksProperties = std::forward<EksPropertiesT>(value);
375 }
376 template <typename EksPropertiesT = EksProperties>
377 JobDefinition& WithEksProperties(EksPropertiesT&& value) {
378 SetEksProperties(std::forward<EksPropertiesT>(value));
379 return *this;
380 }
382
384
388 inline OrchestrationType GetContainerOrchestrationType() const { return m_containerOrchestrationType; }
389 inline bool ContainerOrchestrationTypeHasBeenSet() const { return m_containerOrchestrationTypeHasBeenSet; }
391 m_containerOrchestrationTypeHasBeenSet = true;
392 m_containerOrchestrationType = value;
393 }
396 return *this;
397 }
399
401
404 inline const ConsumableResourceProperties& GetConsumableResourceProperties() const { return m_consumableResourceProperties; }
405 inline bool ConsumableResourcePropertiesHasBeenSet() const { return m_consumableResourcePropertiesHasBeenSet; }
406 template <typename ConsumableResourcePropertiesT = ConsumableResourceProperties>
407 void SetConsumableResourceProperties(ConsumableResourcePropertiesT&& value) {
408 m_consumableResourcePropertiesHasBeenSet = true;
409 m_consumableResourceProperties = std::forward<ConsumableResourcePropertiesT>(value);
410 }
411 template <typename ConsumableResourcePropertiesT = ConsumableResourceProperties>
412 JobDefinition& WithConsumableResourceProperties(ConsumableResourcePropertiesT&& value) {
413 SetConsumableResourceProperties(std::forward<ConsumableResourcePropertiesT>(value));
414 return *this;
415 }
417 private:
418 Aws::String m_jobDefinitionName;
419
420 Aws::String m_jobDefinitionArn;
421
422 int m_revision{0};
423
424 Aws::String m_status;
425
426 Aws::String m_type;
427
428 int m_schedulingPriority{0};
429
431
432 RetryStrategy m_retryStrategy;
433
434 ContainerProperties m_containerProperties;
435
436 JobTimeout m_timeout;
437
438 NodeProperties m_nodeProperties;
439
441
442 bool m_propagateTags{false};
443
444 Aws::Vector<PlatformCapability> m_platformCapabilities;
445
446 EcsProperties m_ecsProperties;
447
448 EksProperties m_eksProperties;
449
450 OrchestrationType m_containerOrchestrationType{OrchestrationType::NOT_SET};
451
452 ConsumableResourceProperties m_consumableResourceProperties;
453 bool m_jobDefinitionNameHasBeenSet = false;
454 bool m_jobDefinitionArnHasBeenSet = false;
455 bool m_revisionHasBeenSet = false;
456 bool m_statusHasBeenSet = false;
457 bool m_typeHasBeenSet = false;
458 bool m_schedulingPriorityHasBeenSet = false;
459 bool m_parametersHasBeenSet = false;
460 bool m_retryStrategyHasBeenSet = false;
461 bool m_containerPropertiesHasBeenSet = false;
462 bool m_timeoutHasBeenSet = false;
463 bool m_nodePropertiesHasBeenSet = false;
464 bool m_tagsHasBeenSet = false;
465 bool m_propagateTagsHasBeenSet = false;
466 bool m_platformCapabilitiesHasBeenSet = false;
467 bool m_ecsPropertiesHasBeenSet = false;
468 bool m_eksPropertiesHasBeenSet = false;
469 bool m_containerOrchestrationTypeHasBeenSet = false;
470 bool m_consumableResourcePropertiesHasBeenSet = false;
471};
472
473} // namespace Model
474} // namespace Batch
475} // 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