1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 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/NetworkBinding.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Json 18 { 19 class JsonValue; 20 class JsonView; 21 } // namespace Json 22 } // namespace Utils 23 namespace ECS 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>An object representing a change in state for a container.</p><p><h3>See 30 * Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ContainerStateChange">AWS 32 * API Reference</a></p> 33 */ 34 class AWS_ECS_API ContainerStateChange 35 { 36 public: 37 ContainerStateChange(); 38 ContainerStateChange(Aws::Utils::Json::JsonView jsonValue); 39 ContainerStateChange& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The name of the container.</p> 45 */ GetContainerName()46 inline const Aws::String& GetContainerName() const{ return m_containerName; } 47 48 /** 49 * <p>The name of the container.</p> 50 */ ContainerNameHasBeenSet()51 inline bool ContainerNameHasBeenSet() const { return m_containerNameHasBeenSet; } 52 53 /** 54 * <p>The name of the container.</p> 55 */ SetContainerName(const Aws::String & value)56 inline void SetContainerName(const Aws::String& value) { m_containerNameHasBeenSet = true; m_containerName = value; } 57 58 /** 59 * <p>The name of the container.</p> 60 */ SetContainerName(Aws::String && value)61 inline void SetContainerName(Aws::String&& value) { m_containerNameHasBeenSet = true; m_containerName = std::move(value); } 62 63 /** 64 * <p>The name of the container.</p> 65 */ SetContainerName(const char * value)66 inline void SetContainerName(const char* value) { m_containerNameHasBeenSet = true; m_containerName.assign(value); } 67 68 /** 69 * <p>The name of the container.</p> 70 */ WithContainerName(const Aws::String & value)71 inline ContainerStateChange& WithContainerName(const Aws::String& value) { SetContainerName(value); return *this;} 72 73 /** 74 * <p>The name of the container.</p> 75 */ WithContainerName(Aws::String && value)76 inline ContainerStateChange& WithContainerName(Aws::String&& value) { SetContainerName(std::move(value)); return *this;} 77 78 /** 79 * <p>The name of the container.</p> 80 */ WithContainerName(const char * value)81 inline ContainerStateChange& WithContainerName(const char* value) { SetContainerName(value); return *this;} 82 83 84 /** 85 * <p>The container image SHA 256 digest.</p> 86 */ GetImageDigest()87 inline const Aws::String& GetImageDigest() const{ return m_imageDigest; } 88 89 /** 90 * <p>The container image SHA 256 digest.</p> 91 */ ImageDigestHasBeenSet()92 inline bool ImageDigestHasBeenSet() const { return m_imageDigestHasBeenSet; } 93 94 /** 95 * <p>The container image SHA 256 digest.</p> 96 */ SetImageDigest(const Aws::String & value)97 inline void SetImageDigest(const Aws::String& value) { m_imageDigestHasBeenSet = true; m_imageDigest = value; } 98 99 /** 100 * <p>The container image SHA 256 digest.</p> 101 */ SetImageDigest(Aws::String && value)102 inline void SetImageDigest(Aws::String&& value) { m_imageDigestHasBeenSet = true; m_imageDigest = std::move(value); } 103 104 /** 105 * <p>The container image SHA 256 digest.</p> 106 */ SetImageDigest(const char * value)107 inline void SetImageDigest(const char* value) { m_imageDigestHasBeenSet = true; m_imageDigest.assign(value); } 108 109 /** 110 * <p>The container image SHA 256 digest.</p> 111 */ WithImageDigest(const Aws::String & value)112 inline ContainerStateChange& WithImageDigest(const Aws::String& value) { SetImageDigest(value); return *this;} 113 114 /** 115 * <p>The container image SHA 256 digest.</p> 116 */ WithImageDigest(Aws::String && value)117 inline ContainerStateChange& WithImageDigest(Aws::String&& value) { SetImageDigest(std::move(value)); return *this;} 118 119 /** 120 * <p>The container image SHA 256 digest.</p> 121 */ WithImageDigest(const char * value)122 inline ContainerStateChange& WithImageDigest(const char* value) { SetImageDigest(value); return *this;} 123 124 125 /** 126 * <p>The ID of the Docker container.</p> 127 */ GetRuntimeId()128 inline const Aws::String& GetRuntimeId() const{ return m_runtimeId; } 129 130 /** 131 * <p>The ID of the Docker container.</p> 132 */ RuntimeIdHasBeenSet()133 inline bool RuntimeIdHasBeenSet() const { return m_runtimeIdHasBeenSet; } 134 135 /** 136 * <p>The ID of the Docker container.</p> 137 */ SetRuntimeId(const Aws::String & value)138 inline void SetRuntimeId(const Aws::String& value) { m_runtimeIdHasBeenSet = true; m_runtimeId = value; } 139 140 /** 141 * <p>The ID of the Docker container.</p> 142 */ SetRuntimeId(Aws::String && value)143 inline void SetRuntimeId(Aws::String&& value) { m_runtimeIdHasBeenSet = true; m_runtimeId = std::move(value); } 144 145 /** 146 * <p>The ID of the Docker container.</p> 147 */ SetRuntimeId(const char * value)148 inline void SetRuntimeId(const char* value) { m_runtimeIdHasBeenSet = true; m_runtimeId.assign(value); } 149 150 /** 151 * <p>The ID of the Docker container.</p> 152 */ WithRuntimeId(const Aws::String & value)153 inline ContainerStateChange& WithRuntimeId(const Aws::String& value) { SetRuntimeId(value); return *this;} 154 155 /** 156 * <p>The ID of the Docker container.</p> 157 */ WithRuntimeId(Aws::String && value)158 inline ContainerStateChange& WithRuntimeId(Aws::String&& value) { SetRuntimeId(std::move(value)); return *this;} 159 160 /** 161 * <p>The ID of the Docker container.</p> 162 */ WithRuntimeId(const char * value)163 inline ContainerStateChange& WithRuntimeId(const char* value) { SetRuntimeId(value); return *this;} 164 165 166 /** 167 * <p>The exit code for the container, if the state change is a result of the 168 * container exiting.</p> 169 */ GetExitCode()170 inline int GetExitCode() const{ return m_exitCode; } 171 172 /** 173 * <p>The exit code for the container, if the state change is a result of the 174 * container exiting.</p> 175 */ ExitCodeHasBeenSet()176 inline bool ExitCodeHasBeenSet() const { return m_exitCodeHasBeenSet; } 177 178 /** 179 * <p>The exit code for the container, if the state change is a result of the 180 * container exiting.</p> 181 */ SetExitCode(int value)182 inline void SetExitCode(int value) { m_exitCodeHasBeenSet = true; m_exitCode = value; } 183 184 /** 185 * <p>The exit code for the container, if the state change is a result of the 186 * container exiting.</p> 187 */ WithExitCode(int value)188 inline ContainerStateChange& WithExitCode(int value) { SetExitCode(value); return *this;} 189 190 191 /** 192 * <p>Any network bindings associated with the container.</p> 193 */ GetNetworkBindings()194 inline const Aws::Vector<NetworkBinding>& GetNetworkBindings() const{ return m_networkBindings; } 195 196 /** 197 * <p>Any network bindings associated with the container.</p> 198 */ NetworkBindingsHasBeenSet()199 inline bool NetworkBindingsHasBeenSet() const { return m_networkBindingsHasBeenSet; } 200 201 /** 202 * <p>Any network bindings associated with the container.</p> 203 */ SetNetworkBindings(const Aws::Vector<NetworkBinding> & value)204 inline void SetNetworkBindings(const Aws::Vector<NetworkBinding>& value) { m_networkBindingsHasBeenSet = true; m_networkBindings = value; } 205 206 /** 207 * <p>Any network bindings associated with the container.</p> 208 */ SetNetworkBindings(Aws::Vector<NetworkBinding> && value)209 inline void SetNetworkBindings(Aws::Vector<NetworkBinding>&& value) { m_networkBindingsHasBeenSet = true; m_networkBindings = std::move(value); } 210 211 /** 212 * <p>Any network bindings associated with the container.</p> 213 */ WithNetworkBindings(const Aws::Vector<NetworkBinding> & value)214 inline ContainerStateChange& WithNetworkBindings(const Aws::Vector<NetworkBinding>& value) { SetNetworkBindings(value); return *this;} 215 216 /** 217 * <p>Any network bindings associated with the container.</p> 218 */ WithNetworkBindings(Aws::Vector<NetworkBinding> && value)219 inline ContainerStateChange& WithNetworkBindings(Aws::Vector<NetworkBinding>&& value) { SetNetworkBindings(std::move(value)); return *this;} 220 221 /** 222 * <p>Any network bindings associated with the container.</p> 223 */ AddNetworkBindings(const NetworkBinding & value)224 inline ContainerStateChange& AddNetworkBindings(const NetworkBinding& value) { m_networkBindingsHasBeenSet = true; m_networkBindings.push_back(value); return *this; } 225 226 /** 227 * <p>Any network bindings associated with the container.</p> 228 */ AddNetworkBindings(NetworkBinding && value)229 inline ContainerStateChange& AddNetworkBindings(NetworkBinding&& value) { m_networkBindingsHasBeenSet = true; m_networkBindings.push_back(std::move(value)); return *this; } 230 231 232 /** 233 * <p>The reason for the state change.</p> 234 */ GetReason()235 inline const Aws::String& GetReason() const{ return m_reason; } 236 237 /** 238 * <p>The reason for the state change.</p> 239 */ ReasonHasBeenSet()240 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } 241 242 /** 243 * <p>The reason for the state change.</p> 244 */ SetReason(const Aws::String & value)245 inline void SetReason(const Aws::String& value) { m_reasonHasBeenSet = true; m_reason = value; } 246 247 /** 248 * <p>The reason for the state change.</p> 249 */ SetReason(Aws::String && value)250 inline void SetReason(Aws::String&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } 251 252 /** 253 * <p>The reason for the state change.</p> 254 */ SetReason(const char * value)255 inline void SetReason(const char* value) { m_reasonHasBeenSet = true; m_reason.assign(value); } 256 257 /** 258 * <p>The reason for the state change.</p> 259 */ WithReason(const Aws::String & value)260 inline ContainerStateChange& WithReason(const Aws::String& value) { SetReason(value); return *this;} 261 262 /** 263 * <p>The reason for the state change.</p> 264 */ WithReason(Aws::String && value)265 inline ContainerStateChange& WithReason(Aws::String&& value) { SetReason(std::move(value)); return *this;} 266 267 /** 268 * <p>The reason for the state change.</p> 269 */ WithReason(const char * value)270 inline ContainerStateChange& WithReason(const char* value) { SetReason(value); return *this;} 271 272 273 /** 274 * <p>The status of the container.</p> 275 */ GetStatus()276 inline const Aws::String& GetStatus() const{ return m_status; } 277 278 /** 279 * <p>The status of the container.</p> 280 */ StatusHasBeenSet()281 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 282 283 /** 284 * <p>The status of the container.</p> 285 */ SetStatus(const Aws::String & value)286 inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } 287 288 /** 289 * <p>The status of the container.</p> 290 */ SetStatus(Aws::String && value)291 inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 292 293 /** 294 * <p>The status of the container.</p> 295 */ SetStatus(const char * value)296 inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } 297 298 /** 299 * <p>The status of the container.</p> 300 */ WithStatus(const Aws::String & value)301 inline ContainerStateChange& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} 302 303 /** 304 * <p>The status of the container.</p> 305 */ WithStatus(Aws::String && value)306 inline ContainerStateChange& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} 307 308 /** 309 * <p>The status of the container.</p> 310 */ WithStatus(const char * value)311 inline ContainerStateChange& WithStatus(const char* value) { SetStatus(value); return *this;} 312 313 private: 314 315 Aws::String m_containerName; 316 bool m_containerNameHasBeenSet; 317 318 Aws::String m_imageDigest; 319 bool m_imageDigestHasBeenSet; 320 321 Aws::String m_runtimeId; 322 bool m_runtimeIdHasBeenSet; 323 324 int m_exitCode; 325 bool m_exitCodeHasBeenSet; 326 327 Aws::Vector<NetworkBinding> m_networkBindings; 328 bool m_networkBindingsHasBeenSet; 329 330 Aws::String m_reason; 331 bool m_reasonHasBeenSet; 332 333 Aws::String m_status; 334 bool m_statusHasBeenSet; 335 }; 336 337 } // namespace Model 338 } // namespace ECS 339 } // namespace Aws 340