software.amazon.awssdk.services.databasemigration.model.ReplicationPendingModifiedValues 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.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 extends Builder> 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