AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Container.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/ecs/ECS_EXPORTS.h>
10#include <aws/ecs/model/HealthStatus.h>
11#include <aws/ecs/model/ManagedAgent.h>
12#include <aws/ecs/model/NetworkBinding.h>
13#include <aws/ecs/model/NetworkInterface.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace ECS {
25namespace Model {
26
32class Container {
33 public:
34 AWS_ECS_API Container() = default;
35 AWS_ECS_API Container(Aws::Utils::Json::JsonView jsonValue);
38
40
43 inline const Aws::String& GetContainerArn() const { return m_containerArn; }
44 inline bool ContainerArnHasBeenSet() const { return m_containerArnHasBeenSet; }
45 template <typename ContainerArnT = Aws::String>
46 void SetContainerArn(ContainerArnT&& value) {
47 m_containerArnHasBeenSet = true;
48 m_containerArn = std::forward<ContainerArnT>(value);
49 }
50 template <typename ContainerArnT = Aws::String>
51 Container& WithContainerArn(ContainerArnT&& value) {
52 SetContainerArn(std::forward<ContainerArnT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetTaskArn() const { return m_taskArn; }
62 inline bool TaskArnHasBeenSet() const { return m_taskArnHasBeenSet; }
63 template <typename TaskArnT = Aws::String>
64 void SetTaskArn(TaskArnT&& value) {
65 m_taskArnHasBeenSet = true;
66 m_taskArn = std::forward<TaskArnT>(value);
67 }
68 template <typename TaskArnT = Aws::String>
69 Container& WithTaskArn(TaskArnT&& value) {
70 SetTaskArn(std::forward<TaskArnT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetName() const { return m_name; }
80 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
81 template <typename NameT = Aws::String>
82 void SetName(NameT&& value) {
83 m_nameHasBeenSet = true;
84 m_name = std::forward<NameT>(value);
85 }
86 template <typename NameT = Aws::String>
87 Container& WithName(NameT&& value) {
88 SetName(std::forward<NameT>(value));
89 return *this;
90 }
92
94
97 inline const Aws::String& GetImage() const { return m_image; }
98 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
99 template <typename ImageT = Aws::String>
100 void SetImage(ImageT&& value) {
101 m_imageHasBeenSet = true;
102 m_image = std::forward<ImageT>(value);
103 }
104 template <typename ImageT = Aws::String>
105 Container& WithImage(ImageT&& value) {
106 SetImage(std::forward<ImageT>(value));
107 return *this;
108 }
110
112
115 inline const Aws::String& GetImageDigest() const { return m_imageDigest; }
116 inline bool ImageDigestHasBeenSet() const { return m_imageDigestHasBeenSet; }
117 template <typename ImageDigestT = Aws::String>
118 void SetImageDigest(ImageDigestT&& value) {
119 m_imageDigestHasBeenSet = true;
120 m_imageDigest = std::forward<ImageDigestT>(value);
121 }
122 template <typename ImageDigestT = Aws::String>
123 Container& WithImageDigest(ImageDigestT&& value) {
124 SetImageDigest(std::forward<ImageDigestT>(value));
125 return *this;
126 }
128
130
133 inline const Aws::String& GetRuntimeId() const { return m_runtimeId; }
134 inline bool RuntimeIdHasBeenSet() const { return m_runtimeIdHasBeenSet; }
135 template <typename RuntimeIdT = Aws::String>
136 void SetRuntimeId(RuntimeIdT&& value) {
137 m_runtimeIdHasBeenSet = true;
138 m_runtimeId = std::forward<RuntimeIdT>(value);
139 }
140 template <typename RuntimeIdT = Aws::String>
141 Container& WithRuntimeId(RuntimeIdT&& value) {
142 SetRuntimeId(std::forward<RuntimeIdT>(value));
143 return *this;
144 }
146
148
151 inline const Aws::String& GetLastStatus() const { return m_lastStatus; }
152 inline bool LastStatusHasBeenSet() const { return m_lastStatusHasBeenSet; }
153 template <typename LastStatusT = Aws::String>
154 void SetLastStatus(LastStatusT&& value) {
155 m_lastStatusHasBeenSet = true;
156 m_lastStatus = std::forward<LastStatusT>(value);
157 }
158 template <typename LastStatusT = Aws::String>
159 Container& WithLastStatus(LastStatusT&& value) {
160 SetLastStatus(std::forward<LastStatusT>(value));
161 return *this;
162 }
164
166
169 inline int GetExitCode() const { return m_exitCode; }
170 inline bool ExitCodeHasBeenSet() const { return m_exitCodeHasBeenSet; }
171 inline void SetExitCode(int value) {
172 m_exitCodeHasBeenSet = true;
173 m_exitCode = value;
174 }
175 inline Container& WithExitCode(int value) {
176 SetExitCode(value);
177 return *this;
178 }
180
182
186 inline const Aws::String& GetReason() const { return m_reason; }
187 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
188 template <typename ReasonT = Aws::String>
189 void SetReason(ReasonT&& value) {
190 m_reasonHasBeenSet = true;
191 m_reason = std::forward<ReasonT>(value);
192 }
193 template <typename ReasonT = Aws::String>
194 Container& WithReason(ReasonT&& value) {
195 SetReason(std::forward<ReasonT>(value));
196 return *this;
197 }
199
201
204 inline const Aws::Vector<NetworkBinding>& GetNetworkBindings() const { return m_networkBindings; }
205 inline bool NetworkBindingsHasBeenSet() const { return m_networkBindingsHasBeenSet; }
206 template <typename NetworkBindingsT = Aws::Vector<NetworkBinding>>
207 void SetNetworkBindings(NetworkBindingsT&& value) {
208 m_networkBindingsHasBeenSet = true;
209 m_networkBindings = std::forward<NetworkBindingsT>(value);
210 }
211 template <typename NetworkBindingsT = Aws::Vector<NetworkBinding>>
212 Container& WithNetworkBindings(NetworkBindingsT&& value) {
213 SetNetworkBindings(std::forward<NetworkBindingsT>(value));
214 return *this;
215 }
216 template <typename NetworkBindingsT = NetworkBinding>
217 Container& AddNetworkBindings(NetworkBindingsT&& value) {
218 m_networkBindingsHasBeenSet = true;
219 m_networkBindings.emplace_back(std::forward<NetworkBindingsT>(value));
220 return *this;
221 }
223
225
228 inline const Aws::Vector<NetworkInterface>& GetNetworkInterfaces() const { return m_networkInterfaces; }
229 inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; }
230 template <typename NetworkInterfacesT = Aws::Vector<NetworkInterface>>
231 void SetNetworkInterfaces(NetworkInterfacesT&& value) {
232 m_networkInterfacesHasBeenSet = true;
233 m_networkInterfaces = std::forward<NetworkInterfacesT>(value);
234 }
235 template <typename NetworkInterfacesT = Aws::Vector<NetworkInterface>>
236 Container& WithNetworkInterfaces(NetworkInterfacesT&& value) {
237 SetNetworkInterfaces(std::forward<NetworkInterfacesT>(value));
238 return *this;
239 }
240 template <typename NetworkInterfacesT = NetworkInterface>
241 Container& AddNetworkInterfaces(NetworkInterfacesT&& value) {
242 m_networkInterfacesHasBeenSet = true;
243 m_networkInterfaces.emplace_back(std::forward<NetworkInterfacesT>(value));
244 return *this;
245 }
247
249
254 inline HealthStatus GetHealthStatus() const { return m_healthStatus; }
255 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
256 inline void SetHealthStatus(HealthStatus value) {
257 m_healthStatusHasBeenSet = true;
258 m_healthStatus = value;
259 }
261 SetHealthStatus(value);
262 return *this;
263 }
265
267
271 inline const Aws::Vector<ManagedAgent>& GetManagedAgents() const { return m_managedAgents; }
272 inline bool ManagedAgentsHasBeenSet() const { return m_managedAgentsHasBeenSet; }
273 template <typename ManagedAgentsT = Aws::Vector<ManagedAgent>>
274 void SetManagedAgents(ManagedAgentsT&& value) {
275 m_managedAgentsHasBeenSet = true;
276 m_managedAgents = std::forward<ManagedAgentsT>(value);
277 }
278 template <typename ManagedAgentsT = Aws::Vector<ManagedAgent>>
279 Container& WithManagedAgents(ManagedAgentsT&& value) {
280 SetManagedAgents(std::forward<ManagedAgentsT>(value));
281 return *this;
282 }
283 template <typename ManagedAgentsT = ManagedAgent>
284 Container& AddManagedAgents(ManagedAgentsT&& value) {
285 m_managedAgentsHasBeenSet = true;
286 m_managedAgents.emplace_back(std::forward<ManagedAgentsT>(value));
287 return *this;
288 }
290
292
297 inline const Aws::String& GetCpu() const { return m_cpu; }
298 inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; }
299 template <typename CpuT = Aws::String>
300 void SetCpu(CpuT&& value) {
301 m_cpuHasBeenSet = true;
302 m_cpu = std::forward<CpuT>(value);
303 }
304 template <typename CpuT = Aws::String>
305 Container& WithCpu(CpuT&& value) {
306 SetCpu(std::forward<CpuT>(value));
307 return *this;
308 }
310
312
315 inline const Aws::String& GetMemory() const { return m_memory; }
316 inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; }
317 template <typename MemoryT = Aws::String>
318 void SetMemory(MemoryT&& value) {
319 m_memoryHasBeenSet = true;
320 m_memory = std::forward<MemoryT>(value);
321 }
322 template <typename MemoryT = Aws::String>
323 Container& WithMemory(MemoryT&& value) {
324 SetMemory(std::forward<MemoryT>(value));
325 return *this;
326 }
328
330
333 inline const Aws::String& GetMemoryReservation() const { return m_memoryReservation; }
334 inline bool MemoryReservationHasBeenSet() const { return m_memoryReservationHasBeenSet; }
335 template <typename MemoryReservationT = Aws::String>
336 void SetMemoryReservation(MemoryReservationT&& value) {
337 m_memoryReservationHasBeenSet = true;
338 m_memoryReservation = std::forward<MemoryReservationT>(value);
339 }
340 template <typename MemoryReservationT = Aws::String>
341 Container& WithMemoryReservation(MemoryReservationT&& value) {
342 SetMemoryReservation(std::forward<MemoryReservationT>(value));
343 return *this;
344 }
346
348
351 inline const Aws::Vector<Aws::String>& GetGpuIds() const { return m_gpuIds; }
352 inline bool GpuIdsHasBeenSet() const { return m_gpuIdsHasBeenSet; }
353 template <typename GpuIdsT = Aws::Vector<Aws::String>>
354 void SetGpuIds(GpuIdsT&& value) {
355 m_gpuIdsHasBeenSet = true;
356 m_gpuIds = std::forward<GpuIdsT>(value);
357 }
358 template <typename GpuIdsT = Aws::Vector<Aws::String>>
359 Container& WithGpuIds(GpuIdsT&& value) {
360 SetGpuIds(std::forward<GpuIdsT>(value));
361 return *this;
362 }
363 template <typename GpuIdsT = Aws::String>
364 Container& AddGpuIds(GpuIdsT&& value) {
365 m_gpuIdsHasBeenSet = true;
366 m_gpuIds.emplace_back(std::forward<GpuIdsT>(value));
367 return *this;
368 }
370 private:
371 Aws::String m_containerArn;
372
373 Aws::String m_taskArn;
374
375 Aws::String m_name;
376
377 Aws::String m_image;
378
379 Aws::String m_imageDigest;
380
381 Aws::String m_runtimeId;
382
383 Aws::String m_lastStatus;
384
385 int m_exitCode{0};
386
387 Aws::String m_reason;
388
389 Aws::Vector<NetworkBinding> m_networkBindings;
390
391 Aws::Vector<NetworkInterface> m_networkInterfaces;
392
393 HealthStatus m_healthStatus{HealthStatus::NOT_SET};
394
395 Aws::Vector<ManagedAgent> m_managedAgents;
396
397 Aws::String m_cpu;
398
399 Aws::String m_memory;
400
401 Aws::String m_memoryReservation;
402
404 bool m_containerArnHasBeenSet = false;
405 bool m_taskArnHasBeenSet = false;
406 bool m_nameHasBeenSet = false;
407 bool m_imageHasBeenSet = false;
408 bool m_imageDigestHasBeenSet = false;
409 bool m_runtimeIdHasBeenSet = false;
410 bool m_lastStatusHasBeenSet = false;
411 bool m_exitCodeHasBeenSet = false;
412 bool m_reasonHasBeenSet = false;
413 bool m_networkBindingsHasBeenSet = false;
414 bool m_networkInterfacesHasBeenSet = false;
415 bool m_healthStatusHasBeenSet = false;
416 bool m_managedAgentsHasBeenSet = false;
417 bool m_cpuHasBeenSet = false;
418 bool m_memoryHasBeenSet = false;
419 bool m_memoryReservationHasBeenSet = false;
420 bool m_gpuIdsHasBeenSet = false;
421};
422
423} // namespace Model
424} // namespace ECS
425} // namespace Aws
void SetHealthStatus(HealthStatus value)
Definition Container.h:256
const Aws::String & GetMemoryReservation() const
Definition Container.h:333
Container & WithRuntimeId(RuntimeIdT &&value)
Definition Container.h:141
const Aws::Vector< NetworkInterface > & GetNetworkInterfaces() const
Definition Container.h:228
bool NameHasBeenSet() const
Definition Container.h:80
bool TaskArnHasBeenSet() const
Definition Container.h:62
void SetNetworkInterfaces(NetworkInterfacesT &&value)
Definition Container.h:231
AWS_ECS_API Container(Aws::Utils::Json::JsonView jsonValue)
Container & WithMemoryReservation(MemoryReservationT &&value)
Definition Container.h:341
void SetNetworkBindings(NetworkBindingsT &&value)
Definition Container.h:207
Container & WithTaskArn(TaskArnT &&value)
Definition Container.h:69
Container & WithManagedAgents(ManagedAgentsT &&value)
Definition Container.h:279
void SetExitCode(int value)
Definition Container.h:171
const Aws::String & GetReason() const
Definition Container.h:186
bool ImageHasBeenSet() const
Definition Container.h:98
Container & WithCpu(CpuT &&value)
Definition Container.h:305
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetImage(ImageT &&value)
Definition Container.h:100
Container & WithLastStatus(LastStatusT &&value)
Definition Container.h:159
Container & WithImage(ImageT &&value)
Definition Container.h:105
Container & WithExitCode(int value)
Definition Container.h:175
AWS_ECS_API Container & operator=(Aws::Utils::Json::JsonView jsonValue)
bool HealthStatusHasBeenSet() const
Definition Container.h:255
void SetMemory(MemoryT &&value)
Definition Container.h:318
bool RuntimeIdHasBeenSet() const
Definition Container.h:134
const Aws::Vector< ManagedAgent > & GetManagedAgents() const
Definition Container.h:271
bool NetworkBindingsHasBeenSet() const
Definition Container.h:205
Container & WithName(NameT &&value)
Definition Container.h:87
Container & WithContainerArn(ContainerArnT &&value)
Definition Container.h:51
void SetRuntimeId(RuntimeIdT &&value)
Definition Container.h:136
bool NetworkInterfacesHasBeenSet() const
Definition Container.h:229
void SetImageDigest(ImageDigestT &&value)
Definition Container.h:118
void SetReason(ReasonT &&value)
Definition Container.h:189
void SetGpuIds(GpuIdsT &&value)
Definition Container.h:354
bool MemoryReservationHasBeenSet() const
Definition Container.h:334
const Aws::String & GetImageDigest() const
Definition Container.h:115
Container & WithMemory(MemoryT &&value)
Definition Container.h:323
AWS_ECS_API Container()=default
void SetName(NameT &&value)
Definition Container.h:82
const Aws::String & GetMemory() const
Definition Container.h:315
bool LastStatusHasBeenSet() const
Definition Container.h:152
const Aws::String & GetImage() const
Definition Container.h:97
Container & AddNetworkBindings(NetworkBindingsT &&value)
Definition Container.h:217
bool ManagedAgentsHasBeenSet() const
Definition Container.h:272
void SetManagedAgents(ManagedAgentsT &&value)
Definition Container.h:274
bool GpuIdsHasBeenSet() const
Definition Container.h:352
bool ExitCodeHasBeenSet() const
Definition Container.h:170
Container & WithHealthStatus(HealthStatus value)
Definition Container.h:260
HealthStatus GetHealthStatus() const
Definition Container.h:254
Container & WithNetworkBindings(NetworkBindingsT &&value)
Definition Container.h:212
Container & WithNetworkInterfaces(NetworkInterfacesT &&value)
Definition Container.h:236
const Aws::String & GetTaskArn() const
Definition Container.h:61
const Aws::String & GetCpu() const
Definition Container.h:297
const Aws::Vector< NetworkBinding > & GetNetworkBindings() const
Definition Container.h:204
bool ReasonHasBeenSet() const
Definition Container.h:187
Container & AddManagedAgents(ManagedAgentsT &&value)
Definition Container.h:284
const Aws::Vector< Aws::String > & GetGpuIds() const
Definition Container.h:351
void SetCpu(CpuT &&value)
Definition Container.h:300
const Aws::String & GetLastStatus() const
Definition Container.h:151
Container & WithReason(ReasonT &&value)
Definition Container.h:194
void SetLastStatus(LastStatusT &&value)
Definition Container.h:154
const Aws::String & GetRuntimeId() const
Definition Container.h:133
bool ContainerArnHasBeenSet() const
Definition Container.h:44
Container & AddGpuIds(GpuIdsT &&value)
Definition Container.h:364
void SetTaskArn(TaskArnT &&value)
Definition Container.h:64
void SetMemoryReservation(MemoryReservationT &&value)
Definition Container.h:336
Container & WithImageDigest(ImageDigestT &&value)
Definition Container.h:123
Container & WithGpuIds(GpuIdsT &&value)
Definition Container.h:359
const Aws::String & GetContainerArn() const
Definition Container.h:43
void SetContainerArn(ContainerArnT &&value)
Definition Container.h:46
bool ImageDigestHasBeenSet() const
Definition Container.h:116
const Aws::String & GetName() const
Definition Container.h:79
bool MemoryHasBeenSet() const
Definition Container.h:316
Container & AddNetworkInterfaces(NetworkInterfacesT &&value)
Definition Container.h:241
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue