software.amazon.awssdk.services.databasemigration.model.ReplicationInstance Maven / Gradle / Ivy
Show all versions of dms Show documentation
/*
* Copyright 2012-2017 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 software.amazon.awssdk.services.databasemigration.model;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import javax.annotation.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.core.protocol.ProtocolMarshaller;
import software.amazon.awssdk.core.protocol.StructuredPojo;
import software.amazon.awssdk.services.databasemigration.transform.ReplicationInstanceMarshaller;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
*/
@Generated("software.amazon.awssdk:codegen")
public class ReplicationInstance implements StructuredPojo, ToCopyableBuilder {
private final String replicationInstanceIdentifier;
private final String replicationInstanceClass;
private final String replicationInstanceStatus;
private final Integer allocatedStorage;
private final Instant instanceCreateTime;
private final List vpcSecurityGroups;
private final String availabilityZone;
private final ReplicationSubnetGroup replicationSubnetGroup;
private final String preferredMaintenanceWindow;
private final ReplicationPendingModifiedValues pendingModifiedValues;
private final Boolean multiAZ;
private final String engineVersion;
private final Boolean autoMinorVersionUpgrade;
private final String kmsKeyId;
private final String replicationInstanceArn;
private final String replicationInstancePublicIpAddress;
private final String replicationInstancePrivateIpAddress;
private final List replicationInstancePublicIpAddresses;
private final List replicationInstancePrivateIpAddresses;
private final Boolean publiclyAccessible;
private final String secondaryAvailabilityZone;
private ReplicationInstance(BuilderImpl builder) {
this.replicationInstanceIdentifier = builder.replicationInstanceIdentifier;
this.replicationInstanceClass = builder.replicationInstanceClass;
this.replicationInstanceStatus = builder.replicationInstanceStatus;
this.allocatedStorage = builder.allocatedStorage;
this.instanceCreateTime = builder.instanceCreateTime;
this.vpcSecurityGroups = builder.vpcSecurityGroups;
this.availabilityZone = builder.availabilityZone;
this.replicationSubnetGroup = builder.replicationSubnetGroup;
this.preferredMaintenanceWindow = builder.preferredMaintenanceWindow;
this.pendingModifiedValues = builder.pendingModifiedValues;
this.multiAZ = builder.multiAZ;
this.engineVersion = builder.engineVersion;
this.autoMinorVersionUpgrade = builder.autoMinorVersionUpgrade;
this.kmsKeyId = builder.kmsKeyId;
this.replicationInstanceArn = builder.replicationInstanceArn;
this.replicationInstancePublicIpAddress = builder.replicationInstancePublicIpAddress;
this.replicationInstancePrivateIpAddress = builder.replicationInstancePrivateIpAddress;
this.replicationInstancePublicIpAddresses = builder.replicationInstancePublicIpAddresses;
this.replicationInstancePrivateIpAddresses = builder.replicationInstancePrivateIpAddresses;
this.publiclyAccessible = builder.publiclyAccessible;
this.secondaryAvailabilityZone = builder.secondaryAvailabilityZone;
}
/**
*
* The replication instance identifier. This parameter is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 alphanumeric characters or hyphens.
*
*
* -
*
* First character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: myrepinstance
*
*
* @return The replication instance identifier. This parameter is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 alphanumeric characters or hyphens.
*
*
* -
*
* First character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: myrepinstance
*/
public String replicationInstanceIdentifier() {
return replicationInstanceIdentifier;
}
/**
*
* The compute and memory capacity of the replication instance.
*
*
* Valid Values:
* dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge
*
*
* @return The compute and memory capacity of the replication instance.
*
* Valid Values:
* dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge
*/
public String replicationInstanceClass() {
return replicationInstanceClass;
}
/**
*
* The status of the replication instance.
*
*
* @return The status of the replication instance.
*/
public String replicationInstanceStatus() {
return replicationInstanceStatus;
}
/**
*
* 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 allocatedStorage() {
return allocatedStorage;
}
/**
*
* The time the replication instance was created.
*
*
* @return The time the replication instance was created.
*/
public Instant instanceCreateTime() {
return instanceCreateTime;
}
/**
*
* The VPC security group for the instance.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* @return The VPC security group for the instance.
*/
public List vpcSecurityGroups() {
return vpcSecurityGroups;
}
/**
*
* The Availability Zone for the instance.
*
*
* @return The Availability Zone for the instance.
*/
public String availabilityZone() {
return availabilityZone;
}
/**
*
* The subnet group for the replication instance.
*
*
* @return The subnet group for the replication instance.
*/
public ReplicationSubnetGroup replicationSubnetGroup() {
return replicationSubnetGroup;
}
/**
*
* The maintenance window times for the replication instance.
*
*
* @return The maintenance window times for the replication instance.
*/
public String preferredMaintenanceWindow() {
return preferredMaintenanceWindow;
}
/**
*
* The pending modification values.
*
*
* @return The pending modification values.
*/
public ReplicationPendingModifiedValues pendingModifiedValues() {
return pendingModifiedValues;
}
/**
*
* Specifies if the replication instance is a Multi-AZ deployment. You cannot set the AvailabilityZone
* parameter if the Multi-AZ parameter is set to true
.
*
*
* @return Specifies if the replication instance is a Multi-AZ deployment. You cannot set the
* AvailabilityZone
parameter if the Multi-AZ parameter is set to true
.
*/
public Boolean multiAZ() {
return multiAZ;
}
/**
*
* The engine version number of the replication instance.
*
*
* @return The engine version number of the replication instance.
*/
public String engineVersion() {
return engineVersion;
}
/**
*
* Boolean value indicating if minor version upgrades will be automatically applied to the instance.
*
*
* @return Boolean value indicating if minor version upgrades will be automatically applied to the instance.
*/
public Boolean autoMinorVersionUpgrade() {
return autoMinorVersionUpgrade;
}
/**
*
* The KMS key identifier that is used to encrypt the content on the replication instance. If you do not specify a
* value for the KmsKeyId parameter, then AWS DMS will use your default encryption key. AWS KMS creates the default
* encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
*
*
* @return The KMS key identifier that is used to encrypt the content on the replication instance. If you do not
* specify a value for the KmsKeyId parameter, then AWS DMS will use your default encryption key. AWS KMS
* creates the default encryption key for your AWS account. Your AWS account has a different default
* encryption key for each AWS region.
*/
public String kmsKeyId() {
return kmsKeyId;
}
/**
*
* The Amazon Resource Name (ARN) of the replication instance.
*
*
* @return The Amazon Resource Name (ARN) of the replication instance.
*/
public String replicationInstanceArn() {
return replicationInstanceArn;
}
/**
*
* The public IP address of the replication instance.
*
*
* @return The public IP address of the replication instance.
*/
public String replicationInstancePublicIpAddress() {
return replicationInstancePublicIpAddress;
}
/**
*
* The private IP address of the replication instance.
*
*
* @return The private IP address of the replication instance.
*/
public String replicationInstancePrivateIpAddress() {
return replicationInstancePrivateIpAddress;
}
/**
*
* The public IP address of the replication instance.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* @return The public IP address of the replication instance.
*/
public List replicationInstancePublicIpAddresses() {
return replicationInstancePublicIpAddresses;
}
/**
*
* The private IP address of the replication instance.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* @return The private IP address of the replication instance.
*/
public List replicationInstancePrivateIpAddresses() {
return replicationInstancePrivateIpAddresses;
}
/**
*
* Specifies the accessibility options for the replication instance. A value of true
represents an
* instance with a public IP address. A value of false
represents an instance with a private IP
* address. The default value is true
.
*
*
* @return Specifies the accessibility options for the replication instance. A value of true
represents
* an instance with a public IP address. A value of false
represents an instance with a private
* IP address. The default value is true
.
*/
public Boolean publiclyAccessible() {
return publiclyAccessible;
}
/**
*
* The availability zone of the standby replication instance in a Multi-AZ deployment.
*
*
* @return The availability zone of the standby replication instance in a Multi-AZ deployment.
*/
public String secondaryAvailabilityZone() {
return secondaryAvailabilityZone;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + ((replicationInstanceIdentifier() == null) ? 0 : replicationInstanceIdentifier().hashCode());
hashCode = 31 * hashCode + ((replicationInstanceClass() == null) ? 0 : replicationInstanceClass().hashCode());
hashCode = 31 * hashCode + ((replicationInstanceStatus() == null) ? 0 : replicationInstanceStatus().hashCode());
hashCode = 31 * hashCode + ((allocatedStorage() == null) ? 0 : allocatedStorage().hashCode());
hashCode = 31 * hashCode + ((instanceCreateTime() == null) ? 0 : instanceCreateTime().hashCode());
hashCode = 31 * hashCode + ((vpcSecurityGroups() == null) ? 0 : vpcSecurityGroups().hashCode());
hashCode = 31 * hashCode + ((availabilityZone() == null) ? 0 : availabilityZone().hashCode());
hashCode = 31 * hashCode + ((replicationSubnetGroup() == null) ? 0 : replicationSubnetGroup().hashCode());
hashCode = 31 * hashCode + ((preferredMaintenanceWindow() == null) ? 0 : preferredMaintenanceWindow().hashCode());
hashCode = 31 * hashCode + ((pendingModifiedValues() == null) ? 0 : pendingModifiedValues().hashCode());
hashCode = 31 * hashCode + ((multiAZ() == null) ? 0 : multiAZ().hashCode());
hashCode = 31 * hashCode + ((engineVersion() == null) ? 0 : engineVersion().hashCode());
hashCode = 31 * hashCode + ((autoMinorVersionUpgrade() == null) ? 0 : autoMinorVersionUpgrade().hashCode());
hashCode = 31 * hashCode + ((kmsKeyId() == null) ? 0 : kmsKeyId().hashCode());
hashCode = 31 * hashCode + ((replicationInstanceArn() == null) ? 0 : replicationInstanceArn().hashCode());
hashCode = 31 * hashCode
+ ((replicationInstancePublicIpAddress() == null) ? 0 : replicationInstancePublicIpAddress().hashCode());
hashCode = 31 * hashCode
+ ((replicationInstancePrivateIpAddress() == null) ? 0 : replicationInstancePrivateIpAddress().hashCode());
hashCode = 31 * hashCode
+ ((replicationInstancePublicIpAddresses() == null) ? 0 : replicationInstancePublicIpAddresses().hashCode());
hashCode = 31 * hashCode
+ ((replicationInstancePrivateIpAddresses() == null) ? 0 : replicationInstancePrivateIpAddresses().hashCode());
hashCode = 31 * hashCode + ((publiclyAccessible() == null) ? 0 : publiclyAccessible().hashCode());
hashCode = 31 * hashCode + ((secondaryAvailabilityZone() == null) ? 0 : secondaryAvailabilityZone().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof ReplicationInstance)) {
return false;
}
ReplicationInstance other = (ReplicationInstance) obj;
if (other.replicationInstanceIdentifier() == null ^ this.replicationInstanceIdentifier() == null) {
return false;
}
if (other.replicationInstanceIdentifier() != null
&& !other.replicationInstanceIdentifier().equals(this.replicationInstanceIdentifier())) {
return false;
}
if (other.replicationInstanceClass() == null ^ this.replicationInstanceClass() == null) {
return false;
}
if (other.replicationInstanceClass() != null && !other.replicationInstanceClass().equals(this.replicationInstanceClass())) {
return false;
}
if (other.replicationInstanceStatus() == null ^ this.replicationInstanceStatus() == null) {
return false;
}
if (other.replicationInstanceStatus() != null
&& !other.replicationInstanceStatus().equals(this.replicationInstanceStatus())) {
return false;
}
if (other.allocatedStorage() == null ^ this.allocatedStorage() == null) {
return false;
}
if (other.allocatedStorage() != null && !other.allocatedStorage().equals(this.allocatedStorage())) {
return false;
}
if (other.instanceCreateTime() == null ^ this.instanceCreateTime() == null) {
return false;
}
if (other.instanceCreateTime() != null && !other.instanceCreateTime().equals(this.instanceCreateTime())) {
return false;
}
if (other.vpcSecurityGroups() == null ^ this.vpcSecurityGroups() == null) {
return false;
}
if (other.vpcSecurityGroups() != null && !other.vpcSecurityGroups().equals(this.vpcSecurityGroups())) {
return false;
}
if (other.availabilityZone() == null ^ this.availabilityZone() == null) {
return false;
}
if (other.availabilityZone() != null && !other.availabilityZone().equals(this.availabilityZone())) {
return false;
}
if (other.replicationSubnetGroup() == null ^ this.replicationSubnetGroup() == null) {
return false;
}
if (other.replicationSubnetGroup() != null && !other.replicationSubnetGroup().equals(this.replicationSubnetGroup())) {
return false;
}
if (other.preferredMaintenanceWindow() == null ^ this.preferredMaintenanceWindow() == null) {
return false;
}
if (other.preferredMaintenanceWindow() != null
&& !other.preferredMaintenanceWindow().equals(this.preferredMaintenanceWindow())) {
return false;
}
if (other.pendingModifiedValues() == null ^ this.pendingModifiedValues() == null) {
return false;
}
if (other.pendingModifiedValues() != null && !other.pendingModifiedValues().equals(this.pendingModifiedValues())) {
return false;
}
if (other.multiAZ() == null ^ this.multiAZ() == null) {
return false;
}
if (other.multiAZ() != null && !other.multiAZ().equals(this.multiAZ())) {
return false;
}
if (other.engineVersion() == null ^ this.engineVersion() == null) {
return false;
}
if (other.engineVersion() != null && !other.engineVersion().equals(this.engineVersion())) {
return false;
}
if (other.autoMinorVersionUpgrade() == null ^ this.autoMinorVersionUpgrade() == null) {
return false;
}
if (other.autoMinorVersionUpgrade() != null && !other.autoMinorVersionUpgrade().equals(this.autoMinorVersionUpgrade())) {
return false;
}
if (other.kmsKeyId() == null ^ this.kmsKeyId() == null) {
return false;
}
if (other.kmsKeyId() != null && !other.kmsKeyId().equals(this.kmsKeyId())) {
return false;
}
if (other.replicationInstanceArn() == null ^ this.replicationInstanceArn() == null) {
return false;
}
if (other.replicationInstanceArn() != null && !other.replicationInstanceArn().equals(this.replicationInstanceArn())) {
return false;
}
if (other.replicationInstancePublicIpAddress() == null ^ this.replicationInstancePublicIpAddress() == null) {
return false;
}
if (other.replicationInstancePublicIpAddress() != null
&& !other.replicationInstancePublicIpAddress().equals(this.replicationInstancePublicIpAddress())) {
return false;
}
if (other.replicationInstancePrivateIpAddress() == null ^ this.replicationInstancePrivateIpAddress() == null) {
return false;
}
if (other.replicationInstancePrivateIpAddress() != null
&& !other.replicationInstancePrivateIpAddress().equals(this.replicationInstancePrivateIpAddress())) {
return false;
}
if (other.replicationInstancePublicIpAddresses() == null ^ this.replicationInstancePublicIpAddresses() == null) {
return false;
}
if (other.replicationInstancePublicIpAddresses() != null
&& !other.replicationInstancePublicIpAddresses().equals(this.replicationInstancePublicIpAddresses())) {
return false;
}
if (other.replicationInstancePrivateIpAddresses() == null ^ this.replicationInstancePrivateIpAddresses() == null) {
return false;
}
if (other.replicationInstancePrivateIpAddresses() != null
&& !other.replicationInstancePrivateIpAddresses().equals(this.replicationInstancePrivateIpAddresses())) {
return false;
}
if (other.publiclyAccessible() == null ^ this.publiclyAccessible() == null) {
return false;
}
if (other.publiclyAccessible() != null && !other.publiclyAccessible().equals(this.publiclyAccessible())) {
return false;
}
if (other.secondaryAvailabilityZone() == null ^ this.secondaryAvailabilityZone() == null) {
return false;
}
if (other.secondaryAvailabilityZone() != null
&& !other.secondaryAvailabilityZone().equals(this.secondaryAvailabilityZone())) {
return false;
}
return true;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("{");
if (replicationInstanceIdentifier() != null) {
sb.append("ReplicationInstanceIdentifier: ").append(replicationInstanceIdentifier()).append(",");
}
if (replicationInstanceClass() != null) {
sb.append("ReplicationInstanceClass: ").append(replicationInstanceClass()).append(",");
}
if (replicationInstanceStatus() != null) {
sb.append("ReplicationInstanceStatus: ").append(replicationInstanceStatus()).append(",");
}
if (allocatedStorage() != null) {
sb.append("AllocatedStorage: ").append(allocatedStorage()).append(",");
}
if (instanceCreateTime() != null) {
sb.append("InstanceCreateTime: ").append(instanceCreateTime()).append(",");
}
if (vpcSecurityGroups() != null) {
sb.append("VpcSecurityGroups: ").append(vpcSecurityGroups()).append(",");
}
if (availabilityZone() != null) {
sb.append("AvailabilityZone: ").append(availabilityZone()).append(",");
}
if (replicationSubnetGroup() != null) {
sb.append("ReplicationSubnetGroup: ").append(replicationSubnetGroup()).append(",");
}
if (preferredMaintenanceWindow() != null) {
sb.append("PreferredMaintenanceWindow: ").append(preferredMaintenanceWindow()).append(",");
}
if (pendingModifiedValues() != null) {
sb.append("PendingModifiedValues: ").append(pendingModifiedValues()).append(",");
}
if (multiAZ() != null) {
sb.append("MultiAZ: ").append(multiAZ()).append(",");
}
if (engineVersion() != null) {
sb.append("EngineVersion: ").append(engineVersion()).append(",");
}
if (autoMinorVersionUpgrade() != null) {
sb.append("AutoMinorVersionUpgrade: ").append(autoMinorVersionUpgrade()).append(",");
}
if (kmsKeyId() != null) {
sb.append("KmsKeyId: ").append(kmsKeyId()).append(",");
}
if (replicationInstanceArn() != null) {
sb.append("ReplicationInstanceArn: ").append(replicationInstanceArn()).append(",");
}
if (replicationInstancePublicIpAddress() != null) {
sb.append("ReplicationInstancePublicIpAddress: ").append(replicationInstancePublicIpAddress()).append(",");
}
if (replicationInstancePrivateIpAddress() != null) {
sb.append("ReplicationInstancePrivateIpAddress: ").append(replicationInstancePrivateIpAddress()).append(",");
}
if (replicationInstancePublicIpAddresses() != null) {
sb.append("ReplicationInstancePublicIpAddresses: ").append(replicationInstancePublicIpAddresses()).append(",");
}
if (replicationInstancePrivateIpAddresses() != null) {
sb.append("ReplicationInstancePrivateIpAddresses: ").append(replicationInstancePrivateIpAddresses()).append(",");
}
if (publiclyAccessible() != null) {
sb.append("PubliclyAccessible: ").append(publiclyAccessible()).append(",");
}
if (secondaryAvailabilityZone() != null) {
sb.append("SecondaryAvailabilityZone: ").append(secondaryAvailabilityZone()).append(",");
}
if (sb.length() > 1) {
sb.setLength(sb.length() - 1);
}
sb.append("}");
return sb.toString();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "ReplicationInstanceIdentifier":
return Optional.of(clazz.cast(replicationInstanceIdentifier()));
case "ReplicationInstanceClass":
return Optional.of(clazz.cast(replicationInstanceClass()));
case "ReplicationInstanceStatus":
return Optional.of(clazz.cast(replicationInstanceStatus()));
case "AllocatedStorage":
return Optional.of(clazz.cast(allocatedStorage()));
case "InstanceCreateTime":
return Optional.of(clazz.cast(instanceCreateTime()));
case "VpcSecurityGroups":
return Optional.of(clazz.cast(vpcSecurityGroups()));
case "AvailabilityZone":
return Optional.of(clazz.cast(availabilityZone()));
case "ReplicationSubnetGroup":
return Optional.of(clazz.cast(replicationSubnetGroup()));
case "PreferredMaintenanceWindow":
return Optional.of(clazz.cast(preferredMaintenanceWindow()));
case "PendingModifiedValues":
return Optional.of(clazz.cast(pendingModifiedValues()));
case "MultiAZ":
return Optional.of(clazz.cast(multiAZ()));
case "EngineVersion":
return Optional.of(clazz.cast(engineVersion()));
case "AutoMinorVersionUpgrade":
return Optional.of(clazz.cast(autoMinorVersionUpgrade()));
case "KmsKeyId":
return Optional.of(clazz.cast(kmsKeyId()));
case "ReplicationInstanceArn":
return Optional.of(clazz.cast(replicationInstanceArn()));
case "ReplicationInstancePublicIpAddress":
return Optional.of(clazz.cast(replicationInstancePublicIpAddress()));
case "ReplicationInstancePrivateIpAddress":
return Optional.of(clazz.cast(replicationInstancePrivateIpAddress()));
case "ReplicationInstancePublicIpAddresses":
return Optional.of(clazz.cast(replicationInstancePublicIpAddresses()));
case "ReplicationInstancePrivateIpAddresses":
return Optional.of(clazz.cast(replicationInstancePrivateIpAddresses()));
case "PubliclyAccessible":
return Optional.of(clazz.cast(publiclyAccessible()));
case "SecondaryAvailabilityZone":
return Optional.of(clazz.cast(secondaryAvailabilityZone()));
default:
return Optional.empty();
}
}
@SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
ReplicationInstanceMarshaller.getInstance().marshall(this, protocolMarshaller);
}
public interface Builder extends CopyableBuilder {
/**
*
* The replication instance identifier. This parameter is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 alphanumeric characters or hyphens.
*
*
* -
*
* First character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: myrepinstance
*
*
* @param replicationInstanceIdentifier
* The replication instance identifier. This parameter is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 alphanumeric characters or hyphens.
*
*
* -
*
* First character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: myrepinstance
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstanceIdentifier(String replicationInstanceIdentifier);
/**
*
* The compute and memory capacity of the replication instance.
*
*
* Valid Values:
* dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge
*
*
* @param replicationInstanceClass
* The compute and memory capacity of the replication instance.
*
* Valid Values:
* dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstanceClass(String replicationInstanceClass);
/**
*
* The status of the replication instance.
*
*
* @param replicationInstanceStatus
* The status of the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstanceStatus(String replicationInstanceStatus);
/**
*
* The amount of storage (in gigabytes) that is allocated for the replication instance.
*
*
* @param allocatedStorage
* 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.
*/
Builder allocatedStorage(Integer allocatedStorage);
/**
*
* The time the replication instance was created.
*
*
* @param instanceCreateTime
* The time the replication instance was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder instanceCreateTime(Instant instanceCreateTime);
/**
*
* The VPC security group for the instance.
*
*
* @param vpcSecurityGroups
* The VPC security group for the instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder vpcSecurityGroups(Collection vpcSecurityGroups);
/**
*
* The VPC security group for the instance.
*
*
* @param vpcSecurityGroups
* The VPC security group for the instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder vpcSecurityGroups(VpcSecurityGroupMembership... vpcSecurityGroups);
/**
*
* The Availability Zone for the instance.
*
*
* @param availabilityZone
* The Availability Zone for the instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder availabilityZone(String availabilityZone);
/**
*
* The subnet group for the replication instance.
*
*
* @param replicationSubnetGroup
* The subnet group for the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationSubnetGroup(ReplicationSubnetGroup replicationSubnetGroup);
/**
*
* The maintenance window times for the replication instance.
*
*
* @param preferredMaintenanceWindow
* The maintenance window times for the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder preferredMaintenanceWindow(String preferredMaintenanceWindow);
/**
*
* The pending modification values.
*
*
* @param pendingModifiedValues
* The pending modification values.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder pendingModifiedValues(ReplicationPendingModifiedValues pendingModifiedValues);
/**
*
* Specifies if the replication instance is a Multi-AZ deployment. You cannot set the
* AvailabilityZone
parameter if the Multi-AZ parameter is set to true
.
*
*
* @param multiAZ
* Specifies if the replication instance is a Multi-AZ deployment. You cannot set the
* AvailabilityZone
parameter if the Multi-AZ parameter is set to true
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder multiAZ(Boolean multiAZ);
/**
*
* The engine version number of the replication instance.
*
*
* @param engineVersion
* The engine version number of the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder engineVersion(String engineVersion);
/**
*
* Boolean value indicating if minor version upgrades will be automatically applied to the instance.
*
*
* @param autoMinorVersionUpgrade
* Boolean value indicating if minor version upgrades will be automatically applied to the instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade);
/**
*
* The KMS key identifier that is used to encrypt the content on the replication instance. If you do not specify
* a value for the KmsKeyId parameter, then AWS DMS will use your default encryption key. AWS KMS creates the
* default encryption key for your AWS account. Your AWS account has a different default encryption key for each
* AWS region.
*
*
* @param kmsKeyId
* The KMS key identifier that is used to encrypt the content on the replication instance. If you do not
* specify a value for the KmsKeyId parameter, then AWS DMS will use your default encryption key. AWS KMS
* creates the default encryption key for your AWS account. Your AWS account has a different default
* encryption key for each AWS region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder kmsKeyId(String kmsKeyId);
/**
*
* The Amazon Resource Name (ARN) of the replication instance.
*
*
* @param replicationInstanceArn
* The Amazon Resource Name (ARN) of the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstanceArn(String replicationInstanceArn);
/**
*
* The public IP address of the replication instance.
*
*
* @param replicationInstancePublicIpAddress
* The public IP address of the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstancePublicIpAddress(String replicationInstancePublicIpAddress);
/**
*
* The private IP address of the replication instance.
*
*
* @param replicationInstancePrivateIpAddress
* The private IP address of the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstancePrivateIpAddress(String replicationInstancePrivateIpAddress);
/**
*
* The public IP address of the replication instance.
*
*
* @param replicationInstancePublicIpAddresses
* The public IP address of the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstancePublicIpAddresses(Collection replicationInstancePublicIpAddresses);
/**
*
* The public IP address of the replication instance.
*
*
* @param replicationInstancePublicIpAddresses
* The public IP address of the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstancePublicIpAddresses(String... replicationInstancePublicIpAddresses);
/**
*
* The private IP address of the replication instance.
*
*
* @param replicationInstancePrivateIpAddresses
* The private IP address of the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstancePrivateIpAddresses(Collection replicationInstancePrivateIpAddresses);
/**
*
* The private IP address of the replication instance.
*
*
* @param replicationInstancePrivateIpAddresses
* The private IP address of the replication instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder replicationInstancePrivateIpAddresses(String... replicationInstancePrivateIpAddresses);
/**
*
* Specifies the accessibility options for the replication instance. A value of true
represents an
* instance with a public IP address. A value of false
represents an instance with a private IP
* address. The default value is true
.
*
*
* @param publiclyAccessible
* Specifies the accessibility options for the replication instance. A value of true
* represents an instance with a public IP address. A value of false
represents an instance
* with a private IP address. The default value is true
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder publiclyAccessible(Boolean publiclyAccessible);
/**
*
* The availability zone of the standby replication instance in a Multi-AZ deployment.
*
*
* @param secondaryAvailabilityZone
* The availability zone of the standby replication instance in a Multi-AZ deployment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder secondaryAvailabilityZone(String secondaryAvailabilityZone);
}
static final class BuilderImpl implements Builder {
private String replicationInstanceIdentifier;
private String replicationInstanceClass;
private String replicationInstanceStatus;
private Integer allocatedStorage;
private Instant instanceCreateTime;
private List vpcSecurityGroups;
private String availabilityZone;
private ReplicationSubnetGroup replicationSubnetGroup;
private String preferredMaintenanceWindow;
private ReplicationPendingModifiedValues pendingModifiedValues;
private Boolean multiAZ;
private String engineVersion;
private Boolean autoMinorVersionUpgrade;
private String kmsKeyId;
private String replicationInstanceArn;
private String replicationInstancePublicIpAddress;
private String replicationInstancePrivateIpAddress;
private List replicationInstancePublicIpAddresses;
private List replicationInstancePrivateIpAddresses;
private Boolean publiclyAccessible;
private String secondaryAvailabilityZone;
private BuilderImpl() {
}
private BuilderImpl(ReplicationInstance model) {
replicationInstanceIdentifier(model.replicationInstanceIdentifier);
replicationInstanceClass(model.replicationInstanceClass);
replicationInstanceStatus(model.replicationInstanceStatus);
allocatedStorage(model.allocatedStorage);
instanceCreateTime(model.instanceCreateTime);
vpcSecurityGroups(model.vpcSecurityGroups);
availabilityZone(model.availabilityZone);
replicationSubnetGroup(model.replicationSubnetGroup);
preferredMaintenanceWindow(model.preferredMaintenanceWindow);
pendingModifiedValues(model.pendingModifiedValues);
multiAZ(model.multiAZ);
engineVersion(model.engineVersion);
autoMinorVersionUpgrade(model.autoMinorVersionUpgrade);
kmsKeyId(model.kmsKeyId);
replicationInstanceArn(model.replicationInstanceArn);
replicationInstancePublicIpAddress(model.replicationInstancePublicIpAddress);
replicationInstancePrivateIpAddress(model.replicationInstancePrivateIpAddress);
replicationInstancePublicIpAddresses(model.replicationInstancePublicIpAddresses);
replicationInstancePrivateIpAddresses(model.replicationInstancePrivateIpAddresses);
publiclyAccessible(model.publiclyAccessible);
secondaryAvailabilityZone(model.secondaryAvailabilityZone);
}
public final String getReplicationInstanceIdentifier() {
return replicationInstanceIdentifier;
}
@Override
public final Builder replicationInstanceIdentifier(String replicationInstanceIdentifier) {
this.replicationInstanceIdentifier = replicationInstanceIdentifier;
return this;
}
public final void setReplicationInstanceIdentifier(String replicationInstanceIdentifier) {
this.replicationInstanceIdentifier = replicationInstanceIdentifier;
}
public final String getReplicationInstanceClass() {
return replicationInstanceClass;
}
@Override
public final Builder replicationInstanceClass(String replicationInstanceClass) {
this.replicationInstanceClass = replicationInstanceClass;
return this;
}
public final void setReplicationInstanceClass(String replicationInstanceClass) {
this.replicationInstanceClass = replicationInstanceClass;
}
public final String getReplicationInstanceStatus() {
return replicationInstanceStatus;
}
@Override
public final Builder replicationInstanceStatus(String replicationInstanceStatus) {
this.replicationInstanceStatus = replicationInstanceStatus;
return this;
}
public final void setReplicationInstanceStatus(String replicationInstanceStatus) {
this.replicationInstanceStatus = replicationInstanceStatus;
}
public final Integer getAllocatedStorage() {
return allocatedStorage;
}
@Override
public final Builder allocatedStorage(Integer allocatedStorage) {
this.allocatedStorage = allocatedStorage;
return this;
}
public final void setAllocatedStorage(Integer allocatedStorage) {
this.allocatedStorage = allocatedStorage;
}
public final Instant getInstanceCreateTime() {
return instanceCreateTime;
}
@Override
public final Builder instanceCreateTime(Instant instanceCreateTime) {
this.instanceCreateTime = instanceCreateTime;
return this;
}
public final void setInstanceCreateTime(Instant instanceCreateTime) {
this.instanceCreateTime = instanceCreateTime;
}
public final Collection getVpcSecurityGroups() {
return vpcSecurityGroups != null ? vpcSecurityGroups.stream().map(VpcSecurityGroupMembership::toBuilder)
.collect(Collectors.toList()) : null;
}
@Override
public final Builder vpcSecurityGroups(Collection vpcSecurityGroups) {
this.vpcSecurityGroups = VpcSecurityGroupMembershipListCopier.copy(vpcSecurityGroups);
return this;
}
@Override
@SafeVarargs
public final Builder vpcSecurityGroups(VpcSecurityGroupMembership... vpcSecurityGroups) {
vpcSecurityGroups(Arrays.asList(vpcSecurityGroups));
return this;
}
public final void setVpcSecurityGroups(Collection vpcSecurityGroups) {
this.vpcSecurityGroups = VpcSecurityGroupMembershipListCopier.copyFromBuilder(vpcSecurityGroups);
}
public final String getAvailabilityZone() {
return availabilityZone;
}
@Override
public final Builder availabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
return this;
}
public final void setAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
}
public final ReplicationSubnetGroup.Builder getReplicationSubnetGroup() {
return replicationSubnetGroup != null ? replicationSubnetGroup.toBuilder() : null;
}
@Override
public final Builder replicationSubnetGroup(ReplicationSubnetGroup replicationSubnetGroup) {
this.replicationSubnetGroup = replicationSubnetGroup;
return this;
}
public final void setReplicationSubnetGroup(ReplicationSubnetGroup.BuilderImpl replicationSubnetGroup) {
this.replicationSubnetGroup = replicationSubnetGroup != null ? replicationSubnetGroup.build() : null;
}
public final String getPreferredMaintenanceWindow() {
return preferredMaintenanceWindow;
}
@Override
public final Builder preferredMaintenanceWindow(String preferredMaintenanceWindow) {
this.preferredMaintenanceWindow = preferredMaintenanceWindow;
return this;
}
public final void setPreferredMaintenanceWindow(String preferredMaintenanceWindow) {
this.preferredMaintenanceWindow = preferredMaintenanceWindow;
}
public final ReplicationPendingModifiedValues.Builder getPendingModifiedValues() {
return pendingModifiedValues != null ? pendingModifiedValues.toBuilder() : null;
}
@Override
public final Builder pendingModifiedValues(ReplicationPendingModifiedValues pendingModifiedValues) {
this.pendingModifiedValues = pendingModifiedValues;
return this;
}
public final void setPendingModifiedValues(ReplicationPendingModifiedValues.BuilderImpl pendingModifiedValues) {
this.pendingModifiedValues = pendingModifiedValues != null ? pendingModifiedValues.build() : null;
}
public final Boolean getMultiAZ() {
return multiAZ;
}
@Override
public final Builder multiAZ(Boolean multiAZ) {
this.multiAZ = multiAZ;
return this;
}
public final void setMultiAZ(Boolean multiAZ) {
this.multiAZ = multiAZ;
}
public final String getEngineVersion() {
return engineVersion;
}
@Override
public final Builder engineVersion(String engineVersion) {
this.engineVersion = engineVersion;
return this;
}
public final void setEngineVersion(String engineVersion) {
this.engineVersion = engineVersion;
}
public final Boolean getAutoMinorVersionUpgrade() {
return autoMinorVersionUpgrade;
}
@Override
public final Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) {
this.autoMinorVersionUpgrade = autoMinorVersionUpgrade;
return this;
}
public final void setAutoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) {
this.autoMinorVersionUpgrade = autoMinorVersionUpgrade;
}
public final String getKmsKeyId() {
return kmsKeyId;
}
@Override
public final Builder kmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
return this;
}
public final void setKmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
public final String getReplicationInstanceArn() {
return replicationInstanceArn;
}
@Override
public final Builder replicationInstanceArn(String replicationInstanceArn) {
this.replicationInstanceArn = replicationInstanceArn;
return this;
}
public final void setReplicationInstanceArn(String replicationInstanceArn) {
this.replicationInstanceArn = replicationInstanceArn;
}
public final String getReplicationInstancePublicIpAddress() {
return replicationInstancePublicIpAddress;
}
@Override
public final Builder replicationInstancePublicIpAddress(String replicationInstancePublicIpAddress) {
this.replicationInstancePublicIpAddress = replicationInstancePublicIpAddress;
return this;
}
public final void setReplicationInstancePublicIpAddress(String replicationInstancePublicIpAddress) {
this.replicationInstancePublicIpAddress = replicationInstancePublicIpAddress;
}
public final String getReplicationInstancePrivateIpAddress() {
return replicationInstancePrivateIpAddress;
}
@Override
public final Builder replicationInstancePrivateIpAddress(String replicationInstancePrivateIpAddress) {
this.replicationInstancePrivateIpAddress = replicationInstancePrivateIpAddress;
return this;
}
public final void setReplicationInstancePrivateIpAddress(String replicationInstancePrivateIpAddress) {
this.replicationInstancePrivateIpAddress = replicationInstancePrivateIpAddress;
}
public final Collection getReplicationInstancePublicIpAddresses() {
return replicationInstancePublicIpAddresses;
}
@Override
public final Builder replicationInstancePublicIpAddresses(Collection replicationInstancePublicIpAddresses) {
this.replicationInstancePublicIpAddresses = ReplicationInstancePublicIpAddressListCopier
.copy(replicationInstancePublicIpAddresses);
return this;
}
@Override
@SafeVarargs
public final Builder replicationInstancePublicIpAddresses(String... replicationInstancePublicIpAddresses) {
replicationInstancePublicIpAddresses(Arrays.asList(replicationInstancePublicIpAddresses));
return this;
}
public final void setReplicationInstancePublicIpAddresses(Collection replicationInstancePublicIpAddresses) {
this.replicationInstancePublicIpAddresses = ReplicationInstancePublicIpAddressListCopier
.copy(replicationInstancePublicIpAddresses);
}
public final Collection getReplicationInstancePrivateIpAddresses() {
return replicationInstancePrivateIpAddresses;
}
@Override
public final Builder replicationInstancePrivateIpAddresses(Collection replicationInstancePrivateIpAddresses) {
this.replicationInstancePrivateIpAddresses = ReplicationInstancePrivateIpAddressListCopier
.copy(replicationInstancePrivateIpAddresses);
return this;
}
@Override
@SafeVarargs
public final Builder replicationInstancePrivateIpAddresses(String... replicationInstancePrivateIpAddresses) {
replicationInstancePrivateIpAddresses(Arrays.asList(replicationInstancePrivateIpAddresses));
return this;
}
public final void setReplicationInstancePrivateIpAddresses(Collection replicationInstancePrivateIpAddresses) {
this.replicationInstancePrivateIpAddresses = ReplicationInstancePrivateIpAddressListCopier
.copy(replicationInstancePrivateIpAddresses);
}
public final Boolean getPubliclyAccessible() {
return publiclyAccessible;
}
@Override
public final Builder publiclyAccessible(Boolean publiclyAccessible) {
this.publiclyAccessible = publiclyAccessible;
return this;
}
public final void setPubliclyAccessible(Boolean publiclyAccessible) {
this.publiclyAccessible = publiclyAccessible;
}
public final String getSecondaryAvailabilityZone() {
return secondaryAvailabilityZone;
}
@Override
public final Builder secondaryAvailabilityZone(String secondaryAvailabilityZone) {
this.secondaryAvailabilityZone = secondaryAvailabilityZone;
return this;
}
public final void setSecondaryAvailabilityZone(String secondaryAvailabilityZone) {
this.secondaryAvailabilityZone = secondaryAvailabilityZone;
}
@Override
public ReplicationInstance build() {
return new ReplicationInstance(this);
}
}
}