AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Container.h
1
6#pragma once
7#include <aws/ecs/ECS_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ecs/model/HealthStatus.h>
11#include <aws/ecs/model/NetworkBinding.h>
12#include <aws/ecs/model/NetworkInterface.h>
13#include <aws/ecs/model/ManagedAgent.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace ECS
27{
28namespace Model
29{
30
37 {
38 public:
39 AWS_ECS_API Container() = default;
40 AWS_ECS_API Container(Aws::Utils::Json::JsonView jsonValue);
43
44
46
49 inline const Aws::String& GetContainerArn() const { return m_containerArn; }
50 inline bool ContainerArnHasBeenSet() const { return m_containerArnHasBeenSet; }
51 template<typename ContainerArnT = Aws::String>
52 void SetContainerArn(ContainerArnT&& value) { m_containerArnHasBeenSet = true; m_containerArn = std::forward<ContainerArnT>(value); }
53 template<typename ContainerArnT = Aws::String>
54 Container& WithContainerArn(ContainerArnT&& value) { SetContainerArn(std::forward<ContainerArnT>(value)); return *this;}
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) { m_taskArnHasBeenSet = true; m_taskArn = std::forward<TaskArnT>(value); }
65 template<typename TaskArnT = Aws::String>
66 Container& WithTaskArn(TaskArnT&& value) { SetTaskArn(std::forward<TaskArnT>(value)); return *this;}
68
70
73 inline const Aws::String& GetName() const { return m_name; }
74 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
75 template<typename NameT = Aws::String>
76 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
77 template<typename NameT = Aws::String>
78 Container& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
80
82
85 inline const Aws::String& GetImage() const { return m_image; }
86 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
87 template<typename ImageT = Aws::String>
88 void SetImage(ImageT&& value) { m_imageHasBeenSet = true; m_image = std::forward<ImageT>(value); }
89 template<typename ImageT = Aws::String>
90 Container& WithImage(ImageT&& value) { SetImage(std::forward<ImageT>(value)); return *this;}
92
94
97 inline const Aws::String& GetImageDigest() const { return m_imageDigest; }
98 inline bool ImageDigestHasBeenSet() const { return m_imageDigestHasBeenSet; }
99 template<typename ImageDigestT = Aws::String>
100 void SetImageDigest(ImageDigestT&& value) { m_imageDigestHasBeenSet = true; m_imageDigest = std::forward<ImageDigestT>(value); }
101 template<typename ImageDigestT = Aws::String>
102 Container& WithImageDigest(ImageDigestT&& value) { SetImageDigest(std::forward<ImageDigestT>(value)); return *this;}
104
106
109 inline const Aws::String& GetRuntimeId() const { return m_runtimeId; }
110 inline bool RuntimeIdHasBeenSet() const { return m_runtimeIdHasBeenSet; }
111 template<typename RuntimeIdT = Aws::String>
112 void SetRuntimeId(RuntimeIdT&& value) { m_runtimeIdHasBeenSet = true; m_runtimeId = std::forward<RuntimeIdT>(value); }
113 template<typename RuntimeIdT = Aws::String>
114 Container& WithRuntimeId(RuntimeIdT&& value) { SetRuntimeId(std::forward<RuntimeIdT>(value)); return *this;}
116
118
121 inline const Aws::String& GetLastStatus() const { return m_lastStatus; }
122 inline bool LastStatusHasBeenSet() const { return m_lastStatusHasBeenSet; }
123 template<typename LastStatusT = Aws::String>
124 void SetLastStatus(LastStatusT&& value) { m_lastStatusHasBeenSet = true; m_lastStatus = std::forward<LastStatusT>(value); }
125 template<typename LastStatusT = Aws::String>
126 Container& WithLastStatus(LastStatusT&& value) { SetLastStatus(std::forward<LastStatusT>(value)); return *this;}
128
130
133 inline int GetExitCode() const { return m_exitCode; }
134 inline bool ExitCodeHasBeenSet() const { return m_exitCodeHasBeenSet; }
135 inline void SetExitCode(int value) { m_exitCodeHasBeenSet = true; m_exitCode = value; }
136 inline Container& WithExitCode(int value) { SetExitCode(value); return *this;}
138
140
144 inline const Aws::String& GetReason() const { return m_reason; }
145 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
146 template<typename ReasonT = Aws::String>
147 void SetReason(ReasonT&& value) { m_reasonHasBeenSet = true; m_reason = std::forward<ReasonT>(value); }
148 template<typename ReasonT = Aws::String>
149 Container& WithReason(ReasonT&& value) { SetReason(std::forward<ReasonT>(value)); return *this;}
151
153
156 inline const Aws::Vector<NetworkBinding>& GetNetworkBindings() const { return m_networkBindings; }
157 inline bool NetworkBindingsHasBeenSet() const { return m_networkBindingsHasBeenSet; }
158 template<typename NetworkBindingsT = Aws::Vector<NetworkBinding>>
159 void SetNetworkBindings(NetworkBindingsT&& value) { m_networkBindingsHasBeenSet = true; m_networkBindings = std::forward<NetworkBindingsT>(value); }
160 template<typename NetworkBindingsT = Aws::Vector<NetworkBinding>>
161 Container& WithNetworkBindings(NetworkBindingsT&& value) { SetNetworkBindings(std::forward<NetworkBindingsT>(value)); return *this;}
162 template<typename NetworkBindingsT = NetworkBinding>
163 Container& AddNetworkBindings(NetworkBindingsT&& value) { m_networkBindingsHasBeenSet = true; m_networkBindings.emplace_back(std::forward<NetworkBindingsT>(value)); return *this; }
165
167
170 inline const Aws::Vector<NetworkInterface>& GetNetworkInterfaces() const { return m_networkInterfaces; }
171 inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; }
172 template<typename NetworkInterfacesT = Aws::Vector<NetworkInterface>>
173 void SetNetworkInterfaces(NetworkInterfacesT&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = std::forward<NetworkInterfacesT>(value); }
174 template<typename NetworkInterfacesT = Aws::Vector<NetworkInterface>>
175 Container& WithNetworkInterfaces(NetworkInterfacesT&& value) { SetNetworkInterfaces(std::forward<NetworkInterfacesT>(value)); return *this;}
176 template<typename NetworkInterfacesT = NetworkInterface>
177 Container& AddNetworkInterfaces(NetworkInterfacesT&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.emplace_back(std::forward<NetworkInterfacesT>(value)); return *this; }
179
181
186 inline HealthStatus GetHealthStatus() const { return m_healthStatus; }
187 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
188 inline void SetHealthStatus(HealthStatus value) { m_healthStatusHasBeenSet = true; m_healthStatus = value; }
189 inline Container& WithHealthStatus(HealthStatus value) { SetHealthStatus(value); return *this;}
191
193
197 inline const Aws::Vector<ManagedAgent>& GetManagedAgents() const { return m_managedAgents; }
198 inline bool ManagedAgentsHasBeenSet() const { return m_managedAgentsHasBeenSet; }
199 template<typename ManagedAgentsT = Aws::Vector<ManagedAgent>>
200 void SetManagedAgents(ManagedAgentsT&& value) { m_managedAgentsHasBeenSet = true; m_managedAgents = std::forward<ManagedAgentsT>(value); }
201 template<typename ManagedAgentsT = Aws::Vector<ManagedAgent>>
202 Container& WithManagedAgents(ManagedAgentsT&& value) { SetManagedAgents(std::forward<ManagedAgentsT>(value)); return *this;}
203 template<typename ManagedAgentsT = ManagedAgent>
204 Container& AddManagedAgents(ManagedAgentsT&& value) { m_managedAgentsHasBeenSet = true; m_managedAgents.emplace_back(std::forward<ManagedAgentsT>(value)); return *this; }
206
208
213 inline const Aws::String& GetCpu() const { return m_cpu; }
214 inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; }
215 template<typename CpuT = Aws::String>
216 void SetCpu(CpuT&& value) { m_cpuHasBeenSet = true; m_cpu = std::forward<CpuT>(value); }
217 template<typename CpuT = Aws::String>
218 Container& WithCpu(CpuT&& value) { SetCpu(std::forward<CpuT>(value)); return *this;}
220
222
225 inline const Aws::String& GetMemory() const { return m_memory; }
226 inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; }
227 template<typename MemoryT = Aws::String>
228 void SetMemory(MemoryT&& value) { m_memoryHasBeenSet = true; m_memory = std::forward<MemoryT>(value); }
229 template<typename MemoryT = Aws::String>
230 Container& WithMemory(MemoryT&& value) { SetMemory(std::forward<MemoryT>(value)); return *this;}
232
234
237 inline const Aws::String& GetMemoryReservation() const { return m_memoryReservation; }
238 inline bool MemoryReservationHasBeenSet() const { return m_memoryReservationHasBeenSet; }
239 template<typename MemoryReservationT = Aws::String>
240 void SetMemoryReservation(MemoryReservationT&& value) { m_memoryReservationHasBeenSet = true; m_memoryReservation = std::forward<MemoryReservationT>(value); }
241 template<typename MemoryReservationT = Aws::String>
242 Container& WithMemoryReservation(MemoryReservationT&& value) { SetMemoryReservation(std::forward<MemoryReservationT>(value)); return *this;}
244
246
249 inline const Aws::Vector<Aws::String>& GetGpuIds() const { return m_gpuIds; }
250 inline bool GpuIdsHasBeenSet() const { return m_gpuIdsHasBeenSet; }
251 template<typename GpuIdsT = Aws::Vector<Aws::String>>
252 void SetGpuIds(GpuIdsT&& value) { m_gpuIdsHasBeenSet = true; m_gpuIds = std::forward<GpuIdsT>(value); }
253 template<typename GpuIdsT = Aws::Vector<Aws::String>>
254 Container& WithGpuIds(GpuIdsT&& value) { SetGpuIds(std::forward<GpuIdsT>(value)); return *this;}
255 template<typename GpuIdsT = Aws::String>
256 Container& AddGpuIds(GpuIdsT&& value) { m_gpuIdsHasBeenSet = true; m_gpuIds.emplace_back(std::forward<GpuIdsT>(value)); return *this; }
258 private:
259
260 Aws::String m_containerArn;
261 bool m_containerArnHasBeenSet = false;
262
263 Aws::String m_taskArn;
264 bool m_taskArnHasBeenSet = false;
265
266 Aws::String m_name;
267 bool m_nameHasBeenSet = false;
268
269 Aws::String m_image;
270 bool m_imageHasBeenSet = false;
271
272 Aws::String m_imageDigest;
273 bool m_imageDigestHasBeenSet = false;
274
275 Aws::String m_runtimeId;
276 bool m_runtimeIdHasBeenSet = false;
277
278 Aws::String m_lastStatus;
279 bool m_lastStatusHasBeenSet = false;
280
281 int m_exitCode{0};
282 bool m_exitCodeHasBeenSet = false;
283
284 Aws::String m_reason;
285 bool m_reasonHasBeenSet = false;
286
287 Aws::Vector<NetworkBinding> m_networkBindings;
288 bool m_networkBindingsHasBeenSet = false;
289
290 Aws::Vector<NetworkInterface> m_networkInterfaces;
291 bool m_networkInterfacesHasBeenSet = false;
292
293 HealthStatus m_healthStatus{HealthStatus::NOT_SET};
294 bool m_healthStatusHasBeenSet = false;
295
296 Aws::Vector<ManagedAgent> m_managedAgents;
297 bool m_managedAgentsHasBeenSet = false;
298
299 Aws::String m_cpu;
300 bool m_cpuHasBeenSet = false;
301
302 Aws::String m_memory;
303 bool m_memoryHasBeenSet = false;
304
305 Aws::String m_memoryReservation;
306 bool m_memoryReservationHasBeenSet = false;
307
309 bool m_gpuIdsHasBeenSet = false;
310 };
311
312} // namespace Model
313} // namespace ECS
314} // namespace Aws
void SetHealthStatus(HealthStatus value)
Definition Container.h:188
const Aws::String & GetMemoryReservation() const
Definition Container.h:237
Container & WithRuntimeId(RuntimeIdT &&value)
Definition Container.h:114
const Aws::Vector< NetworkInterface > & GetNetworkInterfaces() const
Definition Container.h:170
bool NameHasBeenSet() const
Definition Container.h:74
bool TaskArnHasBeenSet() const
Definition Container.h:62
void SetNetworkInterfaces(NetworkInterfacesT &&value)
Definition Container.h:173
AWS_ECS_API Container(Aws::Utils::Json::JsonView jsonValue)
Container & WithMemoryReservation(MemoryReservationT &&value)
Definition Container.h:242
void SetNetworkBindings(NetworkBindingsT &&value)
Definition Container.h:159
Container & WithTaskArn(TaskArnT &&value)
Definition Container.h:66
Container & WithManagedAgents(ManagedAgentsT &&value)
Definition Container.h:202
void SetExitCode(int value)
Definition Container.h:135
const Aws::String & GetReason() const
Definition Container.h:144
bool ImageHasBeenSet() const
Definition Container.h:86
Container & WithCpu(CpuT &&value)
Definition Container.h:218
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetImage(ImageT &&value)
Definition Container.h:88
Container & WithLastStatus(LastStatusT &&value)
Definition Container.h:126
Container & WithImage(ImageT &&value)
Definition Container.h:90
Container & WithExitCode(int value)
Definition Container.h:136
AWS_ECS_API Container & operator=(Aws::Utils::Json::JsonView jsonValue)
bool HealthStatusHasBeenSet() const
Definition Container.h:187
void SetMemory(MemoryT &&value)
Definition Container.h:228
bool RuntimeIdHasBeenSet() const
Definition Container.h:110
const Aws::Vector< ManagedAgent > & GetManagedAgents() const
Definition Container.h:197
bool NetworkBindingsHasBeenSet() const
Definition Container.h:157
Container & WithName(NameT &&value)
Definition Container.h:78
Container & WithContainerArn(ContainerArnT &&value)
Definition Container.h:54
void SetRuntimeId(RuntimeIdT &&value)
Definition Container.h:112
bool NetworkInterfacesHasBeenSet() const
Definition Container.h:171
void SetImageDigest(ImageDigestT &&value)
Definition Container.h:100
void SetReason(ReasonT &&value)
Definition Container.h:147
void SetGpuIds(GpuIdsT &&value)
Definition Container.h:252
bool MemoryReservationHasBeenSet() const
Definition Container.h:238
const Aws::String & GetImageDigest() const
Definition Container.h:97
Container & WithMemory(MemoryT &&value)
Definition Container.h:230
AWS_ECS_API Container()=default
void SetName(NameT &&value)
Definition Container.h:76
const Aws::String & GetMemory() const
Definition Container.h:225
bool LastStatusHasBeenSet() const
Definition Container.h:122
const Aws::String & GetImage() const
Definition Container.h:85
Container & AddNetworkBindings(NetworkBindingsT &&value)
Definition Container.h:163
bool ManagedAgentsHasBeenSet() const
Definition Container.h:198
void SetManagedAgents(ManagedAgentsT &&value)
Definition Container.h:200
bool GpuIdsHasBeenSet() const
Definition Container.h:250
bool ExitCodeHasBeenSet() const
Definition Container.h:134
Container & WithHealthStatus(HealthStatus value)
Definition Container.h:189
HealthStatus GetHealthStatus() const
Definition Container.h:186
Container & WithNetworkBindings(NetworkBindingsT &&value)
Definition Container.h:161
Container & WithNetworkInterfaces(NetworkInterfacesT &&value)
Definition Container.h:175
const Aws::String & GetTaskArn() const
Definition Container.h:61
const Aws::String & GetCpu() const
Definition Container.h:213
const Aws::Vector< NetworkBinding > & GetNetworkBindings() const
Definition Container.h:156
bool ReasonHasBeenSet() const
Definition Container.h:145
Container & AddManagedAgents(ManagedAgentsT &&value)
Definition Container.h:204
const Aws::Vector< Aws::String > & GetGpuIds() const
Definition Container.h:249
void SetCpu(CpuT &&value)
Definition Container.h:216
const Aws::String & GetLastStatus() const
Definition Container.h:121
Container & WithReason(ReasonT &&value)
Definition Container.h:149
void SetLastStatus(LastStatusT &&value)
Definition Container.h:124
const Aws::String & GetRuntimeId() const
Definition Container.h:109
bool ContainerArnHasBeenSet() const
Definition Container.h:50
Container & AddGpuIds(GpuIdsT &&value)
Definition Container.h:256
void SetTaskArn(TaskArnT &&value)
Definition Container.h:64
void SetMemoryReservation(MemoryReservationT &&value)
Definition Container.h:240
Container & WithImageDigest(ImageDigestT &&value)
Definition Container.h:102
Container & WithGpuIds(GpuIdsT &&value)
Definition Container.h:254
const Aws::String & GetContainerArn() const
Definition Container.h:49
void SetContainerArn(ContainerArnT &&value)
Definition Container.h:52
bool ImageDigestHasBeenSet() const
Definition Container.h:98
const Aws::String & GetName() const
Definition Container.h:73
bool MemoryHasBeenSet() const
Definition Container.h:226
Container & AddNetworkInterfaces(NetworkInterfacesT &&value)
Definition Container.h:177
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue