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.codedeploy.model;
  

Information about a deployment.

  
  public class DeploymentInfo implements SerializableCloneable {

    

The application name.

  
      private String applicationName;
    

The deployment group name.

  
      private String deploymentGroupName;
    

The deployment configuration name.

  
      private String deploymentConfigName;
    

The deployment ID.

  
      private String deploymentId;
    

Information about the location of application artifacts that are stored and the service to retrieve them from.

  
      private RevisionLocation revision;
    

The current state of the deployment as a whole.

  
      private String status;
    

Information about any error associated with this deployment.

  
      private ErrorInformation errorInformation;
    

A timestamp indicating when the deployment was created.

  
      private java.util.Date createTime;
    

A timestamp indicating when the deployment began deploying to the deployment group.

Note that in some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of various back-end servers that participate in the overall deployment process.

  
      private java.util.Date startTime;
    

A timestamp indicating when the deployment was completed.

  
      private java.util.Date completeTime;
    

A summary of the deployment status of the instances in the deployment.

  
     private DeploymentOverview deploymentOverview;
    

A comment about the deployment.

 
     private String description;
    

How the deployment was created:

  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.
 
     private String creator;
    

If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

 
     private Boolean ignoreApplicationStopFailures;

    

The application name.

Parameters:
applicationName The application name.
 
     public void setApplicationName(String applicationName) {
         this. = applicationName;
     }

    

The application name.

Returns:
The application name.
 
     public String getApplicationName() {
         return this.;
     }

    

The application name.

Parameters:
applicationName The application name.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withApplicationName(String applicationName) {
         setApplicationName(applicationName);
         return this;
     }

    

The deployment group name.

Parameters:
deploymentGroupName The deployment group name.
 
     public void setDeploymentGroupName(String deploymentGroupName) {
         this. = deploymentGroupName;
     }

    

The deployment group name.

Returns:
The deployment group name.
 
     public String getDeploymentGroupName() {
         return this.;
     }

    

The deployment group name.

Parameters:
deploymentGroupName The deployment group name.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withDeploymentGroupName(String deploymentGroupName) {
         setDeploymentGroupName(deploymentGroupName);
         return this;
     }

    

The deployment configuration name.

Parameters:
deploymentConfigName The deployment configuration name.
 
     public void setDeploymentConfigName(String deploymentConfigName) {
         this. = deploymentConfigName;
     }

    

The deployment configuration name.

Returns:
The deployment configuration name.
 
     public String getDeploymentConfigName() {
         return this.;
     }

    

The deployment configuration name.

Parameters:
deploymentConfigName The deployment configuration name.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withDeploymentConfigName(String deploymentConfigName) {
         setDeploymentConfigName(deploymentConfigName);
         return this;
     }

    

The deployment ID.

Parameters:
deploymentId The deployment ID.
 
     public void setDeploymentId(String deploymentId) {
         this. = deploymentId;
     }

    

The deployment ID.

Returns:
The deployment ID.
 
     public String getDeploymentId() {
         return this.;
     }

    

The deployment ID.

Parameters:
deploymentId The deployment ID.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withDeploymentId(String deploymentId) {
         setDeploymentId(deploymentId);
         return this;
     }

    

Information about the location of application artifacts that are stored and the service to retrieve them from.

Parameters:
revision Information about the location of application artifacts that are stored and the service to retrieve them from.
 
     public void setRevision(RevisionLocation revision) {
         this. = revision;
     }

    

Information about the location of application artifacts that are stored and the service to retrieve them from.

Returns:
Information about the location of application artifacts that are stored and the service to retrieve them from.
 
     public RevisionLocation getRevision() {
         return this.;
     }

    

Information about the location of application artifacts that are stored and the service to retrieve them from.

Parameters:
revision Information about the location of application artifacts that are stored and the service to retrieve them from.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withRevision(RevisionLocation revision) {
         setRevision(revision);
         return this;
     }

    

The current state of the deployment as a whole.

Parameters:
status The current state of the deployment as a whole.
See also:
DeploymentStatus
 
     public void setStatus(String status) {
         this. = status;
     }

    

The current state of the deployment as a whole.

Returns:
The current state of the deployment as a whole.
See also:
DeploymentStatus
 
     public String getStatus() {
         return this.;
     }

    

The current state of the deployment as a whole.

Parameters:
status The current state of the deployment as a whole.
Returns:
Returns a reference to this object so that method calls can be chained together.
See also:
DeploymentStatus
 
     public DeploymentInfo withStatus(String status) {
         setStatus(status);
         return this;
     }

    

The current state of the deployment as a whole.

Parameters:
status The current state of the deployment as a whole.
Returns:
Returns a reference to this object so that method calls can be chained together.
See also:
DeploymentStatus
 
     public void setStatus(DeploymentStatus status) {
         this. = status.toString();
     }

    

The current state of the deployment as a whole.

Parameters:
status The current state of the deployment as a whole.
Returns:
Returns a reference to this object so that method calls can be chained together.
See also:
DeploymentStatus
 
     public DeploymentInfo withStatus(DeploymentStatus status) {
         setStatus(status);
         return this;
     }

    

Information about any error associated with this deployment.

Parameters:
errorInformation Information about any error associated with this deployment.
 
     public void setErrorInformation(ErrorInformation errorInformation) {
         this. = errorInformation;
     }

    

Information about any error associated with this deployment.

Returns:
Information about any error associated with this deployment.
 
         return this.;
     }

    

Information about any error associated with this deployment.

Parameters:
errorInformation Information about any error associated with this deployment.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withErrorInformation(ErrorInformation errorInformation) {
         setErrorInformation(errorInformation);
         return this;
     }

    

A timestamp indicating when the deployment was created.

Parameters:
createTime A timestamp indicating when the deployment was created.
 
     public void setCreateTime(java.util.Date createTime) {
         this. = createTime;
     }

    

A timestamp indicating when the deployment was created.

Returns:
A timestamp indicating when the deployment was created.
 
     public java.util.Date getCreateTime() {
         return this.;
     }

    

A timestamp indicating when the deployment was created.

Parameters:
createTime A timestamp indicating when the deployment was created.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withCreateTime(java.util.Date createTime) {
         setCreateTime(createTime);
         return this;
     }

    

A timestamp indicating when the deployment began deploying to the deployment group.

Note that in some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of various back-end servers that participate in the overall deployment process.

Parameters:
startTime A timestamp indicating when the deployment began deploying to the deployment group.

Note that in some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of various back-end servers that participate in the overall deployment process.

 
     public void setStartTime(java.util.Date startTime) {
         this. = startTime;
     }

    

A timestamp indicating when the deployment began deploying to the deployment group.

Note that in some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of various back-end servers that participate in the overall deployment process.

Returns:
A timestamp indicating when the deployment began deploying to the deployment group.

Note that in some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of various back-end servers that participate in the overall deployment process.

 
     public java.util.Date getStartTime() {
         return this.;
     }

    

A timestamp indicating when the deployment began deploying to the deployment group.

Note that in some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of various back-end servers that participate in the overall deployment process.

Parameters:
startTime A timestamp indicating when the deployment began deploying to the deployment group.

Note that in some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of various back-end servers that participate in the overall deployment process.

Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withStartTime(java.util.Date startTime) {
         setStartTime(startTime);
         return this;
     }

    

A timestamp indicating when the deployment was completed.

Parameters:
completeTime A timestamp indicating when the deployment was completed.
 
     public void setCompleteTime(java.util.Date completeTime) {
         this. = completeTime;
     }

    

A timestamp indicating when the deployment was completed.

Returns:
A timestamp indicating when the deployment was completed.
 
     public java.util.Date getCompleteTime() {
         return this.;
     }

    

A timestamp indicating when the deployment was completed.

Parameters:
completeTime A timestamp indicating when the deployment was completed.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withCompleteTime(java.util.Date completeTime) {
         setCompleteTime(completeTime);
         return this;
     }

    

A summary of the deployment status of the instances in the deployment.

Parameters:
deploymentOverview A summary of the deployment status of the instances in the deployment.
 
     public void setDeploymentOverview(DeploymentOverview deploymentOverview) {
         this. = deploymentOverview;
     }

    

A summary of the deployment status of the instances in the deployment.

Returns:
A summary of the deployment status of the instances in the deployment.
 
         return this.;
     }

    

A summary of the deployment status of the instances in the deployment.

Parameters:
deploymentOverview A summary of the deployment status of the instances in the deployment.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
             DeploymentOverview deploymentOverview) {
         setDeploymentOverview(deploymentOverview);
         return this;
     }

    

A comment about the deployment.

Parameters:
description A comment about the deployment.
 
     public void setDescription(String description) {
         this. = description;
     }

    

A comment about the deployment.

Returns:
A comment about the deployment.
 
     public String getDescription() {
         return this.;
     }

    

A comment about the deployment.

Parameters:
description A comment about the deployment.
Returns:
Returns a reference to this object so that method calls can be chained together.
 
     public DeploymentInfo withDescription(String description) {
         setDescription(description);
         return this;
     }

    

How the deployment was created:

  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.

Parameters:
creator How the deployment was created:
  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.
See also:
DeploymentCreator
 
     public void setCreator(String creator) {
         this. = creator;
     }

    

How the deployment was created:

  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.

Returns:
How the deployment was created:
  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.
See also:
DeploymentCreator
 
     public String getCreator() {
         return this.;
     }

    

How the deployment was created:

  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.

Parameters:
creator How the deployment was created:
  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.
Returns:
Returns a reference to this object so that method calls can be chained together.
See also:
DeploymentCreator
 
     public DeploymentInfo withCreator(String creator) {
         setCreator(creator);
         return this;
     }

    

How the deployment was created:

  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.

Parameters:
creator How the deployment was created:
  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.
Returns:
Returns a reference to this object so that method calls can be chained together.
See also:
DeploymentCreator
 
     public void setCreator(DeploymentCreator creator) {
         this. = creator.toString();
     }

    

How the deployment was created:

  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.

Parameters:
creator How the deployment was created:
  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.
Returns:
Returns a reference to this object so that method calls can be chained together.
See also:
DeploymentCreator
 
     public DeploymentInfo withCreator(DeploymentCreator creator) {
         setCreator(creator);
         return this;
     }

    

If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

Parameters:
ignoreApplicationStopFailures If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

 
     public void setIgnoreApplicationStopFailures(
             Boolean ignoreApplicationStopFailures) {
         this. = ignoreApplicationStopFailures;
     }

    

If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

Returns:
If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

 
         return this.;
     }

    

If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

Parameters:
ignoreApplicationStopFailures If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

Returns:
Returns a reference to this object so that method calls can be chained together.
 
             Boolean ignoreApplicationStopFailures) {
         setIgnoreApplicationStopFailures(ignoreApplicationStopFailures);
         return this;
     }

    

If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

Returns:
If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

 
         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 (getApplicationName() != null)
             sb.append("ApplicationName: " + getApplicationName() + ",");
         if (getDeploymentGroupName() != null)
             sb.append("DeploymentGroupName: " + getDeploymentGroupName() + ",");
         if (getDeploymentConfigName() != null)
             sb.append("DeploymentConfigName: " + getDeploymentConfigName()
                     + ",");
         if (getDeploymentId() != null)
             sb.append("DeploymentId: " + getDeploymentId() + ",");
         if (getRevision() != null)
             sb.append("Revision: " + getRevision() + ",");
         if (getStatus() != null)
             sb.append("Status: " + getStatus() + ",");
         if (getErrorInformation() != null)
             sb.append("ErrorInformation: " + getErrorInformation() + ",");
         if (getCreateTime() != null)
             sb.append("CreateTime: " + getCreateTime() + ",");
         if (getStartTime() != null)
             sb.append("StartTime: " + getStartTime() + ",");
         if (getCompleteTime() != null)
             sb.append("CompleteTime: " + getCompleteTime() + ",");
         if (getDeploymentOverview() != null)
             sb.append("DeploymentOverview: " + getDeploymentOverview() + ",");
         if (getDescription() != null)
             sb.append("Description: " + getDescription() + ",");
         if (getCreator() != null)
             sb.append("Creator: " + getCreator() + ",");
         if (getIgnoreApplicationStopFailures() != null)
             sb.append("IgnoreApplicationStopFailures: "
                     + getIgnoreApplicationStopFailures());
         sb.append("}");
         return sb.toString();
     }
 
     @Override
     public boolean equals(Object obj) {
         if (this == obj)
             return true;
         if (obj == null)
             return false;
 
         if (obj instanceof DeploymentInfo == false)
             return false;
         DeploymentInfo other = (DeploymentInfoobj;
         if (other.getApplicationName() == null
                 ^ this.getApplicationName() == null)
             return false;
         if (other.getApplicationName() != null
                 && other.getApplicationName().equals(this.getApplicationName()) == false)
             return false;
         if (other.getDeploymentGroupName() == null
                 ^ this.getDeploymentGroupName() == null)
             return false;
         if (other.getDeploymentGroupName() != null
                 && other.getDeploymentGroupName().equals(
                         this.getDeploymentGroupName()) == false)
             return false;
         if (other.getDeploymentConfigName() == null
                 ^ this.getDeploymentConfigName() == null)
             return false;
         if (other.getDeploymentConfigName() != null
                 && other.getDeploymentConfigName().equals(
                         this.getDeploymentConfigName()) == false)
             return false;
         if (other.getDeploymentId() == null ^ this.getDeploymentId() == null)
             return false;
         if (other.getDeploymentId() != null
                 && other.getDeploymentId().equals(this.getDeploymentId()) == false)
             return false;
         if (other.getRevision() == null ^ this.getRevision() == null)
             return false;
         if (other.getRevision() != null
                 && other.getRevision().equals(this.getRevision()) == false)
             return false;
         if (other.getStatus() == null ^ this.getStatus() == null)
             return false;
         if (other.getStatus() != null
                 && other.getStatus().equals(this.getStatus()) == false)
             return false;
         if (other.getErrorInformation() == null
                 ^ this.getErrorInformation() == null)
             return false;
         if (other.getErrorInformation() != null
                 && other.getErrorInformation().equals(
                         this.getErrorInformation()) == false)
             return false;
        if (other.getCreateTime() == null ^ this.getCreateTime() == null)
            return false;
        if (other.getCreateTime() != null
                && other.getCreateTime().equals(this.getCreateTime()) == false)
            return false;
        if (other.getStartTime() == null ^ this.getStartTime() == null)
            return false;
        if (other.getStartTime() != null
                && other.getStartTime().equals(this.getStartTime()) == false)
            return false;
        if (other.getCompleteTime() == null ^ this.getCompleteTime() == null)
            return false;
        if (other.getCompleteTime() != null
                && other.getCompleteTime().equals(this.getCompleteTime()) == false)
            return false;
        if (other.getDeploymentOverview() == null
                ^ this.getDeploymentOverview() == null)
            return false;
        if (other.getDeploymentOverview() != null
                && other.getDeploymentOverview().equals(
                        this.getDeploymentOverview()) == false)
            return false;
        if (other.getDescription() == null ^ this.getDescription() == null)
            return false;
        if (other.getDescription() != null
                && other.getDescription().equals(this.getDescription()) == false)
            return false;
        if (other.getCreator() == null ^ this.getCreator() == null)
            return false;
        if (other.getCreator() != null
                && other.getCreator().equals(this.getCreator()) == false)
            return false;
        if (other.getIgnoreApplicationStopFailures() == null
                ^ this.getIgnoreApplicationStopFailures() == null)
            return false;
        if (other.getIgnoreApplicationStopFailures() != null
                && other.getIgnoreApplicationStopFailures().equals(
                        this.getIgnoreApplicationStopFailures()) == false)
            return false;
        return true;
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        hashCode = prime
                * hashCode
                + ((getApplicationName() == null) ? 0 : getApplicationName()
                        .hashCode());
        hashCode = prime
                * hashCode
                + ((getDeploymentGroupName() == null) ? 0
                        : getDeploymentGroupName().hashCode());
        hashCode = prime
                * hashCode
                + ((getDeploymentConfigName() == null) ? 0
                        : getDeploymentConfigName().hashCode());
        hashCode = prime
                * hashCode
                + ((getDeploymentId() == null) ? 0 : getDeploymentId()
                        .hashCode());
        hashCode = prime * hashCode
                + ((getRevision() == null) ? 0 : getRevision().hashCode());
        hashCode = prime * hashCode
                + ((getStatus() == null) ? 0 : getStatus().hashCode());
        hashCode = prime
                * hashCode
                + ((getErrorInformation() == null) ? 0 : getErrorInformation()
                        .hashCode());
        hashCode = prime * hashCode
                + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        hashCode = prime * hashCode
                + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        hashCode = prime
                * hashCode
                + ((getCompleteTime() == null) ? 0 : getCompleteTime()
                        .hashCode());
        hashCode = prime
                * hashCode
                + ((getDeploymentOverview() == null) ? 0
                        : getDeploymentOverview().hashCode());
        hashCode = prime
                * hashCode
                + ((getDescription() == null) ? 0 : getDescription().hashCode());
        hashCode = prime * hashCode
                + ((getCreator() == null) ? 0 : getCreator().hashCode());
        hashCode = prime
                * hashCode
                + ((getIgnoreApplicationStopFailures() == null) ? 0
                        : getIgnoreApplicationStopFailures().hashCode());
        return hashCode;
    }
    @Override
    public DeploymentInfo clone() {
        try {
            return (DeploymentInfosuper.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