AWS SDK for C++

AWS SDK for C++ Version 1.11.756

Loading...
Searching...
No Matches
EcsContainerOverride.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/pipes/Pipes_EXPORTS.h>
10#include <aws/pipes/model/EcsEnvironmentFile.h>
11#include <aws/pipes/model/EcsEnvironmentVariable.h>
12#include <aws/pipes/model/EcsResourceRequirement.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace Pipes {
24namespace Model {
25
36 public:
37 AWS_PIPES_API EcsContainerOverride() = default;
40 AWS_PIPES_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
48 inline const Aws::Vector<Aws::String>& GetCommand() const { return m_command; }
49 inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; }
50 template <typename CommandT = Aws::Vector<Aws::String>>
51 void SetCommand(CommandT&& value) {
52 m_commandHasBeenSet = true;
53 m_command = std::forward<CommandT>(value);
54 }
55 template <typename CommandT = Aws::Vector<Aws::String>>
56 EcsContainerOverride& WithCommand(CommandT&& value) {
57 SetCommand(std::forward<CommandT>(value));
58 return *this;
59 }
60 template <typename CommandT = Aws::String>
61 EcsContainerOverride& AddCommand(CommandT&& value) {
62 m_commandHasBeenSet = true;
63 m_command.emplace_back(std::forward<CommandT>(value));
64 return *this;
65 }
67
69
74 inline int GetCpu() const { return m_cpu; }
75 inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; }
76 inline void SetCpu(int value) {
77 m_cpuHasBeenSet = true;
78 m_cpu = value;
79 }
80 inline EcsContainerOverride& WithCpu(int value) {
81 SetCpu(value);
82 return *this;
83 }
85
87
93 inline const Aws::Vector<EcsEnvironmentVariable>& GetEnvironment() const { return m_environment; }
94 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
95 template <typename EnvironmentT = Aws::Vector<EcsEnvironmentVariable>>
96 void SetEnvironment(EnvironmentT&& value) {
97 m_environmentHasBeenSet = true;
98 m_environment = std::forward<EnvironmentT>(value);
99 }
100 template <typename EnvironmentT = Aws::Vector<EcsEnvironmentVariable>>
101 EcsContainerOverride& WithEnvironment(EnvironmentT&& value) {
102 SetEnvironment(std::forward<EnvironmentT>(value));
103 return *this;
104 }
105 template <typename EnvironmentT = EcsEnvironmentVariable>
106 EcsContainerOverride& AddEnvironment(EnvironmentT&& value) {
107 m_environmentHasBeenSet = true;
108 m_environment.emplace_back(std::forward<EnvironmentT>(value));
109 return *this;
110 }
112
114
118 inline const Aws::Vector<EcsEnvironmentFile>& GetEnvironmentFiles() const { return m_environmentFiles; }
119 inline bool EnvironmentFilesHasBeenSet() const { return m_environmentFilesHasBeenSet; }
120 template <typename EnvironmentFilesT = Aws::Vector<EcsEnvironmentFile>>
121 void SetEnvironmentFiles(EnvironmentFilesT&& value) {
122 m_environmentFilesHasBeenSet = true;
123 m_environmentFiles = std::forward<EnvironmentFilesT>(value);
124 }
125 template <typename EnvironmentFilesT = Aws::Vector<EcsEnvironmentFile>>
126 EcsContainerOverride& WithEnvironmentFiles(EnvironmentFilesT&& value) {
127 SetEnvironmentFiles(std::forward<EnvironmentFilesT>(value));
128 return *this;
129 }
130 template <typename EnvironmentFilesT = EcsEnvironmentFile>
131 EcsContainerOverride& AddEnvironmentFiles(EnvironmentFilesT&& value) {
132 m_environmentFilesHasBeenSet = true;
133 m_environmentFiles.emplace_back(std::forward<EnvironmentFilesT>(value));
134 return *this;
135 }
137
139
145 inline int GetMemory() const { return m_memory; }
146 inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; }
147 inline void SetMemory(int value) {
148 m_memoryHasBeenSet = true;
149 m_memory = value;
150 }
151 inline EcsContainerOverride& WithMemory(int value) {
152 SetMemory(value);
153 return *this;
154 }
156
158
163 inline int GetMemoryReservation() const { return m_memoryReservation; }
164 inline bool MemoryReservationHasBeenSet() const { return m_memoryReservationHasBeenSet; }
165 inline void SetMemoryReservation(int value) {
166 m_memoryReservationHasBeenSet = true;
167 m_memoryReservation = value;
168 }
171 return *this;
172 }
174
176
180 inline const Aws::String& GetName() const { return m_name; }
181 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
182 template <typename NameT = Aws::String>
183 void SetName(NameT&& value) {
184 m_nameHasBeenSet = true;
185 m_name = std::forward<NameT>(value);
186 }
187 template <typename NameT = Aws::String>
189 SetName(std::forward<NameT>(value));
190 return *this;
191 }
193
195
200 inline const Aws::Vector<EcsResourceRequirement>& GetResourceRequirements() const { return m_resourceRequirements; }
201 inline bool ResourceRequirementsHasBeenSet() const { return m_resourceRequirementsHasBeenSet; }
202 template <typename ResourceRequirementsT = Aws::Vector<EcsResourceRequirement>>
203 void SetResourceRequirements(ResourceRequirementsT&& value) {
204 m_resourceRequirementsHasBeenSet = true;
205 m_resourceRequirements = std::forward<ResourceRequirementsT>(value);
206 }
207 template <typename ResourceRequirementsT = Aws::Vector<EcsResourceRequirement>>
208 EcsContainerOverride& WithResourceRequirements(ResourceRequirementsT&& value) {
209 SetResourceRequirements(std::forward<ResourceRequirementsT>(value));
210 return *this;
211 }
212 template <typename ResourceRequirementsT = EcsResourceRequirement>
213 EcsContainerOverride& AddResourceRequirements(ResourceRequirementsT&& value) {
214 m_resourceRequirementsHasBeenSet = true;
215 m_resourceRequirements.emplace_back(std::forward<ResourceRequirementsT>(value));
216 return *this;
217 }
219 private:
220 Aws::Vector<Aws::String> m_command;
221
222 int m_cpu{0};
223
225
226 Aws::Vector<EcsEnvironmentFile> m_environmentFiles;
227
228 int m_memory{0};
229
230 int m_memoryReservation{0};
231
232 Aws::String m_name;
233
234 Aws::Vector<EcsResourceRequirement> m_resourceRequirements;
235 bool m_commandHasBeenSet = false;
236 bool m_cpuHasBeenSet = false;
237 bool m_environmentHasBeenSet = false;
238 bool m_environmentFilesHasBeenSet = false;
239 bool m_memoryHasBeenSet = false;
240 bool m_memoryReservationHasBeenSet = false;
241 bool m_nameHasBeenSet = false;
242 bool m_resourceRequirementsHasBeenSet = false;
243};
244
245} // namespace Model
246} // namespace Pipes
247} // namespace Aws
const Aws::Vector< EcsResourceRequirement > & GetResourceRequirements() const
EcsContainerOverride & AddEnvironmentFiles(EnvironmentFilesT &&value)
EcsContainerOverride & WithName(NameT &&value)
const Aws::Vector< Aws::String > & GetCommand() const
EcsContainerOverride & WithEnvironment(EnvironmentT &&value)
AWS_PIPES_API Aws::Utils::Json::JsonValue Jsonize() const
void SetResourceRequirements(ResourceRequirementsT &&value)
EcsContainerOverride & AddResourceRequirements(ResourceRequirementsT &&value)
EcsContainerOverride & WithCpu(int value)
AWS_PIPES_API EcsContainerOverride()=default
const Aws::Vector< EcsEnvironmentVariable > & GetEnvironment() const
EcsContainerOverride & WithCommand(CommandT &&value)
EcsContainerOverride & AddCommand(CommandT &&value)
void SetEnvironmentFiles(EnvironmentFilesT &&value)
EcsContainerOverride & AddEnvironment(EnvironmentT &&value)
EcsContainerOverride & WithMemoryReservation(int value)
AWS_PIPES_API EcsContainerOverride & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< EcsEnvironmentFile > & GetEnvironmentFiles() const
EcsContainerOverride & WithResourceRequirements(ResourceRequirementsT &&value)
EcsContainerOverride & WithMemory(int value)
AWS_PIPES_API EcsContainerOverride(Aws::Utils::Json::JsonView jsonValue)
EcsContainerOverride & WithEnvironmentFiles(EnvironmentFilesT &&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