/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.codedeploy.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Information about a set of Amazon ECS tasks in an CodeDeploy deployment. An Amazon ECS task set includes details such * as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic. An * CodeDeploy application that uses the Amazon ECS compute platform deploys a containerized application in an Amazon ECS * service as a task set. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ECSTaskSet implements Serializable, Cloneable, StructuredPojo { /** *

* A unique ID of an ECSTaskSet. *

*/ private String identifer; /** *

* The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy * instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. After * the updated task set is created, CodeDeploy shifts traffic to the new task set. *

*/ private Long desiredCount; /** *

* The number of tasks in the task set that are in the PENDING status during an Amazon ECS deployment. * A task in the PENDING state is preparing to enter the RUNNING state. A task set enters * the PENDING status when it launches for the first time, or when it is restarted after being in the * STOPPED state. *

*/ private Long pendingCount; /** *

* The number of tasks in the task set that are in the RUNNING status during an Amazon ECS deployment. * A task in the RUNNING state is running and ready for use. *

*/ private Long runningCount; /** *

* The status of the task set. There are three valid task set statuses: *

* */ private String status; /** *

* The percentage of traffic served by this task set. *

*/ private Double trafficWeight; /** *

* The target group associated with the task set. The target group is used by CodeDeploy to manage traffic to a task * set. *

*/ private TargetGroupInfo targetGroup; /** *

* A label that identifies whether the ECS task set is an original target (BLUE) or a replacement * target (GREEN). *

*/ private String taskSetLabel; /** *

* A unique ID of an ECSTaskSet. *

* * @param identifer * A unique ID of an ECSTaskSet. */ public void setIdentifer(String identifer) { this.identifer = identifer; } /** *

* A unique ID of an ECSTaskSet. *

* * @return A unique ID of an ECSTaskSet. */ public String getIdentifer() { return this.identifer; } /** *

* A unique ID of an ECSTaskSet. *

* * @param identifer * A unique ID of an ECSTaskSet. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSTaskSet withIdentifer(String identifer) { setIdentifer(identifer); return this; } /** *

* The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy * instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. After * the updated task set is created, CodeDeploy shifts traffic to the new task set. *

* * @param desiredCount * The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy * instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. * After the updated task set is created, CodeDeploy shifts traffic to the new task set. */ public void setDesiredCount(Long desiredCount) { this.desiredCount = desiredCount; } /** *

* The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy * instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. After * the updated task set is created, CodeDeploy shifts traffic to the new task set. *

* * @return The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy * instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. * After the updated task set is created, CodeDeploy shifts traffic to the new task set. */ public Long getDesiredCount() { return this.desiredCount; } /** *

* The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy * instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. After * the updated task set is created, CodeDeploy shifts traffic to the new task set. *

* * @param desiredCount * The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy * instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. * After the updated task set is created, CodeDeploy shifts traffic to the new task set. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSTaskSet withDesiredCount(Long desiredCount) { setDesiredCount(desiredCount); return this; } /** *

* The number of tasks in the task set that are in the PENDING status during an Amazon ECS deployment. * A task in the PENDING state is preparing to enter the RUNNING state. A task set enters * the PENDING status when it launches for the first time, or when it is restarted after being in the * STOPPED state. *

* * @param pendingCount * The number of tasks in the task set that are in the PENDING status during an Amazon ECS * deployment. A task in the PENDING state is preparing to enter the RUNNING state. * A task set enters the PENDING status when it launches for the first time, or when it is * restarted after being in the STOPPED state. */ public void setPendingCount(Long pendingCount) { this.pendingCount = pendingCount; } /** *

* The number of tasks in the task set that are in the PENDING status during an Amazon ECS deployment. * A task in the PENDING state is preparing to enter the RUNNING state. A task set enters * the PENDING status when it launches for the first time, or when it is restarted after being in the * STOPPED state. *

* * @return The number of tasks in the task set that are in the PENDING status during an Amazon ECS * deployment. A task in the PENDING state is preparing to enter the RUNNING * state. A task set enters the PENDING status when it launches for the first time, or when it * is restarted after being in the STOPPED state. */ public Long getPendingCount() { return this.pendingCount; } /** *

* The number of tasks in the task set that are in the PENDING status during an Amazon ECS deployment. * A task in the PENDING state is preparing to enter the RUNNING state. A task set enters * the PENDING status when it launches for the first time, or when it is restarted after being in the * STOPPED state. *

* * @param pendingCount * The number of tasks in the task set that are in the PENDING status during an Amazon ECS * deployment. A task in the PENDING state is preparing to enter the RUNNING state. * A task set enters the PENDING status when it launches for the first time, or when it is * restarted after being in the STOPPED state. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSTaskSet withPendingCount(Long pendingCount) { setPendingCount(pendingCount); return this; } /** *

* The number of tasks in the task set that are in the RUNNING status during an Amazon ECS deployment. * A task in the RUNNING state is running and ready for use. *

* * @param runningCount * The number of tasks in the task set that are in the RUNNING status during an Amazon ECS * deployment. A task in the RUNNING state is running and ready for use. */ public void setRunningCount(Long runningCount) { this.runningCount = runningCount; } /** *

* The number of tasks in the task set that are in the RUNNING status during an Amazon ECS deployment. * A task in the RUNNING state is running and ready for use. *

* * @return The number of tasks in the task set that are in the RUNNING status during an Amazon ECS * deployment. A task in the RUNNING state is running and ready for use. */ public Long getRunningCount() { return this.runningCount; } /** *

* The number of tasks in the task set that are in the RUNNING status during an Amazon ECS deployment. * A task in the RUNNING state is running and ready for use. *

* * @param runningCount * The number of tasks in the task set that are in the RUNNING status during an Amazon ECS * deployment. A task in the RUNNING state is running and ready for use. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSTaskSet withRunningCount(Long runningCount) { setRunningCount(runningCount); return this; } /** *

* The status of the task set. There are three valid task set statuses: *

* * * @param status * The status of the task set. There are three valid task set statuses:

*