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

software.amazon.awssdk.services.rds.model.RdsCustomClusterConfiguration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon RDS module holds the client classes that are used for communicating with Amazon Relational Database 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.rds.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;

/**
 * 

* Reserved for future use. *

*/ @Generated("software.amazon.awssdk:codegen") public final class RdsCustomClusterConfiguration implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField INTERCONNECT_SUBNET_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("InterconnectSubnetId").getter(getter(RdsCustomClusterConfiguration::interconnectSubnetId)) .setter(setter(Builder::interconnectSubnetId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InterconnectSubnetId").build()) .build(); private static final SdkField TRANSIT_GATEWAY_MULTICAST_DOMAIN_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("TransitGatewayMulticastDomainId") .getter(getter(RdsCustomClusterConfiguration::transitGatewayMulticastDomainId)) .setter(setter(Builder::transitGatewayMulticastDomainId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TransitGatewayMulticastDomainId") .build()).build(); private static final SdkField REPLICA_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ReplicaMode").getter(getter(RdsCustomClusterConfiguration::replicaModeAsString)) .setter(setter(Builder::replicaMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicaMode").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(INTERCONNECT_SUBNET_ID_FIELD, TRANSIT_GATEWAY_MULTICAST_DOMAIN_ID_FIELD, REPLICA_MODE_FIELD)); private static final long serialVersionUID = 1L; private final String interconnectSubnetId; private final String transitGatewayMulticastDomainId; private final String replicaMode; private RdsCustomClusterConfiguration(BuilderImpl builder) { this.interconnectSubnetId = builder.interconnectSubnetId; this.transitGatewayMulticastDomainId = builder.transitGatewayMulticastDomainId; this.replicaMode = builder.replicaMode; } /** *

* Reserved for future use. *

* * @return Reserved for future use. */ public final String interconnectSubnetId() { return interconnectSubnetId; } /** *

* Reserved for future use. *

* * @return Reserved for future use. */ public final String transitGatewayMulticastDomainId() { return transitGatewayMulticastDomainId; } /** *

* Reserved for future use. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #replicaMode} will * return {@link ReplicaMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #replicaModeAsString}. *

* * @return Reserved for future use. * @see ReplicaMode */ public final ReplicaMode replicaMode() { return ReplicaMode.fromValue(replicaMode); } /** *

* Reserved for future use. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #replicaMode} will * return {@link ReplicaMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #replicaModeAsString}. *

* * @return Reserved for future use. * @see ReplicaMode */ public final String replicaModeAsString() { return replicaMode; } @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(interconnectSubnetId()); hashCode = 31 * hashCode + Objects.hashCode(transitGatewayMulticastDomainId()); hashCode = 31 * hashCode + Objects.hashCode(replicaModeAsString()); 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 RdsCustomClusterConfiguration)) { return false; } RdsCustomClusterConfiguration other = (RdsCustomClusterConfiguration) obj; return Objects.equals(interconnectSubnetId(), other.interconnectSubnetId()) && Objects.equals(transitGatewayMulticastDomainId(), other.transitGatewayMulticastDomainId()) && Objects.equals(replicaModeAsString(), other.replicaModeAsString()); } /** * 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("RdsCustomClusterConfiguration").add("InterconnectSubnetId", interconnectSubnetId()) .add("TransitGatewayMulticastDomainId", transitGatewayMulticastDomainId()) .add("ReplicaMode", replicaModeAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "InterconnectSubnetId": return Optional.ofNullable(clazz.cast(interconnectSubnetId())); case "TransitGatewayMulticastDomainId": return Optional.ofNullable(clazz.cast(transitGatewayMulticastDomainId())); case "ReplicaMode": return Optional.ofNullable(clazz.cast(replicaModeAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((RdsCustomClusterConfiguration) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Reserved for future use. *

* * @param interconnectSubnetId * Reserved for future use. * @return Returns a reference to this object so that method calls can be chained together. */ Builder interconnectSubnetId(String interconnectSubnetId); /** *

* Reserved for future use. *

* * @param transitGatewayMulticastDomainId * Reserved for future use. * @return Returns a reference to this object so that method calls can be chained together. */ Builder transitGatewayMulticastDomainId(String transitGatewayMulticastDomainId); /** *

* Reserved for future use. *

* * @param replicaMode * Reserved for future use. * @see ReplicaMode * @return Returns a reference to this object so that method calls can be chained together. * @see ReplicaMode */ Builder replicaMode(String replicaMode); /** *

* Reserved for future use. *

* * @param replicaMode * Reserved for future use. * @see ReplicaMode * @return Returns a reference to this object so that method calls can be chained together. * @see ReplicaMode */ Builder replicaMode(ReplicaMode replicaMode); } static final class BuilderImpl implements Builder { private String interconnectSubnetId; private String transitGatewayMulticastDomainId; private String replicaMode; private BuilderImpl() { } private BuilderImpl(RdsCustomClusterConfiguration model) { interconnectSubnetId(model.interconnectSubnetId); transitGatewayMulticastDomainId(model.transitGatewayMulticastDomainId); replicaMode(model.replicaMode); } public final String getInterconnectSubnetId() { return interconnectSubnetId; } public final void setInterconnectSubnetId(String interconnectSubnetId) { this.interconnectSubnetId = interconnectSubnetId; } @Override public final Builder interconnectSubnetId(String interconnectSubnetId) { this.interconnectSubnetId = interconnectSubnetId; return this; } public final String getTransitGatewayMulticastDomainId() { return transitGatewayMulticastDomainId; } public final void setTransitGatewayMulticastDomainId(String transitGatewayMulticastDomainId) { this.transitGatewayMulticastDomainId = transitGatewayMulticastDomainId; } @Override public final Builder transitGatewayMulticastDomainId(String transitGatewayMulticastDomainId) { this.transitGatewayMulticastDomainId = transitGatewayMulticastDomainId; return this; } public final String getReplicaMode() { return replicaMode; } public final void setReplicaMode(String replicaMode) { this.replicaMode = replicaMode; } @Override public final Builder replicaMode(String replicaMode) { this.replicaMode = replicaMode; return this; } @Override public final Builder replicaMode(ReplicaMode replicaMode) { this.replicaMode(replicaMode == null ? null : replicaMode.toString()); return this; } @Override public RdsCustomClusterConfiguration build() { return new RdsCustomClusterConfiguration(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy