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

Option settings are the actual settings being applied or configured for that option. It is used when you modify an option group or describe option groups. For example, the NATIVE_NETWORK_ENCRYPTION option has a setting called SQLNET.ENCRYPTION_SERVER that can have several different values.

 
 public class OptionSetting implements SerializableCloneable {

    
The name of the option that has settings that you can set.
 
     private String name;

    
The current value of the option setting.
 
     private String value;

    
The default value of the option setting.
 
     private String defaultValue;

    
The description of the option setting.
 
     private String description;

    
The DB engine specific parameter type.
 
     private String applyType;

    
The data type of the option setting.
 
     private String dataType;

    
The allowed values of the option setting.
 
     private String allowedValues;

    
A Boolean value that, when true, indicates the option setting can be modified from the default.
 
     private Boolean isModifiable;

    
Indicates if the option setting is part of a collection.
 
     private Boolean isCollection;

    
The name of the option that has settings that you can set.

Returns:
The name of the option that has settings that you can set.
 
     public String getName() {
         return ;
     }
    
    
The name of the option that has settings that you can set.

Parameters:
name The name of the option that has settings that you can set.
 
     public void setName(String name) {
         this. = name;
     }
    
    
The name of the option that has settings that you can set.

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

Parameters:
name The name of the option that has settings that you can set.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionSetting withName(String name) {
        this. = name;
        return this;
    }

    
The current value of the option setting.

Returns:
The current value of the option setting.
    public String getValue() {
        return ;
    }
    
    
The current value of the option setting.

Parameters:
value The current value of the option setting.
    public void setValue(String value) {
        this. = value;
    }
    
    
The current value of the option setting.

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

Parameters:
value The current value of the option setting.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionSetting withValue(String value) {
        this. = value;
        return this;
    }

    
The default value of the option setting.

Returns:
The default value of the option setting.
    public String getDefaultValue() {
        return ;
    }
    
    
The default value of the option setting.

Parameters:
defaultValue The default value of the option setting.
    public void setDefaultValue(String defaultValue) {
        this. = defaultValue;
    }
    
    
The default value of the option setting.

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

Parameters:
defaultValue The default value of the option setting.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionSetting withDefaultValue(String defaultValue) {
        this. = defaultValue;
        return this;
    }

    
The description of the option setting.

Returns:
The description of the option setting.
    public String getDescription() {
        return ;
    }
    
    
The description of the option setting.

Parameters:
description The description of the option setting.
    public void setDescription(String description) {
        this. = description;
    }
    
    
The description of the option setting.

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

Parameters:
description The description of the option setting.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionSetting withDescription(String description) {
        this. = description;
        return this;
    }

    
The DB engine specific parameter type.

Returns:
The DB engine specific parameter type.
    public String getApplyType() {
        return ;
    }
    
    
The DB engine specific parameter type.

Parameters:
applyType The DB engine specific parameter type.
    public void setApplyType(String applyType) {
        this. = applyType;
    }
    
    
The DB engine specific parameter type.

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

Parameters:
applyType The DB engine specific parameter type.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionSetting withApplyType(String applyType) {
        this. = applyType;
        return this;
    }

    
The data type of the option setting.

Returns:
The data type of the option setting.
    public String getDataType() {
        return ;
    }
    
    
The data type of the option setting.

Parameters:
dataType The data type of the option setting.
    public void setDataType(String dataType) {
        this. = dataType;
    }
    
    
The data type of the option setting.

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

Parameters:
dataType The data type of the option setting.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionSetting withDataType(String dataType) {
        this. = dataType;
        return this;
    }

    
The allowed values of the option setting.

Returns:
The allowed values of the option setting.
    public String getAllowedValues() {
        return ;
    }
    
    
The allowed values of the option setting.

Parameters:
allowedValues The allowed values of the option setting.
    public void setAllowedValues(String allowedValues) {
        this. = allowedValues;
    }
    
    
The allowed values of the option setting.

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

Parameters:
allowedValues The allowed values of the option setting.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionSetting withAllowedValues(String allowedValues) {
        this. = allowedValues;
        return this;
    }

    
A Boolean value that, when true, indicates the option setting can be modified from the default.

Returns:
A Boolean value that, when true, indicates the option setting can be modified from the default.
    public Boolean isModifiable() {
        return ;
    }
    
    
A Boolean value that, when true, indicates the option setting can be modified from the default.

Parameters:
isModifiable A Boolean value that, when true, indicates the option setting can be modified from the default.
    public void setIsModifiable(Boolean isModifiable) {
        this. = isModifiable;
    }
    
    
A Boolean value that, when true, indicates the option setting can be modified from the default.

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

Parameters:
isModifiable A Boolean value that, when true, indicates the option setting can be modified from the default.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionSetting withIsModifiable(Boolean isModifiable) {
        this. = isModifiable;
        return this;
    }

    
A Boolean value that, when true, indicates the option setting can be modified from the default.

Returns:
A Boolean value that, when true, indicates the option setting can be modified from the default.
    public Boolean getIsModifiable() {
        return ;
    }

    
Indicates if the option setting is part of a collection.

Returns:
Indicates if the option setting is part of a collection.
    public Boolean isCollection() {
        return ;
    }
    
    
Indicates if the option setting is part of a collection.

Parameters:
isCollection Indicates if the option setting is part of a collection.
    public void setIsCollection(Boolean isCollection) {
        this. = isCollection;
    }
    
    
Indicates if the option setting is part of a collection.

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

Parameters:
isCollection Indicates if the option setting is part of a collection.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionSetting withIsCollection(Boolean isCollection) {
        this. = isCollection;
        return this;
    }

    
Indicates if the option setting is part of a collection.

Returns:
Indicates if the option setting is part of a collection.
    public Boolean getIsCollection() {
        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 (getName() != nullsb.append("Name: " + getName() + ",");
        if (getValue() != nullsb.append("Value: " + getValue() + ",");
        if (getDefaultValue() != nullsb.append("DefaultValue: " + getDefaultValue() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getApplyType() != nullsb.append("ApplyType: " + getApplyType() + ",");
        if (getDataType() != nullsb.append("DataType: " + getDataType() + ",");
        if (getAllowedValues() != nullsb.append("AllowedValues: " + getAllowedValues() + ",");
        if (isModifiable() != nullsb.append("IsModifiable: " + isModifiable() + ",");
        if (isCollection() != nullsb.append("IsCollection: " + isCollection() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultValue() == null) ? 0 : getDefaultValue().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getApplyType() == null) ? 0 : getApplyType().hashCode()); 
        hashCode = prime * hashCode + ((getDataType() == null) ? 0 : getDataType().hashCode()); 
        hashCode = prime * hashCode + ((getAllowedValues() == null) ? 0 : getAllowedValues().hashCode()); 
        hashCode = prime * hashCode + ((isModifiable() == null) ? 0 : isModifiable().hashCode()); 
        hashCode = prime * hashCode + ((isCollection() == null) ? 0 : isCollection().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof OptionSetting == falsereturn false;
        OptionSetting other = (OptionSetting)obj;
        
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getValue() == null ^ this.getValue() == nullreturn false;
        if (other.getValue() != null && other.getValue().equals(this.getValue()) == falsereturn false
        if (other.getDefaultValue() == null ^ this.getDefaultValue() == nullreturn false;
        if (other.getDefaultValue() != null && other.getDefaultValue().equals(this.getDefaultValue()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getApplyType() == null ^ this.getApplyType() == nullreturn false;
        if (other.getApplyType() != null && other.getApplyType().equals(this.getApplyType()) == falsereturn false
        if (other.getDataType() == null ^ this.getDataType() == nullreturn false;
        if (other.getDataType() != null && other.getDataType().equals(this.getDataType()) == falsereturn false
        if (other.getAllowedValues() == null ^ this.getAllowedValues() == nullreturn false;
        if (other.getAllowedValues() != null && other.getAllowedValues().equals(this.getAllowedValues()) == falsereturn false
        if (other.isModifiable() == null ^ this.isModifiable() == nullreturn false;
        if (other.isModifiable() != null && other.isModifiable().equals(this.isModifiable()) == falsereturn false
        if (other.isCollection() == null ^ this.isCollection() == nullreturn false;
        if (other.isCollection() != null && other.isCollection().equals(this.isCollection()) == falsereturn false
        return true;
    }
    
    @Override
    public OptionSetting clone() {
        try {
            return (OptionSettingsuper.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