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

software.amazon.awssdk.services.databasemigration.model.ReplicationPendingModifiedValues 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.io.Serializable;
import java.util.Arrays;
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.Function;
import software.amazon.awssdk.annotations.Generated;
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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Provides information about the values of pending modifications to a replication instance. This data type is an object * of the * ReplicationInstance user-defined data type. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ReplicationPendingModifiedValues implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField REPLICATION_INSTANCE_CLASS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ReplicationInstanceClass").getter(getter(ReplicationPendingModifiedValues::replicationInstanceClass)) .setter(setter(Builder::replicationInstanceClass)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationInstanceClass").build()) .build(); private static final SdkField ALLOCATED_STORAGE_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("AllocatedStorage").getter(getter(ReplicationPendingModifiedValues::allocatedStorage)) .setter(setter(Builder::allocatedStorage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AllocatedStorage").build()).build(); private static final SdkField MULTI_AZ_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("MultiAZ").getter(getter(ReplicationPendingModifiedValues::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(ReplicationPendingModifiedValues::engineVersion)) .setter(setter(Builder::engineVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineVersion").build()).build(); private static final SdkField NETWORK_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("NetworkType").getter(getter(ReplicationPendingModifiedValues::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_CLASS_FIELD, ALLOCATED_STORAGE_FIELD, MULTI_AZ_FIELD, ENGINE_VERSION_FIELD, NETWORK_TYPE_FIELD)); private static final long serialVersionUID = 1L; private final String replicationInstanceClass; private final Integer allocatedStorage; private final Boolean multiAZ; private final String engineVersion; private final String networkType; private ReplicationPendingModifiedValues(BuilderImpl builder) { this.replicationInstanceClass = builder.replicationInstanceClass; this.allocatedStorage = builder.allocatedStorage; this.multiAZ = builder.multiAZ; this.engineVersion = builder.engineVersion; this.networkType = builder.networkType; } /** *

* The compute and memory capacity of the replication instance as defined for the specified replication instance * class. *

*

* For more information on the settings and capacities for the available replication instance classes, see Selecting the right DMS replication instance for your migration. *

* * @return The compute and memory capacity of the replication instance as defined for the specified replication * instance class.

*

* For more information on the settings and capacities for the available replication instance classes, see * Selecting the right DMS replication instance for your migration. */ public final String replicationInstanceClass() { return replicationInstanceClass; } /** *

* The amount of storage (in gigabytes) that is allocated for the replication instance. *

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

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

* * @return The engine version number of the replication instance. */ public final String engineVersion() { return engineVersion; } /** *

* 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 + Objects.hashCode(replicationInstanceClass()); hashCode = 31 * hashCode + Objects.hashCode(allocatedStorage()); hashCode = 31 * hashCode + Objects.hashCode(multiAZ()); hashCode = 31 * hashCode + Objects.hashCode(engineVersion()); hashCode = 31 * hashCode + Objects.hashCode(networkType()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ReplicationPendingModifiedValues)) { return false; } ReplicationPendingModifiedValues other = (ReplicationPendingModifiedValues) obj; return Objects.equals(replicationInstanceClass(), other.replicationInstanceClass()) && Objects.equals(allocatedStorage(), other.allocatedStorage()) && Objects.equals(multiAZ(), other.multiAZ()) && Objects.equals(engineVersion(), other.engineVersion()) && 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("ReplicationPendingModifiedValues").add("ReplicationInstanceClass", replicationInstanceClass()) .add("AllocatedStorage", allocatedStorage()).add("MultiAZ", multiAZ()).add("EngineVersion", engineVersion()) .add("NetworkType", networkType()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ReplicationInstanceClass": return Optional.ofNullable(clazz.cast(replicationInstanceClass())); case "AllocatedStorage": return Optional.ofNullable(clazz.cast(allocatedStorage())); case "MultiAZ": return Optional.ofNullable(clazz.cast(multiAZ())); case "EngineVersion": return Optional.ofNullable(clazz.cast(engineVersion())); 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((ReplicationPendingModifiedValues) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The compute and memory capacity of the replication instance as defined for the specified replication instance * class. *

*

* For more information on the settings and capacities for the available replication instance classes, see Selecting the right DMS replication instance for your migration. *

* * @param replicationInstanceClass * The compute and memory capacity of the replication instance as defined for the specified replication * instance class.

*

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

* The amount of storage (in gigabytes) that is allocated for the replication instance. *

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

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

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

* 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); } static final class BuilderImpl implements Builder { private String replicationInstanceClass; private Integer allocatedStorage; private Boolean multiAZ; private String engineVersion; private String networkType; private BuilderImpl() { } private BuilderImpl(ReplicationPendingModifiedValues model) { replicationInstanceClass(model.replicationInstanceClass); allocatedStorage(model.allocatedStorage); multiAZ(model.multiAZ); engineVersion(model.engineVersion); networkType(model.networkType); } 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 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 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 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 ReplicationPendingModifiedValues build() { return new ReplicationPendingModifiedValues(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy