AWS SDK for C++

AWS SDK for C++ Version 1.11.933

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#include <aws/ecs/model/SharingStrategy.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace ECS {
26namespace Model {
27
33class Container {
34 public:
35 AWS_ECS_API Container() = default;
36 AWS_ECS_API Container(Aws::Utils::Json::JsonView jsonValue);
39
41
44 inline const Aws::String& GetContainerArn() const { return m_containerArn; }
45 inline bool ContainerArnHasBeenSet() const { return m_containerArnHasBeenSet; }
46 template <typename ContainerArnT = Aws::String>
47 void SetContainerArn(ContainerArnT&& value) {
48 m_containerArnHasBeenSet = true;
49 m_containerArn = std::forward<ContainerArnT>(value);
50 }
51 template <typename ContainerArnT = Aws::String>
52 Container& WithContainerArn(ContainerArnT&& value) {
53 SetContainerArn(std::forward<ContainerArnT>(value));
54 return *this;
55 }
57
59
62 inline const Aws::String& GetTaskArn() const { return m_taskArn; }
63 inline bool TaskArnHasBeenSet() const { return m_taskArnHasBeenSet; }
64 template <typename TaskArnT = Aws::String>
65 void SetTaskArn(TaskArnT&& value) {
66 m_taskArnHasBeenSet = true;
67 m_taskArn = std::forward<TaskArnT>(value);
68 }
69 template <typename TaskArnT = Aws::String>
70 Container& WithTaskArn(TaskArnT&& value) {
71 SetTaskArn(std::forward<TaskArnT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::String& GetName() const { return m_name; }
81 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
82 template <typename NameT = Aws::String>
83 void SetName(NameT&& value) {
84 m_nameHasBeenSet = true;
85 m_name = std::forward<NameT>(value);
86 }
87 template <typename NameT = Aws::String>
88 Container& WithName(NameT&& value) {
89 SetName(std::forward<NameT>(value));
90 return *this;
91 }
93
95
98 inline const Aws::String& GetImage() const { return m_image; }
99 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
100 template <typename ImageT = Aws::String>
101 void SetImage(ImageT&& value) {
102 m_imageHasBeenSet = true;
103 m_image = std::forward<ImageT>(value);
104 }
105 template <typename ImageT = Aws::String>
106 Container& WithImage(ImageT&& value) {
107 SetImage(std::forward<ImageT>(value));
108 return *this;
109 }
111
113
116 inline const Aws::String& GetImageDigest() const { return m_imageDigest; }
117 inline bool ImageDigestHasBeenSet() const { return m_imageDigestHasBeenSet; }
118 template <typename ImageDigestT = Aws::String>
119 void SetImageDigest(ImageDigestT&& value) {
120 m_imageDigestHasBeenSet = true;
121 m_imageDigest = std::forward<ImageDigestT>(value);
122 }
123 template <typename ImageDigestT = Aws::String>
124 Container& WithImageDigest(ImageDigestT&& value) {
125 SetImageDigest(std::forward<ImageDigestT>(value));
126 return *this;
127 }
129
131
134 inline const Aws::String& GetRuntimeId() const { return m_runtimeId; }
135 inline bool RuntimeIdHasBeenSet() const { return m_runtimeIdHasBeenSet; }
136 template <typename RuntimeIdT = Aws::String>
137 void SetRuntimeId(RuntimeIdT&& value) {
138 m_runtimeIdHasBeenSet = true;
139 m_runtimeId = std::forward<RuntimeIdT>(value);
140 }
141 template <typename RuntimeIdT = Aws::String>
142 Container& WithRuntimeId(RuntimeIdT&& value) {
143 SetRuntimeId(std::forward<RuntimeIdT>(value));
144 return *this;
145 }
147
149
152 inline const Aws::String& GetLastStatus() const { return m_lastStatus; }
153 inline bool LastStatusHasBeenSet() const { return m_lastStatusHasBeenSet; }
154 template <typename LastStatusT = Aws::String>
155 void SetLastStatus(LastStatusT&& value) {
156 m_lastStatusHasBeenSet = true;
157 m_lastStatus = std::forward<LastStatusT>(value);
158 }
159 template <typename LastStatusT = Aws::String>
160 Container& WithLastStatus(LastStatusT&& value) {
161 SetLastStatus(std::forward<LastStatusT>(value));
162 return *this;
163 }
165
167
170 inline int GetExitCode() const { return m_exitCode; }
171 inline bool ExitCodeHasBeenSet() const { return m_exitCodeHasBeenSet; }
172 inline void SetExitCode(int value) {
173 m_exitCodeHasBeenSet = true;
174 m_exitCode = value;
175 }
176 inline Container& WithExitCode(int value) {
177 SetExitCode(value);
178 return *this;
179 }
181
183
187 inline const Aws::String& GetReason() const { return m_reason; }
188 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
189 template <typename ReasonT = Aws::String>
190 void SetReason(ReasonT&& value) {
191 m_reasonHasBeenSet = true;
192 m_reason = std::forward<ReasonT>(value);
193 }
194 template <typename ReasonT = Aws::String>
195 Container& WithReason(ReasonT&& value) {
196 SetReason(std::forward<ReasonT>(value));
197 return *this;
198 }
200
202
205 inline const Aws::Vector<NetworkBinding>& GetNetworkBindings() const { return m_networkBindings; }
206 inline bool NetworkBindingsHasBeenSet() const { return m_networkBindingsHasBeenSet; }
207 template <typename NetworkBindingsT = Aws::Vector<NetworkBinding>>
208 void SetNetworkBindings(NetworkBindingsT&& value) {
209 m_networkBindingsHasBeenSet = true;
210 m_networkBindings = std::forward<NetworkBindingsT>(value);
211 }
212 template <typename NetworkBindingsT = Aws::Vector<NetworkBinding>>
213 Container& WithNetworkBindings(NetworkBindingsT&& value) {
214 SetNetworkBindings(std::forward<NetworkBindingsT>(value));
215 return *this;
216 }
217 template <typename NetworkBindingsT = NetworkBinding>
218 Container& AddNetworkBindings(NetworkBindingsT&& value) {
219 m_networkBindingsHasBeenSet = true;
220 m_networkBindings.emplace_back(std::forward<NetworkBindingsT>(value));
221 return *this;
222 }
224
226
229 inline const Aws::Vector<NetworkInterface>& GetNetworkInterfaces() const { return m_networkInterfaces; }
230 inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; }
231 template <typename NetworkInterfacesT = Aws::Vector<NetworkInterface>>
232 void SetNetworkInterfaces(NetworkInterfacesT&& value) {
233 m_networkInterfacesHasBeenSet = true;
234 m_networkInterfaces = std::forward<NetworkInterfacesT>(value);
235 }
236 template <typename NetworkInterfacesT = Aws::Vector<NetworkInterface>>
237 Container& WithNetworkInterfaces(NetworkInterfacesT&& value) {
238 SetNetworkInterfaces(std::forward<NetworkInterfacesT>(value));
239 return *this;
240 }
241 template <typename NetworkInterfacesT = NetworkInterface>
242 Container& AddNetworkInterfaces(NetworkInterfacesT&& value) {
243 m_networkInterfacesHasBeenSet = true;
244 m_networkInterfaces.emplace_back(std::forward<NetworkInterfacesT>(value));
245 return *this;
246 }
248
250
255 inline HealthStatus GetHealthStatus() const { return m_healthStatus; }
256 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
257 inline void SetHealthStatus(HealthStatus value) {
258 m_healthStatusHasBeenSet = true;
259 m_healthStatus = value;
260 }
262 SetHealthStatus(value);
263 return *this;
264 }
266
268
272 inline const Aws::Vector<ManagedAgent>& GetManagedAgents() const { return m_managedAgents; }
273 inline bool ManagedAgentsHasBeenSet() const { return m_managedAgentsHasBeenSet; }
274 template <typename ManagedAgentsT = Aws::Vector<ManagedAgent>>
275 void SetManagedAgents(ManagedAgentsT&& value) {
276 m_managedAgentsHasBeenSet = true;
277 m_managedAgents = std::forward<ManagedAgentsT>(value);
278 }
279 template <typename ManagedAgentsT = Aws::Vector<ManagedAgent>>
280 Container& WithManagedAgents(ManagedAgentsT&& value) {
281 SetManagedAgents(std::forward<ManagedAgentsT>(value));
282 return *this;
283 }
284 template <typename ManagedAgentsT = ManagedAgent>
285 Container& AddManagedAgents(ManagedAgentsT&& value) {
286 m_managedAgentsHasBeenSet = true;
287 m_managedAgents.emplace_back(std::forward<ManagedAgentsT>(value));
288 return *this;
289 }
291
293
298 inline const Aws::String& GetCpu() const { return m_cpu; }
299 inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; }
300 template <typename CpuT = Aws::String>
301 void SetCpu(CpuT&& value) {
302 m_cpuHasBeenSet = true;
303 m_cpu = std::forward<CpuT>(value);
304 }
305 template <typename CpuT = Aws::String>
306 Container& WithCpu(CpuT&& value) {
307 SetCpu(std::forward<CpuT>(value));
308 return *this;
309 }
311
313
316 inline const Aws::String& GetMemory() const { return m_memory; }
317 inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; }
318 template <typename MemoryT = Aws::String>
319 void SetMemory(MemoryT&& value) {
320 m_memoryHasBeenSet = true;
321 m_memory = std::forward<MemoryT>(value);
322 }
323 template <typename MemoryT = Aws::String>
324 Container& WithMemory(MemoryT&& value) {
325 SetMemory(std::forward<MemoryT>(value));
326 return *this;
327 }
329
331
334 inline const Aws::String& GetMemoryReservation() const { return m_memoryReservation; }
335 inline bool MemoryReservationHasBeenSet() const { return m_memoryReservationHasBeenSet; }
336 template <typename MemoryReservationT = Aws::String>
337 void SetMemoryReservation(MemoryReservationT&& value) {
338 m_memoryReservationHasBeenSet = true;
339 m_memoryReservation = std::forward<MemoryReservationT>(value);
340 }
341 template <typename MemoryReservationT = Aws::String>
342 Container& WithMemoryReservation(MemoryReservationT&& value) {
343 SetMemoryReservation(std::forward<MemoryReservationT>(value));
344 return *this;
345 }
347
349
352 inline const Aws::Vector<Aws::String>& GetGpuIds() const { return m_gpuIds; }
353 inline bool GpuIdsHasBeenSet() const { return m_gpuIdsHasBeenSet; }
354 template <typename GpuIdsT = Aws::Vector<Aws::String>>
355 void SetGpuIds(GpuIdsT&& value) {
356 m_gpuIdsHasBeenSet = true;
357 m_gpuIds = std::forward<GpuIdsT>(value);
358 }
359 template <typename GpuIdsT = Aws::Vector<Aws::String>>
360 Container& WithGpuIds(GpuIdsT&& value) {
361 SetGpuIds(std::forward<GpuIdsT>(value));
362 return *this;
363 }
364 template <typename GpuIdsT = Aws::String>
365 Container& AddGpuIds(GpuIdsT&& value) {
366 m_gpuIdsHasBeenSet = true;
367 m_gpuIds.emplace_back(std::forward<GpuIdsT>(value));
368 return *this;
369 }
371
373
376 inline const Aws::Vector<Aws::String>& GetNeuronDeviceIds() const { return m_neuronDeviceIds; }
377 inline bool NeuronDeviceIdsHasBeenSet() const { return m_neuronDeviceIdsHasBeenSet; }
378 template <typename NeuronDeviceIdsT = Aws::Vector<Aws::String>>
379 void SetNeuronDeviceIds(NeuronDeviceIdsT&& value) {
380 m_neuronDeviceIdsHasBeenSet = true;
381 m_neuronDeviceIds = std::forward<NeuronDeviceIdsT>(value);
382 }
383 template <typename NeuronDeviceIdsT = Aws::Vector<Aws::String>>
384 Container& WithNeuronDeviceIds(NeuronDeviceIdsT&& value) {
385 SetNeuronDeviceIds(std::forward<NeuronDeviceIdsT>(value));
386 return *this;
387 }
388 template <typename NeuronDeviceIdsT = Aws::String>
389 Container& AddNeuronDeviceIds(NeuronDeviceIdsT&& value) {
390 m_neuronDeviceIdsHasBeenSet = true;
391 m_neuronDeviceIds.emplace_back(std::forward<NeuronDeviceIdsT>(value));
392 return *this;
393 }
395
397
402 inline const SharingStrategy& GetGpuSharingStrategy() const { return m_gpuSharingStrategy; }
403 inline bool GpuSharingStrategyHasBeenSet() const { return m_gpuSharingStrategyHasBeenSet; }
404 template <typename GpuSharingStrategyT = SharingStrategy>
405 void SetGpuSharingStrategy(GpuSharingStrategyT&& value) {
406 m_gpuSharingStrategyHasBeenSet = true;
407 m_gpuSharingStrategy = std::forward<GpuSharingStrategyT>(value);
408 }
409 template <typename GpuSharingStrategyT = SharingStrategy>
410 Container& WithGpuSharingStrategy(GpuSharingStrategyT&& value) {
411 SetGpuSharingStrategy(std::forward<GpuSharingStrategyT>(value));
412 return *this;
413 }
415 private:
416 Aws::String m_containerArn;
417
418 Aws::String m_taskArn;
419
420 Aws::String m_name;
421
422 Aws::String m_image;
423
424 Aws::String m_imageDigest;
425
426 Aws::String m_runtimeId;
427
428 Aws::String m_lastStatus;
429
430 int m_exitCode{0};
431
432 Aws::String m_reason;
433
434 Aws::Vector<NetworkBinding> m_networkBindings;
435
436 Aws::Vector<NetworkInterface> m_networkInterfaces;
437
438 HealthStatus m_healthStatus{HealthStatus::NOT_SET};
439
440 Aws::Vector<ManagedAgent> m_managedAgents;
441
442 Aws::String m_cpu;
443
444 Aws::String m_memory;
445
446 Aws::String m_memoryReservation;
447
449
450 Aws::Vector<Aws::String> m_neuronDeviceIds;
451
452 SharingStrategy m_gpuSharingStrategy;
453 bool m_containerArnHasBeenSet = false;
454 bool m_taskArnHasBeenSet = false;
455 bool m_nameHasBeenSet = false;
456 bool m_imageHasBeenSet = false;
457 bool m_imageDigestHasBeenSet = false;
458 bool m_runtimeIdHasBeenSet = false;
459 bool m_lastStatusHasBeenSet = false;
460 bool m_exitCodeHasBeenSet = false;
461 bool m_reasonHasBeenSet = false;
462 bool m_networkBindingsHasBeenSet = false;
463 bool m_networkInterfacesHasBeenSet = false;
464 bool m_healthStatusHasBeenSet = false;
465 bool m_managedAgentsHasBeenSet = false;
466 bool m_cpuHasBeenSet = false;
467 bool m_memoryHasBeenSet = false;
468 bool m_memoryReservationHasBeenSet = false;
469 bool m_gpuIdsHasBeenSet = false;
470 bool m_neuronDeviceIdsHasBeenSet = false;
471 bool m_gpuSharingStrategyHasBeenSet = false;
472};
473
474} // namespace Model
475} // namespace ECS
476} // namespace Aws
void SetHealthStatus(HealthStatus value)
Definition Container.h:257
const Aws::String & GetMemoryReservation() const
Definition Container.h:334
Container & WithRuntimeId(RuntimeIdT &&value)
Definition Container.h:142
const Aws::Vector< NetworkInterface > & GetNetworkInterfaces() const
Definition Container.h:229
bool NameHasBeenSet() const
Definition Container.h:81
bool TaskArnHasBeenSet() const
Definition Container.h:63
void SetNetworkInterfaces(NetworkInterfacesT &&value)
Definition Container.h:232
AWS_ECS_API Container(Aws::Utils::Json::JsonView jsonValue)
Container & WithMemoryReservation(MemoryReservationT &&value)
Definition Container.h:342
void SetNetworkBindings(NetworkBindingsT &&value)
Definition Container.h:208
Container & WithTaskArn(TaskArnT &&value)
Definition Container.h:70
Container & WithManagedAgents(ManagedAgentsT &&value)
Definition Container.h:280
void SetNeuronDeviceIds(NeuronDeviceIdsT &&value)
Definition Container.h:379
void SetExitCode(int value)
Definition Container.h:172
const Aws::String & GetReason() const
Definition Container.h:187
bool ImageHasBeenSet() const
Definition Container.h:99
Container & WithCpu(CpuT &&value)
Definition Container.h:306
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
Container & WithNeuronDeviceIds(NeuronDeviceIdsT &&value)
Definition Container.h:384
void SetImage(ImageT &&value)
Definition Container.h:101
Container & WithLastStatus(LastStatusT &&value)
Definition Container.h:160
Container & WithImage(ImageT &&value)
Definition Container.h:106
Container & WithExitCode(int value)
Definition Container.h:176
AWS_ECS_API Container & operator=(Aws::Utils::Json::JsonView jsonValue)
bool HealthStatusHasBeenSet() const
Definition Container.h:256
void SetMemory(MemoryT &&value)
Definition Container.h:319
bool RuntimeIdHasBeenSet() const
Definition Container.h:135
const Aws::Vector< ManagedAgent > & GetManagedAgents() const
Definition Container.h:272
bool NetworkBindingsHasBeenSet() const
Definition Container.h:206
Container & WithName(NameT &&value)
Definition Container.h:88
Container & WithContainerArn(ContainerArnT &&value)
Definition Container.h:52
void SetRuntimeId(RuntimeIdT &&value)
Definition Container.h:137
bool NeuronDeviceIdsHasBeenSet() const
Definition Container.h:377
bool NetworkInterfacesHasBeenSet() const
Definition Container.h:230
void SetImageDigest(ImageDigestT &&value)
Definition Container.h:119
Container & WithGpuSharingStrategy(GpuSharingStrategyT &&value)
Definition Container.h:410
void SetReason(ReasonT &&value)
Definition Container.h:190
const Aws::Vector< Aws::String > & GetNeuronDeviceIds() const
Definition Container.h:376
void SetGpuIds(GpuIdsT &&value)
Definition Container.h:355
bool MemoryReservationHasBeenSet() const
Definition Container.h:335
const Aws::String & GetImageDigest() const
Definition Container.h:116
Container & WithMemory(MemoryT &&value)
Definition Container.h:324
AWS_ECS_API Container()=default
void SetName(NameT &&value)
Definition Container.h:83
const Aws::String & GetMemory() const
Definition Container.h:316
bool LastStatusHasBeenSet() const
Definition Container.h:153
const Aws::String & GetImage() const
Definition Container.h:98
Container & AddNetworkBindings(NetworkBindingsT &&value)
Definition Container.h:218
bool ManagedAgentsHasBeenSet() const
Definition Container.h:273
void SetManagedAgents(ManagedAgentsT &&value)
Definition Container.h:275
bool GpuIdsHasBeenSet() const
Definition Container.h:353
bool ExitCodeHasBeenSet() const
Definition Container.h:171
const SharingStrategy & GetGpuSharingStrategy() const
Definition Container.h:402
void SetGpuSharingStrategy(GpuSharingStrategyT &&value)
Definition Container.h:405
Container & WithHealthStatus(HealthStatus value)
Definition Container.h:261
HealthStatus GetHealthStatus() const
Definition Container.h:255
bool GpuSharingStrategyHasBeenSet() const
Definition Container.h:403
Container & WithNetworkBindings(NetworkBindingsT &&value)
Definition Container.h:213
Container & WithNetworkInterfaces(NetworkInterfacesT &&value)
Definition Container.h:237
const Aws::String & GetTaskArn() const
Definition Container.h:62
const Aws::String & GetCpu() const
Definition Container.h:298
const Aws::Vector< NetworkBinding > & GetNetworkBindings() const
Definition Container.h:205
bool ReasonHasBeenSet() const
Definition Container.h:188
Container & AddManagedAgents(ManagedAgentsT &&value)
Definition Container.h:285
Container & AddNeuronDeviceIds(NeuronDeviceIdsT &&value)
Definition Container.h:389
const Aws::Vector< Aws::String > & GetGpuIds() const
Definition Container.h:352
void SetCpu(CpuT &&value)
Definition Container.h:301
const Aws::String & GetLastStatus() const
Definition Container.h:152
Container & WithReason(ReasonT &&value)
Definition Container.h:195
void SetLastStatus(LastStatusT &&value)
Definition Container.h:155
const Aws::String & GetRuntimeId() const
Definition Container.h:134
bool ContainerArnHasBeenSet() const
Definition Container.h:45
Container & AddGpuIds(GpuIdsT &&value)
Definition Container.h:365
void SetTaskArn(TaskArnT &&value)
Definition Container.h:65
void SetMemoryReservation(MemoryReservationT &&value)
Definition Container.h:337
Container & WithImageDigest(ImageDigestT &&value)
Definition Container.h:124
Container & WithGpuIds(GpuIdsT &&value)
Definition Container.h:360
const Aws::String & GetContainerArn() const
Definition Container.h:44
void SetContainerArn(ContainerArnT &&value)
Definition Container.h:47
bool ImageDigestHasBeenSet() const
Definition Container.h:117
const Aws::String & GetName() const
Definition Container.h:80
bool MemoryHasBeenSet() const
Definition Container.h:317
Container & AddNetworkInterfaces(NetworkInterfacesT &&value)
Definition Container.h:242
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue