AWS SDK for C++

AWS SDK for C++ Version 1.11.906

Loading...
Searching...
No Matches
TaskContainerProperties.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/FirelensConfiguration.h>
9#include <aws/batch/model/KeyValuePair.h>
10#include <aws/batch/model/LinuxParameters.h>
11#include <aws/batch/model/LogConfiguration.h>
12#include <aws/batch/model/MountPoint.h>
13#include <aws/batch/model/RepositoryCredentials.h>
14#include <aws/batch/model/ResourceRequirement.h>
15#include <aws/batch/model/Secret.h>
16#include <aws/batch/model/TaskContainerDependency.h>
17#include <aws/batch/model/Ulimit.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
41 public:
42 AWS_BATCH_API TaskContainerProperties() = default;
45 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
46
48
60 inline const Aws::Vector<Aws::String>& GetCommand() const { return m_command; }
61 inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; }
62 template <typename CommandT = Aws::Vector<Aws::String>>
63 void SetCommand(CommandT&& value) {
64 m_commandHasBeenSet = true;
65 m_command = std::forward<CommandT>(value);
66 }
67 template <typename CommandT = Aws::Vector<Aws::String>>
69 SetCommand(std::forward<CommandT>(value));
70 return *this;
71 }
72 template <typename CommandT = Aws::String>
74 m_commandHasBeenSet = true;
75 m_command.emplace_back(std::forward<CommandT>(value));
76 return *this;
77 }
79
81
84 inline const Aws::Vector<TaskContainerDependency>& GetDependsOn() const { return m_dependsOn; }
85 inline bool DependsOnHasBeenSet() const { return m_dependsOnHasBeenSet; }
86 template <typename DependsOnT = Aws::Vector<TaskContainerDependency>>
87 void SetDependsOn(DependsOnT&& value) {
88 m_dependsOnHasBeenSet = true;
89 m_dependsOn = std::forward<DependsOnT>(value);
90 }
91 template <typename DependsOnT = Aws::Vector<TaskContainerDependency>>
93 SetDependsOn(std::forward<DependsOnT>(value));
94 return *this;
95 }
96 template <typename DependsOnT = TaskContainerDependency>
98 m_dependsOnHasBeenSet = true;
99 m_dependsOn.emplace_back(std::forward<DependsOnT>(value));
100 return *this;
101 }
103
105
118 inline const Aws::Vector<KeyValuePair>& GetEnvironment() const { return m_environment; }
119 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
120 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
121 void SetEnvironment(EnvironmentT&& value) {
122 m_environmentHasBeenSet = true;
123 m_environment = std::forward<EnvironmentT>(value);
124 }
125 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
127 SetEnvironment(std::forward<EnvironmentT>(value));
128 return *this;
129 }
130 template <typename EnvironmentT = KeyValuePair>
132 m_environmentHasBeenSet = true;
133 m_environment.emplace_back(std::forward<EnvironmentT>(value));
134 return *this;
135 }
137
139
153 inline bool GetEssential() const { return m_essential; }
154 inline bool EssentialHasBeenSet() const { return m_essentialHasBeenSet; }
155 inline void SetEssential(bool value) {
156 m_essentialHasBeenSet = true;
157 m_essential = value;
158 }
160 SetEssential(value);
161 return *this;
162 }
164
166
173 inline const FirelensConfiguration& GetFirelensConfiguration() const { return m_firelensConfiguration; }
174 inline bool FirelensConfigurationHasBeenSet() const { return m_firelensConfigurationHasBeenSet; }
175 template <typename FirelensConfigurationT = FirelensConfiguration>
176 void SetFirelensConfiguration(FirelensConfigurationT&& value) {
177 m_firelensConfigurationHasBeenSet = true;
178 m_firelensConfiguration = std::forward<FirelensConfigurationT>(value);
179 }
180 template <typename FirelensConfigurationT = FirelensConfiguration>
181 TaskContainerProperties& WithFirelensConfiguration(FirelensConfigurationT&& value) {
182 SetFirelensConfiguration(std::forward<FirelensConfigurationT>(value));
183 return *this;
184 }
186
188
203 inline const Aws::String& GetImage() const { return m_image; }
204 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
205 template <typename ImageT = Aws::String>
206 void SetImage(ImageT&& value) {
207 m_imageHasBeenSet = true;
208 m_image = std::forward<ImageT>(value);
209 }
210 template <typename ImageT = Aws::String>
212 SetImage(std::forward<ImageT>(value));
213 return *this;
214 }
216
218
223 inline const LinuxParameters& GetLinuxParameters() const { return m_linuxParameters; }
224 inline bool LinuxParametersHasBeenSet() const { return m_linuxParametersHasBeenSet; }
225 template <typename LinuxParametersT = LinuxParameters>
226 void SetLinuxParameters(LinuxParametersT&& value) {
227 m_linuxParametersHasBeenSet = true;
228 m_linuxParameters = std::forward<LinuxParametersT>(value);
229 }
230 template <typename LinuxParametersT = LinuxParameters>
231 TaskContainerProperties& WithLinuxParameters(LinuxParametersT&& value) {
232 SetLinuxParameters(std::forward<LinuxParametersT>(value));
233 return *this;
234 }
236
238
271 inline const LogConfiguration& GetLogConfiguration() const { return m_logConfiguration; }
272 inline bool LogConfigurationHasBeenSet() const { return m_logConfigurationHasBeenSet; }
273 template <typename LogConfigurationT = LogConfiguration>
274 void SetLogConfiguration(LogConfigurationT&& value) {
275 m_logConfigurationHasBeenSet = true;
276 m_logConfiguration = std::forward<LogConfigurationT>(value);
277 }
278 template <typename LogConfigurationT = LogConfiguration>
279 TaskContainerProperties& WithLogConfiguration(LogConfigurationT&& value) {
280 SetLogConfiguration(std::forward<LogConfigurationT>(value));
281 return *this;
282 }
284
286
298 inline const Aws::Vector<MountPoint>& GetMountPoints() const { return m_mountPoints; }
299 inline bool MountPointsHasBeenSet() const { return m_mountPointsHasBeenSet; }
300 template <typename MountPointsT = Aws::Vector<MountPoint>>
301 void SetMountPoints(MountPointsT&& value) {
302 m_mountPointsHasBeenSet = true;
303 m_mountPoints = std::forward<MountPointsT>(value);
304 }
305 template <typename MountPointsT = Aws::Vector<MountPoint>>
307 SetMountPoints(std::forward<MountPointsT>(value));
308 return *this;
309 }
310 template <typename MountPointsT = MountPoint>
312 m_mountPointsHasBeenSet = true;
313 m_mountPoints.emplace_back(std::forward<MountPointsT>(value));
314 return *this;
315 }
317
319
323 inline const Aws::String& GetName() const { return m_name; }
324 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
325 template <typename NameT = Aws::String>
326 void SetName(NameT&& value) {
327 m_nameHasBeenSet = true;
328 m_name = std::forward<NameT>(value);
329 }
330 template <typename NameT = Aws::String>
332 SetName(std::forward<NameT>(value));
333 return *this;
334 }
336
338
350 inline bool GetPrivileged() const { return m_privileged; }
351 inline bool PrivilegedHasBeenSet() const { return m_privilegedHasBeenSet; }
352 inline void SetPrivileged(bool value) {
353 m_privilegedHasBeenSet = true;
354 m_privileged = value;
355 }
357 SetPrivileged(value);
358 return *this;
359 }
361
363
374 inline bool GetReadonlyRootFilesystem() const { return m_readonlyRootFilesystem; }
375 inline bool ReadonlyRootFilesystemHasBeenSet() const { return m_readonlyRootFilesystemHasBeenSet; }
376 inline void SetReadonlyRootFilesystem(bool value) {
377 m_readonlyRootFilesystemHasBeenSet = true;
378 m_readonlyRootFilesystem = value;
379 }
382 return *this;
383 }
385
387
390 inline const RepositoryCredentials& GetRepositoryCredentials() const { return m_repositoryCredentials; }
391 inline bool RepositoryCredentialsHasBeenSet() const { return m_repositoryCredentialsHasBeenSet; }
392 template <typename RepositoryCredentialsT = RepositoryCredentials>
393 void SetRepositoryCredentials(RepositoryCredentialsT&& value) {
394 m_repositoryCredentialsHasBeenSet = true;
395 m_repositoryCredentials = std::forward<RepositoryCredentialsT>(value);
396 }
397 template <typename RepositoryCredentialsT = RepositoryCredentials>
398 TaskContainerProperties& WithRepositoryCredentials(RepositoryCredentialsT&& value) {
399 SetRepositoryCredentials(std::forward<RepositoryCredentialsT>(value));
400 return *this;
401 }
403
405
410 inline const Aws::Vector<ResourceRequirement>& GetResourceRequirements() const { return m_resourceRequirements; }
411 inline bool ResourceRequirementsHasBeenSet() const { return m_resourceRequirementsHasBeenSet; }
412 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
413 void SetResourceRequirements(ResourceRequirementsT&& value) {
414 m_resourceRequirementsHasBeenSet = true;
415 m_resourceRequirements = std::forward<ResourceRequirementsT>(value);
416 }
417 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
418 TaskContainerProperties& WithResourceRequirements(ResourceRequirementsT&& value) {
419 SetResourceRequirements(std::forward<ResourceRequirementsT>(value));
420 return *this;
421 }
422 template <typename ResourceRequirementsT = ResourceRequirement>
423 TaskContainerProperties& AddResourceRequirements(ResourceRequirementsT&& value) {
424 m_resourceRequirementsHasBeenSet = true;
425 m_resourceRequirements.emplace_back(std::forward<ResourceRequirementsT>(value));
426 return *this;
427 }
429
431
436 inline const Aws::Vector<Secret>& GetSecrets() const { return m_secrets; }
437 inline bool SecretsHasBeenSet() const { return m_secretsHasBeenSet; }
438 template <typename SecretsT = Aws::Vector<Secret>>
439 void SetSecrets(SecretsT&& value) {
440 m_secretsHasBeenSet = true;
441 m_secrets = std::forward<SecretsT>(value);
442 }
443 template <typename SecretsT = Aws::Vector<Secret>>
445 SetSecrets(std::forward<SecretsT>(value));
446 return *this;
447 }
448 template <typename SecretsT = Secret>
450 m_secretsHasBeenSet = true;
451 m_secrets.emplace_back(std::forward<SecretsT>(value));
452 return *this;
453 }
455
457
479 inline const Aws::Vector<Ulimit>& GetUlimits() const { return m_ulimits; }
480 inline bool UlimitsHasBeenSet() const { return m_ulimitsHasBeenSet; }
481 template <typename UlimitsT = Aws::Vector<Ulimit>>
482 void SetUlimits(UlimitsT&& value) {
483 m_ulimitsHasBeenSet = true;
484 m_ulimits = std::forward<UlimitsT>(value);
485 }
486 template <typename UlimitsT = Aws::Vector<Ulimit>>
488 SetUlimits(std::forward<UlimitsT>(value));
489 return *this;
490 }
491 template <typename UlimitsT = Ulimit>
493 m_ulimitsHasBeenSet = true;
494 m_ulimits.emplace_back(std::forward<UlimitsT>(value));
495 return *this;
496 }
498
500
514 inline const Aws::String& GetUser() const { return m_user; }
515 inline bool UserHasBeenSet() const { return m_userHasBeenSet; }
516 template <typename UserT = Aws::String>
517 void SetUser(UserT&& value) {
518 m_userHasBeenSet = true;
519 m_user = std::forward<UserT>(value);
520 }
521 template <typename UserT = Aws::String>
523 SetUser(std::forward<UserT>(value));
524 return *this;
525 }
527
529
534 inline int GetStartTimeout() const { return m_startTimeout; }
535 inline bool StartTimeoutHasBeenSet() const { return m_startTimeoutHasBeenSet; }
536 inline void SetStartTimeout(int value) {
537 m_startTimeoutHasBeenSet = true;
538 m_startTimeout = value;
539 }
541 SetStartTimeout(value);
542 return *this;
543 }
545
547
559 inline int GetStopTimeout() const { return m_stopTimeout; }
560 inline bool StopTimeoutHasBeenSet() const { return m_stopTimeoutHasBeenSet; }
561 inline void SetStopTimeout(int value) {
562 m_stopTimeoutHasBeenSet = true;
563 m_stopTimeout = value;
564 }
566 SetStopTimeout(value);
567 return *this;
568 }
570 private:
571 Aws::Vector<Aws::String> m_command;
572
574
575 Aws::Vector<KeyValuePair> m_environment;
576
577 bool m_essential{false};
578
579 FirelensConfiguration m_firelensConfiguration;
580
581 Aws::String m_image;
582
583 LinuxParameters m_linuxParameters;
584
585 LogConfiguration m_logConfiguration;
586
587 Aws::Vector<MountPoint> m_mountPoints;
588
589 Aws::String m_name;
590
591 bool m_privileged{false};
592
593 bool m_readonlyRootFilesystem{false};
594
595 RepositoryCredentials m_repositoryCredentials;
596
597 Aws::Vector<ResourceRequirement> m_resourceRequirements;
598
599 Aws::Vector<Secret> m_secrets;
600
601 Aws::Vector<Ulimit> m_ulimits;
602
603 Aws::String m_user;
604
605 int m_startTimeout{0};
606
607 int m_stopTimeout{0};
608 bool m_commandHasBeenSet = false;
609 bool m_dependsOnHasBeenSet = false;
610 bool m_environmentHasBeenSet = false;
611 bool m_essentialHasBeenSet = false;
612 bool m_firelensConfigurationHasBeenSet = false;
613 bool m_imageHasBeenSet = false;
614 bool m_linuxParametersHasBeenSet = false;
615 bool m_logConfigurationHasBeenSet = false;
616 bool m_mountPointsHasBeenSet = false;
617 bool m_nameHasBeenSet = false;
618 bool m_privilegedHasBeenSet = false;
619 bool m_readonlyRootFilesystemHasBeenSet = false;
620 bool m_repositoryCredentialsHasBeenSet = false;
621 bool m_resourceRequirementsHasBeenSet = false;
622 bool m_secretsHasBeenSet = false;
623 bool m_ulimitsHasBeenSet = false;
624 bool m_userHasBeenSet = false;
625 bool m_startTimeoutHasBeenSet = false;
626 bool m_stopTimeoutHasBeenSet = false;
627};
628
629} // namespace Model
630} // namespace Batch
631} // namespace Aws
const Aws::Vector< ResourceRequirement > & GetResourceRequirements() const
TaskContainerProperties & WithFirelensConfiguration(FirelensConfigurationT &&value)
TaskContainerProperties & WithResourceRequirements(ResourceRequirementsT &&value)
const Aws::Vector< Secret > & GetSecrets() const
TaskContainerProperties & WithStartTimeout(int value)
void SetResourceRequirements(ResourceRequirementsT &&value)
TaskContainerProperties & WithPrivileged(bool value)
TaskContainerProperties & WithCommand(CommandT &&value)
const RepositoryCredentials & GetRepositoryCredentials() const
TaskContainerProperties & WithName(NameT &&value)
const Aws::Vector< TaskContainerDependency > & GetDependsOn() const
AWS_BATCH_API TaskContainerProperties()=default
TaskContainerProperties & WithLinuxParameters(LinuxParametersT &&value)
TaskContainerProperties & WithUser(UserT &&value)
const LinuxParameters & GetLinuxParameters() const
const Aws::Vector< Aws::String > & GetCommand() const
TaskContainerProperties & AddEnvironment(EnvironmentT &&value)
TaskContainerProperties & AddDependsOn(DependsOnT &&value)
void SetFirelensConfiguration(FirelensConfigurationT &&value)
void SetLogConfiguration(LogConfigurationT &&value)
TaskContainerProperties & WithRepositoryCredentials(RepositoryCredentialsT &&value)
AWS_BATCH_API TaskContainerProperties(Aws::Utils::Json::JsonView jsonValue)
TaskContainerProperties & WithUlimits(UlimitsT &&value)
TaskContainerProperties & WithReadonlyRootFilesystem(bool value)
TaskContainerProperties & AddCommand(CommandT &&value)
const Aws::Vector< Ulimit > & GetUlimits() const
const FirelensConfiguration & GetFirelensConfiguration() const
TaskContainerProperties & WithEnvironment(EnvironmentT &&value)
void SetRepositoryCredentials(RepositoryCredentialsT &&value)
const Aws::Vector< KeyValuePair > & GetEnvironment() const
TaskContainerProperties & WithMountPoints(MountPointsT &&value)
AWS_BATCH_API TaskContainerProperties & operator=(Aws::Utils::Json::JsonView jsonValue)
TaskContainerProperties & AddResourceRequirements(ResourceRequirementsT &&value)
TaskContainerProperties & WithStopTimeout(int value)
TaskContainerProperties & WithEssential(bool value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
TaskContainerProperties & AddMountPoints(MountPointsT &&value)
const LogConfiguration & GetLogConfiguration() const
TaskContainerProperties & WithDependsOn(DependsOnT &&value)
TaskContainerProperties & WithImage(ImageT &&value)
const Aws::Vector< MountPoint > & GetMountPoints() const
TaskContainerProperties & WithLogConfiguration(LogConfigurationT &&value)
TaskContainerProperties & WithSecrets(SecretsT &&value)
TaskContainerProperties & AddUlimits(UlimitsT &&value)
TaskContainerProperties & AddSecrets(SecretsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue