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

software.amazon.awssdk.services.databasemigration.model.ModifyReplicationInstanceRequest 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.

The newest version!
/*
 * 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.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
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 ModifyReplicationInstanceRequest extends DatabaseMigrationRequest implements ToCopyableBuilder { private final String replicationInstanceArn; private final Integer allocatedStorage; private final Boolean applyImmediately; private final String replicationInstanceClass; private final List vpcSecurityGroupIds; private final String preferredMaintenanceWindow; private final Boolean multiAZ; private final String engineVersion; private final Boolean allowMajorVersionUpgrade; private final Boolean autoMinorVersionUpgrade; private final String replicationInstanceIdentifier; private ModifyReplicationInstanceRequest(BuilderImpl builder) { super(builder); this.replicationInstanceArn = builder.replicationInstanceArn; this.allocatedStorage = builder.allocatedStorage; this.applyImmediately = builder.applyImmediately; this.replicationInstanceClass = builder.replicationInstanceClass; this.vpcSecurityGroupIds = builder.vpcSecurityGroupIds; this.preferredMaintenanceWindow = builder.preferredMaintenanceWindow; this.multiAZ = builder.multiAZ; this.engineVersion = builder.engineVersion; this.allowMajorVersionUpgrade = builder.allowMajorVersionUpgrade; this.autoMinorVersionUpgrade = builder.autoMinorVersionUpgrade; this.replicationInstanceIdentifier = builder.replicationInstanceIdentifier; } /** *

* 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 amount of storage (in gigabytes) to be allocated for the replication instance. *

* * @return The amount of storage (in gigabytes) to be allocated for the replication instance. */ public Integer allocatedStorage() { return allocatedStorage; } /** *

* Indicates whether the changes should be applied immediately or during the next maintenance window. *

* * @return Indicates whether the changes should be applied immediately or during the next maintenance window. */ public Boolean applyImmediately() { return applyImmediately; } /** *

* 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; } /** *

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

* * @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 List vpcSecurityGroupIds() { return vpcSecurityGroupIds; } /** *

* The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. * Changing this parameter does not result in an outage, except in the following situation, and the change is * asynchronously applied as soon as possible. If moving this window to the current time, there must be at least 30 * minutes between the current time and end of the window to ensure pending changes are applied. *

*

* Default: Uses existing setting *

*

* Format: ddd:hh24:mi-ddd:hh24:mi *

*

* Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun *

*

* Constraints: Must be at least 30 minutes *

* * @return The weekly time range (in UTC) during which system maintenance can occur, which might result in an * outage. Changing this parameter does not result in an outage, except in the following situation, and the * change is asynchronously applied as soon as possible. If moving this window to the current time, there * must be at least 30 minutes between the current time and end of the window to ensure pending changes are * applied.

*

* Default: Uses existing setting *

*

* Format: ddd:hh24:mi-ddd:hh24:mi *

*

* Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun *

*

* Constraints: Must be at least 30 minutes */ public String preferredMaintenanceWindow() { return preferredMaintenanceWindow; } /** *

* 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; } /** *

* Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and the * change is asynchronously applied as soon as possible. *

*

* Constraints: This parameter must be set to true when specifying a value for the EngineVersion * parameter that is a different major version than the replication instance's current version. *

* * @return Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage * and the change is asynchronously applied as soon as possible.

*

* Constraints: This parameter must be set to true when specifying a value for the * EngineVersion parameter that is a different major version than the replication instance's * current version. */ public Boolean allowMajorVersionUpgrade() { return allowMajorVersionUpgrade; } /** *

* Indicates that minor version upgrades will be applied automatically to the replication instance during the * maintenance window. Changing this parameter does not result in an outage except in the following case and the * change is asynchronously applied as soon as possible. An outage will result if this parameter is set to * true during the maintenance window, and a newer minor version is available, and AWS DMS has enabled * auto patching for that engine version. *

* * @return Indicates that minor version upgrades will be applied automatically to the replication instance during * the maintenance window. Changing this parameter does not result in an outage except in the following case * and the change is asynchronously applied as soon as possible. An outage will result if this parameter is * set to true during the maintenance window, and a newer minor version is available, and AWS * DMS has enabled auto patching for that engine version. */ public Boolean autoMinorVersionUpgrade() { return autoMinorVersionUpgrade; } /** *

* The replication instance identifier. This parameter is stored as a lowercase string. *

* * @return The replication instance identifier. This parameter is stored as a lowercase string. */ public String replicationInstanceIdentifier() { return replicationInstanceIdentifier; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(replicationInstanceArn()); hashCode = 31 * hashCode + Objects.hashCode(allocatedStorage()); hashCode = 31 * hashCode + Objects.hashCode(applyImmediately()); hashCode = 31 * hashCode + Objects.hashCode(replicationInstanceClass()); hashCode = 31 * hashCode + Objects.hashCode(vpcSecurityGroupIds()); hashCode = 31 * hashCode + Objects.hashCode(preferredMaintenanceWindow()); hashCode = 31 * hashCode + Objects.hashCode(multiAZ()); hashCode = 31 * hashCode + Objects.hashCode(engineVersion()); hashCode = 31 * hashCode + Objects.hashCode(allowMajorVersionUpgrade()); hashCode = 31 * hashCode + Objects.hashCode(autoMinorVersionUpgrade()); hashCode = 31 * hashCode + Objects.hashCode(replicationInstanceIdentifier()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ModifyReplicationInstanceRequest)) { return false; } ModifyReplicationInstanceRequest other = (ModifyReplicationInstanceRequest) obj; return Objects.equals(replicationInstanceArn(), other.replicationInstanceArn()) && Objects.equals(allocatedStorage(), other.allocatedStorage()) && Objects.equals(applyImmediately(), other.applyImmediately()) && Objects.equals(replicationInstanceClass(), other.replicationInstanceClass()) && Objects.equals(vpcSecurityGroupIds(), other.vpcSecurityGroupIds()) && Objects.equals(preferredMaintenanceWindow(), other.preferredMaintenanceWindow()) && Objects.equals(multiAZ(), other.multiAZ()) && Objects.equals(engineVersion(), other.engineVersion()) && Objects.equals(allowMajorVersionUpgrade(), other.allowMajorVersionUpgrade()) && Objects.equals(autoMinorVersionUpgrade(), other.autoMinorVersionUpgrade()) && Objects.equals(replicationInstanceIdentifier(), other.replicationInstanceIdentifier()); } @Override public String toString() { return ToString.builder("ModifyReplicationInstanceRequest").add("ReplicationInstanceArn", replicationInstanceArn()) .add("AllocatedStorage", allocatedStorage()).add("ApplyImmediately", applyImmediately()) .add("ReplicationInstanceClass", replicationInstanceClass()).add("VpcSecurityGroupIds", vpcSecurityGroupIds()) .add("PreferredMaintenanceWindow", preferredMaintenanceWindow()).add("MultiAZ", multiAZ()) .add("EngineVersion", engineVersion()).add("AllowMajorVersionUpgrade", allowMajorVersionUpgrade()) .add("AutoMinorVersionUpgrade", autoMinorVersionUpgrade()) .add("ReplicationInstanceIdentifier", replicationInstanceIdentifier()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ReplicationInstanceArn": return Optional.ofNullable(clazz.cast(replicationInstanceArn())); case "AllocatedStorage": return Optional.ofNullable(clazz.cast(allocatedStorage())); case "ApplyImmediately": return Optional.ofNullable(clazz.cast(applyImmediately())); case "ReplicationInstanceClass": return Optional.ofNullable(clazz.cast(replicationInstanceClass())); case "VpcSecurityGroupIds": return Optional.ofNullable(clazz.cast(vpcSecurityGroupIds())); 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 "AllowMajorVersionUpgrade": return Optional.ofNullable(clazz.cast(allowMajorVersionUpgrade())); case "AutoMinorVersionUpgrade": return Optional.ofNullable(clazz.cast(autoMinorVersionUpgrade())); case "ReplicationInstanceIdentifier": return Optional.ofNullable(clazz.cast(replicationInstanceIdentifier())); default: return Optional.empty(); } } public interface Builder extends DatabaseMigrationRequest.Builder, CopyableBuilder { /** *

* 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 amount of storage (in gigabytes) to be allocated for the replication instance. *

* * @param allocatedStorage * The amount of storage (in gigabytes) to be allocated for the replication instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder allocatedStorage(Integer allocatedStorage); /** *

* Indicates whether the changes should be applied immediately or during the next maintenance window. *

* * @param applyImmediately * Indicates whether the changes should be applied immediately or during the next maintenance window. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applyImmediately(Boolean applyImmediately); /** *

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

* 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 weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. * Changing this parameter does not result in an outage, except in the following situation, and the change is * asynchronously applied as soon as possible. If moving this window to the current time, there must be at least * 30 minutes between the current time and end of the window to ensure pending changes are applied. *

*

* Default: Uses existing setting *

*

* Format: ddd:hh24:mi-ddd:hh24:mi *

*

* Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun *

*

* Constraints: Must be at least 30 minutes *

* * @param preferredMaintenanceWindow * The weekly time range (in UTC) during which system maintenance can occur, which might result in an * outage. Changing this parameter does not result in an outage, except in the following situation, and * the change is asynchronously applied as soon as possible. If moving this window to the current time, * there must be at least 30 minutes between the current time and end of the window to ensure pending * changes are applied.

*

* Default: Uses existing setting *

*

* Format: ddd:hh24:mi-ddd:hh24:mi *

*

* Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun *

*

* Constraints: Must be at least 30 minutes * @return Returns a reference to this object so that method calls can be chained together. */ Builder preferredMaintenanceWindow(String preferredMaintenanceWindow); /** *

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

* Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and * the change is asynchronously applied as soon as possible. *

*

* Constraints: This parameter must be set to true when specifying a value for the EngineVersion * parameter that is a different major version than the replication instance's current version. *

* * @param allowMajorVersionUpgrade * Indicates that major version upgrades are allowed. Changing this parameter does not result in an * outage and the change is asynchronously applied as soon as possible.

*

* Constraints: This parameter must be set to true when specifying a value for the * EngineVersion parameter that is a different major version than the replication instance's * current version. * @return Returns a reference to this object so that method calls can be chained together. */ Builder allowMajorVersionUpgrade(Boolean allowMajorVersionUpgrade); /** *

* Indicates that minor version upgrades will be applied automatically to the replication instance during the * maintenance window. Changing this parameter does not result in an outage except in the following case and the * change is asynchronously applied as soon as possible. An outage will result if this parameter is set to * true during the maintenance window, and a newer minor version is available, and AWS DMS has * enabled auto patching for that engine version. *

* * @param autoMinorVersionUpgrade * Indicates that minor version upgrades will be applied automatically to the replication instance during * the maintenance window. Changing this parameter does not result in an outage except in the following * case and the change is asynchronously applied as soon as possible. An outage will result if this * parameter is set to true during the maintenance window, and a newer minor version is * available, and AWS DMS has enabled auto patching for that engine version. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade); /** *

* The replication instance identifier. This parameter is stored as a lowercase string. *

* * @param replicationInstanceIdentifier * The replication instance identifier. This parameter is stored as a lowercase string. * @return Returns a reference to this object so that method calls can be chained together. */ Builder replicationInstanceIdentifier(String replicationInstanceIdentifier); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends DatabaseMigrationRequest.BuilderImpl implements Builder { private String replicationInstanceArn; private Integer allocatedStorage; private Boolean applyImmediately; private String replicationInstanceClass; private List vpcSecurityGroupIds = DefaultSdkAutoConstructList.getInstance(); private String preferredMaintenanceWindow; private Boolean multiAZ; private String engineVersion; private Boolean allowMajorVersionUpgrade; private Boolean autoMinorVersionUpgrade; private String replicationInstanceIdentifier; private BuilderImpl() { } private BuilderImpl(ModifyReplicationInstanceRequest model) { super(model); replicationInstanceArn(model.replicationInstanceArn); allocatedStorage(model.allocatedStorage); applyImmediately(model.applyImmediately); replicationInstanceClass(model.replicationInstanceClass); vpcSecurityGroupIds(model.vpcSecurityGroupIds); preferredMaintenanceWindow(model.preferredMaintenanceWindow); multiAZ(model.multiAZ); engineVersion(model.engineVersion); allowMajorVersionUpgrade(model.allowMajorVersionUpgrade); autoMinorVersionUpgrade(model.autoMinorVersionUpgrade); replicationInstanceIdentifier(model.replicationInstanceIdentifier); } 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 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 Boolean getApplyImmediately() { return applyImmediately; } @Override public final Builder applyImmediately(Boolean applyImmediately) { this.applyImmediately = applyImmediately; return this; } public final void setApplyImmediately(Boolean applyImmediately) { this.applyImmediately = applyImmediately; } 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 Collection getVpcSecurityGroupIds() { return 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 void setVpcSecurityGroupIds(Collection vpcSecurityGroupIds) { this.vpcSecurityGroupIds = VpcSecurityGroupIdListCopier.copy(vpcSecurityGroupIds); } 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 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 getAllowMajorVersionUpgrade() { return allowMajorVersionUpgrade; } @Override public final Builder allowMajorVersionUpgrade(Boolean allowMajorVersionUpgrade) { this.allowMajorVersionUpgrade = allowMajorVersionUpgrade; return this; } public final void setAllowMajorVersionUpgrade(Boolean allowMajorVersionUpgrade) { this.allowMajorVersionUpgrade = allowMajorVersionUpgrade; } 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 getReplicationInstanceIdentifier() { return replicationInstanceIdentifier; } @Override public final Builder replicationInstanceIdentifier(String replicationInstanceIdentifier) { this.replicationInstanceIdentifier = replicationInstanceIdentifier; return this; } public final void setReplicationInstanceIdentifier(String replicationInstanceIdentifier) { this.replicationInstanceIdentifier = replicationInstanceIdentifier; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public ModifyReplicationInstanceRequest build() { return new ModifyReplicationInstanceRequest(this); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy