com.amazonaws.services.docdb.model.OrderableDBInstanceOption Maven / Gradle / Ivy
Show all versions of aws-java-sdk-docdb Show documentation
/*
* Copyright 2019-2024 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.docdb.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* The options that are available for an instance.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class OrderableDBInstanceOption implements Serializable, Cloneable {
/**
*
* The engine type of an instance.
*
*/
private String engine;
/**
*
* The engine version of an instance.
*
*/
private String engineVersion;
/**
*
* The instance class for an instance.
*
*/
private String dBInstanceClass;
/**
*
* The license model for an instance.
*
*/
private String licenseModel;
/**
*
* A list of Availability Zones for an instance.
*
*/
private java.util.List availabilityZones;
/**
*
* Indicates whether an instance is in a virtual private cloud (VPC).
*
*/
private Boolean vpc;
/**
*
* The storage type to associate with the DB cluster
*
*/
private String storageType;
/**
*
* The engine type of an instance.
*
*
* @param engine
* The engine type of an instance.
*/
public void setEngine(String engine) {
this.engine = engine;
}
/**
*
* The engine type of an instance.
*
*
* @return The engine type of an instance.
*/
public String getEngine() {
return this.engine;
}
/**
*
* The engine type of an instance.
*
*
* @param engine
* The engine type of an instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableDBInstanceOption withEngine(String engine) {
setEngine(engine);
return this;
}
/**
*
* The engine version of an instance.
*
*
* @param engineVersion
* The engine version of an instance.
*/
public void setEngineVersion(String engineVersion) {
this.engineVersion = engineVersion;
}
/**
*
* The engine version of an instance.
*
*
* @return The engine version of an instance.
*/
public String getEngineVersion() {
return this.engineVersion;
}
/**
*
* The engine version of an instance.
*
*
* @param engineVersion
* The engine version of an instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableDBInstanceOption withEngineVersion(String engineVersion) {
setEngineVersion(engineVersion);
return this;
}
/**
*
* The instance class for an instance.
*
*
* @param dBInstanceClass
* The instance class for an instance.
*/
public void setDBInstanceClass(String dBInstanceClass) {
this.dBInstanceClass = dBInstanceClass;
}
/**
*
* The instance class for an instance.
*
*
* @return The instance class for an instance.
*/
public String getDBInstanceClass() {
return this.dBInstanceClass;
}
/**
*
* The instance class for an instance.
*
*
* @param dBInstanceClass
* The instance class for an instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableDBInstanceOption withDBInstanceClass(String dBInstanceClass) {
setDBInstanceClass(dBInstanceClass);
return this;
}
/**
*
* The license model for an instance.
*
*
* @param licenseModel
* The license model for an instance.
*/
public void setLicenseModel(String licenseModel) {
this.licenseModel = licenseModel;
}
/**
*
* The license model for an instance.
*
*
* @return The license model for an instance.
*/
public String getLicenseModel() {
return this.licenseModel;
}
/**
*
* The license model for an instance.
*
*
* @param licenseModel
* The license model for an instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableDBInstanceOption withLicenseModel(String licenseModel) {
setLicenseModel(licenseModel);
return this;
}
/**
*
* A list of Availability Zones for an instance.
*
*
* @return A list of Availability Zones for an instance.
*/
public java.util.List getAvailabilityZones() {
return availabilityZones;
}
/**
*
* A list of Availability Zones for an instance.
*
*
* @param availabilityZones
* A list of Availability Zones for an instance.
*/
public void setAvailabilityZones(java.util.Collection availabilityZones) {
if (availabilityZones == null) {
this.availabilityZones = null;
return;
}
this.availabilityZones = new java.util.ArrayList(availabilityZones);
}
/**
*
* A list of Availability Zones for an instance.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAvailabilityZones(java.util.Collection)} or {@link #withAvailabilityZones(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param availabilityZones
* A list of Availability Zones for an instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableDBInstanceOption withAvailabilityZones(AvailabilityZone... availabilityZones) {
if (this.availabilityZones == null) {
setAvailabilityZones(new java.util.ArrayList(availabilityZones.length));
}
for (AvailabilityZone ele : availabilityZones) {
this.availabilityZones.add(ele);
}
return this;
}
/**
*
* A list of Availability Zones for an instance.
*
*
* @param availabilityZones
* A list of Availability Zones for an instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableDBInstanceOption withAvailabilityZones(java.util.Collection availabilityZones) {
setAvailabilityZones(availabilityZones);
return this;
}
/**
*
* Indicates whether an instance is in a virtual private cloud (VPC).
*
*
* @param vpc
* Indicates whether an instance is in a virtual private cloud (VPC).
*/
public void setVpc(Boolean vpc) {
this.vpc = vpc;
}
/**
*
* Indicates whether an instance is in a virtual private cloud (VPC).
*
*
* @return Indicates whether an instance is in a virtual private cloud (VPC).
*/
public Boolean getVpc() {
return this.vpc;
}
/**
*
* Indicates whether an instance is in a virtual private cloud (VPC).
*
*
* @param vpc
* Indicates whether an instance is in a virtual private cloud (VPC).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableDBInstanceOption withVpc(Boolean vpc) {
setVpc(vpc);
return this;
}
/**
*
* Indicates whether an instance is in a virtual private cloud (VPC).
*
*
* @return Indicates whether an instance is in a virtual private cloud (VPC).
*/
public Boolean isVpc() {
return this.vpc;
}
/**
*
* The storage type to associate with the DB cluster
*
*
* @param storageType
* The storage type to associate with the DB cluster
*/
public void setStorageType(String storageType) {
this.storageType = storageType;
}
/**
*
* The storage type to associate with the DB cluster
*
*
* @return The storage type to associate with the DB cluster
*/
public String getStorageType() {
return this.storageType;
}
/**
*
* The storage type to associate with the DB cluster
*
*
* @param storageType
* The storage type to associate with the DB cluster
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableDBInstanceOption withStorageType(String storageType) {
setStorageType(storageType);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getEngine() != null)
sb.append("Engine: ").append(getEngine()).append(",");
if (getEngineVersion() != null)
sb.append("EngineVersion: ").append(getEngineVersion()).append(",");
if (getDBInstanceClass() != null)
sb.append("DBInstanceClass: ").append(getDBInstanceClass()).append(",");
if (getLicenseModel() != null)
sb.append("LicenseModel: ").append(getLicenseModel()).append(",");
if (getAvailabilityZones() != null)
sb.append("AvailabilityZones: ").append(getAvailabilityZones()).append(",");
if (getVpc() != null)
sb.append("Vpc: ").append(getVpc()).append(",");
if (getStorageType() != null)
sb.append("StorageType: ").append(getStorageType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OrderableDBInstanceOption == false)
return false;
OrderableDBInstanceOption other = (OrderableDBInstanceOption) obj;
if (other.getEngine() == null ^ this.getEngine() == null)
return false;
if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == false)
return false;
if (other.getEngineVersion() == null ^ this.getEngineVersion() == null)
return false;
if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false)
return false;
if (other.getDBInstanceClass() == null ^ this.getDBInstanceClass() == null)
return false;
if (other.getDBInstanceClass() != null && other.getDBInstanceClass().equals(this.getDBInstanceClass()) == false)
return false;
if (other.getLicenseModel() == null ^ this.getLicenseModel() == null)
return false;
if (other.getLicenseModel() != null && other.getLicenseModel().equals(this.getLicenseModel()) == false)
return false;
if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == null)
return false;
if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == false)
return false;
if (other.getVpc() == null ^ this.getVpc() == null)
return false;
if (other.getVpc() != null && other.getVpc().equals(this.getVpc()) == false)
return false;
if (other.getStorageType() == null ^ this.getStorageType() == null)
return false;
if (other.getStorageType() != null && other.getStorageType().equals(this.getStorageType()) == false)
return false;
return true;
}
@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 + ((getVpc() == null) ? 0 : getVpc().hashCode());
hashCode = prime * hashCode + ((getStorageType() == null) ? 0 : getStorageType().hashCode());
return hashCode;
}
@Override
public OrderableDBInstanceOption clone() {
try {
return (OrderableDBInstanceOption) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}