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;
 

This data type is used as a response element in the action DescribeDBEngineVersions.

 
 public class DBEngineVersion implements SerializableCloneable {

    
The name of the database engine.
 
     private String engine;

    
The version number of the database engine.
 
     private String engineVersion;

    
The name of the DB parameter group family for the database engine.
 
     private String dBParameterGroupFamily;

    
The description of the database engine.
 
     private String dBEngineDescription;

    
The description of the database engine version.
 
     private String dBEngineVersionDescription;

    
The default character set for new instances of this engine version, if the CharacterSetName parameter of the CreateDBInstance API is not specified.
 
     private CharacterSet defaultCharacterSet;

    
A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API.
 
Default constructor for a new DBEngineVersion object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public DBEngineVersion() {}
    
    
The name of the database engine.

Returns:
The name of the database engine.
 
     public String getEngine() {
         return ;
     }
    
    
The name of the database engine.

Parameters:
engine The name of the database engine.
 
     public void setEngine(String engine) {
         this. = engine;
     }
    
    
The name of the database engine.

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

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

    
The version number of the database engine.

Returns:
The version number of the database engine.
    public String getEngineVersion() {
        return ;
    }
    
    
The version number of the database engine.

Parameters:
engineVersion The version number of the database engine.
    public void setEngineVersion(String engineVersion) {
        this. = engineVersion;
    }
    
    
The version number of the database engine.

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

Parameters:
engineVersion The version number of the database engine.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DBEngineVersion withEngineVersion(String engineVersion) {
        this. = engineVersion;
        return this;
    }

    
The name of the DB parameter group family for the database engine.

Returns:
The name of the DB parameter group family for the database engine.
    public String getDBParameterGroupFamily() {
        return ;
    }
    
    
The name of the DB parameter group family for the database engine.

Parameters:
dBParameterGroupFamily The name of the DB parameter group family for the database engine.
    public void setDBParameterGroupFamily(String dBParameterGroupFamily) {
        this. = dBParameterGroupFamily;
    }
    
    
The name of the DB parameter group family for the database engine.

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

Parameters:
dBParameterGroupFamily The name of the DB parameter group family for the database engine.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DBEngineVersion withDBParameterGroupFamily(String dBParameterGroupFamily) {
        this. = dBParameterGroupFamily;
        return this;
    }

    
The description of the database engine.

Returns:
The description of the database engine.
    public String getDBEngineDescription() {
        return ;
    }
    
    
The description of the database engine.

Parameters:
dBEngineDescription The description of the database engine.
    public void setDBEngineDescription(String dBEngineDescription) {
        this. = dBEngineDescription;
    }
    
    
The description of the database engine.

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

Parameters:
dBEngineDescription The description of the database engine.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DBEngineVersion withDBEngineDescription(String dBEngineDescription) {
        this. = dBEngineDescription;
        return this;
    }

    
The description of the database engine version.

Returns:
The description of the database engine version.
        return ;
    }
    
    
The description of the database engine version.

Parameters:
dBEngineVersionDescription The description of the database engine version.
    public void setDBEngineVersionDescription(String dBEngineVersionDescription) {
        this. = dBEngineVersionDescription;
    }
    
    
The description of the database engine version.

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

Parameters:
dBEngineVersionDescription The description of the database engine version.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DBEngineVersion withDBEngineVersionDescription(String dBEngineVersionDescription) {
        this. = dBEngineVersionDescription;
        return this;
    }

    
The default character set for new instances of this engine version, if the CharacterSetName parameter of the CreateDBInstance API is not specified.

Returns:
The default character set for new instances of this engine version, if the CharacterSetName parameter of the CreateDBInstance API is not specified.
        return ;
    }
    
    
The default character set for new instances of this engine version, if the CharacterSetName parameter of the CreateDBInstance API is not specified.

Parameters:
defaultCharacterSet The default character set for new instances of this engine version, if the CharacterSetName parameter of the CreateDBInstance API is not specified.
    public void setDefaultCharacterSet(CharacterSet defaultCharacterSet) {
        this. = defaultCharacterSet;
    }
    
    
The default character set for new instances of this engine version, if the CharacterSetName parameter of the CreateDBInstance API is not specified.

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

Parameters:
defaultCharacterSet The default character set for new instances of this engine version, if the CharacterSetName parameter of the CreateDBInstance API is not specified.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DBEngineVersion withDefaultCharacterSet(CharacterSet defaultCharacterSet) {
        this. = defaultCharacterSet;
        return this;
    }

    
A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API.

Returns:
A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API.

Parameters:
supportedCharacterSets A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API.
    public void setSupportedCharacterSets(java.util.Collection<CharacterSetsupportedCharacterSets) {
        if (supportedCharacterSets == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<CharacterSetsupportedCharacterSetsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<CharacterSet>(supportedCharacterSets.size());
        supportedCharacterSetsCopy.addAll(supportedCharacterSets);
        this. = supportedCharacterSetsCopy;
    }
    
    
A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API.

NOTE: This method appends the values to the existing list (if any). Use setSupportedCharacterSets(java.util.Collection) or withSupportedCharacterSets(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:
supportedCharacterSets A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DBEngineVersion withSupportedCharacterSets(CharacterSet... supportedCharacterSets) {
        if (getSupportedCharacterSets() == nullsetSupportedCharacterSets(new java.util.ArrayList<CharacterSet>(supportedCharacterSets.length));
        for (CharacterSet value : supportedCharacterSets) {
            getSupportedCharacterSets().add(value);
        }
        return this;
    }
    
    
A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API.

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

Parameters:
supportedCharacterSets A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DBEngineVersion withSupportedCharacterSets(java.util.Collection<CharacterSetsupportedCharacterSets) {
        if (supportedCharacterSets == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<CharacterSetsupportedCharacterSetsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<CharacterSet>(supportedCharacterSets.size());
            supportedCharacterSetsCopy.addAll(supportedCharacterSets);
            this. = supportedCharacterSetsCopy;
        }
        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 (getEngine() != nullsb.append("Engine: " + getEngine() + ",");
        if (getEngineVersion() != nullsb.append("EngineVersion: " + getEngineVersion() + ",");
        if (getDBParameterGroupFamily() != nullsb.append("DBParameterGroupFamily: " + getDBParameterGroupFamily() + ",");
        if (getDBEngineDescription() != nullsb.append("DBEngineDescription: " + getDBEngineDescription() + ",");
        if (getDBEngineVersionDescription() != nullsb.append("DBEngineVersionDescription: " + getDBEngineVersionDescription() + ",");
        if (getDefaultCharacterSet() != nullsb.append("DefaultCharacterSet: " + getDefaultCharacterSet() + ",");
        if (getSupportedCharacterSets() != nullsb.append("SupportedCharacterSets: " + getSupportedCharacterSets() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); 
        hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); 
        hashCode = prime * hashCode + ((getDBParameterGroupFamily() == null) ? 0 : getDBParameterGroupFamily().hashCode()); 
        hashCode = prime * hashCode + ((getDBEngineDescription() == null) ? 0 : getDBEngineDescription().hashCode()); 
        hashCode = prime * hashCode + ((getDBEngineVersionDescription() == null) ? 0 : getDBEngineVersionDescription().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultCharacterSet() == null) ? 0 : getDefaultCharacterSet().hashCode()); 
        hashCode = prime * hashCode + ((getSupportedCharacterSets() == null) ? 0 : getSupportedCharacterSets().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DBEngineVersion == falsereturn false;
        DBEngineVersion other = (DBEngineVersion)obj;
        
        if (other.getEngine() == null ^ this.getEngine() == nullreturn false;
        if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == falsereturn false
        if (other.getEngineVersion() == null ^ this.getEngineVersion() == nullreturn false;
        if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == falsereturn false
        if (other.getDBParameterGroupFamily() == null ^ this.getDBParameterGroupFamily() == nullreturn false;
        if (other.getDBParameterGroupFamily() != null && other.getDBParameterGroupFamily().equals(this.getDBParameterGroupFamily()) == falsereturn false
        if (other.getDBEngineDescription() == null ^ this.getDBEngineDescription() == nullreturn false;
        if (other.getDBEngineDescription() != null && other.getDBEngineDescription().equals(this.getDBEngineDescription()) == falsereturn false
        if (other.getDBEngineVersionDescription() == null ^ this.getDBEngineVersionDescription() == nullreturn false;
        if (other.getDBEngineVersionDescription() != null && other.getDBEngineVersionDescription().equals(this.getDBEngineVersionDescription()) == falsereturn false
        if (other.getDefaultCharacterSet() == null ^ this.getDefaultCharacterSet() == nullreturn false;
        if (other.getDefaultCharacterSet() != null && other.getDefaultCharacterSet().equals(this.getDefaultCharacterSet()) == falsereturn false
        if (other.getSupportedCharacterSets() == null ^ this.getSupportedCharacterSets() == nullreturn false;
        if (other.getSupportedCharacterSets() != null && other.getSupportedCharacterSets().equals(this.getSupportedCharacterSets()) == falsereturn false
        return true;
    }
    
    @Override
    public DBEngineVersion clone() {
        try {
            return (DBEngineVersionsuper.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