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

The Parameter data type.

 
 public class Parameter implements SerializableCloneable {

    
The key associated with the parameter.
 
     private String parameterKey;

    
The value associated with the parameter.
 
     private String parameterValue;

    
During a stack update, use the existing parameter value that is being used for the stack.
 
     private Boolean usePreviousValue;

    
The key associated with the parameter.

Returns:
The key associated with the parameter.
 
     public String getParameterKey() {
         return ;
     }
    
    
The key associated with the parameter.

Parameters:
parameterKey The key associated with the parameter.
 
     public void setParameterKey(String parameterKey) {
         this. = parameterKey;
     }
    
    
The key associated with the parameter.

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

Parameters:
parameterKey The key associated with the parameter.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Parameter withParameterKey(String parameterKey) {
         this. = parameterKey;
         return this;
     }

    
The value associated with the parameter.

Returns:
The value associated with the parameter.
 
     public String getParameterValue() {
         return ;
     }
    
    
The value associated with the parameter.

Parameters:
parameterValue The value associated with the parameter.
 
     public void setParameterValue(String parameterValue) {
         this. = parameterValue;
     }
    
    
The value associated with the parameter.

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

Parameters:
parameterValue The value associated with the parameter.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Parameter withParameterValue(String parameterValue) {
        this. = parameterValue;
        return this;
    }

    
During a stack update, use the existing parameter value that is being used for the stack.

Returns:
During a stack update, use the existing parameter value that is being used for the stack.
    public Boolean isUsePreviousValue() {
        return ;
    }
    
    
During a stack update, use the existing parameter value that is being used for the stack.

Parameters:
usePreviousValue During a stack update, use the existing parameter value that is being used for the stack.
    public void setUsePreviousValue(Boolean usePreviousValue) {
        this. = usePreviousValue;
    }
    
    
During a stack update, use the existing parameter value that is being used for the stack.

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

Parameters:
usePreviousValue During a stack update, use the existing parameter value that is being used for the stack.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Parameter withUsePreviousValue(Boolean usePreviousValue) {
        this. = usePreviousValue;
        return this;
    }

    
During a stack update, use the existing parameter value that is being used for the stack.

Returns:
During a stack update, use the existing parameter value that is being used for the stack.
    public Boolean getUsePreviousValue() {
        return ;
    }

    
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 (getParameterKey() != nullsb.append("ParameterKey: " + getParameterKey() + ",");
        if (getParameterValue() != nullsb.append("ParameterValue: " + getParameterValue() + ",");
        if (isUsePreviousValue() != nullsb.append("UsePreviousValue: " + isUsePreviousValue() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getParameterKey() == null) ? 0 : getParameterKey().hashCode()); 
        hashCode = prime * hashCode + ((getParameterValue() == null) ? 0 : getParameterValue().hashCode()); 
        hashCode = prime * hashCode + ((isUsePreviousValue() == null) ? 0 : isUsePreviousValue().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof Parameter == falsereturn false;
        Parameter other = (Parameter)obj;
        
        if (other.getParameterKey() == null ^ this.getParameterKey() == nullreturn false;
        if (other.getParameterKey() != null && other.getParameterKey().equals(this.getParameterKey()) == falsereturn false
        if (other.getParameterValue() == null ^ this.getParameterValue() == nullreturn false;
        if (other.getParameterValue() != null && other.getParameterValue().equals(this.getParameterValue()) == falsereturn false
        if (other.isUsePreviousValue() == null ^ this.isUsePreviousValue() == nullreturn false;
        if (other.isUsePreviousValue() != null && other.isUsePreviousValue().equals(this.isUsePreviousValue()) == falsereturn false
        return true;
    }
    
    @Override
    public Parameter clone() {
        try {
            return (Parametersuper.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