AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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
409 inline const Aws::Vector<ResourceRequirement>& GetResourceRequirements() const { return m_resourceRequirements; }
410 inline bool ResourceRequirementsHasBeenSet() const { return m_resourceRequirementsHasBeenSet; }
411 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
412 void SetResourceRequirements(ResourceRequirementsT&& value) {
413 m_resourceRequirementsHasBeenSet = true;
414 m_resourceRequirements = std::forward<ResourceRequirementsT>(value);
415 }
416 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
417 TaskContainerProperties& WithResourceRequirements(ResourceRequirementsT&& value) {
418 SetResourceRequirements(std::forward<ResourceRequirementsT>(value));
419 return *this;
420 }
421 template <typename ResourceRequirementsT = ResourceRequirement>
422 TaskContainerProperties& AddResourceRequirements(ResourceRequirementsT&& value) {
423 m_resourceRequirementsHasBeenSet = true;
424 m_resourceRequirements.emplace_back(std::forward<ResourceRequirementsT>(value));
425 return *this;
426 }
428
430
435 inline const Aws::Vector<Secret>& GetSecrets() const { return m_secrets; }
436 inline bool SecretsHasBeenSet() const { return m_secretsHasBeenSet; }
437 template <typename SecretsT = Aws::Vector<Secret>>
438 void SetSecrets(SecretsT&& value) {
439 m_secretsHasBeenSet = true;
440 m_secrets = std::forward<SecretsT>(value);
441 }
442 template <typename SecretsT = Aws::Vector<Secret>>
444 SetSecrets(std::forward<SecretsT>(value));
445 return *this;
446 }
447 template <typename SecretsT = Secret>
449 m_secretsHasBeenSet = true;
450 m_secrets.emplace_back(std::forward<SecretsT>(value));
451 return *this;
452 }
454
456
478 inline const Aws::Vector<Ulimit>& GetUlimits() const { return m_ulimits; }
479 inline bool UlimitsHasBeenSet() const { return m_ulimitsHasBeenSet; }
480 template <typename UlimitsT = Aws::Vector<Ulimit>>
481 void SetUlimits(UlimitsT&& value) {
482 m_ulimitsHasBeenSet = true;
483 m_ulimits = std::forward<UlimitsT>(value);
484 }
485 template <typename UlimitsT = Aws::Vector<Ulimit>>
487 SetUlimits(std::forward<UlimitsT>(value));
488 return *this;
489 }
490 template <typename UlimitsT = Ulimit>
492 m_ulimitsHasBeenSet = true;
493 m_ulimits.emplace_back(std::forward<UlimitsT>(value));
494 return *this;
495 }
497
499
513 inline const Aws::String& GetUser() const { return m_user; }
514 inline bool UserHasBeenSet() const { return m_userHasBeenSet; }
515 template <typename UserT = Aws::String>
516 void SetUser(UserT&& value) {
517 m_userHasBeenSet = true;
518 m_user = std::forward<UserT>(value);
519 }
520 template <typename UserT = Aws::String>
522 SetUser(std::forward<UserT>(value));
523 return *this;
524 }
526 private:
527 Aws::Vector<Aws::String> m_command;
528
530
531 Aws::Vector<KeyValuePair> m_environment;
532
533 bool m_essential{false};
534
535 FirelensConfiguration m_firelensConfiguration;
536
537 Aws::String m_image;
538
539 LinuxParameters m_linuxParameters;
540
541 LogConfiguration m_logConfiguration;
542
543 Aws::Vector<MountPoint> m_mountPoints;
544
545 Aws::String m_name;
546
547 bool m_privileged{false};
548
549 bool m_readonlyRootFilesystem{false};
550
551 RepositoryCredentials m_repositoryCredentials;
552
553 Aws::Vector<ResourceRequirement> m_resourceRequirements;
554
555 Aws::Vector<Secret> m_secrets;
556
557 Aws::Vector<Ulimit> m_ulimits;
558
559 Aws::String m_user;
560 bool m_commandHasBeenSet = false;
561 bool m_dependsOnHasBeenSet = false;
562 bool m_environmentHasBeenSet = false;
563 bool m_essentialHasBeenSet = false;
564 bool m_firelensConfigurationHasBeenSet = false;
565 bool m_imageHasBeenSet = false;
566 bool m_linuxParametersHasBeenSet = false;
567 bool m_logConfigurationHasBeenSet = false;
568 bool m_mountPointsHasBeenSet = false;
569 bool m_nameHasBeenSet = false;
570 bool m_privilegedHasBeenSet = false;
571 bool m_readonlyRootFilesystemHasBeenSet = false;
572 bool m_repositoryCredentialsHasBeenSet = false;
573 bool m_resourceRequirementsHasBeenSet = false;
574 bool m_secretsHasBeenSet = false;
575 bool m_ulimitsHasBeenSet = false;
576 bool m_userHasBeenSet = false;
577};
578
579} // namespace Model
580} // namespace Batch
581} // namespace Aws
const Aws::Vector< ResourceRequirement > & GetResourceRequirements() const
TaskContainerProperties & WithFirelensConfiguration(FirelensConfigurationT &&value)
TaskContainerProperties & WithResourceRequirements(ResourceRequirementsT &&value)
const Aws::Vector< Secret > & GetSecrets() const
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 & 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