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;
 
 
Container for the parameters to the UpdateDeploymentGroup operation.

Changes information about an existing deployment group.

 
 public class UpdateDeploymentGroupRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The application name corresponding to the deployment group to update.

Constraints:
Length: 1 - 100

 
     private String applicationName;

    
The current name of the existing deployment group.

Constraints:
Length: 1 - 100

 
     private String currentDeploymentGroupName;

    
The new name of the deployment group, if you want to change it.

Constraints:
Length: 1 - 100

 
     private String newDeploymentGroupName;

    
The replacement deployment configuration name to use, if you want to change it.

Constraints:
Length: 1 - 100

 
     private String deploymentConfigName;

    
The replacement set of Amazon EC2 tags to filter on, if you want to change them.
 
The replacement set of on-premises instance tags for filter on, if you want to change them.
 
The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.
 
A replacement service role's ARN, if you want to change it.
 
     private String serviceRoleArn;

    
The application name corresponding to the deployment group to update.

Constraints:
Length: 1 - 100

Returns:
The application name corresponding to the deployment group to update.
 
     public String getApplicationName() {
         return ;
     }
    
    
The application name corresponding to the deployment group to update.

Constraints:
Length: 1 - 100

Parameters:
applicationName The application name corresponding to the deployment group to update.
    public void setApplicationName(String applicationName) {
        this. = applicationName;
    }
    
    
The application name corresponding to the deployment group to update.

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

Constraints:
Length: 1 - 100

Parameters:
applicationName The application name corresponding to the deployment group to update.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateDeploymentGroupRequest withApplicationName(String applicationName) {
        this. = applicationName;
        return this;
    }

    
The current name of the existing deployment group.

Constraints:
Length: 1 - 100

Returns:
The current name of the existing deployment group.
        return ;
    }
    
    
The current name of the existing deployment group.

Constraints:
Length: 1 - 100

Parameters:
currentDeploymentGroupName The current name of the existing deployment group.
    public void setCurrentDeploymentGroupName(String currentDeploymentGroupName) {
        this. = currentDeploymentGroupName;
    }
    
    
The current name of the existing deployment group.

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

Constraints:
Length: 1 - 100

Parameters:
currentDeploymentGroupName The current name of the existing deployment group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateDeploymentGroupRequest withCurrentDeploymentGroupName(String currentDeploymentGroupName) {
        this. = currentDeploymentGroupName;
        return this;
    }

    
The new name of the deployment group, if you want to change it.

Constraints:
Length: 1 - 100

Returns:
The new name of the deployment group, if you want to change it.
    public String getNewDeploymentGroupName() {
        return ;
    }
    
    
The new name of the deployment group, if you want to change it.

Constraints:
Length: 1 - 100

Parameters:
newDeploymentGroupName The new name of the deployment group, if you want to change it.
    public void setNewDeploymentGroupName(String newDeploymentGroupName) {
        this. = newDeploymentGroupName;
    }
    
    
The new name of the deployment group, if you want to change it.

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

Constraints:
Length: 1 - 100

Parameters:
newDeploymentGroupName The new name of the deployment group, if you want to change it.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateDeploymentGroupRequest withNewDeploymentGroupName(String newDeploymentGroupName) {
        this. = newDeploymentGroupName;
        return this;
    }

    
The replacement deployment configuration name to use, if you want to change it.

Constraints:
Length: 1 - 100

Returns:
The replacement deployment configuration name to use, if you want to change it.
    public String getDeploymentConfigName() {
        return ;
    }
    
    
The replacement deployment configuration name to use, if you want to change it.

Constraints:
Length: 1 - 100

Parameters:
deploymentConfigName The replacement deployment configuration name to use, if you want to change it.
    public void setDeploymentConfigName(String deploymentConfigName) {
        this. = deploymentConfigName;
    }
    
    
The replacement deployment configuration name to use, if you want to change it.

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

Constraints:
Length: 1 - 100

Parameters:
deploymentConfigName The replacement deployment configuration name to use, if you want to change it.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateDeploymentGroupRequest withDeploymentConfigName(String deploymentConfigName) {
        this. = deploymentConfigName;
        return this;
    }

    
The replacement set of Amazon EC2 tags to filter on, if you want to change them.

Returns:
The replacement set of Amazon EC2 tags to filter on, if you want to change them.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The replacement set of Amazon EC2 tags to filter on, if you want to change them.

Parameters:
ec2TagFilters The replacement set of Amazon EC2 tags to filter on, if you want to change them.
    public void setEc2TagFilters(java.util.Collection<EC2TagFilterec2TagFilters) {
        if (ec2TagFilters == null) {
            this. = null;
            return;
        }
        ec2TagFiltersCopy.addAll(ec2TagFilters);
        this. = ec2TagFiltersCopy;
    }
    
    
The replacement set of Amazon EC2 tags to filter on, if you want to change them.

NOTE: This method appends the values to the existing list (if any). Use setEc2TagFilters(java.util.Collection) or withEc2TagFilters(java.util.Collection) if you want to override the existing values.

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

Parameters:
ec2TagFilters The replacement set of Amazon EC2 tags to filter on, if you want to change them.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateDeploymentGroupRequest withEc2TagFilters(EC2TagFilter... ec2TagFilters) {
        if (getEc2TagFilters() == nullsetEc2TagFilters(new java.util.ArrayList<EC2TagFilter>(ec2TagFilters.length));
        for (EC2TagFilter value : ec2TagFilters) {
            getEc2TagFilters().add(value);
        }
        return this;
    }
    
    
The replacement set of Amazon EC2 tags to filter on, if you want to change them.

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

Parameters:
ec2TagFilters The replacement set of Amazon EC2 tags to filter on, if you want to change them.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (ec2TagFilters == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<EC2TagFilterec2TagFiltersCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<EC2TagFilter>(ec2TagFilters.size());
            ec2TagFiltersCopy.addAll(ec2TagFilters);
            this. = ec2TagFiltersCopy;
        }
        return this;
    }

    
The replacement set of on-premises instance tags for filter on, if you want to change them.

Returns:
The replacement set of on-premises instance tags for filter on, if you want to change them.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The replacement set of on-premises instance tags for filter on, if you want to change them.

Parameters:
onPremisesInstanceTagFilters The replacement set of on-premises instance tags for filter on, if you want to change them.
    public void setOnPremisesInstanceTagFilters(java.util.Collection<TagFilteronPremisesInstanceTagFilters) {
        if (onPremisesInstanceTagFilters == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<TagFilteronPremisesInstanceTagFiltersCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<TagFilter>(onPremisesInstanceTagFilters.size());
        onPremisesInstanceTagFiltersCopy.addAll(onPremisesInstanceTagFilters);
        this. = onPremisesInstanceTagFiltersCopy;
    }
    
    
The replacement set of on-premises instance tags for filter on, if you want to change them.

NOTE: This method appends the values to the existing list (if any). Use setOnPremisesInstanceTagFilters(java.util.Collection) or withOnPremisesInstanceTagFilters(java.util.Collection) if you want to override the existing values.

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

Parameters:
onPremisesInstanceTagFilters The replacement set of on-premises instance tags for filter on, if you want to change them.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateDeploymentGroupRequest withOnPremisesInstanceTagFilters(TagFilter... onPremisesInstanceTagFilters) {
        if (getOnPremisesInstanceTagFilters() == nullsetOnPremisesInstanceTagFilters(new java.util.ArrayList<TagFilter>(onPremisesInstanceTagFilters.length));
        for (TagFilter value : onPremisesInstanceTagFilters) {
            getOnPremisesInstanceTagFilters().add(value);
        }
        return this;
    }
    
    
The replacement set of on-premises instance tags for filter on, if you want to change them.

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

Parameters:
onPremisesInstanceTagFilters The replacement set of on-premises instance tags for filter on, if you want to change them.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (onPremisesInstanceTagFilters == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<TagFilteronPremisesInstanceTagFiltersCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<TagFilter>(onPremisesInstanceTagFilters.size());
            onPremisesInstanceTagFiltersCopy.addAll(onPremisesInstanceTagFilters);
            this. = onPremisesInstanceTagFiltersCopy;
        }
        return this;
    }

    
The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.

Returns:
The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.

Parameters:
autoScalingGroups The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.
    public void setAutoScalingGroups(java.util.Collection<StringautoScalingGroups) {
        if (autoScalingGroups == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringautoScalingGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(autoScalingGroups.size());
        autoScalingGroupsCopy.addAll(autoScalingGroups);
        this. = autoScalingGroupsCopy;
    }
    
    
The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.

NOTE: This method appends the values to the existing list (if any). Use setAutoScalingGroups(java.util.Collection) or withAutoScalingGroups(java.util.Collection) if you want to override the existing values.

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

Parameters:
autoScalingGroups The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateDeploymentGroupRequest withAutoScalingGroups(String... autoScalingGroups) {
        if (getAutoScalingGroups() == nullsetAutoScalingGroups(new java.util.ArrayList<String>(autoScalingGroups.length));
        for (String value : autoScalingGroups) {
            getAutoScalingGroups().add(value);
        }
        return this;
    }
    
    
The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.

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

Parameters:
autoScalingGroups The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (autoScalingGroups == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringautoScalingGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(autoScalingGroups.size());
            autoScalingGroupsCopy.addAll(autoScalingGroups);
            this. = autoScalingGroupsCopy;
        }
        return this;
    }

    
A replacement service role's ARN, if you want to change it.

Returns:
A replacement service role's ARN, if you want to change it.
    public String getServiceRoleArn() {
        return ;
    }
    
    
A replacement service role's ARN, if you want to change it.

Parameters:
serviceRoleArn A replacement service role's ARN, if you want to change it.
    public void setServiceRoleArn(String serviceRoleArn) {
        this. = serviceRoleArn;
    }
    
    
A replacement service role's ARN, if you want to change it.

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

Parameters:
serviceRoleArn A replacement service role's ARN, if you want to change it.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateDeploymentGroupRequest withServiceRoleArn(String serviceRoleArn) {
        this. = serviceRoleArn;
        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() != nullsb.append("ApplicationName: " + getApplicationName() + ",");
        if (getCurrentDeploymentGroupName() != nullsb.append("CurrentDeploymentGroupName: " + getCurrentDeploymentGroupName() + ",");
        if (getNewDeploymentGroupName() != nullsb.append("NewDeploymentGroupName: " + getNewDeploymentGroupName() + ",");
        if (getDeploymentConfigName() != nullsb.append("DeploymentConfigName: " + getDeploymentConfigName() + ",");
        if (getEc2TagFilters() != nullsb.append("Ec2TagFilters: " + getEc2TagFilters() + ",");
        if (getOnPremisesInstanceTagFilters() != nullsb.append("OnPremisesInstanceTagFilters: " + getOnPremisesInstanceTagFilters() + ",");
        if (getAutoScalingGroups() != nullsb.append("AutoScalingGroups: " + getAutoScalingGroups() + ",");
        if (getServiceRoleArn() != nullsb.append("ServiceRoleArn: " + getServiceRoleArn() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getApplicationName() == null) ? 0 : getApplicationName().hashCode()); 
        hashCode = prime * hashCode + ((getCurrentDeploymentGroupName() == null) ? 0 : getCurrentDeploymentGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getNewDeploymentGroupName() == null) ? 0 : getNewDeploymentGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getDeploymentConfigName() == null) ? 0 : getDeploymentConfigName().hashCode()); 
        hashCode = prime * hashCode + ((getEc2TagFilters() == null) ? 0 : getEc2TagFilters().hashCode()); 
        hashCode = prime * hashCode + ((getOnPremisesInstanceTagFilters() == null) ? 0 : getOnPremisesInstanceTagFilters().hashCode()); 
        hashCode = prime * hashCode + ((getAutoScalingGroups() == null) ? 0 : getAutoScalingGroups().hashCode()); 
        hashCode = prime * hashCode + ((getServiceRoleArn() == null) ? 0 : getServiceRoleArn().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof UpdateDeploymentGroupRequest == falsereturn false;
        
        if (other.getApplicationName() == null ^ this.getApplicationName() == nullreturn false;
        if (other.getApplicationName() != null && other.getApplicationName().equals(this.getApplicationName()) == falsereturn false
        if (other.getCurrentDeploymentGroupName() == null ^ this.getCurrentDeploymentGroupName() == nullreturn false;
        if (other.getCurrentDeploymentGroupName() != null && other.getCurrentDeploymentGroupName().equals(this.getCurrentDeploymentGroupName()) == falsereturn false
        if (other.getNewDeploymentGroupName() == null ^ this.getNewDeploymentGroupName() == nullreturn false;
        if (other.getNewDeploymentGroupName() != null && other.getNewDeploymentGroupName().equals(this.getNewDeploymentGroupName()) == falsereturn false
        if (other.getDeploymentConfigName() == null ^ this.getDeploymentConfigName() == nullreturn false;
        if (other.getDeploymentConfigName() != null && other.getDeploymentConfigName().equals(this.getDeploymentConfigName()) == falsereturn false
        if (other.getEc2TagFilters() == null ^ this.getEc2TagFilters() == nullreturn false;
        if (other.getEc2TagFilters() != null && other.getEc2TagFilters().equals(this.getEc2TagFilters()) == falsereturn false
        if (other.getOnPremisesInstanceTagFilters() == null ^ this.getOnPremisesInstanceTagFilters() == nullreturn false;
        if (other.getOnPremisesInstanceTagFilters() != null && other.getOnPremisesInstanceTagFilters().equals(this.getOnPremisesInstanceTagFilters()) == falsereturn false
        if (other.getAutoScalingGroups() == null ^ this.getAutoScalingGroups() == nullreturn false;
        if (other.getAutoScalingGroups() != null && other.getAutoScalingGroups().equals(this.getAutoScalingGroups()) == falsereturn false
        if (other.getServiceRoleArn() == null ^ this.getServiceRoleArn() == nullreturn false;
        if (other.getServiceRoleArn() != null && other.getServiceRoleArn().equals(this.getServiceRoleArn()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (UpdateDeploymentGroupRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X