software.amazon.awssdk.services.databasemigration.model.ReplicationInstance Maven / Gradle / Ivy
Show all versions of dms Show documentation
/*
* Copyright 2013-2018 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.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.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.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.services.databasemigration.transform.ReplicationInstanceMarshaller;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
*/
@Generated("software.amazon.awssdk:codegen")
public final 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 + Objects.hashCode(replicationInstanceIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(replicationInstanceClass());
hashCode = 31 * hashCode + Objects.hashCode(replicationInstanceStatus());
hashCode = 31 * hashCode + Objects.hashCode(allocatedStorage());
hashCode = 31 * hashCode + Objects.hashCode(instanceCreateTime());
hashCode = 31 * hashCode + Objects.hashCode(vpcSecurityGroups());
hashCode = 31 * hashCode + Objects.hashCode(availabilityZone());
hashCode = 31 * hashCode + Objects.hashCode(replicationSubnetGroup());
hashCode = 31 * hashCode + Objects.hashCode(preferredMaintenanceWindow());
hashCode = 31 * hashCode + Objects.hashCode(pendingModifiedValues());
hashCode = 31 * hashCode + Objects.hashCode(multiAZ());
hashCode = 31 * hashCode + Objects.hashCode(engineVersion());
hashCode = 31 * hashCode + Objects.hashCode(autoMinorVersionUpgrade());
hashCode = 31 * hashCode + Objects.hashCode(kmsKeyId());
hashCode = 31 * hashCode + Objects.hashCode(replicationInstanceArn());
hashCode = 31 * hashCode + Objects.hashCode(replicationInstancePublicIpAddress());
hashCode = 31 * hashCode + Objects.hashCode(replicationInstancePrivateIpAddress());
hashCode = 31 * hashCode + Objects.hashCode(replicationInstancePublicIpAddresses());
hashCode = 31 * hashCode + Objects.hashCode(replicationInstancePrivateIpAddresses());
hashCode = 31 * hashCode + Objects.hashCode(publiclyAccessible());
hashCode = 31 * hashCode + Objects.hashCode(secondaryAvailabilityZone());
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;
return Objects.equals(replicationInstanceIdentifier(), other.replicationInstanceIdentifier())
&& Objects.equals(replicationInstanceClass(), other.replicationInstanceClass())
&& Objects.equals(replicationInstanceStatus(), other.replicationInstanceStatus())
&& Objects.equals(allocatedStorage(), other.allocatedStorage())
&& Objects.equals(instanceCreateTime(), other.instanceCreateTime())
&& Objects.equals(vpcSecurityGroups(), other.vpcSecurityGroups())
&& Objects.equals(availabilityZone(), other.availabilityZone())
&& Objects.equals(replicationSubnetGroup(), other.replicationSubnetGroup())
&& Objects.equals(preferredMaintenanceWindow(), other.preferredMaintenanceWindow())
&& Objects.equals(pendingModifiedValues(), other.pendingModifiedValues())
&& Objects.equals(multiAZ(), other.multiAZ()) && Objects.equals(engineVersion(), other.engineVersion())
&& Objects.equals(autoMinorVersionUpgrade(), other.autoMinorVersionUpgrade())
&& Objects.equals(kmsKeyId(), other.kmsKeyId())
&& Objects.equals(replicationInstanceArn(), other.replicationInstanceArn())
&& Objects.equals(replicationInstancePublicIpAddress(), other.replicationInstancePublicIpAddress())
&& Objects.equals(replicationInstancePrivateIpAddress(), other.replicationInstancePrivateIpAddress())
&& Objects.equals(replicationInstancePublicIpAddresses(), other.replicationInstancePublicIpAddresses())
&& Objects.equals(replicationInstancePrivateIpAddresses(), other.replicationInstancePrivateIpAddresses())
&& Objects.equals(publiclyAccessible(), other.publiclyAccessible())
&& Objects.equals(secondaryAvailabilityZone(), other.secondaryAvailabilityZone());
}
@Override
public String toString() {
return ToString.builder("ReplicationInstance").add("ReplicationInstanceIdentifier", replicationInstanceIdentifier())
.add("ReplicationInstanceClass", replicationInstanceClass())
.add("ReplicationInstanceStatus", replicationInstanceStatus()).add("AllocatedStorage", allocatedStorage())
.add("InstanceCreateTime", instanceCreateTime()).add("VpcSecurityGroups", vpcSecurityGroups())
.add("AvailabilityZone", availabilityZone()).add("ReplicationSubnetGroup", replicationSubnetGroup())
.add("PreferredMaintenanceWindow", preferredMaintenanceWindow())
.add("PendingModifiedValues", pendingModifiedValues()).add("MultiAZ", multiAZ())
.add("EngineVersion", engineVersion()).add("AutoMinorVersionUpgrade", autoMinorVersionUpgrade())
.add("KmsKeyId", kmsKeyId()).add("ReplicationInstanceArn", replicationInstanceArn())
.add("ReplicationInstancePublicIpAddress", replicationInstancePublicIpAddress())
.add("ReplicationInstancePrivateIpAddress", replicationInstancePrivateIpAddress())
.add("ReplicationInstancePublicIpAddresses", replicationInstancePublicIpAddresses())
.add("ReplicationInstancePrivateIpAddresses", replicationInstancePrivateIpAddresses())
.add("PubliclyAccessible", publiclyAccessible()).add("SecondaryAvailabilityZone", secondaryAvailabilityZone())
.build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "ReplicationInstanceIdentifier":
return Optional.ofNullable(clazz.cast(replicationInstanceIdentifier()));
case "ReplicationInstanceClass":
return Optional.ofNullable(clazz.cast(replicationInstanceClass()));
case "ReplicationInstanceStatus":
return Optional.ofNullable(clazz.cast(replicationInstanceStatus()));
case "AllocatedStorage":
return Optional.ofNullable(clazz.cast(allocatedStorage()));
case "InstanceCreateTime":
return Optional.ofNullable(clazz.cast(instanceCreateTime()));
case "VpcSecurityGroups":
return Optional.ofNullable(clazz.cast(vpcSecurityGroups()));
case "AvailabilityZone":
return Optional.ofNullable(clazz.cast(availabilityZone()));
case "ReplicationSubnetGroup":
return Optional.ofNullable(clazz.cast(replicationSubnetGroup()));
case "PreferredMaintenanceWindow":
return Optional.ofNullable(clazz.cast(preferredMaintenanceWindow()));
case "PendingModifiedValues":
return Optional.ofNullable(clazz.cast(pendingModifiedValues()));
case "MultiAZ":
return Optional.ofNullable(clazz.cast(multiAZ()));
case "EngineVersion":
return Optional.ofNullable(clazz.cast(engineVersion()));
case "AutoMinorVersionUpgrade":
return Optional.ofNullable(clazz.cast(autoMinorVersionUpgrade()));
case "KmsKeyId":
return Optional.ofNullable(clazz.cast(kmsKeyId()));
case "ReplicationInstanceArn":
return Optional.ofNullable(clazz.cast(replicationInstanceArn()));
case "ReplicationInstancePublicIpAddress":
return Optional.ofNullable(clazz.cast(replicationInstancePublicIpAddress()));
case "ReplicationInstancePrivateIpAddress":
return Optional.ofNullable(clazz.cast(replicationInstancePrivateIpAddress()));
case "ReplicationInstancePublicIpAddresses":
return Optional.ofNullable(clazz.cast(replicationInstancePublicIpAddresses()));
case "ReplicationInstancePrivateIpAddresses":
return Optional.ofNullable(clazz.cast(replicationInstancePrivateIpAddresses()));
case "PubliclyAccessible":
return Optional.ofNullable(clazz.cast(publiclyAccessible()));
case "SecondaryAvailabilityZone":
return Optional.ofNullable(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 VPC security group for the instance.
*
* This is a convenience that creates an instance of the {@link List.Builder}
* avoiding the need to create one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called
* immediately and its result is passed to {@link #vpcSecurityGroups(List)}.
*
* @param vpcSecurityGroups
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #vpcSecurityGroups(List)
*/
Builder vpcSecurityGroups(Consumer... 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 subnet group for the replication instance.
*
* This is a convenience that creates an instance of the {@link ReplicationSubnetGroup.Builder} avoiding the
* need to create one manually via {@link ReplicationSubnetGroup#builder()}.
*
* When the {@link Consumer} completes, {@link ReplicationSubnetGroup.Builder#build()} is called immediately and
* its result is passed to {@link #replicationSubnetGroup(ReplicationSubnetGroup)}.
*
* @param replicationSubnetGroup
* a consumer that will call methods on {@link ReplicationSubnetGroup.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #replicationSubnetGroup(ReplicationSubnetGroup)
*/
default Builder replicationSubnetGroup(Consumer replicationSubnetGroup) {
return replicationSubnetGroup(ReplicationSubnetGroup.builder().applyMutation(replicationSubnetGroup).build());
}
/**
*
* 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);
/**
*
* The pending modification values.
*
* This is a convenience that creates an instance of the {@link ReplicationPendingModifiedValues.Builder}
* avoiding the need to create one manually via {@link ReplicationPendingModifiedValues#builder()}.
*
* When the {@link Consumer} completes, {@link ReplicationPendingModifiedValues.Builder#build()} is called
* immediately and its result is passed to {@link #pendingModifiedValues(ReplicationPendingModifiedValues)}.
*
* @param pendingModifiedValues
* a consumer that will call methods on {@link ReplicationPendingModifiedValues.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #pendingModifiedValues(ReplicationPendingModifiedValues)
*/
default Builder pendingModifiedValues(Consumer pendingModifiedValues) {
return pendingModifiedValues(ReplicationPendingModifiedValues.builder().applyMutation(pendingModifiedValues).build());
}
/**
*
* 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 = DefaultSdkAutoConstructList.getInstance();
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 = DefaultSdkAutoConstructList.getInstance();
private List replicationInstancePrivateIpAddresses = DefaultSdkAutoConstructList.getInstance();
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;
}
@Override
@SafeVarargs
public final Builder vpcSecurityGroups(Consumer... vpcSecurityGroups) {
vpcSecurityGroups(Stream.of(vpcSecurityGroups)
.map(c -> VpcSecurityGroupMembership.builder().applyMutation(c).build()).collect(Collectors.toList()));
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);
}
}
}