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/codedeploy/CodeDeploy_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/core/utils/DateTime.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/codedeploy/model/TargetStatus.h> 12 #include <aws/codedeploy/model/LifecycleEvent.h> 13 #include <aws/codedeploy/model/ECSTaskSet.h> 14 #include <utility> 15 16 namespace Aws 17 { 18 namespace Utils 19 { 20 namespace Json 21 { 22 class JsonValue; 23 class JsonView; 24 } // namespace Json 25 } // namespace Utils 26 namespace CodeDeploy 27 { 28 namespace Model 29 { 30 31 /** 32 * <p> Information about the target of an Amazon ECS deployment. </p><p><h3>See 33 * Also:</h3> <a 34 * href="http://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ECSTarget">AWS 35 * API Reference</a></p> 36 */ 37 class AWS_CODEDEPLOY_API ECSTarget 38 { 39 public: 40 ECSTarget(); 41 ECSTarget(Aws::Utils::Json::JsonView jsonValue); 42 ECSTarget& operator=(Aws::Utils::Json::JsonView jsonValue); 43 Aws::Utils::Json::JsonValue Jsonize() const; 44 45 46 /** 47 * <p> The unique ID of a deployment. </p> 48 */ GetDeploymentId()49 inline const Aws::String& GetDeploymentId() const{ return m_deploymentId; } 50 51 /** 52 * <p> The unique ID of a deployment. </p> 53 */ DeploymentIdHasBeenSet()54 inline bool DeploymentIdHasBeenSet() const { return m_deploymentIdHasBeenSet; } 55 56 /** 57 * <p> The unique ID of a deployment. </p> 58 */ SetDeploymentId(const Aws::String & value)59 inline void SetDeploymentId(const Aws::String& value) { m_deploymentIdHasBeenSet = true; m_deploymentId = value; } 60 61 /** 62 * <p> The unique ID of a deployment. </p> 63 */ SetDeploymentId(Aws::String && value)64 inline void SetDeploymentId(Aws::String&& value) { m_deploymentIdHasBeenSet = true; m_deploymentId = std::move(value); } 65 66 /** 67 * <p> The unique ID of a deployment. </p> 68 */ SetDeploymentId(const char * value)69 inline void SetDeploymentId(const char* value) { m_deploymentIdHasBeenSet = true; m_deploymentId.assign(value); } 70 71 /** 72 * <p> The unique ID of a deployment. </p> 73 */ WithDeploymentId(const Aws::String & value)74 inline ECSTarget& WithDeploymentId(const Aws::String& value) { SetDeploymentId(value); return *this;} 75 76 /** 77 * <p> The unique ID of a deployment. </p> 78 */ WithDeploymentId(Aws::String && value)79 inline ECSTarget& WithDeploymentId(Aws::String&& value) { SetDeploymentId(std::move(value)); return *this;} 80 81 /** 82 * <p> The unique ID of a deployment. </p> 83 */ WithDeploymentId(const char * value)84 inline ECSTarget& WithDeploymentId(const char* value) { SetDeploymentId(value); return *this;} 85 86 87 /** 88 * <p> The unique ID of a deployment target that has a type of 89 * <code>ecsTarget</code>. </p> 90 */ GetTargetId()91 inline const Aws::String& GetTargetId() const{ return m_targetId; } 92 93 /** 94 * <p> The unique ID of a deployment target that has a type of 95 * <code>ecsTarget</code>. </p> 96 */ TargetIdHasBeenSet()97 inline bool TargetIdHasBeenSet() const { return m_targetIdHasBeenSet; } 98 99 /** 100 * <p> The unique ID of a deployment target that has a type of 101 * <code>ecsTarget</code>. </p> 102 */ SetTargetId(const Aws::String & value)103 inline void SetTargetId(const Aws::String& value) { m_targetIdHasBeenSet = true; m_targetId = value; } 104 105 /** 106 * <p> The unique ID of a deployment target that has a type of 107 * <code>ecsTarget</code>. </p> 108 */ SetTargetId(Aws::String && value)109 inline void SetTargetId(Aws::String&& value) { m_targetIdHasBeenSet = true; m_targetId = std::move(value); } 110 111 /** 112 * <p> The unique ID of a deployment target that has a type of 113 * <code>ecsTarget</code>. </p> 114 */ SetTargetId(const char * value)115 inline void SetTargetId(const char* value) { m_targetIdHasBeenSet = true; m_targetId.assign(value); } 116 117 /** 118 * <p> The unique ID of a deployment target that has a type of 119 * <code>ecsTarget</code>. </p> 120 */ WithTargetId(const Aws::String & value)121 inline ECSTarget& WithTargetId(const Aws::String& value) { SetTargetId(value); return *this;} 122 123 /** 124 * <p> The unique ID of a deployment target that has a type of 125 * <code>ecsTarget</code>. </p> 126 */ WithTargetId(Aws::String && value)127 inline ECSTarget& WithTargetId(Aws::String&& value) { SetTargetId(std::move(value)); return *this;} 128 129 /** 130 * <p> The unique ID of a deployment target that has a type of 131 * <code>ecsTarget</code>. </p> 132 */ WithTargetId(const char * value)133 inline ECSTarget& WithTargetId(const char* value) { SetTargetId(value); return *this;} 134 135 136 /** 137 * <p> The Amazon Resource Name (ARN) of the target. </p> 138 */ GetTargetArn()139 inline const Aws::String& GetTargetArn() const{ return m_targetArn; } 140 141 /** 142 * <p> The Amazon Resource Name (ARN) of the target. </p> 143 */ TargetArnHasBeenSet()144 inline bool TargetArnHasBeenSet() const { return m_targetArnHasBeenSet; } 145 146 /** 147 * <p> The Amazon Resource Name (ARN) of the target. </p> 148 */ SetTargetArn(const Aws::String & value)149 inline void SetTargetArn(const Aws::String& value) { m_targetArnHasBeenSet = true; m_targetArn = value; } 150 151 /** 152 * <p> The Amazon Resource Name (ARN) of the target. </p> 153 */ SetTargetArn(Aws::String && value)154 inline void SetTargetArn(Aws::String&& value) { m_targetArnHasBeenSet = true; m_targetArn = std::move(value); } 155 156 /** 157 * <p> The Amazon Resource Name (ARN) of the target. </p> 158 */ SetTargetArn(const char * value)159 inline void SetTargetArn(const char* value) { m_targetArnHasBeenSet = true; m_targetArn.assign(value); } 160 161 /** 162 * <p> The Amazon Resource Name (ARN) of the target. </p> 163 */ WithTargetArn(const Aws::String & value)164 inline ECSTarget& WithTargetArn(const Aws::String& value) { SetTargetArn(value); return *this;} 165 166 /** 167 * <p> The Amazon Resource Name (ARN) of the target. </p> 168 */ WithTargetArn(Aws::String && value)169 inline ECSTarget& WithTargetArn(Aws::String&& value) { SetTargetArn(std::move(value)); return *this;} 170 171 /** 172 * <p> The Amazon Resource Name (ARN) of the target. </p> 173 */ WithTargetArn(const char * value)174 inline ECSTarget& WithTargetArn(const char* value) { SetTargetArn(value); return *this;} 175 176 177 /** 178 * <p> The date and time when the target Amazon ECS application was updated by a 179 * deployment. </p> 180 */ GetLastUpdatedAt()181 inline const Aws::Utils::DateTime& GetLastUpdatedAt() const{ return m_lastUpdatedAt; } 182 183 /** 184 * <p> The date and time when the target Amazon ECS application was updated by a 185 * deployment. </p> 186 */ LastUpdatedAtHasBeenSet()187 inline bool LastUpdatedAtHasBeenSet() const { return m_lastUpdatedAtHasBeenSet; } 188 189 /** 190 * <p> The date and time when the target Amazon ECS application was updated by a 191 * deployment. </p> 192 */ SetLastUpdatedAt(const Aws::Utils::DateTime & value)193 inline void SetLastUpdatedAt(const Aws::Utils::DateTime& value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = value; } 194 195 /** 196 * <p> The date and time when the target Amazon ECS application was updated by a 197 * deployment. </p> 198 */ SetLastUpdatedAt(Aws::Utils::DateTime && value)199 inline void SetLastUpdatedAt(Aws::Utils::DateTime&& value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = std::move(value); } 200 201 /** 202 * <p> The date and time when the target Amazon ECS application was updated by a 203 * deployment. </p> 204 */ WithLastUpdatedAt(const Aws::Utils::DateTime & value)205 inline ECSTarget& WithLastUpdatedAt(const Aws::Utils::DateTime& value) { SetLastUpdatedAt(value); return *this;} 206 207 /** 208 * <p> The date and time when the target Amazon ECS application was updated by a 209 * deployment. </p> 210 */ WithLastUpdatedAt(Aws::Utils::DateTime && value)211 inline ECSTarget& WithLastUpdatedAt(Aws::Utils::DateTime&& value) { SetLastUpdatedAt(std::move(value)); return *this;} 212 213 214 /** 215 * <p> The lifecycle events of the deployment to this target Amazon ECS 216 * application. </p> 217 */ GetLifecycleEvents()218 inline const Aws::Vector<LifecycleEvent>& GetLifecycleEvents() const{ return m_lifecycleEvents; } 219 220 /** 221 * <p> The lifecycle events of the deployment to this target Amazon ECS 222 * application. </p> 223 */ LifecycleEventsHasBeenSet()224 inline bool LifecycleEventsHasBeenSet() const { return m_lifecycleEventsHasBeenSet; } 225 226 /** 227 * <p> The lifecycle events of the deployment to this target Amazon ECS 228 * application. </p> 229 */ SetLifecycleEvents(const Aws::Vector<LifecycleEvent> & value)230 inline void SetLifecycleEvents(const Aws::Vector<LifecycleEvent>& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents = value; } 231 232 /** 233 * <p> The lifecycle events of the deployment to this target Amazon ECS 234 * application. </p> 235 */ SetLifecycleEvents(Aws::Vector<LifecycleEvent> && value)236 inline void SetLifecycleEvents(Aws::Vector<LifecycleEvent>&& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents = std::move(value); } 237 238 /** 239 * <p> The lifecycle events of the deployment to this target Amazon ECS 240 * application. </p> 241 */ WithLifecycleEvents(const Aws::Vector<LifecycleEvent> & value)242 inline ECSTarget& WithLifecycleEvents(const Aws::Vector<LifecycleEvent>& value) { SetLifecycleEvents(value); return *this;} 243 244 /** 245 * <p> The lifecycle events of the deployment to this target Amazon ECS 246 * application. </p> 247 */ WithLifecycleEvents(Aws::Vector<LifecycleEvent> && value)248 inline ECSTarget& WithLifecycleEvents(Aws::Vector<LifecycleEvent>&& value) { SetLifecycleEvents(std::move(value)); return *this;} 249 250 /** 251 * <p> The lifecycle events of the deployment to this target Amazon ECS 252 * application. </p> 253 */ AddLifecycleEvents(const LifecycleEvent & value)254 inline ECSTarget& AddLifecycleEvents(const LifecycleEvent& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents.push_back(value); return *this; } 255 256 /** 257 * <p> The lifecycle events of the deployment to this target Amazon ECS 258 * application. </p> 259 */ AddLifecycleEvents(LifecycleEvent && value)260 inline ECSTarget& AddLifecycleEvents(LifecycleEvent&& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents.push_back(std::move(value)); return *this; } 261 262 263 /** 264 * <p> The status an Amazon ECS deployment's target ECS application. </p> 265 */ GetStatus()266 inline const TargetStatus& GetStatus() const{ return m_status; } 267 268 /** 269 * <p> The status an Amazon ECS deployment's target ECS application. </p> 270 */ StatusHasBeenSet()271 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 272 273 /** 274 * <p> The status an Amazon ECS deployment's target ECS application. </p> 275 */ SetStatus(const TargetStatus & value)276 inline void SetStatus(const TargetStatus& value) { m_statusHasBeenSet = true; m_status = value; } 277 278 /** 279 * <p> The status an Amazon ECS deployment's target ECS application. </p> 280 */ SetStatus(TargetStatus && value)281 inline void SetStatus(TargetStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 282 283 /** 284 * <p> The status an Amazon ECS deployment's target ECS application. </p> 285 */ WithStatus(const TargetStatus & value)286 inline ECSTarget& WithStatus(const TargetStatus& value) { SetStatus(value); return *this;} 287 288 /** 289 * <p> The status an Amazon ECS deployment's target ECS application. </p> 290 */ WithStatus(TargetStatus && value)291 inline ECSTarget& WithStatus(TargetStatus&& value) { SetStatus(std::move(value)); return *this;} 292 293 294 /** 295 * <p> The <code>ECSTaskSet</code> objects associated with the ECS target. </p> 296 */ GetTaskSetsInfo()297 inline const Aws::Vector<ECSTaskSet>& GetTaskSetsInfo() const{ return m_taskSetsInfo; } 298 299 /** 300 * <p> The <code>ECSTaskSet</code> objects associated with the ECS target. </p> 301 */ TaskSetsInfoHasBeenSet()302 inline bool TaskSetsInfoHasBeenSet() const { return m_taskSetsInfoHasBeenSet; } 303 304 /** 305 * <p> The <code>ECSTaskSet</code> objects associated with the ECS target. </p> 306 */ SetTaskSetsInfo(const Aws::Vector<ECSTaskSet> & value)307 inline void SetTaskSetsInfo(const Aws::Vector<ECSTaskSet>& value) { m_taskSetsInfoHasBeenSet = true; m_taskSetsInfo = value; } 308 309 /** 310 * <p> The <code>ECSTaskSet</code> objects associated with the ECS target. </p> 311 */ SetTaskSetsInfo(Aws::Vector<ECSTaskSet> && value)312 inline void SetTaskSetsInfo(Aws::Vector<ECSTaskSet>&& value) { m_taskSetsInfoHasBeenSet = true; m_taskSetsInfo = std::move(value); } 313 314 /** 315 * <p> The <code>ECSTaskSet</code> objects associated with the ECS target. </p> 316 */ WithTaskSetsInfo(const Aws::Vector<ECSTaskSet> & value)317 inline ECSTarget& WithTaskSetsInfo(const Aws::Vector<ECSTaskSet>& value) { SetTaskSetsInfo(value); return *this;} 318 319 /** 320 * <p> The <code>ECSTaskSet</code> objects associated with the ECS target. </p> 321 */ WithTaskSetsInfo(Aws::Vector<ECSTaskSet> && value)322 inline ECSTarget& WithTaskSetsInfo(Aws::Vector<ECSTaskSet>&& value) { SetTaskSetsInfo(std::move(value)); return *this;} 323 324 /** 325 * <p> The <code>ECSTaskSet</code> objects associated with the ECS target. </p> 326 */ AddTaskSetsInfo(const ECSTaskSet & value)327 inline ECSTarget& AddTaskSetsInfo(const ECSTaskSet& value) { m_taskSetsInfoHasBeenSet = true; m_taskSetsInfo.push_back(value); return *this; } 328 329 /** 330 * <p> The <code>ECSTaskSet</code> objects associated with the ECS target. </p> 331 */ AddTaskSetsInfo(ECSTaskSet && value)332 inline ECSTarget& AddTaskSetsInfo(ECSTaskSet&& value) { m_taskSetsInfoHasBeenSet = true; m_taskSetsInfo.push_back(std::move(value)); return *this; } 333 334 private: 335 336 Aws::String m_deploymentId; 337 bool m_deploymentIdHasBeenSet; 338 339 Aws::String m_targetId; 340 bool m_targetIdHasBeenSet; 341 342 Aws::String m_targetArn; 343 bool m_targetArnHasBeenSet; 344 345 Aws::Utils::DateTime m_lastUpdatedAt; 346 bool m_lastUpdatedAtHasBeenSet; 347 348 Aws::Vector<LifecycleEvent> m_lifecycleEvents; 349 bool m_lifecycleEventsHasBeenSet; 350 351 TargetStatus m_status; 352 bool m_statusHasBeenSet; 353 354 Aws::Vector<ECSTaskSet> m_taskSetsInfo; 355 bool m_taskSetsInfoHasBeenSet; 356 }; 357 358 } // namespace Model 359 } // namespace CodeDeploy 360 } // namespace Aws 361