AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ContainerOverrides.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/KeyValuePair.h>
9#include <aws/batch/model/ResourceRequirement.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace Batch {
23namespace Model {
24
34 public:
35 AWS_BATCH_API ContainerOverrides() = default;
38 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
46 inline const Aws::Vector<Aws::String>& GetCommand() const { return m_command; }
47 inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; }
48 template <typename CommandT = Aws::Vector<Aws::String>>
49 void SetCommand(CommandT&& value) {
50 m_commandHasBeenSet = true;
51 m_command = std::forward<CommandT>(value);
52 }
53 template <typename CommandT = Aws::Vector<Aws::String>>
54 ContainerOverrides& WithCommand(CommandT&& value) {
55 SetCommand(std::forward<CommandT>(value));
56 return *this;
57 }
58 template <typename CommandT = Aws::String>
59 ContainerOverrides& AddCommand(CommandT&& value) {
60 m_commandHasBeenSet = true;
61 m_command.emplace_back(std::forward<CommandT>(value));
62 return *this;
63 }
65
67
72 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
73 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
74 template <typename InstanceTypeT = Aws::String>
75 void SetInstanceType(InstanceTypeT&& value) {
76 m_instanceTypeHasBeenSet = true;
77 m_instanceType = std::forward<InstanceTypeT>(value);
78 }
79 template <typename InstanceTypeT = Aws::String>
80 ContainerOverrides& WithInstanceType(InstanceTypeT&& value) {
81 SetInstanceType(std::forward<InstanceTypeT>(value));
82 return *this;
83 }
85
87
95 inline const Aws::Vector<KeyValuePair>& GetEnvironment() const { return m_environment; }
96 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
97 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
98 void SetEnvironment(EnvironmentT&& value) {
99 m_environmentHasBeenSet = true;
100 m_environment = std::forward<EnvironmentT>(value);
101 }
102 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
103 ContainerOverrides& WithEnvironment(EnvironmentT&& value) {
104 SetEnvironment(std::forward<EnvironmentT>(value));
105 return *this;
106 }
107 template <typename EnvironmentT = KeyValuePair>
108 ContainerOverrides& AddEnvironment(EnvironmentT&& value) {
109 m_environmentHasBeenSet = true;
110 m_environment.emplace_back(std::forward<EnvironmentT>(value));
111 return *this;
112 }
114
116
121 inline const Aws::Vector<ResourceRequirement>& GetResourceRequirements() const { return m_resourceRequirements; }
122 inline bool ResourceRequirementsHasBeenSet() const { return m_resourceRequirementsHasBeenSet; }
123 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
124 void SetResourceRequirements(ResourceRequirementsT&& value) {
125 m_resourceRequirementsHasBeenSet = true;
126 m_resourceRequirements = std::forward<ResourceRequirementsT>(value);
127 }
128 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
129 ContainerOverrides& WithResourceRequirements(ResourceRequirementsT&& value) {
130 SetResourceRequirements(std::forward<ResourceRequirementsT>(value));
131 return *this;
132 }
133 template <typename ResourceRequirementsT = ResourceRequirement>
134 ContainerOverrides& AddResourceRequirements(ResourceRequirementsT&& value) {
135 m_resourceRequirementsHasBeenSet = true;
136 m_resourceRequirements.emplace_back(std::forward<ResourceRequirementsT>(value));
137 return *this;
138 }
140 private:
141 Aws::Vector<Aws::String> m_command;
142
143 Aws::String m_instanceType;
144
145 Aws::Vector<KeyValuePair> m_environment;
146
147 Aws::Vector<ResourceRequirement> m_resourceRequirements;
148 bool m_commandHasBeenSet = false;
149 bool m_instanceTypeHasBeenSet = false;
150 bool m_environmentHasBeenSet = false;
151 bool m_resourceRequirementsHasBeenSet = false;
152};
153
154} // namespace Model
155} // namespace Batch
156} // namespace Aws
AWS_BATCH_API ContainerOverrides()=default
ContainerOverrides & WithCommand(CommandT &&value)
const Aws::Vector< KeyValuePair > & GetEnvironment() const
void SetResourceRequirements(ResourceRequirementsT &&value)
AWS_BATCH_API ContainerOverrides & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetInstanceType() const
AWS_BATCH_API ContainerOverrides(Aws::Utils::Json::JsonView jsonValue)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< Aws::String > & GetCommand() const
void SetEnvironment(EnvironmentT &&value)
void SetInstanceType(InstanceTypeT &&value)
ContainerOverrides & AddResourceRequirements(ResourceRequirementsT &&value)
const Aws::Vector< ResourceRequirement > & GetResourceRequirements() const
ContainerOverrides & WithEnvironment(EnvironmentT &&value)
ContainerOverrides & AddCommand(CommandT &&value)
ContainerOverrides & AddEnvironment(EnvironmentT &&value)
ContainerOverrides & WithInstanceType(InstanceTypeT &&value)
ContainerOverrides & WithResourceRequirements(ResourceRequirementsT &&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