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

Updates the environment description, deploys a new application version, updates the configuration settings to an entirely new configuration template, or updates select configuration option values in the running environment.

Attempting to update both the release and configuration is not allowed and AWS Elastic Beanstalk returns an InvalidParameterCombination error.

When updating the configuration settings to a new template or individual settings, a draft configuration is created and DescribeConfigurationSettings for this environment returns two setting descriptions with different DeploymentStatus values.

 
 public class UpdateEnvironmentRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The ID of the environment to update.

If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

 
     private String environmentId;

    
The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

Constraints:
Length: 4 - 23

 
     private String environmentName;

    
If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.

Constraints:
Length: 0 - 200

 
     private String description;

    
This specifies the tier to use to update the environment.

Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.

 
     private EnvironmentTier tier;

    
If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

 
     private String versionLabel;

    
If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

    private String templateName;

    
This specifies the platform version that the environment will run after the environment is updated.

Constraints:
Length: 0 - 100

    private String solutionStackName;

    
If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.
A list of custom user-defined configuration options to remove from the configuration set for this environment.
Default constructor for a new UpdateEnvironmentRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
    public UpdateEnvironmentRequest() {}
    
    
The ID of the environment to update.

If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

Returns:
The ID of the environment to update.

If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

    public String getEnvironmentId() {
        return ;
    }
    
    
The ID of the environment to update.

If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

Parameters:
environmentId The ID of the environment to update.

If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

    public void setEnvironmentId(String environmentId) {
        this. = environmentId;
    }
    
    
The ID of the environment to update.

If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

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

Parameters:
environmentId The ID of the environment to update.

If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateEnvironmentRequest withEnvironmentId(String environmentId) {
        this. = environmentId;
        return this;
    }

    
The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

Constraints:
Length: 4 - 23

Returns:
The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

    public String getEnvironmentName() {
        return ;
    }
    
    
The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

Constraints:
Length: 4 - 23

Parameters:
environmentName The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

    public void setEnvironmentName(String environmentName) {
        this. = environmentName;
    }
    
    
The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

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

Constraints:
Length: 4 - 23

Parameters:
environmentName The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateEnvironmentRequest withEnvironmentName(String environmentName) {
        this. = environmentName;
        return this;
    }

    
If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.

Constraints:
Length: 0 - 200

Returns:
If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.
    public String getDescription() {
        return ;
    }
    
    
If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.

Constraints:
Length: 0 - 200

Parameters:
description If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.
    public void setDescription(String description) {
        this. = description;
    }
    
    
If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.

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

Constraints:
Length: 0 - 200

Parameters:
description If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateEnvironmentRequest withDescription(String description) {
        this. = description;
        return this;
    }

    
This specifies the tier to use to update the environment.

Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.

Returns:
This specifies the tier to use to update the environment.

Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.

    public EnvironmentTier getTier() {
        return ;
    }
    
    
This specifies the tier to use to update the environment.

Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.

Parameters:
tier This specifies the tier to use to update the environment.

Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.

    public void setTier(EnvironmentTier tier) {
        this. = tier;
    }
    
    
This specifies the tier to use to update the environment.

Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.

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

Parameters:
tier This specifies the tier to use to update the environment.

Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = tier;
        return this;
    }

    
If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

Returns:
If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.
    public String getVersionLabel() {
        return ;
    }
    
    
If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

Parameters:
versionLabel If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.
    public void setVersionLabel(String versionLabel) {
        this. = versionLabel;
    }
    
    
If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.

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

Constraints:
Length: 1 - 100

Parameters:
versionLabel If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateEnvironmentRequest withVersionLabel(String versionLabel) {
        this. = versionLabel;
        return this;
    }

    
If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

Returns:
If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.
    public String getTemplateName() {
        return ;
    }
    
    
If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

Parameters:
templateName If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.
    public void setTemplateName(String templateName) {
        this. = templateName;
    }
    
    
If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.

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

Constraints:
Length: 1 - 100

Parameters:
templateName If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateEnvironmentRequest withTemplateName(String templateName) {
        this. = templateName;
        return this;
    }

    
This specifies the platform version that the environment will run after the environment is updated.

Constraints:
Length: 0 - 100

Returns:
This specifies the platform version that the environment will run after the environment is updated.
    public String getSolutionStackName() {
        return ;
    }
    
    
This specifies the platform version that the environment will run after the environment is updated.

Constraints:
Length: 0 - 100

Parameters:
solutionStackName This specifies the platform version that the environment will run after the environment is updated.
    public void setSolutionStackName(String solutionStackName) {
        this. = solutionStackName;
    }
    
    
This specifies the platform version that the environment will run after the environment is updated.

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

Constraints:
Length: 0 - 100

Parameters:
solutionStackName This specifies the platform version that the environment will run after the environment is updated.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateEnvironmentRequest withSolutionStackName(String solutionStackName) {
        this. = solutionStackName;
        return this;
    }

    
If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.

Returns:
If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.

Parameters:
optionSettings If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.
    public void setOptionSettings(java.util.Collection<ConfigurationOptionSettingoptionSettings) {
        if (optionSettings == null) {
            this. = null;
            return;
        }
        optionSettingsCopy.addAll(optionSettings);
        this. = optionSettingsCopy;
    }
    
    
If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.

NOTE: This method appends the values to the existing list (if any). Use setOptionSettings(java.util.Collection) or withOptionSettings(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:
optionSettings If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (getOptionSettings() == nullsetOptionSettings(new java.util.ArrayList<ConfigurationOptionSetting>(optionSettings.length));
        for (ConfigurationOptionSetting value : optionSettings) {
            getOptionSettings().add(value);
        }
        return this;
    }
    
    
If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.

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

Parameters:
optionSettings If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (optionSettings == null) {
            this. = null;
        } else {
            optionSettingsCopy.addAll(optionSettings);
            this. = optionSettingsCopy;
        }
        return this;
    }

    
A list of custom user-defined configuration options to remove from the configuration set for this environment.

Returns:
A list of custom user-defined configuration options to remove from the configuration set for this environment.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of custom user-defined configuration options to remove from the configuration set for this environment.

Parameters:
optionsToRemove A list of custom user-defined configuration options to remove from the configuration set for this environment.
    public void setOptionsToRemove(java.util.Collection<OptionSpecificationoptionsToRemove) {
        if (optionsToRemove == null) {
            this. = null;
            return;
        }
        optionsToRemoveCopy.addAll(optionsToRemove);
        this. = optionsToRemoveCopy;
    }
    
    
A list of custom user-defined configuration options to remove from the configuration set for this environment.

NOTE: This method appends the values to the existing list (if any). Use setOptionsToRemove(java.util.Collection) or withOptionsToRemove(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:
optionsToRemove A list of custom user-defined configuration options to remove from the configuration set for this environment.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (getOptionsToRemove() == nullsetOptionsToRemove(new java.util.ArrayList<OptionSpecification>(optionsToRemove.length));
        for (OptionSpecification value : optionsToRemove) {
            getOptionsToRemove().add(value);
        }
        return this;
    }
    
    
A list of custom user-defined configuration options to remove from the configuration set for this environment.

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

Parameters:
optionsToRemove A list of custom user-defined configuration options to remove from the configuration set for this environment.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (optionsToRemove == null) {
            this. = null;
        } else {
            optionsToRemoveCopy.addAll(optionsToRemove);
            this. = optionsToRemoveCopy;
        }
        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 (getEnvironmentId() != nullsb.append("EnvironmentId: " + getEnvironmentId() + ",");
        if (getEnvironmentName() != nullsb.append("EnvironmentName: " + getEnvironmentName() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getTier() != nullsb.append("Tier: " + getTier() + ",");
        if (getVersionLabel() != nullsb.append("VersionLabel: " + getVersionLabel() + ",");
        if (getTemplateName() != nullsb.append("TemplateName: " + getTemplateName() + ",");
        if (getSolutionStackName() != nullsb.append("SolutionStackName: " + getSolutionStackName() + ",");
        if (getOptionSettings() != nullsb.append("OptionSettings: " + getOptionSettings() + ",");
        if (getOptionsToRemove() != nullsb.append("OptionsToRemove: " + getOptionsToRemove() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getEnvironmentId() == null) ? 0 : getEnvironmentId().hashCode()); 
        hashCode = prime * hashCode + ((getEnvironmentName() == null) ? 0 : getEnvironmentName().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getTier() == null) ? 0 : getTier().hashCode()); 
        hashCode = prime * hashCode + ((getVersionLabel() == null) ? 0 : getVersionLabel().hashCode()); 
        hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode()); 
        hashCode = prime * hashCode + ((getSolutionStackName() == null) ? 0 : getSolutionStackName().hashCode()); 
        hashCode = prime * hashCode + ((getOptionSettings() == null) ? 0 : getOptionSettings().hashCode()); 
        hashCode = prime * hashCode + ((getOptionsToRemove() == null) ? 0 : getOptionsToRemove().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof UpdateEnvironmentRequest == falsereturn false;
        UpdateEnvironmentRequest other = (UpdateEnvironmentRequest)obj;
        
        if (other.getEnvironmentId() == null ^ this.getEnvironmentId() == nullreturn false;
        if (other.getEnvironmentId() != null && other.getEnvironmentId().equals(this.getEnvironmentId()) == falsereturn false
        if (other.getEnvironmentName() == null ^ this.getEnvironmentName() == nullreturn false;
        if (other.getEnvironmentName() != null && other.getEnvironmentName().equals(this.getEnvironmentName()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getTier() == null ^ this.getTier() == nullreturn false;
        if (other.getTier() != null && other.getTier().equals(this.getTier()) == falsereturn false
        if (other.getVersionLabel() == null ^ this.getVersionLabel() == nullreturn false;
        if (other.getVersionLabel() != null && other.getVersionLabel().equals(this.getVersionLabel()) == falsereturn false
        if (other.getTemplateName() == null ^ this.getTemplateName() == nullreturn false;
        if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == falsereturn false
        if (other.getSolutionStackName() == null ^ this.getSolutionStackName() == nullreturn false;
        if (other.getSolutionStackName() != null && other.getSolutionStackName().equals(this.getSolutionStackName()) == falsereturn false
        if (other.getOptionSettings() == null ^ this.getOptionSettings() == nullreturn false;
        if (other.getOptionSettings() != null && other.getOptionSettings().equals(this.getOptionSettings()) == falsereturn false
        if (other.getOptionsToRemove() == null ^ this.getOptionsToRemove() == nullreturn false;
        if (other.getOptionsToRemove() != null && other.getOptionsToRemove().equals(this.getOptionsToRemove()) == falsereturn false
        return true;
    }
    
    @Override
    public UpdateEnvironmentRequest clone() {
        
            return (UpdateEnvironmentRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X