All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.databasemigration.model.CreateReplicationInstanceRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Database Migration Service module holds the client classes that are used for communicating with AWS Database Migration Service.

There is a newer version: 2.29.15
Show newest version
/*
 * 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 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 getter(Function g) { return obj -> g.apply((CreateReplicationInstanceRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends DatabaseMigrationRequest.Builder, SdkPojo, CopyableBuilder { /** *

* 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 *

* * @param replicationInstanceIdentifier * 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 Returns a reference to this object so that method calls can be chained together. */ Builder replicationInstanceIdentifier(String replicationInstanceIdentifier); /** *

* The amount of storage (in gigabytes) to be initially allocated for the replication instance. *

* * @param allocatedStorage * The amount of storage (in gigabytes) to be initially 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 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. *

* * @param replicationInstanceClass * The compute and memory capacity of the replication instance as defined for the specified replication * instance class. For example to specify the instance class dms.c4.large, set this parameter to * "dms.c4.large".

*

* For more information on the settings and capacities for the available replication instance classes, * see * Choosing the right DMS replication instance; and, Selecting the best size for a replication instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder replicationInstanceClass(String replicationInstanceClass); /** *

* 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. *

* * @param vpcSecurityGroupIds * 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. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcSecurityGroupIds(Collection vpcSecurityGroupIds); /** *

* 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. *

* * @param vpcSecurityGroupIds * 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. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcSecurityGroupIds(String... 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. *

* * @param availabilityZone * 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 Returns a reference to this object so that method calls can be chained together. */ Builder availabilityZone(String availabilityZone); /** *

* A subnet group to associate with the replication instance. *

* * @param replicationSubnetGroupIdentifier * A subnet group to associate with the replication instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder replicationSubnetGroupIdentifier(String 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. *

* * @param preferredMaintenanceWindow * 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 Returns a reference to this object so that method calls can be chained together. */ Builder preferredMaintenanceWindow(String 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. *

* * @param multiAZ * 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 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. *

*

* If an engine version number is not specified when a replication instance is created, the default is the * latest engine version available. *

* * @param engineVersion * 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 Returns a reference to this object so that method calls can be chained together. */ Builder engineVersion(String 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 *

* * @param autoMinorVersionUpgrade * 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 Returns a reference to this object so that method calls can be chained together. */ Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade); /** *

* One or more tags to be assigned to the replication instance. *

* * @param tags * One or more tags to be assigned to the replication instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* One or more tags to be assigned to the replication instance. *

* * @param tags * One or more tags to be assigned to the replication instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

* One or more tags to be assigned to the replication instance. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.databasemigration.model.Tag.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.databasemigration.model.Tag#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.databasemigration.model.Tag.Builder#build()} is called immediately and * its result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on * {@link software.amazon.awssdk.services.databasemigration.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... 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. *

* * @param kmsKeyId * 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 Returns a reference to this object so that method calls can be chained together. */ Builder kmsKeyId(String 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. *

* * @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); /** *

* 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" *

* * @param dnsNameServers * 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 Returns a reference to this object so that method calls can be chained together. */ Builder dnsNameServers(String 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. *

* * @param resourceIdentifier * 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 Returns a reference to this object so that method calls can be chained together. */ Builder resourceIdentifier(String 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. *

* * @param networkType * 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 Returns a reference to this object so that method calls can be chained together. */ Builder networkType(String networkType); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends DatabaseMigrationRequest.BuilderImpl implements Builder { private String replicationInstanceIdentifier; private Integer allocatedStorage; private String replicationInstanceClass; private List vpcSecurityGroupIds = DefaultSdkAutoConstructList.getInstance(); private String availabilityZone; private String replicationSubnetGroupIdentifier; private String preferredMaintenanceWindow; private Boolean multiAZ; private String engineVersion; private Boolean autoMinorVersionUpgrade; private List tags = DefaultSdkAutoConstructList.getInstance(); private String kmsKeyId; private Boolean publiclyAccessible; private String dnsNameServers; private String resourceIdentifier; private String networkType; private BuilderImpl() { } private BuilderImpl(CreateReplicationInstanceRequest model) { super(model); replicationInstanceIdentifier(model.replicationInstanceIdentifier); allocatedStorage(model.allocatedStorage); replicationInstanceClass(model.replicationInstanceClass); vpcSecurityGroupIds(model.vpcSecurityGroupIds); availabilityZone(model.availabilityZone); replicationSubnetGroupIdentifier(model.replicationSubnetGroupIdentifier); preferredMaintenanceWindow(model.preferredMaintenanceWindow); multiAZ(model.multiAZ); engineVersion(model.engineVersion); autoMinorVersionUpgrade(model.autoMinorVersionUpgrade); tags(model.tags); kmsKeyId(model.kmsKeyId); publiclyAccessible(model.publiclyAccessible); dnsNameServers(model.dnsNameServers); resourceIdentifier(model.resourceIdentifier); networkType(model.networkType); } public final String getReplicationInstanceIdentifier() { return replicationInstanceIdentifier; } public final void setReplicationInstanceIdentifier(String replicationInstanceIdentifier) { this.replicationInstanceIdentifier = replicationInstanceIdentifier; } @Override public final Builder replicationInstanceIdentifier(String replicationInstanceIdentifier) { this.replicationInstanceIdentifier = replicationInstanceIdentifier; return this; } public final Integer getAllocatedStorage() { return allocatedStorage; } public final void setAllocatedStorage(Integer allocatedStorage) { this.allocatedStorage = allocatedStorage; } @Override public final Builder allocatedStorage(Integer allocatedStorage) { this.allocatedStorage = allocatedStorage; return this; } public final String getReplicationInstanceClass() { return replicationInstanceClass; } public final void setReplicationInstanceClass(String replicationInstanceClass) { this.replicationInstanceClass = replicationInstanceClass; } @Override public final Builder replicationInstanceClass(String replicationInstanceClass) { this.replicationInstanceClass = replicationInstanceClass; return this; } public final Collection getVpcSecurityGroupIds() { if (vpcSecurityGroupIds instanceof SdkAutoConstructList) { return null; } return vpcSecurityGroupIds; } public final void setVpcSecurityGroupIds(Collection vpcSecurityGroupIds) { this.vpcSecurityGroupIds = VpcSecurityGroupIdListCopier.copy(vpcSecurityGroupIds); } @Override public final Builder vpcSecurityGroupIds(Collection vpcSecurityGroupIds) { this.vpcSecurityGroupIds = VpcSecurityGroupIdListCopier.copy(vpcSecurityGroupIds); return this; } @Override @SafeVarargs public final Builder vpcSecurityGroupIds(String... vpcSecurityGroupIds) { vpcSecurityGroupIds(Arrays.asList(vpcSecurityGroupIds)); return this; } public final String getAvailabilityZone() { return availabilityZone; } public final void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } @Override public final Builder availabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; return this; } public final String getReplicationSubnetGroupIdentifier() { return replicationSubnetGroupIdentifier; } public final void setReplicationSubnetGroupIdentifier(String replicationSubnetGroupIdentifier) { this.replicationSubnetGroupIdentifier = replicationSubnetGroupIdentifier; } @Override public final Builder replicationSubnetGroupIdentifier(String replicationSubnetGroupIdentifier) { this.replicationSubnetGroupIdentifier = replicationSubnetGroupIdentifier; return this; } public final String getPreferredMaintenanceWindow() { return preferredMaintenanceWindow; } public final void setPreferredMaintenanceWindow(String preferredMaintenanceWindow) { this.preferredMaintenanceWindow = preferredMaintenanceWindow; } @Override public final Builder preferredMaintenanceWindow(String preferredMaintenanceWindow) { this.preferredMaintenanceWindow = preferredMaintenanceWindow; return this; } public final Boolean getMultiAZ() { return multiAZ; } public final void setMultiAZ(Boolean multiAZ) { this.multiAZ = multiAZ; } @Override public final Builder multiAZ(Boolean multiAZ) { this.multiAZ = multiAZ; return this; } public final String getEngineVersion() { return engineVersion; } public final void setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; } @Override public final Builder engineVersion(String engineVersion) { this.engineVersion = engineVersion; return this; } public final Boolean getAutoMinorVersionUpgrade() { return autoMinorVersionUpgrade; } public final void setAutoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) { this.autoMinorVersionUpgrade = autoMinorVersionUpgrade; } @Override public final Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) { this.autoMinorVersionUpgrade = autoMinorVersionUpgrade; return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final String getKmsKeyId() { return kmsKeyId; } public final void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } @Override public final Builder kmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; return this; } public final Boolean getPubliclyAccessible() { return publiclyAccessible; } public final void setPubliclyAccessible(Boolean publiclyAccessible) { this.publiclyAccessible = publiclyAccessible; } @Override public final Builder publiclyAccessible(Boolean publiclyAccessible) { this.publiclyAccessible = publiclyAccessible; return this; } public final String getDnsNameServers() { return dnsNameServers; } public final void setDnsNameServers(String dnsNameServers) { this.dnsNameServers = dnsNameServers; } @Override public final Builder dnsNameServers(String dnsNameServers) { this.dnsNameServers = dnsNameServers; return this; } public final String getResourceIdentifier() { return resourceIdentifier; } public final void setResourceIdentifier(String resourceIdentifier) { this.resourceIdentifier = resourceIdentifier; } @Override public final Builder resourceIdentifier(String resourceIdentifier) { this.resourceIdentifier = resourceIdentifier; return this; } public final String getNetworkType() { return networkType; } public final void setNetworkType(String networkType) { this.networkType = networkType; } @Override public final Builder networkType(String networkType) { this.networkType = networkType; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateReplicationInstanceRequest build() { return new CreateReplicationInstanceRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy