com.amazonaws.services.databasemigrationservice.model.OrderableReplicationInstance Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dms Show documentation
/*
* Copyright 2017-2022 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.databasemigrationservice.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* In response to the DescribeOrderableReplicationInstances
operation, this object describes an available
* replication instance. This description includes the replication instance's type, engine version, and allocated
* storage.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class OrderableReplicationInstance implements Serializable, Cloneable, StructuredPojo {
/**
*
* The version of the replication engine.
*
*/
private String engineVersion;
/**
*
* The compute and memory capacity of the replication instance as defined for the specified replication instance
* class. For example to specify the instance class dms.c4.large, set this parameter to "dms.c4.large"
.
*
*
* For more information on the settings and capacities for the available replication instance classes, see Selecting the right DMS replication instance for your migration.
*
*/
private String replicationInstanceClass;
/**
*
* The type of storage used by the replication instance.
*
*/
private String storageType;
/**
*
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*
*/
private Integer minAllocatedStorage;
/**
*
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*
*/
private Integer maxAllocatedStorage;
/**
*
* The default amount of storage (in gigabytes) that is allocated for the replication instance.
*
*/
private Integer defaultAllocatedStorage;
/**
*
* The amount of storage (in gigabytes) that is allocated for the replication instance.
*
*/
private Integer includedAllocatedStorage;
/**
*
* List of Availability Zones for this replication instance.
*
*/
private java.util.List availabilityZones;
/**
*
* The value returned when the specified EngineVersion
of the replication instance is in Beta or test
* mode. This indicates some features might not work as expected.
*
*
*
* DMS supports the ReleaseStatus
parameter in versions 3.1.4 and later.
*
*
*/
private String releaseStatus;
/**
*
* The version of the replication engine.
*
*
* @param engineVersion
* The version of the replication engine.
*/
public void setEngineVersion(String engineVersion) {
this.engineVersion = engineVersion;
}
/**
*
* The version of the replication engine.
*
*
* @return The version of the replication engine.
*/
public String getEngineVersion() {
return this.engineVersion;
}
/**
*
* The version of the replication engine.
*
*
* @param engineVersion
* The version of the replication engine.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableReplicationInstance withEngineVersion(String engineVersion) {
setEngineVersion(engineVersion);
return this;
}
/**
*
* The compute and memory capacity of the replication instance as defined for the specified replication instance
* class. For example to specify the instance class dms.c4.large, set this parameter to "dms.c4.large"
.
*
*
* For more information on the settings and capacities for the available replication instance classes, see Selecting the right DMS replication instance for your migration.
*
*
* @param replicationInstanceClass
* The compute and memory capacity of the replication instance as defined for the specified replication
* instance class. For example to specify the instance class dms.c4.large, set this parameter to
* "dms.c4.large"
.
*
* For more information on the settings and capacities for the available replication instance classes, see Selecting the right DMS replication instance for your migration.
*/
public void setReplicationInstanceClass(String replicationInstanceClass) {
this.replicationInstanceClass = replicationInstanceClass;
}
/**
*
* The compute and memory capacity of the replication instance as defined for the specified replication instance
* class. For example to specify the instance class dms.c4.large, set this parameter to "dms.c4.large"
.
*
*
* For more information on the settings and capacities for the available replication instance classes, see Selecting the right DMS replication instance for your migration.
*
*
* @return The compute and memory capacity of the replication instance as defined for the specified replication
* instance class. For example to specify the instance class dms.c4.large, set this parameter to
* "dms.c4.large"
.
*
* For more information on the settings and capacities for the available replication instance classes, see
* Selecting the right DMS replication instance for your migration.
*/
public String getReplicationInstanceClass() {
return this.replicationInstanceClass;
}
/**
*
* The compute and memory capacity of the replication instance as defined for the specified replication instance
* class. For example to specify the instance class dms.c4.large, set this parameter to "dms.c4.large"
.
*
*
* For more information on the settings and capacities for the available replication instance classes, see Selecting the right DMS replication instance for your migration.
*
*
* @param replicationInstanceClass
* The compute and memory capacity of the replication instance as defined for the specified replication
* instance class. For example to specify the instance class dms.c4.large, set this parameter to
* "dms.c4.large"
.
*
* For more information on the settings and capacities for the available replication instance classes, see Selecting the right DMS replication instance for your migration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableReplicationInstance withReplicationInstanceClass(String replicationInstanceClass) {
setReplicationInstanceClass(replicationInstanceClass);
return this;
}
/**
*
* The type of storage used by the replication instance.
*
*
* @param storageType
* The type of storage used by the replication instance.
*/
public void setStorageType(String storageType) {
this.storageType = storageType;
}
/**
*
* The type of storage used by the replication instance.
*
*
* @return The type of storage used by the replication instance.
*/
public String getStorageType() {
return this.storageType;
}
/**
*
* The type of storage used by the replication instance.
*
*
* @param storageType
* The type of storage used by the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableReplicationInstance withStorageType(String storageType) {
setStorageType(storageType);
return this;
}
/**
*
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*
*
* @param minAllocatedStorage
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*/
public void setMinAllocatedStorage(Integer minAllocatedStorage) {
this.minAllocatedStorage = minAllocatedStorage;
}
/**
*
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*
*
* @return The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*/
public Integer getMinAllocatedStorage() {
return this.minAllocatedStorage;
}
/**
*
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*
*
* @param minAllocatedStorage
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableReplicationInstance withMinAllocatedStorage(Integer minAllocatedStorage) {
setMinAllocatedStorage(minAllocatedStorage);
return this;
}
/**
*
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*
*
* @param maxAllocatedStorage
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*/
public void setMaxAllocatedStorage(Integer maxAllocatedStorage) {
this.maxAllocatedStorage = maxAllocatedStorage;
}
/**
*
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*
*
* @return The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*/
public Integer getMaxAllocatedStorage() {
return this.maxAllocatedStorage;
}
/**
*
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
*
*
* @param maxAllocatedStorage
* The minimum amount of storage (in gigabytes) that can be allocated for the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableReplicationInstance withMaxAllocatedStorage(Integer maxAllocatedStorage) {
setMaxAllocatedStorage(maxAllocatedStorage);
return this;
}
/**
*
* The default amount of storage (in gigabytes) that is allocated for the replication instance.
*
*
* @param defaultAllocatedStorage
* The default amount of storage (in gigabytes) that is allocated for the replication instance.
*/
public void setDefaultAllocatedStorage(Integer defaultAllocatedStorage) {
this.defaultAllocatedStorage = defaultAllocatedStorage;
}
/**
*
* The default amount of storage (in gigabytes) that is allocated for the replication instance.
*
*
* @return The default amount of storage (in gigabytes) that is allocated for the replication instance.
*/
public Integer getDefaultAllocatedStorage() {
return this.defaultAllocatedStorage;
}
/**
*
* The default amount of storage (in gigabytes) that is allocated for the replication instance.
*
*
* @param defaultAllocatedStorage
* The default amount of storage (in gigabytes) that is allocated for the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableReplicationInstance withDefaultAllocatedStorage(Integer defaultAllocatedStorage) {
setDefaultAllocatedStorage(defaultAllocatedStorage);
return this;
}
/**
*
* The amount of storage (in gigabytes) that is allocated for the replication instance.
*
*
* @param includedAllocatedStorage
* The amount of storage (in gigabytes) that is allocated for the replication instance.
*/
public void setIncludedAllocatedStorage(Integer includedAllocatedStorage) {
this.includedAllocatedStorage = includedAllocatedStorage;
}
/**
*
* The amount of storage (in gigabytes) that is allocated for the replication instance.
*
*
* @return The amount of storage (in gigabytes) that is allocated for the replication instance.
*/
public Integer getIncludedAllocatedStorage() {
return this.includedAllocatedStorage;
}
/**
*
* The amount of storage (in gigabytes) that is allocated for the replication instance.
*
*
* @param includedAllocatedStorage
* The amount of storage (in gigabytes) that is allocated for the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableReplicationInstance withIncludedAllocatedStorage(Integer includedAllocatedStorage) {
setIncludedAllocatedStorage(includedAllocatedStorage);
return this;
}
/**
*
* List of Availability Zones for this replication instance.
*
*
* @return List of Availability Zones for this replication instance.
*/
public java.util.List getAvailabilityZones() {
return availabilityZones;
}
/**
*
* List of Availability Zones for this replication instance.
*
*
* @param availabilityZones
* List of Availability Zones for this replication instance.
*/
public void setAvailabilityZones(java.util.Collection availabilityZones) {
if (availabilityZones == null) {
this.availabilityZones = null;
return;
}
this.availabilityZones = new java.util.ArrayList(availabilityZones);
}
/**
*
* List of Availability Zones for this replication 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
* List of Availability Zones for this replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableReplicationInstance withAvailabilityZones(String... availabilityZones) {
if (this.availabilityZones == null) {
setAvailabilityZones(new java.util.ArrayList(availabilityZones.length));
}
for (String ele : availabilityZones) {
this.availabilityZones.add(ele);
}
return this;
}
/**
*
* List of Availability Zones for this replication instance.
*
*
* @param availabilityZones
* List of Availability Zones for this replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrderableReplicationInstance withAvailabilityZones(java.util.Collection availabilityZones) {
setAvailabilityZones(availabilityZones);
return this;
}
/**
*
* The value returned when the specified EngineVersion
of the replication instance is in Beta or test
* mode. This indicates some features might not work as expected.
*
*
*
* DMS supports the ReleaseStatus
parameter in versions 3.1.4 and later.
*
*
*
* @param releaseStatus
* The value returned when the specified EngineVersion
of the replication instance is in Beta or
* test mode. This indicates some features might not work as expected.
*
* DMS supports the ReleaseStatus
parameter in versions 3.1.4 and later.
*
* @see ReleaseStatusValues
*/
public void setReleaseStatus(String releaseStatus) {
this.releaseStatus = releaseStatus;
}
/**
*
* The value returned when the specified EngineVersion
of the replication instance is in Beta or test
* mode. This indicates some features might not work as expected.
*
*
*
* DMS supports the ReleaseStatus
parameter in versions 3.1.4 and later.
*
*
*
* @return The value returned when the specified EngineVersion
of the replication instance is in Beta
* or test mode. This indicates some features might not work as expected.
*
* DMS supports the ReleaseStatus
parameter in versions 3.1.4 and later.
*
* @see ReleaseStatusValues
*/
public String getReleaseStatus() {
return this.releaseStatus;
}
/**
*
* The value returned when the specified EngineVersion
of the replication instance is in Beta or test
* mode. This indicates some features might not work as expected.
*
*
*
* DMS supports the ReleaseStatus
parameter in versions 3.1.4 and later.
*
*
*
* @param releaseStatus
* The value returned when the specified EngineVersion
of the replication instance is in Beta or
* test mode. This indicates some features might not work as expected.
*
* DMS supports the ReleaseStatus
parameter in versions 3.1.4 and later.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ReleaseStatusValues
*/
public OrderableReplicationInstance withReleaseStatus(String releaseStatus) {
setReleaseStatus(releaseStatus);
return this;
}
/**
*
* The value returned when the specified EngineVersion
of the replication instance is in Beta or test
* mode. This indicates some features might not work as expected.
*
*
*
* DMS supports the ReleaseStatus
parameter in versions 3.1.4 and later.
*
*
*
* @param releaseStatus
* The value returned when the specified EngineVersion
of the replication instance is in Beta or
* test mode. This indicates some features might not work as expected.
*
* DMS supports the ReleaseStatus
parameter in versions 3.1.4 and later.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ReleaseStatusValues
*/
public OrderableReplicationInstance withReleaseStatus(ReleaseStatusValues releaseStatus) {
this.releaseStatus = releaseStatus.toString();
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 (getEngineVersion() != null)
sb.append("EngineVersion: ").append(getEngineVersion()).append(",");
if (getReplicationInstanceClass() != null)
sb.append("ReplicationInstanceClass: ").append(getReplicationInstanceClass()).append(",");
if (getStorageType() != null)
sb.append("StorageType: ").append(getStorageType()).append(",");
if (getMinAllocatedStorage() != null)
sb.append("MinAllocatedStorage: ").append(getMinAllocatedStorage()).append(",");
if (getMaxAllocatedStorage() != null)
sb.append("MaxAllocatedStorage: ").append(getMaxAllocatedStorage()).append(",");
if (getDefaultAllocatedStorage() != null)
sb.append("DefaultAllocatedStorage: ").append(getDefaultAllocatedStorage()).append(",");
if (getIncludedAllocatedStorage() != null)
sb.append("IncludedAllocatedStorage: ").append(getIncludedAllocatedStorage()).append(",");
if (getAvailabilityZones() != null)
sb.append("AvailabilityZones: ").append(getAvailabilityZones()).append(",");
if (getReleaseStatus() != null)
sb.append("ReleaseStatus: ").append(getReleaseStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OrderableReplicationInstance == false)
return false;
OrderableReplicationInstance other = (OrderableReplicationInstance) obj;
if (other.getEngineVersion() == null ^ this.getEngineVersion() == null)
return false;
if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false)
return false;
if (other.getReplicationInstanceClass() == null ^ this.getReplicationInstanceClass() == null)
return false;
if (other.getReplicationInstanceClass() != null && other.getReplicationInstanceClass().equals(this.getReplicationInstanceClass()) == false)
return false;
if (other.getStorageType() == null ^ this.getStorageType() == null)
return false;
if (other.getStorageType() != null && other.getStorageType().equals(this.getStorageType()) == false)
return false;
if (other.getMinAllocatedStorage() == null ^ this.getMinAllocatedStorage() == null)
return false;
if (other.getMinAllocatedStorage() != null && other.getMinAllocatedStorage().equals(this.getMinAllocatedStorage()) == false)
return false;
if (other.getMaxAllocatedStorage() == null ^ this.getMaxAllocatedStorage() == null)
return false;
if (other.getMaxAllocatedStorage() != null && other.getMaxAllocatedStorage().equals(this.getMaxAllocatedStorage()) == false)
return false;
if (other.getDefaultAllocatedStorage() == null ^ this.getDefaultAllocatedStorage() == null)
return false;
if (other.getDefaultAllocatedStorage() != null && other.getDefaultAllocatedStorage().equals(this.getDefaultAllocatedStorage()) == false)
return false;
if (other.getIncludedAllocatedStorage() == null ^ this.getIncludedAllocatedStorage() == null)
return false;
if (other.getIncludedAllocatedStorage() != null && other.getIncludedAllocatedStorage().equals(this.getIncludedAllocatedStorage()) == 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.getReleaseStatus() == null ^ this.getReleaseStatus() == null)
return false;
if (other.getReleaseStatus() != null && other.getReleaseStatus().equals(this.getReleaseStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode());
hashCode = prime * hashCode + ((getReplicationInstanceClass() == null) ? 0 : getReplicationInstanceClass().hashCode());
hashCode = prime * hashCode + ((getStorageType() == null) ? 0 : getStorageType().hashCode());
hashCode = prime * hashCode + ((getMinAllocatedStorage() == null) ? 0 : getMinAllocatedStorage().hashCode());
hashCode = prime * hashCode + ((getMaxAllocatedStorage() == null) ? 0 : getMaxAllocatedStorage().hashCode());
hashCode = prime * hashCode + ((getDefaultAllocatedStorage() == null) ? 0 : getDefaultAllocatedStorage().hashCode());
hashCode = prime * hashCode + ((getIncludedAllocatedStorage() == null) ? 0 : getIncludedAllocatedStorage().hashCode());
hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode());
hashCode = prime * hashCode + ((getReleaseStatus() == null) ? 0 : getReleaseStatus().hashCode());
return hashCode;
}
@Override
public OrderableReplicationInstance clone() {
try {
return (OrderableReplicationInstance) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.databasemigrationservice.model.transform.OrderableReplicationInstanceMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}