AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
TaskContainerDetails.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/NetworkInterface.h>
14#include <aws/batch/model/RepositoryCredentials.h>
15#include <aws/batch/model/ResourceRequirement.h>
16#include <aws/batch/model/Secret.h>
17#include <aws/batch/model/TaskContainerDependency.h>
18#include <aws/batch/model/Ulimit.h>
19#include <aws/core/utils/memory/stl/AWSString.h>
20#include <aws/core/utils/memory/stl/AWSVector.h>
21
22#include <utility>
23
24namespace Aws {
25namespace Utils {
26namespace Json {
27class JsonValue;
28class JsonView;
29} // namespace Json
30} // namespace Utils
31namespace Batch {
32namespace Model {
33
41 public:
42 AWS_BATCH_API TaskContainerDetails() = default;
45 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
46
48
59 inline const Aws::Vector<Aws::String>& GetCommand() const { return m_command; }
60 inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; }
61 template <typename CommandT = Aws::Vector<Aws::String>>
62 void SetCommand(CommandT&& value) {
63 m_commandHasBeenSet = true;
64 m_command = std::forward<CommandT>(value);
65 }
66 template <typename CommandT = Aws::Vector<Aws::String>>
67 TaskContainerDetails& WithCommand(CommandT&& value) {
68 SetCommand(std::forward<CommandT>(value));
69 return *this;
70 }
71 template <typename CommandT = Aws::String>
72 TaskContainerDetails& AddCommand(CommandT&& value) {
73 m_commandHasBeenSet = true;
74 m_command.emplace_back(std::forward<CommandT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::Vector<TaskContainerDependency>& GetDependsOn() const { return m_dependsOn; }
84 inline bool DependsOnHasBeenSet() const { return m_dependsOnHasBeenSet; }
85 template <typename DependsOnT = Aws::Vector<TaskContainerDependency>>
86 void SetDependsOn(DependsOnT&& value) {
87 m_dependsOnHasBeenSet = true;
88 m_dependsOn = std::forward<DependsOnT>(value);
89 }
90 template <typename DependsOnT = Aws::Vector<TaskContainerDependency>>
91 TaskContainerDetails& WithDependsOn(DependsOnT&& value) {
92 SetDependsOn(std::forward<DependsOnT>(value));
93 return *this;
94 }
95 template <typename DependsOnT = TaskContainerDependency>
96 TaskContainerDetails& AddDependsOn(DependsOnT&& value) {
97 m_dependsOnHasBeenSet = true;
98 m_dependsOn.emplace_back(std::forward<DependsOnT>(value));
99 return *this;
100 }
102
104
115 inline const Aws::Vector<KeyValuePair>& GetEnvironment() const { return m_environment; }
116 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
117 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
118 void SetEnvironment(EnvironmentT&& value) {
119 m_environmentHasBeenSet = true;
120 m_environment = std::forward<EnvironmentT>(value);
121 }
122 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
123 TaskContainerDetails& WithEnvironment(EnvironmentT&& value) {
124 SetEnvironment(std::forward<EnvironmentT>(value));
125 return *this;
126 }
127 template <typename EnvironmentT = KeyValuePair>
128 TaskContainerDetails& AddEnvironment(EnvironmentT&& value) {
129 m_environmentHasBeenSet = true;
130 m_environment.emplace_back(std::forward<EnvironmentT>(value));
131 return *this;
132 }
134
136
150 inline bool GetEssential() const { return m_essential; }
151 inline bool EssentialHasBeenSet() const { return m_essentialHasBeenSet; }
152 inline void SetEssential(bool value) {
153 m_essentialHasBeenSet = true;
154 m_essential = value;
155 }
157 SetEssential(value);
158 return *this;
159 }
161
163
170 inline const FirelensConfiguration& GetFirelensConfiguration() const { return m_firelensConfiguration; }
171 inline bool FirelensConfigurationHasBeenSet() const { return m_firelensConfigurationHasBeenSet; }
172 template <typename FirelensConfigurationT = FirelensConfiguration>
173 void SetFirelensConfiguration(FirelensConfigurationT&& value) {
174 m_firelensConfigurationHasBeenSet = true;
175 m_firelensConfiguration = std::forward<FirelensConfigurationT>(value);
176 }
177 template <typename FirelensConfigurationT = FirelensConfiguration>
178 TaskContainerDetails& WithFirelensConfiguration(FirelensConfigurationT&& value) {
179 SetFirelensConfiguration(std::forward<FirelensConfigurationT>(value));
180 return *this;
181 }
183
185
200 inline const Aws::String& GetImage() const { return m_image; }
201 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
202 template <typename ImageT = Aws::String>
203 void SetImage(ImageT&& value) {
204 m_imageHasBeenSet = true;
205 m_image = std::forward<ImageT>(value);
206 }
207 template <typename ImageT = Aws::String>
209 SetImage(std::forward<ImageT>(value));
210 return *this;
211 }
213
215
221 inline const LinuxParameters& GetLinuxParameters() const { return m_linuxParameters; }
222 inline bool LinuxParametersHasBeenSet() const { return m_linuxParametersHasBeenSet; }
223 template <typename LinuxParametersT = LinuxParameters>
224 void SetLinuxParameters(LinuxParametersT&& value) {
225 m_linuxParametersHasBeenSet = true;
226 m_linuxParameters = std::forward<LinuxParametersT>(value);
227 }
228 template <typename LinuxParametersT = LinuxParameters>
229 TaskContainerDetails& WithLinuxParameters(LinuxParametersT&& value) {
230 SetLinuxParameters(std::forward<LinuxParametersT>(value));
231 return *this;
232 }
234
236
269 inline const LogConfiguration& GetLogConfiguration() const { return m_logConfiguration; }
270 inline bool LogConfigurationHasBeenSet() const { return m_logConfigurationHasBeenSet; }
271 template <typename LogConfigurationT = LogConfiguration>
272 void SetLogConfiguration(LogConfigurationT&& value) {
273 m_logConfigurationHasBeenSet = true;
274 m_logConfiguration = std::forward<LogConfigurationT>(value);
275 }
276 template <typename LogConfigurationT = LogConfiguration>
277 TaskContainerDetails& WithLogConfiguration(LogConfigurationT&& value) {
278 SetLogConfiguration(std::forward<LogConfigurationT>(value));
279 return *this;
280 }
282
284
296 inline const Aws::Vector<MountPoint>& GetMountPoints() const { return m_mountPoints; }
297 inline bool MountPointsHasBeenSet() const { return m_mountPointsHasBeenSet; }
298 template <typename MountPointsT = Aws::Vector<MountPoint>>
299 void SetMountPoints(MountPointsT&& value) {
300 m_mountPointsHasBeenSet = true;
301 m_mountPoints = std::forward<MountPointsT>(value);
302 }
303 template <typename MountPointsT = Aws::Vector<MountPoint>>
304 TaskContainerDetails& WithMountPoints(MountPointsT&& value) {
305 SetMountPoints(std::forward<MountPointsT>(value));
306 return *this;
307 }
308 template <typename MountPointsT = MountPoint>
309 TaskContainerDetails& AddMountPoints(MountPointsT&& value) {
310 m_mountPointsHasBeenSet = true;
311 m_mountPoints.emplace_back(std::forward<MountPointsT>(value));
312 return *this;
313 }
315
317
320 inline const Aws::String& GetName() const { return m_name; }
321 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
322 template <typename NameT = Aws::String>
323 void SetName(NameT&& value) {
324 m_nameHasBeenSet = true;
325 m_name = std::forward<NameT>(value);
326 }
327 template <typename NameT = Aws::String>
329 SetName(std::forward<NameT>(value));
330 return *this;
331 }
333
335
347 inline bool GetPrivileged() const { return m_privileged; }
348 inline bool PrivilegedHasBeenSet() const { return m_privilegedHasBeenSet; }
349 inline void SetPrivileged(bool value) {
350 m_privilegedHasBeenSet = true;
351 m_privileged = value;
352 }
354 SetPrivileged(value);
355 return *this;
356 }
358
360
371 inline bool GetReadonlyRootFilesystem() const { return m_readonlyRootFilesystem; }
372 inline bool ReadonlyRootFilesystemHasBeenSet() const { return m_readonlyRootFilesystemHasBeenSet; }
373 inline void SetReadonlyRootFilesystem(bool value) {
374 m_readonlyRootFilesystemHasBeenSet = true;
375 m_readonlyRootFilesystem = value;
376 }
379 return *this;
380 }
382
384
387 inline const RepositoryCredentials& GetRepositoryCredentials() const { return m_repositoryCredentials; }
388 inline bool RepositoryCredentialsHasBeenSet() const { return m_repositoryCredentialsHasBeenSet; }
389 template <typename RepositoryCredentialsT = RepositoryCredentials>
390 void SetRepositoryCredentials(RepositoryCredentialsT&& value) {
391 m_repositoryCredentialsHasBeenSet = true;
392 m_repositoryCredentials = std::forward<RepositoryCredentialsT>(value);
393 }
394 template <typename RepositoryCredentialsT = RepositoryCredentials>
395 TaskContainerDetails& WithRepositoryCredentials(RepositoryCredentialsT&& value) {
396 SetRepositoryCredentials(std::forward<RepositoryCredentialsT>(value));
397 return *this;
398 }
400
402
406 inline const Aws::Vector<ResourceRequirement>& GetResourceRequirements() const { return m_resourceRequirements; }
407 inline bool ResourceRequirementsHasBeenSet() const { return m_resourceRequirementsHasBeenSet; }
408 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
409 void SetResourceRequirements(ResourceRequirementsT&& value) {
410 m_resourceRequirementsHasBeenSet = true;
411 m_resourceRequirements = std::forward<ResourceRequirementsT>(value);
412 }
413 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
414 TaskContainerDetails& WithResourceRequirements(ResourceRequirementsT&& value) {
415 SetResourceRequirements(std::forward<ResourceRequirementsT>(value));
416 return *this;
417 }
418 template <typename ResourceRequirementsT = ResourceRequirement>
419 TaskContainerDetails& AddResourceRequirements(ResourceRequirementsT&& value) {
420 m_resourceRequirementsHasBeenSet = true;
421 m_resourceRequirements.emplace_back(std::forward<ResourceRequirementsT>(value));
422 return *this;
423 }
425
427
432 inline const Aws::Vector<Secret>& GetSecrets() const { return m_secrets; }
433 inline bool SecretsHasBeenSet() const { return m_secretsHasBeenSet; }
434 template <typename SecretsT = Aws::Vector<Secret>>
435 void SetSecrets(SecretsT&& value) {
436 m_secretsHasBeenSet = true;
437 m_secrets = std::forward<SecretsT>(value);
438 }
439 template <typename SecretsT = Aws::Vector<Secret>>
441 SetSecrets(std::forward<SecretsT>(value));
442 return *this;
443 }
444 template <typename SecretsT = Secret>
445 TaskContainerDetails& AddSecrets(SecretsT&& value) {
446 m_secretsHasBeenSet = true;
447 m_secrets.emplace_back(std::forward<SecretsT>(value));
448 return *this;
449 }
451
453
475 inline const Aws::Vector<Ulimit>& GetUlimits() const { return m_ulimits; }
476 inline bool UlimitsHasBeenSet() const { return m_ulimitsHasBeenSet; }
477 template <typename UlimitsT = Aws::Vector<Ulimit>>
478 void SetUlimits(UlimitsT&& value) {
479 m_ulimitsHasBeenSet = true;
480 m_ulimits = std::forward<UlimitsT>(value);
481 }
482 template <typename UlimitsT = Aws::Vector<Ulimit>>
484 SetUlimits(std::forward<UlimitsT>(value));
485 return *this;
486 }
487 template <typename UlimitsT = Ulimit>
488 TaskContainerDetails& AddUlimits(UlimitsT&& value) {
489 m_ulimitsHasBeenSet = true;
490 m_ulimits.emplace_back(std::forward<UlimitsT>(value));
491 return *this;
492 }
494
496
510 inline const Aws::String& GetUser() const { return m_user; }
511 inline bool UserHasBeenSet() const { return m_userHasBeenSet; }
512 template <typename UserT = Aws::String>
513 void SetUser(UserT&& value) {
514 m_userHasBeenSet = true;
515 m_user = std::forward<UserT>(value);
516 }
517 template <typename UserT = Aws::String>
519 SetUser(std::forward<UserT>(value));
520 return *this;
521 }
523
525
528 inline int GetExitCode() const { return m_exitCode; }
529 inline bool ExitCodeHasBeenSet() const { return m_exitCodeHasBeenSet; }
530 inline void SetExitCode(int value) {
531 m_exitCodeHasBeenSet = true;
532 m_exitCode = value;
533 }
535 SetExitCode(value);
536 return *this;
537 }
539
541
545 inline const Aws::String& GetReason() const { return m_reason; }
546 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
547 template <typename ReasonT = Aws::String>
548 void SetReason(ReasonT&& value) {
549 m_reasonHasBeenSet = true;
550 m_reason = std::forward<ReasonT>(value);
551 }
552 template <typename ReasonT = Aws::String>
554 SetReason(std::forward<ReasonT>(value));
555 return *this;
556 }
558
560
566 inline const Aws::String& GetLogStreamName() const { return m_logStreamName; }
567 inline bool LogStreamNameHasBeenSet() const { return m_logStreamNameHasBeenSet; }
568 template <typename LogStreamNameT = Aws::String>
569 void SetLogStreamName(LogStreamNameT&& value) {
570 m_logStreamNameHasBeenSet = true;
571 m_logStreamName = std::forward<LogStreamNameT>(value);
572 }
573 template <typename LogStreamNameT = Aws::String>
574 TaskContainerDetails& WithLogStreamName(LogStreamNameT&& value) {
575 SetLogStreamName(std::forward<LogStreamNameT>(value));
576 return *this;
577 }
579
581
584 inline const Aws::Vector<NetworkInterface>& GetNetworkInterfaces() const { return m_networkInterfaces; }
585 inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; }
586 template <typename NetworkInterfacesT = Aws::Vector<NetworkInterface>>
587 void SetNetworkInterfaces(NetworkInterfacesT&& value) {
588 m_networkInterfacesHasBeenSet = true;
589 m_networkInterfaces = std::forward<NetworkInterfacesT>(value);
590 }
591 template <typename NetworkInterfacesT = Aws::Vector<NetworkInterface>>
592 TaskContainerDetails& WithNetworkInterfaces(NetworkInterfacesT&& value) {
593 SetNetworkInterfaces(std::forward<NetworkInterfacesT>(value));
594 return *this;
595 }
596 template <typename NetworkInterfacesT = NetworkInterface>
597 TaskContainerDetails& AddNetworkInterfaces(NetworkInterfacesT&& value) {
598 m_networkInterfacesHasBeenSet = true;
599 m_networkInterfaces.emplace_back(std::forward<NetworkInterfacesT>(value));
600 return *this;
601 }
603 private:
604 Aws::Vector<Aws::String> m_command;
605
607
608 Aws::Vector<KeyValuePair> m_environment;
609
610 bool m_essential{false};
611
612 FirelensConfiguration m_firelensConfiguration;
613
614 Aws::String m_image;
615
616 LinuxParameters m_linuxParameters;
617
618 LogConfiguration m_logConfiguration;
619
620 Aws::Vector<MountPoint> m_mountPoints;
621
622 Aws::String m_name;
623
624 bool m_privileged{false};
625
626 bool m_readonlyRootFilesystem{false};
627
628 RepositoryCredentials m_repositoryCredentials;
629
630 Aws::Vector<ResourceRequirement> m_resourceRequirements;
631
632 Aws::Vector<Secret> m_secrets;
633
634 Aws::Vector<Ulimit> m_ulimits;
635
636 Aws::String m_user;
637
638 int m_exitCode{0};
639
640 Aws::String m_reason;
641
642 Aws::String m_logStreamName;
643
644 Aws::Vector<NetworkInterface> m_networkInterfaces;
645 bool m_commandHasBeenSet = false;
646 bool m_dependsOnHasBeenSet = false;
647 bool m_environmentHasBeenSet = false;
648 bool m_essentialHasBeenSet = false;
649 bool m_firelensConfigurationHasBeenSet = false;
650 bool m_imageHasBeenSet = false;
651 bool m_linuxParametersHasBeenSet = false;
652 bool m_logConfigurationHasBeenSet = false;
653 bool m_mountPointsHasBeenSet = false;
654 bool m_nameHasBeenSet = false;
655 bool m_privilegedHasBeenSet = false;
656 bool m_readonlyRootFilesystemHasBeenSet = false;
657 bool m_repositoryCredentialsHasBeenSet = false;
658 bool m_resourceRequirementsHasBeenSet = false;
659 bool m_secretsHasBeenSet = false;
660 bool m_ulimitsHasBeenSet = false;
661 bool m_userHasBeenSet = false;
662 bool m_exitCodeHasBeenSet = false;
663 bool m_reasonHasBeenSet = false;
664 bool m_logStreamNameHasBeenSet = false;
665 bool m_networkInterfacesHasBeenSet = false;
666};
667
668} // namespace Model
669} // namespace Batch
670} // namespace Aws
void SetLinuxParameters(LinuxParametersT &&value)
const Aws::Vector< Aws::String > & GetCommand() const
TaskContainerDetails & WithDependsOn(DependsOnT &&value)
const Aws::Vector< ResourceRequirement > & GetResourceRequirements() const
TaskContainerDetails & AddDependsOn(DependsOnT &&value)
TaskContainerDetails & WithMountPoints(MountPointsT &&value)
TaskContainerDetails & WithLogStreamName(LogStreamNameT &&value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< TaskContainerDependency > & GetDependsOn() const
TaskContainerDetails & WithNetworkInterfaces(NetworkInterfacesT &&value)
void SetNetworkInterfaces(NetworkInterfacesT &&value)
TaskContainerDetails & WithLinuxParameters(LinuxParametersT &&value)
TaskContainerDetails & WithReason(ReasonT &&value)
const FirelensConfiguration & GetFirelensConfiguration() const
const Aws::Vector< KeyValuePair > & GetEnvironment() const
void SetLogConfiguration(LogConfigurationT &&value)
TaskContainerDetails & WithFirelensConfiguration(FirelensConfigurationT &&value)
const RepositoryCredentials & GetRepositoryCredentials() const
TaskContainerDetails & WithEssential(bool value)
const Aws::Vector< NetworkInterface > & GetNetworkInterfaces() const
TaskContainerDetails & WithPrivileged(bool value)
TaskContainerDetails & WithUser(UserT &&value)
void SetRepositoryCredentials(RepositoryCredentialsT &&value)
TaskContainerDetails & AddUlimits(UlimitsT &&value)
const LinuxParameters & GetLinuxParameters() const
void SetLogStreamName(LogStreamNameT &&value)
TaskContainerDetails & WithName(NameT &&value)
AWS_BATCH_API TaskContainerDetails & operator=(Aws::Utils::Json::JsonView jsonValue)
const LogConfiguration & GetLogConfiguration() const
TaskContainerDetails & WithEnvironment(EnvironmentT &&value)
TaskContainerDetails & WithExitCode(int value)
AWS_BATCH_API TaskContainerDetails(Aws::Utils::Json::JsonView jsonValue)
TaskContainerDetails & AddNetworkInterfaces(NetworkInterfacesT &&value)
TaskContainerDetails & AddEnvironment(EnvironmentT &&value)
TaskContainerDetails & AddResourceRequirements(ResourceRequirementsT &&value)
const Aws::Vector< Secret > & GetSecrets() const
TaskContainerDetails & WithCommand(CommandT &&value)
const Aws::Vector< MountPoint > & GetMountPoints() const
TaskContainerDetails & AddCommand(CommandT &&value)
AWS_BATCH_API TaskContainerDetails()=default
TaskContainerDetails & WithLogConfiguration(LogConfigurationT &&value)
TaskContainerDetails & WithRepositoryCredentials(RepositoryCredentialsT &&value)
TaskContainerDetails & WithReadonlyRootFilesystem(bool value)
TaskContainerDetails & WithImage(ImageT &&value)
TaskContainerDetails & WithResourceRequirements(ResourceRequirementsT &&value)
TaskContainerDetails & WithSecrets(SecretsT &&value)
TaskContainerDetails & AddMountPoints(MountPointsT &&value)
TaskContainerDetails & WithUlimits(UlimitsT &&value)
void SetResourceRequirements(ResourceRequirementsT &&value)
const Aws::Vector< Ulimit > & GetUlimits() const
void SetFirelensConfiguration(FirelensConfigurationT &&value)
TaskContainerDetails & 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