software.amazon.awssdk.services.databasemigration.model.CreateReplicationInstanceRequest Maven / Gradle / Ivy
Show all versions of databasemigration Show documentation
/*
* Copyright 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.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
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 CreateReplicationInstanceRequest extends DatabaseMigrationRequest implements
ToCopyableBuilder {
private static final SdkField REPLICATION_INSTANCE_IDENTIFIER_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("ReplicationInstanceIdentifier")
.getter(getter(CreateReplicationInstanceRequest::replicationInstanceIdentifier))
.setter(setter(Builder::replicationInstanceIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationInstanceIdentifier")
.build()).build();
private static final SdkField ALLOCATED_STORAGE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("AllocatedStorage").getter(getter(CreateReplicationInstanceRequest::allocatedStorage))
.setter(setter(Builder::allocatedStorage))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AllocatedStorage").build()).build();
private static final SdkField REPLICATION_INSTANCE_CLASS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ReplicationInstanceClass").getter(getter(CreateReplicationInstanceRequest::replicationInstanceClass))
.setter(setter(Builder::replicationInstanceClass))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationInstanceClass").build())
.build();
private static final SdkField> VPC_SECURITY_GROUP_IDS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("VpcSecurityGroupIds")
.getter(getter(CreateReplicationInstanceRequest::vpcSecurityGroupIds))
.setter(setter(Builder::vpcSecurityGroupIds))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcSecurityGroupIds").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField AVAILABILITY_ZONE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AvailabilityZone").getter(getter(CreateReplicationInstanceRequest::availabilityZone))
.setter(setter(Builder::availabilityZone))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailabilityZone").build()).build();
private static final SdkField REPLICATION_SUBNET_GROUP_IDENTIFIER_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("ReplicationSubnetGroupIdentifier")
.getter(getter(CreateReplicationInstanceRequest::replicationSubnetGroupIdentifier))
.setter(setter(Builder::replicationSubnetGroupIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationSubnetGroupIdentifier")
.build()).build();
private static final SdkField PREFERRED_MAINTENANCE_WINDOW_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("PreferredMaintenanceWindow")
.getter(getter(CreateReplicationInstanceRequest::preferredMaintenanceWindow))
.setter(setter(Builder::preferredMaintenanceWindow))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreferredMaintenanceWindow").build())
.build();
private static final SdkField MULTI_AZ_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("MultiAZ").getter(getter(CreateReplicationInstanceRequest::multiAZ)).setter(setter(Builder::multiAZ))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MultiAZ").build()).build();
private static final SdkField ENGINE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EngineVersion").getter(getter(CreateReplicationInstanceRequest::engineVersion))
.setter(setter(Builder::engineVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineVersion").build()).build();
private static final SdkField AUTO_MINOR_VERSION_UPGRADE_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("AutoMinorVersionUpgrade").getter(getter(CreateReplicationInstanceRequest::autoMinorVersionUpgrade))
.setter(setter(Builder::autoMinorVersionUpgrade))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMinorVersionUpgrade").build())
.build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Tags")
.getter(getter(CreateReplicationInstanceRequest::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Tag::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("KmsKeyId").getter(getter(CreateReplicationInstanceRequest::kmsKeyId)).setter(setter(Builder::kmsKeyId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KmsKeyId").build()).build();
private static final SdkField PUBLICLY_ACCESSIBLE_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("PubliclyAccessible").getter(getter(CreateReplicationInstanceRequest::publiclyAccessible))
.setter(setter(Builder::publiclyAccessible))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PubliclyAccessible").build())
.build();
private static final SdkField DNS_NAME_SERVERS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DnsNameServers").getter(getter(CreateReplicationInstanceRequest::dnsNameServers))
.setter(setter(Builder::dnsNameServers))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DnsNameServers").build()).build();
private static final SdkField RESOURCE_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ResourceIdentifier").getter(getter(CreateReplicationInstanceRequest::resourceIdentifier))
.setter(setter(Builder::resourceIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceIdentifier").build())
.build();
private static final SdkField NETWORK_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("NetworkType").getter(getter(CreateReplicationInstanceRequest::networkType))
.setter(setter(Builder::networkType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NetworkType").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
REPLICATION_INSTANCE_IDENTIFIER_FIELD, ALLOCATED_STORAGE_FIELD, REPLICATION_INSTANCE_CLASS_FIELD,
VPC_SECURITY_GROUP_IDS_FIELD, AVAILABILITY_ZONE_FIELD, REPLICATION_SUBNET_GROUP_IDENTIFIER_FIELD,
PREFERRED_MAINTENANCE_WINDOW_FIELD, MULTI_AZ_FIELD, ENGINE_VERSION_FIELD, AUTO_MINOR_VERSION_UPGRADE_FIELD,
TAGS_FIELD, KMS_KEY_ID_FIELD, PUBLICLY_ACCESSIBLE_FIELD, DNS_NAME_SERVERS_FIELD, RESOURCE_IDENTIFIER_FIELD,
NETWORK_TYPE_FIELD));
private final String replicationInstanceIdentifier;
private final Integer allocatedStorage;
private final String replicationInstanceClass;
private final List vpcSecurityGroupIds;
private final String availabilityZone;
private final String replicationSubnetGroupIdentifier;
private final String preferredMaintenanceWindow;
private final Boolean multiAZ;
private final String engineVersion;
private final Boolean autoMinorVersionUpgrade;
private final List tags;
private final String kmsKeyId;
private final Boolean publiclyAccessible;
private final String dnsNameServers;
private final String resourceIdentifier;
private final String networkType;
private CreateReplicationInstanceRequest(BuilderImpl builder) {
super(builder);
this.replicationInstanceIdentifier = builder.replicationInstanceIdentifier;
this.allocatedStorage = builder.allocatedStorage;
this.replicationInstanceClass = builder.replicationInstanceClass;
this.vpcSecurityGroupIds = builder.vpcSecurityGroupIds;
this.availabilityZone = builder.availabilityZone;
this.replicationSubnetGroupIdentifier = builder.replicationSubnetGroupIdentifier;
this.preferredMaintenanceWindow = builder.preferredMaintenanceWindow;
this.multiAZ = builder.multiAZ;
this.engineVersion = builder.engineVersion;
this.autoMinorVersionUpgrade = builder.autoMinorVersionUpgrade;
this.tags = builder.tags;
this.kmsKeyId = builder.kmsKeyId;
this.publiclyAccessible = builder.publiclyAccessible;
this.dnsNameServers = builder.dnsNameServers;
this.resourceIdentifier = builder.resourceIdentifier;
this.networkType = builder.networkType;
}
/**
*
* The replication instance identifier. This parameter is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain 1-63 alphanumeric characters or hyphens.
*
*
* -
*
* First character must be a letter.
*
*
* -
*
* Can't 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 1-63 alphanumeric characters or hyphens.
*
*
* -
*
* First character must be a letter.
*
*
* -
*
* Can't end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: myrepinstance
*/
public final String replicationInstanceIdentifier() {
return replicationInstanceIdentifier;
}
/**
*
* The amount of storage (in gigabytes) to be initially allocated for the replication instance.
*
*
* @return The amount of storage (in gigabytes) to be initially allocated for the replication instance.
*/
public final Integer allocatedStorage() {
return allocatedStorage;
}
/**
*
* 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 Choosing the right
* DMS replication instance; and, Selecting the best size for a replication instance.
*
*
* @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
* Choosing
* the right DMS replication instance; and, Selecting the best size for a replication instance.
*/
public final String replicationInstanceClass() {
return replicationInstanceClass;
}
/**
* For responses, this returns true if the service returned a value for the VpcSecurityGroupIds property. This DOES
* NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasVpcSecurityGroupIds() {
return vpcSecurityGroupIds != null && !(vpcSecurityGroupIds instanceof SdkAutoConstructList);
}
/**
*
* Specifies the VPC security group to be used with the replication instance. The VPC security group must work with
* the VPC containing the replication instance.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasVpcSecurityGroupIds} method.
*
*
* @return Specifies the VPC security group to be used with the replication instance. The VPC security group must
* work with the VPC containing the replication instance.
*/
public final List vpcSecurityGroupIds() {
return vpcSecurityGroupIds;
}
/**
*
* The Availability Zone where the replication instance will be created. The default value is a random,
* system-chosen Availability Zone in the endpoint's Amazon Web Services Region, for example:
* us-east-1d
.
*
*
* @return The Availability Zone where the replication instance will be created. The default value is a random,
* system-chosen Availability Zone in the endpoint's Amazon Web Services Region, for example:
* us-east-1d
.
*/
public final String availabilityZone() {
return availabilityZone;
}
/**
*
* A subnet group to associate with the replication instance.
*
*
* @return A subnet group to associate with the replication instance.
*/
public final String replicationSubnetGroupIdentifier() {
return replicationSubnetGroupIdentifier;
}
/**
*
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Default: A 30-minute window selected at random from an 8-hour block of time per Amazon Web Services Region,
* occurring on a random day of the week.
*
*
* Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Minimum 30-minute window.
*
*
* @return The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Default: A 30-minute window selected at random from an 8-hour block of time per Amazon Web Services
* Region, occurring on a random day of the week.
*
*
* Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Minimum 30-minute window.
*/
public final String preferredMaintenanceWindow() {
return preferredMaintenanceWindow;
}
/**
*
* Specifies whether the replication instance is a Multi-AZ deployment. You can't set the
* AvailabilityZone
parameter if the Multi-AZ parameter is set to true
.
*
*
* @return Specifies whether the replication instance is a Multi-AZ deployment. You can't set the
* AvailabilityZone
parameter if the Multi-AZ parameter is set to true
.
*/
public final Boolean multiAZ() {
return multiAZ;
}
/**
*
* The engine version number of the replication instance.
*
*
* If an engine version number is not specified when a replication instance is created, the default is the latest
* engine version available.
*
*
* @return The engine version number of the replication instance.
*
* If an engine version number is not specified when a replication instance is created, the default is the
* latest engine version available.
*/
public final String engineVersion() {
return engineVersion;
}
/**
*
* A value that indicates whether minor engine upgrades are applied automatically to the replication instance during
* the maintenance window. This parameter defaults to true
.
*
*
* Default: true
*
*
* @return A value that indicates whether minor engine upgrades are applied automatically to the replication
* instance during the maintenance window. This parameter defaults to true
.
*
* Default: true
*/
public final Boolean autoMinorVersionUpgrade() {
return autoMinorVersionUpgrade;
}
/**
* For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that
* the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful
* because the SDK will never return a null collection or map, but you may need to differentiate between the service
* returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
* if a value for the property was specified in the request builder, and false if a value was not specified.
*/
public final boolean hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructList);
}
/**
*
* One or more tags to be assigned to the replication instance.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTags} method.
*
*
* @return One or more tags to be assigned to the replication instance.
*/
public final List tags() {
return tags;
}
/**
*
* An KMS key identifier that is used to encrypt the data on the replication instance.
*
*
* If you don't specify a value for the KmsKeyId
parameter, then DMS uses your default encryption key.
*
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has
* a different default encryption key for each Amazon Web Services Region.
*
*
* @return An KMS key identifier that is used to encrypt the data on the replication instance.
*
* If you don't specify a value for the KmsKeyId
parameter, then DMS uses your default
* encryption key.
*
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services
* account has a different default encryption key for each Amazon Web Services Region.
*/
public final String kmsKeyId() {
return kmsKeyId;
}
/**
*
* 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 final Boolean publiclyAccessible() {
return publiclyAccessible;
}
/**
*
* A list of custom DNS name servers supported for the replication instance to access your on-premise source or
* target database. This list overrides the default name servers supported by the replication instance. You can
* specify a comma-separated list of internet addresses for up to four on-premise DNS name servers. For example:
* "1.1.1.1,2.2.2.2,3.3.3.3,4.4.4.4"
*
*
* @return A list of custom DNS name servers supported for the replication instance to access your on-premise source
* or target database. This list overrides the default name servers supported by the replication instance.
* You can specify a comma-separated list of internet addresses for up to four on-premise DNS name servers.
* For example: "1.1.1.1,2.2.2.2,3.3.3.3,4.4.4.4"
*/
public final String dnsNameServers() {
return dnsNameServers;
}
/**
*
* A friendly name for the resource identifier at the end of the EndpointArn
response parameter that is
* returned in the created Endpoint
object. The value for this parameter can have up to 31 characters.
* It can contain only ASCII letters, digits, and hyphen ('-'). Also, it can't end with a hyphen or contain two
* consecutive hyphens, and can only begin with a letter, such as Example-App-ARN1
. For example, this
* value might result in the EndpointArn
value
* arn:aws:dms:eu-west-1:012345678901:rep:Example-App-ARN1
. If you don't specify a
* ResourceIdentifier
value, DMS generates a default identifier value for the end of
* EndpointArn
.
*
*
* @return A friendly name for the resource identifier at the end of the EndpointArn
response parameter
* that is returned in the created Endpoint
object. The value for this parameter can have up to
* 31 characters. It can contain only ASCII letters, digits, and hyphen ('-'). Also, it can't end with a
* hyphen or contain two consecutive hyphens, and can only begin with a letter, such as
* Example-App-ARN1
. For example, this value might result in the EndpointArn
value
* arn:aws:dms:eu-west-1:012345678901:rep:Example-App-ARN1
. If you don't specify a
* ResourceIdentifier
value, DMS generates a default identifier value for the end of
* EndpointArn
.
*/
public final String resourceIdentifier() {
return resourceIdentifier;
}
/**
*
* The type of IP address protocol used by a replication instance, such as IPv4 only or Dual-stack that supports
* both IPv4 and IPv6 addressing. IPv6 only is not yet supported.
*
*
* @return The type of IP address protocol used by a replication instance, such as IPv4 only or Dual-stack that
* supports both IPv4 and IPv6 addressing. IPv6 only is not yet supported.
*/
public final String networkType() {
return networkType;
}
@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 final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(replicationInstanceIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(allocatedStorage());
hashCode = 31 * hashCode + Objects.hashCode(replicationInstanceClass());
hashCode = 31 * hashCode + Objects.hashCode(hasVpcSecurityGroupIds() ? vpcSecurityGroupIds() : null);
hashCode = 31 * hashCode + Objects.hashCode(availabilityZone());
hashCode = 31 * hashCode + Objects.hashCode(replicationSubnetGroupIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(preferredMaintenanceWindow());
hashCode = 31 * hashCode + Objects.hashCode(multiAZ());
hashCode = 31 * hashCode + Objects.hashCode(engineVersion());
hashCode = 31 * hashCode + Objects.hashCode(autoMinorVersionUpgrade());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
hashCode = 31 * hashCode + Objects.hashCode(kmsKeyId());
hashCode = 31 * hashCode + Objects.hashCode(publiclyAccessible());
hashCode = 31 * hashCode + Objects.hashCode(dnsNameServers());
hashCode = 31 * hashCode + Objects.hashCode(resourceIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(networkType());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CreateReplicationInstanceRequest)) {
return false;
}
CreateReplicationInstanceRequest other = (CreateReplicationInstanceRequest) obj;
return Objects.equals(replicationInstanceIdentifier(), other.replicationInstanceIdentifier())
&& Objects.equals(allocatedStorage(), other.allocatedStorage())
&& Objects.equals(replicationInstanceClass(), other.replicationInstanceClass())
&& hasVpcSecurityGroupIds() == other.hasVpcSecurityGroupIds()
&& Objects.equals(vpcSecurityGroupIds(), other.vpcSecurityGroupIds())
&& Objects.equals(availabilityZone(), other.availabilityZone())
&& Objects.equals(replicationSubnetGroupIdentifier(), other.replicationSubnetGroupIdentifier())
&& Objects.equals(preferredMaintenanceWindow(), other.preferredMaintenanceWindow())
&& Objects.equals(multiAZ(), other.multiAZ()) && Objects.equals(engineVersion(), other.engineVersion())
&& Objects.equals(autoMinorVersionUpgrade(), other.autoMinorVersionUpgrade()) && hasTags() == other.hasTags()
&& Objects.equals(tags(), other.tags()) && Objects.equals(kmsKeyId(), other.kmsKeyId())
&& Objects.equals(publiclyAccessible(), other.publiclyAccessible())
&& Objects.equals(dnsNameServers(), other.dnsNameServers())
&& Objects.equals(resourceIdentifier(), other.resourceIdentifier())
&& Objects.equals(networkType(), other.networkType());
}
/**
* 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.
*/
@Override
public final String toString() {
return ToString.builder("CreateReplicationInstanceRequest")
.add("ReplicationInstanceIdentifier", replicationInstanceIdentifier())
.add("AllocatedStorage", allocatedStorage()).add("ReplicationInstanceClass", replicationInstanceClass())
.add("VpcSecurityGroupIds", hasVpcSecurityGroupIds() ? vpcSecurityGroupIds() : null)
.add("AvailabilityZone", availabilityZone())
.add("ReplicationSubnetGroupIdentifier", replicationSubnetGroupIdentifier())
.add("PreferredMaintenanceWindow", preferredMaintenanceWindow()).add("MultiAZ", multiAZ())
.add("EngineVersion", engineVersion()).add("AutoMinorVersionUpgrade", autoMinorVersionUpgrade())
.add("Tags", hasTags() ? tags() : null).add("KmsKeyId", kmsKeyId())
.add("PubliclyAccessible", publiclyAccessible()).add("DnsNameServers", dnsNameServers())
.add("ResourceIdentifier", resourceIdentifier()).add("NetworkType", networkType()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "ReplicationInstanceIdentifier":
return Optional.ofNullable(clazz.cast(replicationInstanceIdentifier()));
case "AllocatedStorage":
return Optional.ofNullable(clazz.cast(allocatedStorage()));
case "ReplicationInstanceClass":
return Optional.ofNullable(clazz.cast(replicationInstanceClass()));
case "VpcSecurityGroupIds":
return Optional.ofNullable(clazz.cast(vpcSecurityGroupIds()));
case "AvailabilityZone":
return Optional.ofNullable(clazz.cast(availabilityZone()));
case "ReplicationSubnetGroupIdentifier":
return Optional.ofNullable(clazz.cast(replicationSubnetGroupIdentifier()));
case "PreferredMaintenanceWindow":
return Optional.ofNullable(clazz.cast(preferredMaintenanceWindow()));
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 "Tags":
return Optional.ofNullable(clazz.cast(tags()));
case "KmsKeyId":
return Optional.ofNullable(clazz.cast(kmsKeyId()));
case "PubliclyAccessible":
return Optional.ofNullable(clazz.cast(publiclyAccessible()));
case "DnsNameServers":
return Optional.ofNullable(clazz.cast(dnsNameServers()));
case "ResourceIdentifier":
return Optional.ofNullable(clazz.cast(resourceIdentifier()));
case "NetworkType":
return Optional.ofNullable(clazz.cast(networkType()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function