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;
 

Contains a list of available options for a DB instance

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

 
 public class OrderableDBInstanceOption implements SerializableCloneable {

    
The engine type of the orderable DB instance.
 
     private String engine;

    
The engine version of the orderable DB instance.
 
     private String engineVersion;

    
The DB instance Class for the orderable DB instance
 
     private String dBInstanceClass;

    
The license model for the orderable DB instance.
 
     private String licenseModel;

    
A list of availability zones for the orderable DB instance.
 
Indicates whether this orderable DB instance is multi-AZ capable.
 
     private Boolean multiAZCapable;

    
Indicates whether this orderable DB instance can have a Read Replica.
 
     private Boolean readReplicaCapable;

    
Indicates whether this is a VPC orderable DB instance.
 
     private Boolean vpc;

    
Indicates whether this orderable DB instance supports encrypted storage.
 
     private Boolean supportsStorageEncryption;

    
The storage type for this orderable DB instance.
 
     private String storageType;

    
Indicates whether this orderable DB instance supports provisioned IOPS.
 
     private Boolean supportsIops;

    
The engine type of the orderable DB instance.

Returns:
The engine type of the orderable DB instance.
 
     public String getEngine() {
         return ;
     }
    
    
The engine type of the orderable DB instance.

Parameters:
engine The engine type of the orderable DB instance.
    public void setEngine(String engine) {
        this. = engine;
    }
    
    
The engine type of the orderable DB instance.

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

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

    
The engine version of the orderable DB instance.

Returns:
The engine version of the orderable DB instance.
    public String getEngineVersion() {
        return ;
    }
    
    
The engine version of the orderable DB instance.

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

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

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

    
The DB instance Class for the orderable DB instance

Returns:
The DB instance Class for the orderable DB instance
    public String getDBInstanceClass() {
        return ;
    }
    
    
The DB instance Class for the orderable DB instance

Parameters:
dBInstanceClass The DB instance Class for the orderable DB instance
    public void setDBInstanceClass(String dBInstanceClass) {
        this. = dBInstanceClass;
    }
    
    
The DB instance Class for the orderable DB instance

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

Parameters:
dBInstanceClass The DB instance Class for the orderable DB instance
Returns:
A reference to this updated object so that method calls can be chained together.
    public OrderableDBInstanceOption withDBInstanceClass(String dBInstanceClass) {
        this. = dBInstanceClass;
        return this;
    }

    
The license model for the orderable DB instance.

Returns:
The license model for the orderable DB instance.
    public String getLicenseModel() {
        return ;
    }
    
    
The license model for the orderable DB instance.

Parameters:
licenseModel The license model for the orderable DB instance.
    public void setLicenseModel(String licenseModel) {
        this. = licenseModel;
    }
    
    
The license model for the orderable DB instance.

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

Parameters:
licenseModel The license model for the orderable DB instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OrderableDBInstanceOption withLicenseModel(String licenseModel) {
        this. = licenseModel;
        return this;
    }

    
A list of availability zones for the orderable DB instance.

Returns:
A list of availability zones for the orderable DB instance.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of availability zones for the orderable DB instance.

Parameters:
availabilityZones A list of availability zones for the orderable DB instance.
    public void setAvailabilityZones(java.util.Collection<AvailabilityZoneavailabilityZones) {
        if (availabilityZones == null) {
            this. = null;
            return;
        }
        availabilityZonesCopy.addAll(availabilityZones);
        this. = availabilityZonesCopy;
    }
    
    
A list of availability zones for the orderable DB instance.

NOTE: This method appends the values to the existing list (if any). Use setAvailabilityZones(java.util.Collection) or withAvailabilityZones(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:
availabilityZones A list of availability zones for the orderable DB instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OrderableDBInstanceOption withAvailabilityZones(AvailabilityZone... availabilityZones) {
        if (getAvailabilityZones() == nullsetAvailabilityZones(new java.util.ArrayList<AvailabilityZone>(availabilityZones.length));
        for (AvailabilityZone value : availabilityZones) {
            getAvailabilityZones().add(value);
        }
        return this;
    }
    
    
A list of availability zones for the orderable DB instance.

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

Parameters:
availabilityZones A list of availability zones for the orderable DB instance.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (availabilityZones == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<AvailabilityZoneavailabilityZonesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<AvailabilityZone>(availabilityZones.size());
            availabilityZonesCopy.addAll(availabilityZones);
            this. = availabilityZonesCopy;
        }
        return this;
    }

    
Indicates whether this orderable DB instance is multi-AZ capable.

Returns:
Indicates whether this orderable DB instance is multi-AZ capable.
    public Boolean isMultiAZCapable() {
        return ;
    }
    
    
Indicates whether this orderable DB instance is multi-AZ capable.

Parameters:
multiAZCapable Indicates whether this orderable DB instance is multi-AZ capable.
    public void setMultiAZCapable(Boolean multiAZCapable) {
        this. = multiAZCapable;
    }
    
    
Indicates whether this orderable DB instance is multi-AZ capable.

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

Parameters:
multiAZCapable Indicates whether this orderable DB instance is multi-AZ capable.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OrderableDBInstanceOption withMultiAZCapable(Boolean multiAZCapable) {
        this. = multiAZCapable;
        return this;
    }

    
Indicates whether this orderable DB instance is multi-AZ capable.

Returns:
Indicates whether this orderable DB instance is multi-AZ capable.
    public Boolean getMultiAZCapable() {
        return ;
    }

    
Indicates whether this orderable DB instance can have a Read Replica.

Returns:
Indicates whether this orderable DB instance can have a Read Replica.
    public Boolean isReadReplicaCapable() {
        return ;
    }
    
    
Indicates whether this orderable DB instance can have a Read Replica.

Parameters:
readReplicaCapable Indicates whether this orderable DB instance can have a Read Replica.
    public void setReadReplicaCapable(Boolean readReplicaCapable) {
        this. = readReplicaCapable;
    }
    
    
Indicates whether this orderable DB instance can have a Read Replica.

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

Parameters:
readReplicaCapable Indicates whether this orderable DB instance can have a Read Replica.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OrderableDBInstanceOption withReadReplicaCapable(Boolean readReplicaCapable) {
        this. = readReplicaCapable;
        return this;
    }

    
Indicates whether this orderable DB instance can have a Read Replica.

Returns:
Indicates whether this orderable DB instance can have a Read Replica.
    public Boolean getReadReplicaCapable() {
        return ;
    }

    
Indicates whether this is a VPC orderable DB instance.

Returns:
Indicates whether this is a VPC orderable DB instance.
    public Boolean isVpc() {
        return ;
    }
    
    
Indicates whether this is a VPC orderable DB instance.

Parameters:
vpc Indicates whether this is a VPC orderable DB instance.
    public void setVpc(Boolean vpc) {
        this. = vpc;
    }
    
    
Indicates whether this is a VPC orderable DB instance.

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

Parameters:
vpc Indicates whether this is a VPC orderable DB instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OrderableDBInstanceOption withVpc(Boolean vpc) {
        this. = vpc;
        return this;
    }

    
Indicates whether this is a VPC orderable DB instance.

Returns:
Indicates whether this is a VPC orderable DB instance.
    public Boolean getVpc() {
        return ;
    }

    
Indicates whether this orderable DB instance supports encrypted storage.

Returns:
Indicates whether this orderable DB instance supports encrypted storage.
        return ;
    }
    
    
Indicates whether this orderable DB instance supports encrypted storage.

Parameters:
supportsStorageEncryption Indicates whether this orderable DB instance supports encrypted storage.
    public void setSupportsStorageEncryption(Boolean supportsStorageEncryption) {
        this. = supportsStorageEncryption;
    }
    
    
Indicates whether this orderable DB instance supports encrypted storage.

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

Parameters:
supportsStorageEncryption Indicates whether this orderable DB instance supports encrypted storage.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OrderableDBInstanceOption withSupportsStorageEncryption(Boolean supportsStorageEncryption) {
        this. = supportsStorageEncryption;
        return this;
    }

    
Indicates whether this orderable DB instance supports encrypted storage.

Returns:
Indicates whether this orderable DB instance supports encrypted storage.
        return ;
    }

    
The storage type for this orderable DB instance.

Returns:
The storage type for this orderable DB instance.
    public String getStorageType() {
        return ;
    }
    
    
The storage type for this orderable DB instance.

Parameters:
storageType The storage type for this orderable DB instance.
    public void setStorageType(String storageType) {
        this. = storageType;
    }
    
    
The storage type for this orderable DB instance.

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

Parameters:
storageType The storage type for this orderable DB instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OrderableDBInstanceOption withStorageType(String storageType) {
        this. = storageType;
        return this;
    }

    
Indicates whether this orderable DB instance supports provisioned IOPS.

Returns:
Indicates whether this orderable DB instance supports provisioned IOPS.
    public Boolean isSupportsIops() {
        return ;
    }
    
    
Indicates whether this orderable DB instance supports provisioned IOPS.

Parameters:
supportsIops Indicates whether this orderable DB instance supports provisioned IOPS.
    public void setSupportsIops(Boolean supportsIops) {
        this. = supportsIops;
    }
    
    
Indicates whether this orderable DB instance supports provisioned IOPS.

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

Parameters:
supportsIops Indicates whether this orderable DB instance supports provisioned IOPS.
Returns:
A reference to this updated object so that method calls can be chained together.
    public OrderableDBInstanceOption withSupportsIops(Boolean supportsIops) {
        this. = supportsIops;
        return this;
    }

    
Indicates whether this orderable DB instance supports provisioned IOPS.

Returns:
Indicates whether this orderable DB instance supports provisioned IOPS.
    public Boolean getSupportsIops() {
        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 (getEngine() != nullsb.append("Engine: " + getEngine() + ",");
        if (getEngineVersion() != nullsb.append("EngineVersion: " + getEngineVersion() + ",");
        if (getDBInstanceClass() != nullsb.append("DBInstanceClass: " + getDBInstanceClass() + ",");
        if (getLicenseModel() != nullsb.append("LicenseModel: " + getLicenseModel() + ",");
        if (getAvailabilityZones() != nullsb.append("AvailabilityZones: " + getAvailabilityZones() + ",");
        if (isMultiAZCapable() != nullsb.append("MultiAZCapable: " + isMultiAZCapable() + ",");
        if (isReadReplicaCapable() != nullsb.append("ReadReplicaCapable: " + isReadReplicaCapable() + ",");
        if (isVpc() != nullsb.append("Vpc: " + isVpc() + ",");
        if (isSupportsStorageEncryption() != nullsb.append("SupportsStorageEncryption: " + isSupportsStorageEncryption() + ",");
        if (getStorageType() != nullsb.append("StorageType: " + getStorageType() + ",");
        if (isSupportsIops() != nullsb.append("SupportsIops: " + isSupportsIops() );
        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 + ((getDBInstanceClass() == null) ? 0 : getDBInstanceClass().hashCode()); 
        hashCode = prime * hashCode + ((getLicenseModel() == null) ? 0 : getLicenseModel().hashCode()); 
        hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode()); 
        hashCode = prime * hashCode + ((isMultiAZCapable() == null) ? 0 : isMultiAZCapable().hashCode()); 
        hashCode = prime * hashCode + ((isReadReplicaCapable() == null) ? 0 : isReadReplicaCapable().hashCode()); 
        hashCode = prime * hashCode + ((isVpc() == null) ? 0 : isVpc().hashCode()); 
        hashCode = prime * hashCode + ((isSupportsStorageEncryption() == null) ? 0 : isSupportsStorageEncryption().hashCode()); 
        hashCode = prime * hashCode + ((getStorageType() == null) ? 0 : getStorageType().hashCode()); 
        hashCode = prime * hashCode + ((isSupportsIops() == null) ? 0 : isSupportsIops().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof OrderableDBInstanceOption == falsereturn false;
        
        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.getDBInstanceClass() == null ^ this.getDBInstanceClass() == nullreturn false;
        if (other.getDBInstanceClass() != null && other.getDBInstanceClass().equals(this.getDBInstanceClass()) == falsereturn false
        if (other.getLicenseModel() == null ^ this.getLicenseModel() == nullreturn false;
        if (other.getLicenseModel() != null && other.getLicenseModel().equals(this.getLicenseModel()) == falsereturn false
        if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == nullreturn false;
        if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == falsereturn false
        if (other.isMultiAZCapable() == null ^ this.isMultiAZCapable() == nullreturn false;
        if (other.isMultiAZCapable() != null && other.isMultiAZCapable().equals(this.isMultiAZCapable()) == falsereturn false
        if (other.isReadReplicaCapable() == null ^ this.isReadReplicaCapable() == nullreturn false;
        if (other.isReadReplicaCapable() != null && other.isReadReplicaCapable().equals(this.isReadReplicaCapable()) == falsereturn false
        if (other.isVpc() == null ^ this.isVpc() == nullreturn false;
        if (other.isVpc() != null && other.isVpc().equals(this.isVpc()) == falsereturn false
        if (other.isSupportsStorageEncryption() == null ^ this.isSupportsStorageEncryption() == nullreturn false;
        if (other.isSupportsStorageEncryption() != null && other.isSupportsStorageEncryption().equals(this.isSupportsStorageEncryption()) == falsereturn false
        if (other.getStorageType() == null ^ this.getStorageType() == nullreturn false;
        if (other.getStorageType() != null && other.getStorageType().equals(this.getStorageType()) == falsereturn false
        if (other.isSupportsIops() == null ^ this.isSupportsIops() == nullreturn false;
        if (other.isSupportsIops() != null && other.isSupportsIops().equals(this.isSupportsIops()) == falsereturn false
        return true;
    }
    
    @Override
    public OrderableDBInstanceOption clone() {
        try {
            return (OrderableDBInstanceOptionsuper.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