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;
 

Available option.

 
 public class OptionGroupOption implements SerializableCloneable {

    
The name of the option.
 
     private String name;

    
The description of the option.
 
     private String description;

    
The name of the engine that this option can be applied to.
 
     private String engineName;

    
Indicates the major engine version that the option is available for.
 
     private String majorEngineVersion;

    
The minimum required engine version for the option to be applied.
 
     private String minimumRequiredMinorEngineVersion;

    
Specifies whether the option requires a port.
 
     private Boolean portRequired;

    
If the option requires a port, specifies the default port for the option.
 
     private Integer defaultPort;

    
List of all options that are prerequisites for this option.
 
A persistent option cannot be removed from the option group once the option group is used, but this option can be removed from the db instance while modifying the related data and assigning another option group without this option.
 
     private Boolean persistent;

    
A permanent option cannot be removed from the option group once the option group is used, and it cannot be removed from the db instance after assigning an option group with this permanent option.
 
     private Boolean permanent;

    
Specifies the option settings that are available (and the default value) for each option in an option group.
 
The name of the option.

Returns:
The name of the option.
 
     public String getName() {
         return ;
     }
    
    
The name of the option.

Parameters:
name The name of the option.
    public void setName(String name) {
        this. = name;
    }
    
    
The name of the option.

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

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

    
The description of the option.

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

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

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

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

    
The name of the engine that this option can be applied to.

Returns:
The name of the engine that this option can be applied to.
    public String getEngineName() {
        return ;
    }
    
    
The name of the engine that this option can be applied to.

Parameters:
engineName The name of the engine that this option can be applied to.
    public void setEngineName(String engineName) {
        this. = engineName;
    }
    
    
The name of the engine that this option can be applied to.

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

Parameters:
engineName The name of the engine that this option can be applied to.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withEngineName(String engineName) {
        this. = engineName;
        return this;
    }

    
Indicates the major engine version that the option is available for.

Returns:
Indicates the major engine version that the option is available for.
    public String getMajorEngineVersion() {
        return ;
    }
    
    
Indicates the major engine version that the option is available for.

Parameters:
majorEngineVersion Indicates the major engine version that the option is available for.
    public void setMajorEngineVersion(String majorEngineVersion) {
        this. = majorEngineVersion;
    }
    
    
Indicates the major engine version that the option is available for.

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

Parameters:
majorEngineVersion Indicates the major engine version that the option is available for.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withMajorEngineVersion(String majorEngineVersion) {
        this. = majorEngineVersion;
        return this;
    }

    
The minimum required engine version for the option to be applied.

Returns:
The minimum required engine version for the option to be applied.
        return ;
    }
    
    
The minimum required engine version for the option to be applied.

Parameters:
minimumRequiredMinorEngineVersion The minimum required engine version for the option to be applied.
    public void setMinimumRequiredMinorEngineVersion(String minimumRequiredMinorEngineVersion) {
        this. = minimumRequiredMinorEngineVersion;
    }
    
    
The minimum required engine version for the option to be applied.

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

Parameters:
minimumRequiredMinorEngineVersion The minimum required engine version for the option to be applied.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withMinimumRequiredMinorEngineVersion(String minimumRequiredMinorEngineVersion) {
        this. = minimumRequiredMinorEngineVersion;
        return this;
    }

    
Specifies whether the option requires a port.

Returns:
Specifies whether the option requires a port.
    public Boolean isPortRequired() {
        return ;
    }
    
    
Specifies whether the option requires a port.

Parameters:
portRequired Specifies whether the option requires a port.
    public void setPortRequired(Boolean portRequired) {
        this. = portRequired;
    }
    
    
Specifies whether the option requires a port.

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

Parameters:
portRequired Specifies whether the option requires a port.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withPortRequired(Boolean portRequired) {
        this. = portRequired;
        return this;
    }

    
Specifies whether the option requires a port.

Returns:
Specifies whether the option requires a port.
    public Boolean getPortRequired() {
        return ;
    }

    
If the option requires a port, specifies the default port for the option.

Returns:
If the option requires a port, specifies the default port for the option.
    public Integer getDefaultPort() {
        return ;
    }
    
    
If the option requires a port, specifies the default port for the option.

Parameters:
defaultPort If the option requires a port, specifies the default port for the option.
    public void setDefaultPort(Integer defaultPort) {
        this. = defaultPort;
    }
    
    
If the option requires a port, specifies the default port for the option.

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

Parameters:
defaultPort If the option requires a port, specifies the default port for the option.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withDefaultPort(Integer defaultPort) {
        this. = defaultPort;
        return this;
    }

    
List of all options that are prerequisites for this option.

Returns:
List of all options that are prerequisites for this option.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
List of all options that are prerequisites for this option.

Parameters:
optionsDependedOn List of all options that are prerequisites for this option.
    public void setOptionsDependedOn(java.util.Collection<StringoptionsDependedOn) {
        if (optionsDependedOn == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringoptionsDependedOnCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(optionsDependedOn.size());
        optionsDependedOnCopy.addAll(optionsDependedOn);
        this. = optionsDependedOnCopy;
    }
    
    
List of all options that are prerequisites for this option.

NOTE: This method appends the values to the existing list (if any). Use setOptionsDependedOn(java.util.Collection) or withOptionsDependedOn(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:
optionsDependedOn List of all options that are prerequisites for this option.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withOptionsDependedOn(String... optionsDependedOn) {
        if (getOptionsDependedOn() == nullsetOptionsDependedOn(new java.util.ArrayList<String>(optionsDependedOn.length));
        for (String value : optionsDependedOn) {
            getOptionsDependedOn().add(value);
        }
        return this;
    }
    
    
List of all options that are prerequisites for this option.

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

Parameters:
optionsDependedOn List of all options that are prerequisites for this option.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withOptionsDependedOn(java.util.Collection<StringoptionsDependedOn) {
        if (optionsDependedOn == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringoptionsDependedOnCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(optionsDependedOn.size());
            optionsDependedOnCopy.addAll(optionsDependedOn);
            this. = optionsDependedOnCopy;
        }
        return this;
    }

    
A persistent option cannot be removed from the option group once the option group is used, but this option can be removed from the db instance while modifying the related data and assigning another option group without this option.

Returns:
A persistent option cannot be removed from the option group once the option group is used, but this option can be removed from the db instance while modifying the related data and assigning another option group without this option.
    public Boolean isPersistent() {
        return ;
    }
    
    
A persistent option cannot be removed from the option group once the option group is used, but this option can be removed from the db instance while modifying the related data and assigning another option group without this option.

Parameters:
persistent A persistent option cannot be removed from the option group once the option group is used, but this option can be removed from the db instance while modifying the related data and assigning another option group without this option.
    public void setPersistent(Boolean persistent) {
        this. = persistent;
    }
    
    
A persistent option cannot be removed from the option group once the option group is used, but this option can be removed from the db instance while modifying the related data and assigning another option group without this option.

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

Parameters:
persistent A persistent option cannot be removed from the option group once the option group is used, but this option can be removed from the db instance while modifying the related data and assigning another option group without this option.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withPersistent(Boolean persistent) {
        this. = persistent;
        return this;
    }

    
A persistent option cannot be removed from the option group once the option group is used, but this option can be removed from the db instance while modifying the related data and assigning another option group without this option.

Returns:
A persistent option cannot be removed from the option group once the option group is used, but this option can be removed from the db instance while modifying the related data and assigning another option group without this option.
    public Boolean getPersistent() {
        return ;
    }

    
A permanent option cannot be removed from the option group once the option group is used, and it cannot be removed from the db instance after assigning an option group with this permanent option.

Returns:
A permanent option cannot be removed from the option group once the option group is used, and it cannot be removed from the db instance after assigning an option group with this permanent option.
    public Boolean isPermanent() {
        return ;
    }
    
    
A permanent option cannot be removed from the option group once the option group is used, and it cannot be removed from the db instance after assigning an option group with this permanent option.

Parameters:
permanent A permanent option cannot be removed from the option group once the option group is used, and it cannot be removed from the db instance after assigning an option group with this permanent option.
    public void setPermanent(Boolean permanent) {
        this. = permanent;
    }
    
    
A permanent option cannot be removed from the option group once the option group is used, and it cannot be removed from the db instance after assigning an option group with this permanent option.

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

Parameters:
permanent A permanent option cannot be removed from the option group once the option group is used, and it cannot be removed from the db instance after assigning an option group with this permanent option.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withPermanent(Boolean permanent) {
        this. = permanent;
        return this;
    }

    
A permanent option cannot be removed from the option group once the option group is used, and it cannot be removed from the db instance after assigning an option group with this permanent option.

Returns:
A permanent option cannot be removed from the option group once the option group is used, and it cannot be removed from the db instance after assigning an option group with this permanent option.
    public Boolean getPermanent() {
        return ;
    }

    
Specifies the option settings that are available (and the default value) for each option in an option group.

Returns:
Specifies the option settings that are available (and the default value) for each option in an option group.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Specifies the option settings that are available (and the default value) for each option in an option group.

Parameters:
optionGroupOptionSettings Specifies the option settings that are available (and the default value) for each option in an option group.
    public void setOptionGroupOptionSettings(java.util.Collection<OptionGroupOptionSettingoptionGroupOptionSettings) {
        if (optionGroupOptionSettings == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<OptionGroupOptionSettingoptionGroupOptionSettingsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<OptionGroupOptionSetting>(optionGroupOptionSettings.size());
        optionGroupOptionSettingsCopy.addAll(optionGroupOptionSettings);
        this. = optionGroupOptionSettingsCopy;
    }
    
    
Specifies the option settings that are available (and the default value) for each option in an option group.

NOTE: This method appends the values to the existing list (if any). Use setOptionGroupOptionSettings(java.util.Collection) or withOptionGroupOptionSettings(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:
optionGroupOptionSettings Specifies the option settings that are available (and the default value) for each option in an option group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OptionGroupOption withOptionGroupOptionSettings(OptionGroupOptionSetting... optionGroupOptionSettings) {
        if (getOptionGroupOptionSettings() == nullsetOptionGroupOptionSettings(new java.util.ArrayList<OptionGroupOptionSetting>(optionGroupOptionSettings.length));
        for (OptionGroupOptionSetting value : optionGroupOptionSettings) {
            getOptionGroupOptionSettings().add(value);
        }
        return this;
    }
    
    
Specifies the option settings that are available (and the default value) for each option in an option group.

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

Parameters:
optionGroupOptionSettings Specifies the option settings that are available (and the default value) for each option in an option group.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (optionGroupOptionSettings == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<OptionGroupOptionSettingoptionGroupOptionSettingsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<OptionGroupOptionSetting>(optionGroupOptionSettings.size());
            optionGroupOptionSettingsCopy.addAll(optionGroupOptionSettings);
            this. = optionGroupOptionSettingsCopy;
        }
        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 (getName() != nullsb.append("Name: " + getName() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getEngineName() != nullsb.append("EngineName: " + getEngineName() + ",");
        if (getMajorEngineVersion() != nullsb.append("MajorEngineVersion: " + getMajorEngineVersion() + ",");
        if (getMinimumRequiredMinorEngineVersion() != nullsb.append("MinimumRequiredMinorEngineVersion: " + getMinimumRequiredMinorEngineVersion() + ",");
        if (isPortRequired() != nullsb.append("PortRequired: " + isPortRequired() + ",");
        if (getDefaultPort() != nullsb.append("DefaultPort: " + getDefaultPort() + ",");
        if (getOptionsDependedOn() != nullsb.append("OptionsDependedOn: " + getOptionsDependedOn() + ",");
        if (isPersistent() != nullsb.append("Persistent: " + isPersistent() + ",");
        if (isPermanent() != nullsb.append("Permanent: " + isPermanent() + ",");
        if (getOptionGroupOptionSettings() != nullsb.append("OptionGroupOptionSettings: " + getOptionGroupOptionSettings() );
        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 + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getEngineName() == null) ? 0 : getEngineName().hashCode()); 
        hashCode = prime * hashCode + ((getMajorEngineVersion() == null) ? 0 : getMajorEngineVersion().hashCode()); 
        hashCode = prime * hashCode + ((getMinimumRequiredMinorEngineVersion() == null) ? 0 : getMinimumRequiredMinorEngineVersion().hashCode()); 
        hashCode = prime * hashCode + ((isPortRequired() == null) ? 0 : isPortRequired().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultPort() == null) ? 0 : getDefaultPort().hashCode()); 
        hashCode = prime * hashCode + ((getOptionsDependedOn() == null) ? 0 : getOptionsDependedOn().hashCode()); 
        hashCode = prime * hashCode + ((isPersistent() == null) ? 0 : isPersistent().hashCode()); 
        hashCode = prime * hashCode + ((isPermanent() == null) ? 0 : isPermanent().hashCode()); 
        hashCode = prime * hashCode + ((getOptionGroupOptionSettings() == null) ? 0 : getOptionGroupOptionSettings().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof OptionGroupOption == falsereturn false;
        OptionGroupOption other = (OptionGroupOption)obj;
        
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getEngineName() == null ^ this.getEngineName() == nullreturn false;
        if (other.getEngineName() != null && other.getEngineName().equals(this.getEngineName()) == falsereturn false
        if (other.getMajorEngineVersion() == null ^ this.getMajorEngineVersion() == nullreturn false;
        if (other.getMajorEngineVersion() != null && other.getMajorEngineVersion().equals(this.getMajorEngineVersion()) == falsereturn false
        if (other.getMinimumRequiredMinorEngineVersion() == null ^ this.getMinimumRequiredMinorEngineVersion() == nullreturn false;
        if (other.getMinimumRequiredMinorEngineVersion() != null && other.getMinimumRequiredMinorEngineVersion().equals(this.getMinimumRequiredMinorEngineVersion()) == falsereturn false
        if (other.isPortRequired() == null ^ this.isPortRequired() == nullreturn false;
        if (other.isPortRequired() != null && other.isPortRequired().equals(this.isPortRequired()) == falsereturn false
        if (other.getDefaultPort() == null ^ this.getDefaultPort() == nullreturn false;
        if (other.getDefaultPort() != null && other.getDefaultPort().equals(this.getDefaultPort()) == falsereturn false
        if (other.getOptionsDependedOn() == null ^ this.getOptionsDependedOn() == nullreturn false;
        if (other.getOptionsDependedOn() != null && other.getOptionsDependedOn().equals(this.getOptionsDependedOn()) == falsereturn false
        if (other.isPersistent() == null ^ this.isPersistent() == nullreturn false;
        if (other.isPersistent() != null && other.isPersistent().equals(this.isPersistent()) == falsereturn false
        if (other.isPermanent() == null ^ this.isPermanent() == nullreturn false;
        if (other.isPermanent() != null && other.isPermanent().equals(this.isPermanent()) == falsereturn false
        if (other.getOptionGroupOptionSettings() == null ^ this.getOptionGroupOptionSettings() == nullreturn false;
        if (other.getOptionGroupOptionSettings() != null && other.getOptionGroupOptionSettings().equals(this.getOptionGroupOptionSettings()) == falsereturn false
        return true;
    }
    
    @Override
    public OptionGroupOption clone() {
        try {
            return (OptionGroupOptionsuper.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