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

software.amazon.awssdk.services.elasticache.model.GlobalReplicationGroup Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon ElastiCache module holds the client classes that are used for communicating with Amazon ElastiCache Service

There is a newer version: 2.29.39
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.elasticache.model;

import java.io.Serializable;
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.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;

/**
 * 

* Consists of a primary cluster that accepts writes and an associated secondary cluster that resides in a different * Amazon region. The secondary cluster accepts only reads. The primary cluster automatically replicates updates to the * secondary cluster. *

*
    *
  • *

    * The GlobalReplicationGroupIdSuffix represents the name of the Global datastore, which is what you use to * associate a secondary cluster. *

    *
  • *
*/ @Generated("software.amazon.awssdk:codegen") public final class GlobalReplicationGroup implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField GLOBAL_REPLICATION_GROUP_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("GlobalReplicationGroupId").getter(getter(GlobalReplicationGroup::globalReplicationGroupId)) .setter(setter(Builder::globalReplicationGroupId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GlobalReplicationGroupId").build()) .build(); private static final SdkField GLOBAL_REPLICATION_GROUP_DESCRIPTION_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("GlobalReplicationGroupDescription") .getter(getter(GlobalReplicationGroup::globalReplicationGroupDescription)) .setter(setter(Builder::globalReplicationGroupDescription)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GlobalReplicationGroupDescription") .build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status") .getter(getter(GlobalReplicationGroup::status)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build(); private static final SdkField CACHE_NODE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CacheNodeType").getter(getter(GlobalReplicationGroup::cacheNodeType)) .setter(setter(Builder::cacheNodeType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CacheNodeType").build()).build(); private static final SdkField ENGINE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Engine") .getter(getter(GlobalReplicationGroup::engine)).setter(setter(Builder::engine)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Engine").build()).build(); private static final SdkField ENGINE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EngineVersion").getter(getter(GlobalReplicationGroup::engineVersion)) .setter(setter(Builder::engineVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineVersion").build()).build(); private static final SdkField> MEMBERS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Members") .getter(getter(GlobalReplicationGroup::members)) .setter(setter(Builder::members)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Members").build(), ListTrait .builder() .memberLocationName("GlobalReplicationGroupMember") .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(GlobalReplicationGroupMember::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("GlobalReplicationGroupMember").build()).build()).build()) .build(); private static final SdkField CLUSTER_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("ClusterEnabled").getter(getter(GlobalReplicationGroup::clusterEnabled)) .setter(setter(Builder::clusterEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClusterEnabled").build()).build(); private static final SdkField> GLOBAL_NODE_GROUPS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("GlobalNodeGroups") .getter(getter(GlobalReplicationGroup::globalNodeGroups)) .setter(setter(Builder::globalNodeGroups)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GlobalNodeGroups").build(), ListTrait .builder() .memberLocationName("GlobalNodeGroup") .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(GlobalNodeGroup::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("GlobalNodeGroup").build()).build()).build()).build(); private static final SdkField AUTH_TOKEN_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("AuthTokenEnabled").getter(getter(GlobalReplicationGroup::authTokenEnabled)) .setter(setter(Builder::authTokenEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AuthTokenEnabled").build()).build(); private static final SdkField TRANSIT_ENCRYPTION_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("TransitEncryptionEnabled").getter(getter(GlobalReplicationGroup::transitEncryptionEnabled)) .setter(setter(Builder::transitEncryptionEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TransitEncryptionEnabled").build()) .build(); private static final SdkField AT_REST_ENCRYPTION_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("AtRestEncryptionEnabled").getter(getter(GlobalReplicationGroup::atRestEncryptionEnabled)) .setter(setter(Builder::atRestEncryptionEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AtRestEncryptionEnabled").build()) .build(); private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("ARN") .getter(getter(GlobalReplicationGroup::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ARN").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList( GLOBAL_REPLICATION_GROUP_ID_FIELD, GLOBAL_REPLICATION_GROUP_DESCRIPTION_FIELD, STATUS_FIELD, CACHE_NODE_TYPE_FIELD, ENGINE_FIELD, ENGINE_VERSION_FIELD, MEMBERS_FIELD, CLUSTER_ENABLED_FIELD, GLOBAL_NODE_GROUPS_FIELD, AUTH_TOKEN_ENABLED_FIELD, TRANSIT_ENCRYPTION_ENABLED_FIELD, AT_REST_ENCRYPTION_ENABLED_FIELD, ARN_FIELD)); private static final long serialVersionUID = 1L; private final String globalReplicationGroupId; private final String globalReplicationGroupDescription; private final String status; private final String cacheNodeType; private final String engine; private final String engineVersion; private final List members; private final Boolean clusterEnabled; private final List globalNodeGroups; private final Boolean authTokenEnabled; private final Boolean transitEncryptionEnabled; private final Boolean atRestEncryptionEnabled; private final String arn; private GlobalReplicationGroup(BuilderImpl builder) { this.globalReplicationGroupId = builder.globalReplicationGroupId; this.globalReplicationGroupDescription = builder.globalReplicationGroupDescription; this.status = builder.status; this.cacheNodeType = builder.cacheNodeType; this.engine = builder.engine; this.engineVersion = builder.engineVersion; this.members = builder.members; this.clusterEnabled = builder.clusterEnabled; this.globalNodeGroups = builder.globalNodeGroups; this.authTokenEnabled = builder.authTokenEnabled; this.transitEncryptionEnabled = builder.transitEncryptionEnabled; this.atRestEncryptionEnabled = builder.atRestEncryptionEnabled; this.arn = builder.arn; } /** *

* The name of the Global datastore *

* * @return The name of the Global datastore */ public final String globalReplicationGroupId() { return globalReplicationGroupId; } /** *

* The optional description of the Global datastore *

* * @return The optional description of the Global datastore */ public final String globalReplicationGroupDescription() { return globalReplicationGroupDescription; } /** *

* The status of the Global datastore *

* * @return The status of the Global datastore */ public final String status() { return status; } /** *

* The cache node type of the Global datastore *

* * @return The cache node type of the Global datastore */ public final String cacheNodeType() { return cacheNodeType; } /** *

* The Elasticache engine. For Redis OSS only. *

* * @return The Elasticache engine. For Redis OSS only. */ public final String engine() { return engine; } /** *

* The Elasticache (Redis OSS) engine version. *

* * @return The Elasticache (Redis OSS) engine version. */ public final String engineVersion() { return engineVersion; } /** * For responses, this returns true if the service returned a value for the Members 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 hasMembers() { return members != null && !(members instanceof SdkAutoConstructList); } /** *

* The replication groups that comprise the Global datastore. *

*

* 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 #hasMembers} method. *

* * @return The replication groups that comprise the Global datastore. */ public final List members() { return members; } /** *

* A flag that indicates whether the Global datastore is cluster enabled. *

* * @return A flag that indicates whether the Global datastore is cluster enabled. */ public final Boolean clusterEnabled() { return clusterEnabled; } /** * For responses, this returns true if the service returned a value for the GlobalNodeGroups 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 hasGlobalNodeGroups() { return globalNodeGroups != null && !(globalNodeGroups instanceof SdkAutoConstructList); } /** *

* Indicates the slot configuration and global identifier for each slice group. *

*

* 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 #hasGlobalNodeGroups} method. *

* * @return Indicates the slot configuration and global identifier for each slice group. */ public final List globalNodeGroups() { return globalNodeGroups; } /** *

* A flag that enables using an AuthToken (password) when issuing Redis OSS commands. *

*

* Default: false *

* * @return A flag that enables using an AuthToken (password) when issuing Redis OSS commands.

*

* Default: false */ public final Boolean authTokenEnabled() { return authTokenEnabled; } /** *

* A flag that enables in-transit encryption when set to true. *

*

* Required: Only available when creating a replication group in an Amazon VPC using Redis OSS version * 3.2.6, 4.x or later. *

* * @return A flag that enables in-transit encryption when set to true.

*

* Required: Only available when creating a replication group in an Amazon VPC using Redis OSS * version 3.2.6, 4.x or later. */ public final Boolean transitEncryptionEnabled() { return transitEncryptionEnabled; } /** *

* A flag that enables encryption at rest when set to true. *

*

* You cannot modify the value of AtRestEncryptionEnabled after the replication group is created. To * enable encryption at rest on a replication group you must set AtRestEncryptionEnabled to * true when you create the replication group. *

*

* Required: Only available when creating a replication group in an Amazon VPC using Redis OSS version * 3.2.6, 4.x or later. *

* * @return A flag that enables encryption at rest when set to true.

*

* You cannot modify the value of AtRestEncryptionEnabled after the replication group is * created. To enable encryption at rest on a replication group you must set * AtRestEncryptionEnabled to true when you create the replication group. *

*

* Required: Only available when creating a replication group in an Amazon VPC using Redis OSS * version 3.2.6, 4.x or later. */ public final Boolean atRestEncryptionEnabled() { return atRestEncryptionEnabled; } /** *

* The ARN (Amazon Resource Name) of the global replication group. *

* * @return The ARN (Amazon Resource Name) of the global replication group. */ public final String arn() { return arn; } @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(globalReplicationGroupId()); hashCode = 31 * hashCode + Objects.hashCode(globalReplicationGroupDescription()); hashCode = 31 * hashCode + Objects.hashCode(status()); hashCode = 31 * hashCode + Objects.hashCode(cacheNodeType()); hashCode = 31 * hashCode + Objects.hashCode(engine()); hashCode = 31 * hashCode + Objects.hashCode(engineVersion()); hashCode = 31 * hashCode + Objects.hashCode(hasMembers() ? members() : null); hashCode = 31 * hashCode + Objects.hashCode(clusterEnabled()); hashCode = 31 * hashCode + Objects.hashCode(hasGlobalNodeGroups() ? globalNodeGroups() : null); hashCode = 31 * hashCode + Objects.hashCode(authTokenEnabled()); hashCode = 31 * hashCode + Objects.hashCode(transitEncryptionEnabled()); hashCode = 31 * hashCode + Objects.hashCode(atRestEncryptionEnabled()); hashCode = 31 * hashCode + Objects.hashCode(arn()); 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 GlobalReplicationGroup)) { return false; } GlobalReplicationGroup other = (GlobalReplicationGroup) obj; return Objects.equals(globalReplicationGroupId(), other.globalReplicationGroupId()) && Objects.equals(globalReplicationGroupDescription(), other.globalReplicationGroupDescription()) && Objects.equals(status(), other.status()) && Objects.equals(cacheNodeType(), other.cacheNodeType()) && Objects.equals(engine(), other.engine()) && Objects.equals(engineVersion(), other.engineVersion()) && hasMembers() == other.hasMembers() && Objects.equals(members(), other.members()) && Objects.equals(clusterEnabled(), other.clusterEnabled()) && hasGlobalNodeGroups() == other.hasGlobalNodeGroups() && Objects.equals(globalNodeGroups(), other.globalNodeGroups()) && Objects.equals(authTokenEnabled(), other.authTokenEnabled()) && Objects.equals(transitEncryptionEnabled(), other.transitEncryptionEnabled()) && Objects.equals(atRestEncryptionEnabled(), other.atRestEncryptionEnabled()) && Objects.equals(arn(), other.arn()); } /** * 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("GlobalReplicationGroup").add("GlobalReplicationGroupId", globalReplicationGroupId()) .add("GlobalReplicationGroupDescription", globalReplicationGroupDescription()).add("Status", status()) .add("CacheNodeType", cacheNodeType()).add("Engine", engine()).add("EngineVersion", engineVersion()) .add("Members", hasMembers() ? members() : null).add("ClusterEnabled", clusterEnabled()) .add("GlobalNodeGroups", hasGlobalNodeGroups() ? globalNodeGroups() : null) .add("AuthTokenEnabled", authTokenEnabled()).add("TransitEncryptionEnabled", transitEncryptionEnabled()) .add("AtRestEncryptionEnabled", atRestEncryptionEnabled()).add("ARN", arn()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "GlobalReplicationGroupId": return Optional.ofNullable(clazz.cast(globalReplicationGroupId())); case "GlobalReplicationGroupDescription": return Optional.ofNullable(clazz.cast(globalReplicationGroupDescription())); case "Status": return Optional.ofNullable(clazz.cast(status())); case "CacheNodeType": return Optional.ofNullable(clazz.cast(cacheNodeType())); case "Engine": return Optional.ofNullable(clazz.cast(engine())); case "EngineVersion": return Optional.ofNullable(clazz.cast(engineVersion())); case "Members": return Optional.ofNullable(clazz.cast(members())); case "ClusterEnabled": return Optional.ofNullable(clazz.cast(clusterEnabled())); case "GlobalNodeGroups": return Optional.ofNullable(clazz.cast(globalNodeGroups())); case "AuthTokenEnabled": return Optional.ofNullable(clazz.cast(authTokenEnabled())); case "TransitEncryptionEnabled": return Optional.ofNullable(clazz.cast(transitEncryptionEnabled())); case "AtRestEncryptionEnabled": return Optional.ofNullable(clazz.cast(atRestEncryptionEnabled())); case "ARN": return Optional.ofNullable(clazz.cast(arn())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((GlobalReplicationGroup) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The name of the Global datastore *

* * @param globalReplicationGroupId * The name of the Global datastore * @return Returns a reference to this object so that method calls can be chained together. */ Builder globalReplicationGroupId(String globalReplicationGroupId); /** *

* The optional description of the Global datastore *

* * @param globalReplicationGroupDescription * The optional description of the Global datastore * @return Returns a reference to this object so that method calls can be chained together. */ Builder globalReplicationGroupDescription(String globalReplicationGroupDescription); /** *

* The status of the Global datastore *

* * @param status * The status of the Global datastore * @return Returns a reference to this object so that method calls can be chained together. */ Builder status(String status); /** *

* The cache node type of the Global datastore *

* * @param cacheNodeType * The cache node type of the Global datastore * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheNodeType(String cacheNodeType); /** *

* The Elasticache engine. For Redis OSS only. *

* * @param engine * The Elasticache engine. For Redis OSS only. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engine(String engine); /** *

* The Elasticache (Redis OSS) engine version. *

* * @param engineVersion * The Elasticache (Redis OSS) engine version. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engineVersion(String engineVersion); /** *

* The replication groups that comprise the Global datastore. *

* * @param members * The replication groups that comprise the Global datastore. * @return Returns a reference to this object so that method calls can be chained together. */ Builder members(Collection members); /** *

* The replication groups that comprise the Global datastore. *

* * @param members * The replication groups that comprise the Global datastore. * @return Returns a reference to this object so that method calls can be chained together. */ Builder members(GlobalReplicationGroupMember... members); /** *

* The replication groups that comprise the Global datastore. *

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

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.elasticache.model.GlobalReplicationGroupMember.Builder#build()} is * called immediately and its result is passed to {@link #members(List)}. * * @param members * a consumer that will call methods on * {@link software.amazon.awssdk.services.elasticache.model.GlobalReplicationGroupMember.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #members(java.util.Collection) */ Builder members(Consumer... members); /** *

* A flag that indicates whether the Global datastore is cluster enabled. *

* * @param clusterEnabled * A flag that indicates whether the Global datastore is cluster enabled. * @return Returns a reference to this object so that method calls can be chained together. */ Builder clusterEnabled(Boolean clusterEnabled); /** *

* Indicates the slot configuration and global identifier for each slice group. *

* * @param globalNodeGroups * Indicates the slot configuration and global identifier for each slice group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder globalNodeGroups(Collection globalNodeGroups); /** *

* Indicates the slot configuration and global identifier for each slice group. *

* * @param globalNodeGroups * Indicates the slot configuration and global identifier for each slice group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder globalNodeGroups(GlobalNodeGroup... globalNodeGroups); /** *

* Indicates the slot configuration and global identifier for each slice group. *

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

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.elasticache.model.GlobalNodeGroup.Builder#build()} is called * immediately and its result is passed to {@link #globalNodeGroups(List)}. * * @param globalNodeGroups * a consumer that will call methods on * {@link software.amazon.awssdk.services.elasticache.model.GlobalNodeGroup.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #globalNodeGroups(java.util.Collection) */ Builder globalNodeGroups(Consumer... globalNodeGroups); /** *

* A flag that enables using an AuthToken (password) when issuing Redis OSS commands. *

*

* Default: false *

* * @param authTokenEnabled * A flag that enables using an AuthToken (password) when issuing Redis OSS commands.

*

* Default: false * @return Returns a reference to this object so that method calls can be chained together. */ Builder authTokenEnabled(Boolean authTokenEnabled); /** *

* A flag that enables in-transit encryption when set to true. *

*

* Required: Only available when creating a replication group in an Amazon VPC using Redis OSS version * 3.2.6, 4.x or later. *

* * @param transitEncryptionEnabled * A flag that enables in-transit encryption when set to true.

*

* Required: Only available when creating a replication group in an Amazon VPC using Redis OSS * version 3.2.6, 4.x or later. * @return Returns a reference to this object so that method calls can be chained together. */ Builder transitEncryptionEnabled(Boolean transitEncryptionEnabled); /** *

* A flag that enables encryption at rest when set to true. *

*

* You cannot modify the value of AtRestEncryptionEnabled after the replication group is created. * To enable encryption at rest on a replication group you must set AtRestEncryptionEnabled to * true when you create the replication group. *

*

* Required: Only available when creating a replication group in an Amazon VPC using Redis OSS version * 3.2.6, 4.x or later. *

* * @param atRestEncryptionEnabled * A flag that enables encryption at rest when set to true.

*

* You cannot modify the value of AtRestEncryptionEnabled after the replication group is * created. To enable encryption at rest on a replication group you must set * AtRestEncryptionEnabled to true when you create the replication group. *

*

* Required: Only available when creating a replication group in an Amazon VPC using Redis OSS * version 3.2.6, 4.x or later. * @return Returns a reference to this object so that method calls can be chained together. */ Builder atRestEncryptionEnabled(Boolean atRestEncryptionEnabled); /** *

* The ARN (Amazon Resource Name) of the global replication group. *

* * @param arn * The ARN (Amazon Resource Name) of the global replication group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); } static final class BuilderImpl implements Builder { private String globalReplicationGroupId; private String globalReplicationGroupDescription; private String status; private String cacheNodeType; private String engine; private String engineVersion; private List members = DefaultSdkAutoConstructList.getInstance(); private Boolean clusterEnabled; private List globalNodeGroups = DefaultSdkAutoConstructList.getInstance(); private Boolean authTokenEnabled; private Boolean transitEncryptionEnabled; private Boolean atRestEncryptionEnabled; private String arn; private BuilderImpl() { } private BuilderImpl(GlobalReplicationGroup model) { globalReplicationGroupId(model.globalReplicationGroupId); globalReplicationGroupDescription(model.globalReplicationGroupDescription); status(model.status); cacheNodeType(model.cacheNodeType); engine(model.engine); engineVersion(model.engineVersion); members(model.members); clusterEnabled(model.clusterEnabled); globalNodeGroups(model.globalNodeGroups); authTokenEnabled(model.authTokenEnabled); transitEncryptionEnabled(model.transitEncryptionEnabled); atRestEncryptionEnabled(model.atRestEncryptionEnabled); arn(model.arn); } public final String getGlobalReplicationGroupId() { return globalReplicationGroupId; } public final void setGlobalReplicationGroupId(String globalReplicationGroupId) { this.globalReplicationGroupId = globalReplicationGroupId; } @Override public final Builder globalReplicationGroupId(String globalReplicationGroupId) { this.globalReplicationGroupId = globalReplicationGroupId; return this; } public final String getGlobalReplicationGroupDescription() { return globalReplicationGroupDescription; } public final void setGlobalReplicationGroupDescription(String globalReplicationGroupDescription) { this.globalReplicationGroupDescription = globalReplicationGroupDescription; } @Override public final Builder globalReplicationGroupDescription(String globalReplicationGroupDescription) { this.globalReplicationGroupDescription = globalReplicationGroupDescription; return this; } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } public final String getCacheNodeType() { return cacheNodeType; } public final void setCacheNodeType(String cacheNodeType) { this.cacheNodeType = cacheNodeType; } @Override public final Builder cacheNodeType(String cacheNodeType) { this.cacheNodeType = cacheNodeType; return this; } public final String getEngine() { return engine; } public final void setEngine(String engine) { this.engine = engine; } @Override public final Builder engine(String engine) { this.engine = engine; 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 List getMembers() { List result = GlobalReplicationGroupMemberListCopier .copyToBuilder(this.members); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setMembers(Collection members) { this.members = GlobalReplicationGroupMemberListCopier.copyFromBuilder(members); } @Override public final Builder members(Collection members) { this.members = GlobalReplicationGroupMemberListCopier.copy(members); return this; } @Override @SafeVarargs public final Builder members(GlobalReplicationGroupMember... members) { members(Arrays.asList(members)); return this; } @Override @SafeVarargs public final Builder members(Consumer... members) { members(Stream.of(members).map(c -> GlobalReplicationGroupMember.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Boolean getClusterEnabled() { return clusterEnabled; } public final void setClusterEnabled(Boolean clusterEnabled) { this.clusterEnabled = clusterEnabled; } @Override public final Builder clusterEnabled(Boolean clusterEnabled) { this.clusterEnabled = clusterEnabled; return this; } public final List getGlobalNodeGroups() { List result = GlobalNodeGroupListCopier.copyToBuilder(this.globalNodeGroups); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setGlobalNodeGroups(Collection globalNodeGroups) { this.globalNodeGroups = GlobalNodeGroupListCopier.copyFromBuilder(globalNodeGroups); } @Override public final Builder globalNodeGroups(Collection globalNodeGroups) { this.globalNodeGroups = GlobalNodeGroupListCopier.copy(globalNodeGroups); return this; } @Override @SafeVarargs public final Builder globalNodeGroups(GlobalNodeGroup... globalNodeGroups) { globalNodeGroups(Arrays.asList(globalNodeGroups)); return this; } @Override @SafeVarargs public final Builder globalNodeGroups(Consumer... globalNodeGroups) { globalNodeGroups(Stream.of(globalNodeGroups).map(c -> GlobalNodeGroup.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Boolean getAuthTokenEnabled() { return authTokenEnabled; } public final void setAuthTokenEnabled(Boolean authTokenEnabled) { this.authTokenEnabled = authTokenEnabled; } @Override public final Builder authTokenEnabled(Boolean authTokenEnabled) { this.authTokenEnabled = authTokenEnabled; return this; } public final Boolean getTransitEncryptionEnabled() { return transitEncryptionEnabled; } public final void setTransitEncryptionEnabled(Boolean transitEncryptionEnabled) { this.transitEncryptionEnabled = transitEncryptionEnabled; } @Override public final Builder transitEncryptionEnabled(Boolean transitEncryptionEnabled) { this.transitEncryptionEnabled = transitEncryptionEnabled; return this; } public final Boolean getAtRestEncryptionEnabled() { return atRestEncryptionEnabled; } public final void setAtRestEncryptionEnabled(Boolean atRestEncryptionEnabled) { this.atRestEncryptionEnabled = atRestEncryptionEnabled; } @Override public final Builder atRestEncryptionEnabled(Boolean atRestEncryptionEnabled) { this.atRestEncryptionEnabled = atRestEncryptionEnabled; return this; } public final String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } @Override public GlobalReplicationGroup build() { return new GlobalReplicationGroup(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy