Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.ecs.model;
 
 
 public class Deployment implements SerializableCloneable {

    
The ID of the deployment.
 
     private String id;

    
The status of the deployment. Valid values are PRIMARY (for the most recent deployment), ACTIVE (for previous deployments that still have tasks running, but are being replaced with the PRIMARY deployment), and INACTIVE (for deployments that have been completely replaced).
 
     private String status;

    
The most recent task definition that was specified for the service to use.
 
     private String taskDefinition;

    
The most recent desired count of tasks that was specified for the service to deploy and/or maintain.
 
     private Integer desiredCount;

    
The number of tasks in the deployment that are in the PENDING status.
 
     private Integer pendingCount;

    
The number of tasks in the deployment that are in the RUNNING status.
 
     private Integer runningCount;

    
The Unix time in seconds and milliseconds when the service was created.
 
     private java.util.Date createdAt;

    
The Unix time in seconds and milliseconds when the service was last updated.
 
     private java.util.Date updatedAt;

    
The ID of the deployment.

Returns:
The ID of the deployment.
 
     public String getId() {
         return ;
     }
    
    
The ID of the deployment.

Parameters:
id The ID of the deployment.
 
     public void setId(String id) {
         this. = id;
     }
    
    
The ID of the deployment.

Returns a reference to this object so that method calls can be chained together.

Parameters:
id The ID of the deployment.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Deployment withId(String id) {
        this. = id;
        return this;
    }

    
The status of the deployment. Valid values are PRIMARY (for the most recent deployment), ACTIVE (for previous deployments that still have tasks running, but are being replaced with the PRIMARY deployment), and INACTIVE (for deployments that have been completely replaced).

Returns:
The status of the deployment. Valid values are PRIMARY (for the most recent deployment), ACTIVE (for previous deployments that still have tasks running, but are being replaced with the PRIMARY deployment), and INACTIVE (for deployments that have been completely replaced).
    public String getStatus() {
        return ;
    }
    
    
The status of the deployment. Valid values are PRIMARY (for the most recent deployment), ACTIVE (for previous deployments that still have tasks running, but are being replaced with the PRIMARY deployment), and INACTIVE (for deployments that have been completely replaced).

Parameters:
status The status of the deployment. Valid values are PRIMARY (for the most recent deployment), ACTIVE (for previous deployments that still have tasks running, but are being replaced with the PRIMARY deployment), and INACTIVE (for deployments that have been completely replaced).
    public void setStatus(String status) {
        this. = status;
    }
    
    
The status of the deployment. Valid values are PRIMARY (for the most recent deployment), ACTIVE (for previous deployments that still have tasks running, but are being replaced with the PRIMARY deployment), and INACTIVE (for deployments that have been completely replaced).

Returns a reference to this object so that method calls can be chained together.

Parameters:
status The status of the deployment. Valid values are PRIMARY (for the most recent deployment), ACTIVE (for previous deployments that still have tasks running, but are being replaced with the PRIMARY deployment), and INACTIVE (for deployments that have been completely replaced).
Returns:
A reference to this updated object so that method calls can be chained together.
    public Deployment withStatus(String status) {
        this. = status;
        return this;
    }

    
The most recent task definition that was specified for the service to use.

Returns:
The most recent task definition that was specified for the service to use.
    public String getTaskDefinition() {
        return ;
    }
    
    
The most recent task definition that was specified for the service to use.

Parameters:
taskDefinition The most recent task definition that was specified for the service to use.
    public void setTaskDefinition(String taskDefinition) {
        this. = taskDefinition;
    }
    
    
The most recent task definition that was specified for the service to use.

Returns a reference to this object so that method calls can be chained together.

Parameters:
taskDefinition The most recent task definition that was specified for the service to use.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Deployment withTaskDefinition(String taskDefinition) {
        this. = taskDefinition;
        return this;
    }

    
The most recent desired count of tasks that was specified for the service to deploy and/or maintain.

Returns:
The most recent desired count of tasks that was specified for the service to deploy and/or maintain.
    public Integer getDesiredCount() {
        return ;
    }
    
    
The most recent desired count of tasks that was specified for the service to deploy and/or maintain.

Parameters:
desiredCount The most recent desired count of tasks that was specified for the service to deploy and/or maintain.
    public void setDesiredCount(Integer desiredCount) {
        this. = desiredCount;
    }
    
    
The most recent desired count of tasks that was specified for the service to deploy and/or maintain.

Returns a reference to this object so that method calls can be chained together.

Parameters:
desiredCount The most recent desired count of tasks that was specified for the service to deploy and/or maintain.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Deployment withDesiredCount(Integer desiredCount) {
        this. = desiredCount;
        return this;
    }

    
The number of tasks in the deployment that are in the PENDING status.

Returns:
The number of tasks in the deployment that are in the PENDING status.
    public Integer getPendingCount() {
        return ;
    }
    
    
The number of tasks in the deployment that are in the PENDING status.

Parameters:
pendingCount The number of tasks in the deployment that are in the PENDING status.
    public void setPendingCount(Integer pendingCount) {
        this. = pendingCount;
    }
    
    
The number of tasks in the deployment that are in the PENDING status.

Returns a reference to this object so that method calls can be chained together.

Parameters:
pendingCount The number of tasks in the deployment that are in the PENDING status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Deployment withPendingCount(Integer pendingCount) {
        this. = pendingCount;
        return this;
    }

    
The number of tasks in the deployment that are in the RUNNING status.

Returns:
The number of tasks in the deployment that are in the RUNNING status.
    public Integer getRunningCount() {
        return ;
    }
    
    
The number of tasks in the deployment that are in the RUNNING status.

Parameters:
runningCount The number of tasks in the deployment that are in the RUNNING status.
    public void setRunningCount(Integer runningCount) {
        this. = runningCount;
    }
    
    
The number of tasks in the deployment that are in the RUNNING status.

Returns a reference to this object so that method calls can be chained together.

Parameters:
runningCount The number of tasks in the deployment that are in the RUNNING status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Deployment withRunningCount(Integer runningCount) {
        this. = runningCount;
        return this;
    }

    
The Unix time in seconds and milliseconds when the service was created.

Returns:
The Unix time in seconds and milliseconds when the service was created.
    public java.util.Date getCreatedAt() {
        return ;
    }
    
    
The Unix time in seconds and milliseconds when the service was created.

Parameters:
createdAt The Unix time in seconds and milliseconds when the service was created.
    public void setCreatedAt(java.util.Date createdAt) {
        this. = createdAt;
    }
    
    
The Unix time in seconds and milliseconds when the service was created.

Returns a reference to this object so that method calls can be chained together.

Parameters:
createdAt The Unix time in seconds and milliseconds when the service was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Deployment withCreatedAt(java.util.Date createdAt) {
        this. = createdAt;
        return this;
    }

    
The Unix time in seconds and milliseconds when the service was last updated.

Returns:
The Unix time in seconds and milliseconds when the service was last updated.
    public java.util.Date getUpdatedAt() {
        return ;
    }
    
    
The Unix time in seconds and milliseconds when the service was last updated.

Parameters:
updatedAt The Unix time in seconds and milliseconds when the service was last updated.
    public void setUpdatedAt(java.util.Date updatedAt) {
        this. = updatedAt;
    }
    
    
The Unix time in seconds and milliseconds when the service was last updated.

Returns a reference to this object so that method calls can be chained together.

Parameters:
updatedAt The Unix time in seconds and milliseconds when the service was last updated.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Deployment withUpdatedAt(java.util.Date updatedAt) {
        this. = updatedAt;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getId() != nullsb.append("Id: " + getId() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getTaskDefinition() != nullsb.append("TaskDefinition: " + getTaskDefinition() + ",");
        if (getDesiredCount() != nullsb.append("DesiredCount: " + getDesiredCount() + ",");
        if (getPendingCount() != nullsb.append("PendingCount: " + getPendingCount() + ",");
        if (getRunningCount() != nullsb.append("RunningCount: " + getRunningCount() + ",");
        if (getCreatedAt() != nullsb.append("CreatedAt: " + getCreatedAt() + ",");
        if (getUpdatedAt() != nullsb.append("UpdatedAt: " + getUpdatedAt() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getTaskDefinition() == null) ? 0 : getTaskDefinition().hashCode()); 
        hashCode = prime * hashCode + ((getDesiredCount() == null) ? 0 : getDesiredCount().hashCode()); 
        hashCode = prime * hashCode + ((getPendingCount() == null) ? 0 : getPendingCount().hashCode()); 
        hashCode = prime * hashCode + ((getRunningCount() == null) ? 0 : getRunningCount().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); 
        hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof Deployment == falsereturn false;
        Deployment other = (Deployment)obj;
        
        if (other.getId() == null ^ this.getId() == nullreturn false;
        if (other.getId() != null && other.getId().equals(this.getId()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getTaskDefinition() == null ^ this.getTaskDefinition() == nullreturn false;
        if (other.getTaskDefinition() != null && other.getTaskDefinition().equals(this.getTaskDefinition()) == falsereturn false
        if (other.getDesiredCount() == null ^ this.getDesiredCount() == nullreturn false;
        if (other.getDesiredCount() != null && other.getDesiredCount().equals(this.getDesiredCount()) == falsereturn false
        if (other.getPendingCount() == null ^ this.getPendingCount() == nullreturn false;
        if (other.getPendingCount() != null && other.getPendingCount().equals(this.getPendingCount()) == falsereturn false
        if (other.getRunningCount() == null ^ this.getRunningCount() == nullreturn false;
        if (other.getRunningCount() != null && other.getRunningCount().equals(this.getRunningCount()) == falsereturn false
        if (other.getCreatedAt() == null ^ this.getCreatedAt() == nullreturn false;
        if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == falsereturn false
        if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == nullreturn false;
        if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == falsereturn false
        return true;
    }
    
    @Override
    public Deployment clone() {
        try {
            return (Deploymentsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X