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

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

/*
 * Copyright 2014-2019 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.time.Instant;
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.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents a copy of an entire Redis cluster as of the time when the snapshot was taken. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Snapshot implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField SNAPSHOT_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::snapshotName)).setter(setter(Builder::snapshotName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotName").build()).build(); private static final SdkField REPLICATION_GROUP_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::replicationGroupId)).setter(setter(Builder::replicationGroupId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationGroupId").build()) .build(); private static final SdkField REPLICATION_GROUP_DESCRIPTION_FIELD = SdkField . builder(MarshallingType.STRING) .getter(getter(Snapshot::replicationGroupDescription)) .setter(setter(Builder::replicationGroupDescription)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReplicationGroupDescription") .build()).build(); private static final SdkField CACHE_CLUSTER_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::cacheClusterId)).setter(setter(Builder::cacheClusterId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CacheClusterId").build()).build(); private static final SdkField SNAPSHOT_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::snapshotStatus)).setter(setter(Builder::snapshotStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotStatus").build()).build(); private static final SdkField SNAPSHOT_SOURCE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::snapshotSource)).setter(setter(Builder::snapshotSource)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotSource").build()).build(); private static final SdkField CACHE_NODE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::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) .getter(getter(Snapshot::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) .getter(getter(Snapshot::engineVersion)).setter(setter(Builder::engineVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineVersion").build()).build(); private static final SdkField NUM_CACHE_NODES_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(Snapshot::numCacheNodes)).setter(setter(Builder::numCacheNodes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NumCacheNodes").build()).build(); private static final SdkField PREFERRED_AVAILABILITY_ZONE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::preferredAvailabilityZone)).setter(setter(Builder::preferredAvailabilityZone)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreferredAvailabilityZone").build()) .build(); private static final SdkField CACHE_CLUSTER_CREATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(Snapshot::cacheClusterCreateTime)).setter(setter(Builder::cacheClusterCreateTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CacheClusterCreateTime").build()) .build(); private static final SdkField PREFERRED_MAINTENANCE_WINDOW_FIELD = SdkField . builder(MarshallingType.STRING) .getter(getter(Snapshot::preferredMaintenanceWindow)) .setter(setter(Builder::preferredMaintenanceWindow)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreferredMaintenanceWindow").build()) .build(); private static final SdkField TOPIC_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::topicArn)).setter(setter(Builder::topicArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TopicArn").build()).build(); private static final SdkField PORT_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(Snapshot::port)).setter(setter(Builder::port)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Port").build()).build(); private static final SdkField CACHE_PARAMETER_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::cacheParameterGroupName)).setter(setter(Builder::cacheParameterGroupName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CacheParameterGroupName").build()) .build(); private static final SdkField CACHE_SUBNET_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::cacheSubnetGroupName)).setter(setter(Builder::cacheSubnetGroupName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CacheSubnetGroupName").build()) .build(); private static final SdkField VPC_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::vpcId)).setter(setter(Builder::vpcId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcId").build()).build(); private static final SdkField AUTO_MINOR_VERSION_UPGRADE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(Snapshot::autoMinorVersionUpgrade)).setter(setter(Builder::autoMinorVersionUpgrade)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMinorVersionUpgrade").build()) .build(); private static final SdkField SNAPSHOT_RETENTION_LIMIT_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(Snapshot::snapshotRetentionLimit)).setter(setter(Builder::snapshotRetentionLimit)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotRetentionLimit").build()) .build(); private static final SdkField SNAPSHOT_WINDOW_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::snapshotWindow)).setter(setter(Builder::snapshotWindow)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotWindow").build()).build(); private static final SdkField NUM_NODE_GROUPS_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(Snapshot::numNodeGroups)).setter(setter(Builder::numNodeGroups)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NumNodeGroups").build()).build(); private static final SdkField AUTOMATIC_FAILOVER_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(Snapshot::automaticFailoverAsString)).setter(setter(Builder::automaticFailover)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutomaticFailover").build()).build(); private static final SdkField> NODE_SNAPSHOTS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(Snapshot::nodeSnapshots)) .setter(setter(Builder::nodeSnapshots)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NodeSnapshots").build(), ListTrait .builder() .memberLocationName("NodeSnapshot") .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(NodeSnapshot::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("NodeSnapshot").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(SNAPSHOT_NAME_FIELD, REPLICATION_GROUP_ID_FIELD, REPLICATION_GROUP_DESCRIPTION_FIELD, CACHE_CLUSTER_ID_FIELD, SNAPSHOT_STATUS_FIELD, SNAPSHOT_SOURCE_FIELD, CACHE_NODE_TYPE_FIELD, ENGINE_FIELD, ENGINE_VERSION_FIELD, NUM_CACHE_NODES_FIELD, PREFERRED_AVAILABILITY_ZONE_FIELD, CACHE_CLUSTER_CREATE_TIME_FIELD, PREFERRED_MAINTENANCE_WINDOW_FIELD, TOPIC_ARN_FIELD, PORT_FIELD, CACHE_PARAMETER_GROUP_NAME_FIELD, CACHE_SUBNET_GROUP_NAME_FIELD, VPC_ID_FIELD, AUTO_MINOR_VERSION_UPGRADE_FIELD, SNAPSHOT_RETENTION_LIMIT_FIELD, SNAPSHOT_WINDOW_FIELD, NUM_NODE_GROUPS_FIELD, AUTOMATIC_FAILOVER_FIELD, NODE_SNAPSHOTS_FIELD)); private static final long serialVersionUID = 1L; private final String snapshotName; private final String replicationGroupId; private final String replicationGroupDescription; private final String cacheClusterId; private final String snapshotStatus; private final String snapshotSource; private final String cacheNodeType; private final String engine; private final String engineVersion; private final Integer numCacheNodes; private final String preferredAvailabilityZone; private final Instant cacheClusterCreateTime; private final String preferredMaintenanceWindow; private final String topicArn; private final Integer port; private final String cacheParameterGroupName; private final String cacheSubnetGroupName; private final String vpcId; private final Boolean autoMinorVersionUpgrade; private final Integer snapshotRetentionLimit; private final String snapshotWindow; private final Integer numNodeGroups; private final String automaticFailover; private final List nodeSnapshots; private Snapshot(BuilderImpl builder) { this.snapshotName = builder.snapshotName; this.replicationGroupId = builder.replicationGroupId; this.replicationGroupDescription = builder.replicationGroupDescription; this.cacheClusterId = builder.cacheClusterId; this.snapshotStatus = builder.snapshotStatus; this.snapshotSource = builder.snapshotSource; this.cacheNodeType = builder.cacheNodeType; this.engine = builder.engine; this.engineVersion = builder.engineVersion; this.numCacheNodes = builder.numCacheNodes; this.preferredAvailabilityZone = builder.preferredAvailabilityZone; this.cacheClusterCreateTime = builder.cacheClusterCreateTime; this.preferredMaintenanceWindow = builder.preferredMaintenanceWindow; this.topicArn = builder.topicArn; this.port = builder.port; this.cacheParameterGroupName = builder.cacheParameterGroupName; this.cacheSubnetGroupName = builder.cacheSubnetGroupName; this.vpcId = builder.vpcId; this.autoMinorVersionUpgrade = builder.autoMinorVersionUpgrade; this.snapshotRetentionLimit = builder.snapshotRetentionLimit; this.snapshotWindow = builder.snapshotWindow; this.numNodeGroups = builder.numNodeGroups; this.automaticFailover = builder.automaticFailover; this.nodeSnapshots = builder.nodeSnapshots; } /** *

* The name of a snapshot. For an automatic snapshot, the name is system-generated. For a manual snapshot, this is * the user-provided name. *

* * @return The name of a snapshot. For an automatic snapshot, the name is system-generated. For a manual snapshot, * this is the user-provided name. */ public String snapshotName() { return snapshotName; } /** *

* The unique identifier of the source replication group. *

* * @return The unique identifier of the source replication group. */ public String replicationGroupId() { return replicationGroupId; } /** *

* A description of the source replication group. *

* * @return A description of the source replication group. */ public String replicationGroupDescription() { return replicationGroupDescription; } /** *

* The user-supplied identifier of the source cluster. *

* * @return The user-supplied identifier of the source cluster. */ public String cacheClusterId() { return cacheClusterId; } /** *

* The status of the snapshot. Valid values: creating | available | restoring * | copying | deleting. *

* * @return The status of the snapshot. Valid values: creating | available | * restoring | copying | deleting. */ public String snapshotStatus() { return snapshotStatus; } /** *

* Indicates whether the snapshot is from an automatic backup (automated) or was created manually ( * manual). *

* * @return Indicates whether the snapshot is from an automatic backup (automated) or was created * manually (manual). */ public String snapshotSource() { return snapshotSource; } /** *

* The name of the compute and memory capacity node type for the source cluster. *

*

* The following node types are supported by ElastiCache. Generally speaking, the current generation types provide * more memory and computational power at lower cost when compared to their equivalent previous generation * counterparts. *

*
    *
  • *

    * General purpose: *

    *
      *
    • *

      * Current generation: *

      *

      * T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium *

      *

      * M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, * cache.m3.2xlarge *

      *

      * M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, * cache.m4.4xlarge, cache.m4.10xlarge *

      *
    • *
    • *

      * Previous generation: (not recommended) *

      *

      * T1 node types: cache.t1.micro *

      *

      * M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, * cache.m1.xlarge *

      *
    • *
    *
  • *
  • *

    * Compute optimized: *

    *
      *
    • *

      * Previous generation: (not recommended) *

      *

      * C1 node types: cache.c1.xlarge *

      *
    • *
    *
  • *
  • *

    * Memory optimized: *

    *
      *
    • *

      * Current generation: *

      *

      * R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, * cache.r3.4xlarge, cache.r3.8xlarge *

      *

      * R4 node types; cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, * cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge *

      *
    • *
    • *

      * Previous generation: (not recommended) *

      *

      * M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge *

      *
    • *
    *
  • *
*

* Notes: *

*
    *
  • *

    * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon VPC). *

    *
  • *
  • *

    * Redis (cluster mode disabled): Redis backup/restore is not supported on T1 and T2 instances. *

    *
  • *
  • *

    * Redis (cluster mode enabled): Backup/restore is not supported on T1 instances. *

    *
  • *
  • *

    * Redis Append-only files (AOF) functionality is not supported for T1 or T2 instances. *

    *
  • *
*

* For a complete listing of node types and specifications, see: *

* * * @return The name of the compute and memory capacity node type for the source cluster.

*

* The following node types are supported by ElastiCache. Generally speaking, the current generation types * provide more memory and computational power at lower cost when compared to their equivalent previous * generation counterparts. *

*
    *
  • *

    * General purpose: *

    *
      *
    • *

      * Current generation: *

      *

      * T2 node types: cache.t2.micro, cache.t2.small, * cache.t2.medium *

      *

      * M3 node types: cache.m3.medium, cache.m3.large, * cache.m3.xlarge, cache.m3.2xlarge *

      *

      * M4 node types: cache.m4.large, cache.m4.xlarge, * cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge *

      *
    • *
    • *

      * Previous generation: (not recommended) *

      *

      * T1 node types: cache.t1.micro *

      *

      * M1 node types: cache.m1.small, cache.m1.medium, * cache.m1.large, cache.m1.xlarge *

      *
    • *
    *
  • *
  • *

    * Compute optimized: *

    *
      *
    • *

      * Previous generation: (not recommended) *

      *

      * C1 node types: cache.c1.xlarge *

      *
    • *
    *
  • *
  • *

    * Memory optimized: *

    *
      *
    • *

      * Current generation: *

      *

      * R3 node types: cache.r3.large, cache.r3.xlarge, * cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge *

      *

      * R4 node types; cache.r4.large, cache.r4.xlarge, * cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, * cache.r4.16xlarge *

      *
    • *
    • *

      * Previous generation: (not recommended) *

      *

      * M2 node types: cache.m2.xlarge, cache.m2.2xlarge, * cache.m2.4xlarge *

      *
    • *
    *
  • *
*

* Notes: *

*
    *
  • *

    * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon VPC). *

    *
  • *
  • *

    * Redis (cluster mode disabled): Redis backup/restore is not supported on T1 and T2 instances. *

    *
  • *
  • *

    * Redis (cluster mode enabled): Backup/restore is not supported on T1 instances. *

    *
  • *
  • *

    * Redis Append-only files (AOF) functionality is not supported for T1 or T2 instances. *

    *
  • *
*

* For a complete listing of node types and specifications, see: *

*
    *
  • *

    * Amazon ElastiCache Product Features and Details *

    *
  • *
  • *

    * Cache Node Type-Specific Parameters for Memcached *

    *
  • *
  • *

    * Cache Node Type-Specific Parameters for Redis *

    *
  • */ public String cacheNodeType() { return cacheNodeType; } /** *

    * The name of the cache engine (memcached or redis) used by the source cluster. *

    * * @return The name of the cache engine (memcached or redis) used by the source cluster. */ public String engine() { return engine; } /** *

    * The version of the cache engine version that is used by the source cluster. *

    * * @return The version of the cache engine version that is used by the source cluster. */ public String engineVersion() { return engineVersion; } /** *

    * The number of cache nodes in the source cluster. *

    *

    * For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 * and 20. *

    * * @return The number of cache nodes in the source cluster.

    *

    * For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be * between 1 and 20. */ public Integer numCacheNodes() { return numCacheNodes; } /** *

    * The name of the Availability Zone in which the source cluster is located. *

    * * @return The name of the Availability Zone in which the source cluster is located. */ public String preferredAvailabilityZone() { return preferredAvailabilityZone; } /** *

    * The date and time when the source cluster was created. *

    * * @return The date and time when the source cluster was created. */ public Instant cacheClusterCreateTime() { return cacheClusterCreateTime; } /** *

    * Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range * in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. *

    *

    * Valid values for ddd are: *

    *
      *
    • *

      * sun *

      *
    • *
    • *

      * mon *

      *
    • *
    • *

      * tue *

      *
    • *
    • *

      * wed *

      *
    • *
    • *

      * thu *

      *
    • *
    • *

      * fri *

      *
    • *
    • *

      * sat *

      *
    • *
    *

    * Example: sun:23:00-mon:01:30 *

    * * @return Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as * a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 * minute period.

    *

    * Valid values for ddd are: *

    *
      *
    • *

      * sun *

      *
    • *
    • *

      * mon *

      *
    • *
    • *

      * tue *

      *
    • *
    • *

      * wed *

      *
    • *
    • *

      * thu *

      *
    • *
    • *

      * fri *

      *
    • *
    • *

      * sat *

      *
    • *
    *

    * Example: sun:23:00-mon:01:30 */ public String preferredMaintenanceWindow() { return preferredMaintenanceWindow; } /** *

    * The Amazon Resource Name (ARN) for the topic used by the source cluster for publishing notifications. *

    * * @return The Amazon Resource Name (ARN) for the topic used by the source cluster for publishing notifications. */ public String topicArn() { return topicArn; } /** *

    * The port number used by each cache nodes in the source cluster. *

    * * @return The port number used by each cache nodes in the source cluster. */ public Integer port() { return port; } /** *

    * The cache parameter group that is associated with the source cluster. *

    * * @return The cache parameter group that is associated with the source cluster. */ public String cacheParameterGroupName() { return cacheParameterGroupName; } /** *

    * The name of the cache subnet group associated with the source cluster. *

    * * @return The name of the cache subnet group associated with the source cluster. */ public String cacheSubnetGroupName() { return cacheSubnetGroupName; } /** *

    * The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cluster. *

    * * @return The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cluster. */ public String vpcId() { return vpcId; } /** *

    * This parameter is currently disabled. *

    * * @return This parameter is currently disabled. */ public Boolean autoMinorVersionUpgrade() { return autoMinorVersionUpgrade; } /** *

    * For an automatic snapshot, the number of days for which ElastiCache retains the snapshot before deleting it. *

    *

    * For manual snapshots, this field reflects the SnapshotRetentionLimit for the source cluster when the * snapshot was created. This field is otherwise ignored: Manual snapshots do not expire, and can only be deleted * using the DeleteSnapshot operation. *

    *

    * Important If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. *

    * * @return For an automatic snapshot, the number of days for which ElastiCache retains the snapshot before deleting * it.

    *

    * For manual snapshots, this field reflects the SnapshotRetentionLimit for the source cluster * when the snapshot was created. This field is otherwise ignored: Manual snapshots do not expire, and can * only be deleted using the DeleteSnapshot operation. *

    *

    * Important If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. */ public Integer snapshotRetentionLimit() { return snapshotRetentionLimit; } /** *

    * The daily time range during which ElastiCache takes daily snapshots of the source cluster. *

    * * @return The daily time range during which ElastiCache takes daily snapshots of the source cluster. */ public String snapshotWindow() { return snapshotWindow; } /** *

    * The number of node groups (shards) in this snapshot. When restoring from a snapshot, the number of node groups * (shards) in the snapshot and in the restored replication group must be the same. *

    * * @return The number of node groups (shards) in this snapshot. When restoring from a snapshot, the number of node * groups (shards) in the snapshot and in the restored replication group must be the same. */ public Integer numNodeGroups() { return numNodeGroups; } /** *

    * Indicates the status of Multi-AZ with automatic failover for the source Redis replication group. *

    *

    * Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on: *

    *
      *
    • *

      * Redis versions earlier than 2.8.6. *

      *
    • *
    • *

      * Redis (cluster mode disabled): T1 and T2 cache node types. *

      *
    • *
    • *

      * Redis (cluster mode enabled): T1 node types. *

      *
    • *
    *

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

    * * @return Indicates the status of Multi-AZ with automatic failover for the source Redis replication group.

    *

    * Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on: *

    *
      *
    • *

      * Redis versions earlier than 2.8.6. *

      *
    • *
    • *

      * Redis (cluster mode disabled): T1 and T2 cache node types. *

      *
    • *
    • *

      * Redis (cluster mode enabled): T1 node types. *

      *
    • * @see AutomaticFailoverStatus */ public AutomaticFailoverStatus automaticFailover() { return AutomaticFailoverStatus.fromValue(automaticFailover); } /** *

      * Indicates the status of Multi-AZ with automatic failover for the source Redis replication group. *

      *

      * Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on: *

      *
        *
      • *

        * Redis versions earlier than 2.8.6. *

        *
      • *
      • *

        * Redis (cluster mode disabled): T1 and T2 cache node types. *

        *
      • *
      • *

        * Redis (cluster mode enabled): T1 node types. *

        *
      • *
      *

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

      * * @return Indicates the status of Multi-AZ with automatic failover for the source Redis replication group.

      *

      * Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on: *

      *
        *
      • *

        * Redis versions earlier than 2.8.6. *

        *
      • *
      • *

        * Redis (cluster mode disabled): T1 and T2 cache node types. *

        *
      • *
      • *

        * Redis (cluster mode enabled): T1 node types. *

        *
      • * @see AutomaticFailoverStatus */ public String automaticFailoverAsString() { return automaticFailover; } /** *

        * A list of the cache nodes in the source cluster. *

        *

        * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

        * * @return A list of the cache nodes in the source cluster. */ public List nodeSnapshots() { return nodeSnapshots; } @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(snapshotName()); hashCode = 31 * hashCode + Objects.hashCode(replicationGroupId()); hashCode = 31 * hashCode + Objects.hashCode(replicationGroupDescription()); hashCode = 31 * hashCode + Objects.hashCode(cacheClusterId()); hashCode = 31 * hashCode + Objects.hashCode(snapshotStatus()); hashCode = 31 * hashCode + Objects.hashCode(snapshotSource()); hashCode = 31 * hashCode + Objects.hashCode(cacheNodeType()); hashCode = 31 * hashCode + Objects.hashCode(engine()); hashCode = 31 * hashCode + Objects.hashCode(engineVersion()); hashCode = 31 * hashCode + Objects.hashCode(numCacheNodes()); hashCode = 31 * hashCode + Objects.hashCode(preferredAvailabilityZone()); hashCode = 31 * hashCode + Objects.hashCode(cacheClusterCreateTime()); hashCode = 31 * hashCode + Objects.hashCode(preferredMaintenanceWindow()); hashCode = 31 * hashCode + Objects.hashCode(topicArn()); hashCode = 31 * hashCode + Objects.hashCode(port()); hashCode = 31 * hashCode + Objects.hashCode(cacheParameterGroupName()); hashCode = 31 * hashCode + Objects.hashCode(cacheSubnetGroupName()); hashCode = 31 * hashCode + Objects.hashCode(vpcId()); hashCode = 31 * hashCode + Objects.hashCode(autoMinorVersionUpgrade()); hashCode = 31 * hashCode + Objects.hashCode(snapshotRetentionLimit()); hashCode = 31 * hashCode + Objects.hashCode(snapshotWindow()); hashCode = 31 * hashCode + Objects.hashCode(numNodeGroups()); hashCode = 31 * hashCode + Objects.hashCode(automaticFailoverAsString()); hashCode = 31 * hashCode + Objects.hashCode(nodeSnapshots()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Snapshot)) { return false; } Snapshot other = (Snapshot) obj; return Objects.equals(snapshotName(), other.snapshotName()) && Objects.equals(replicationGroupId(), other.replicationGroupId()) && Objects.equals(replicationGroupDescription(), other.replicationGroupDescription()) && Objects.equals(cacheClusterId(), other.cacheClusterId()) && Objects.equals(snapshotStatus(), other.snapshotStatus()) && Objects.equals(snapshotSource(), other.snapshotSource()) && Objects.equals(cacheNodeType(), other.cacheNodeType()) && Objects.equals(engine(), other.engine()) && Objects.equals(engineVersion(), other.engineVersion()) && Objects.equals(numCacheNodes(), other.numCacheNodes()) && Objects.equals(preferredAvailabilityZone(), other.preferredAvailabilityZone()) && Objects.equals(cacheClusterCreateTime(), other.cacheClusterCreateTime()) && Objects.equals(preferredMaintenanceWindow(), other.preferredMaintenanceWindow()) && Objects.equals(topicArn(), other.topicArn()) && Objects.equals(port(), other.port()) && Objects.equals(cacheParameterGroupName(), other.cacheParameterGroupName()) && Objects.equals(cacheSubnetGroupName(), other.cacheSubnetGroupName()) && Objects.equals(vpcId(), other.vpcId()) && Objects.equals(autoMinorVersionUpgrade(), other.autoMinorVersionUpgrade()) && Objects.equals(snapshotRetentionLimit(), other.snapshotRetentionLimit()) && Objects.equals(snapshotWindow(), other.snapshotWindow()) && Objects.equals(numNodeGroups(), other.numNodeGroups()) && Objects.equals(automaticFailoverAsString(), other.automaticFailoverAsString()) && Objects.equals(nodeSnapshots(), other.nodeSnapshots()); } /** * 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 String toString() { return ToString.builder("Snapshot").add("SnapshotName", snapshotName()).add("ReplicationGroupId", replicationGroupId()) .add("ReplicationGroupDescription", replicationGroupDescription()).add("CacheClusterId", cacheClusterId()) .add("SnapshotStatus", snapshotStatus()).add("SnapshotSource", snapshotSource()) .add("CacheNodeType", cacheNodeType()).add("Engine", engine()).add("EngineVersion", engineVersion()) .add("NumCacheNodes", numCacheNodes()).add("PreferredAvailabilityZone", preferredAvailabilityZone()) .add("CacheClusterCreateTime", cacheClusterCreateTime()) .add("PreferredMaintenanceWindow", preferredMaintenanceWindow()).add("TopicArn", topicArn()).add("Port", port()) .add("CacheParameterGroupName", cacheParameterGroupName()).add("CacheSubnetGroupName", cacheSubnetGroupName()) .add("VpcId", vpcId()).add("AutoMinorVersionUpgrade", autoMinorVersionUpgrade()) .add("SnapshotRetentionLimit", snapshotRetentionLimit()).add("SnapshotWindow", snapshotWindow()) .add("NumNodeGroups", numNodeGroups()).add("AutomaticFailover", automaticFailoverAsString()) .add("NodeSnapshots", nodeSnapshots()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "SnapshotName": return Optional.ofNullable(clazz.cast(snapshotName())); case "ReplicationGroupId": return Optional.ofNullable(clazz.cast(replicationGroupId())); case "ReplicationGroupDescription": return Optional.ofNullable(clazz.cast(replicationGroupDescription())); case "CacheClusterId": return Optional.ofNullable(clazz.cast(cacheClusterId())); case "SnapshotStatus": return Optional.ofNullable(clazz.cast(snapshotStatus())); case "SnapshotSource": return Optional.ofNullable(clazz.cast(snapshotSource())); 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 "NumCacheNodes": return Optional.ofNullable(clazz.cast(numCacheNodes())); case "PreferredAvailabilityZone": return Optional.ofNullable(clazz.cast(preferredAvailabilityZone())); case "CacheClusterCreateTime": return Optional.ofNullable(clazz.cast(cacheClusterCreateTime())); case "PreferredMaintenanceWindow": return Optional.ofNullable(clazz.cast(preferredMaintenanceWindow())); case "TopicArn": return Optional.ofNullable(clazz.cast(topicArn())); case "Port": return Optional.ofNullable(clazz.cast(port())); case "CacheParameterGroupName": return Optional.ofNullable(clazz.cast(cacheParameterGroupName())); case "CacheSubnetGroupName": return Optional.ofNullable(clazz.cast(cacheSubnetGroupName())); case "VpcId": return Optional.ofNullable(clazz.cast(vpcId())); case "AutoMinorVersionUpgrade": return Optional.ofNullable(clazz.cast(autoMinorVersionUpgrade())); case "SnapshotRetentionLimit": return Optional.ofNullable(clazz.cast(snapshotRetentionLimit())); case "SnapshotWindow": return Optional.ofNullable(clazz.cast(snapshotWindow())); case "NumNodeGroups": return Optional.ofNullable(clazz.cast(numNodeGroups())); case "AutomaticFailover": return Optional.ofNullable(clazz.cast(automaticFailoverAsString())); case "NodeSnapshots": return Optional.ofNullable(clazz.cast(nodeSnapshots())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Snapshot) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

        * The name of a snapshot. For an automatic snapshot, the name is system-generated. For a manual snapshot, this * is the user-provided name. *

        * * @param snapshotName * The name of a snapshot. For an automatic snapshot, the name is system-generated. For a manual * snapshot, this is the user-provided name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder snapshotName(String snapshotName); /** *

        * The unique identifier of the source replication group. *

        * * @param replicationGroupId * The unique identifier of the source replication group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder replicationGroupId(String replicationGroupId); /** *

        * A description of the source replication group. *

        * * @param replicationGroupDescription * A description of the source replication group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder replicationGroupDescription(String replicationGroupDescription); /** *

        * The user-supplied identifier of the source cluster. *

        * * @param cacheClusterId * The user-supplied identifier of the source cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheClusterId(String cacheClusterId); /** *

        * The status of the snapshot. Valid values: creating | available | * restoring | copying | deleting. *

        * * @param snapshotStatus * The status of the snapshot. Valid values: creating | available | * restoring | copying | deleting. * @return Returns a reference to this object so that method calls can be chained together. */ Builder snapshotStatus(String snapshotStatus); /** *

        * Indicates whether the snapshot is from an automatic backup (automated) or was created manually ( * manual). *

        * * @param snapshotSource * Indicates whether the snapshot is from an automatic backup (automated) or was created * manually (manual). * @return Returns a reference to this object so that method calls can be chained together. */ Builder snapshotSource(String snapshotSource); /** *

        * The name of the compute and memory capacity node type for the source cluster. *

        *

        * The following node types are supported by ElastiCache. Generally speaking, the current generation types * provide more memory and computational power at lower cost when compared to their equivalent previous * generation counterparts. *

        *
          *
        • *

          * General purpose: *

          *
            *
          • *

            * Current generation: *

            *

            * T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium *

            *

            * M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge *

            *

            * M4 node types: cache.m4.large, cache.m4.xlarge, * cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge *

            *
          • *
          • *

            * Previous generation: (not recommended) *

            *

            * T1 node types: cache.t1.micro *

            *

            * M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, * cache.m1.xlarge *

            *
          • *
          *
        • *
        • *

          * Compute optimized: *

          *
            *
          • *

            * Previous generation: (not recommended) *

            *

            * C1 node types: cache.c1.xlarge *

            *
          • *
          *
        • *
        • *

          * Memory optimized: *

          *
            *
          • *

            * Current generation: *

            *

            * R3 node types: cache.r3.large, cache.r3.xlarge, * cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge *

            *

            * R4 node types; cache.r4.large, cache.r4.xlarge, * cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, * cache.r4.16xlarge *

            *
          • *
          • *

            * Previous generation: (not recommended) *

            *

            * M2 node types: cache.m2.xlarge, cache.m2.2xlarge, * cache.m2.4xlarge *

            *
          • *
          *
        • *
        *

        * Notes: *

        *
          *
        • *

          * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon VPC). *

          *
        • *
        • *

          * Redis (cluster mode disabled): Redis backup/restore is not supported on T1 and T2 instances. *

          *
        • *
        • *

          * Redis (cluster mode enabled): Backup/restore is not supported on T1 instances. *

          *
        • *
        • *

          * Redis Append-only files (AOF) functionality is not supported for T1 or T2 instances. *

          *
        • *
        *

        * For a complete listing of node types and specifications, see: *

        * * * @param cacheNodeType * The name of the compute and memory capacity node type for the source cluster.

        *

        * The following node types are supported by ElastiCache. Generally speaking, the current generation * types provide more memory and computational power at lower cost when compared to their equivalent * previous generation counterparts. *

        *
          *
        • *

          * General purpose: *

          *
            *
          • *

            * Current generation: *

            *

            * T2 node types: cache.t2.micro, cache.t2.small, * cache.t2.medium *

            *

            * M3 node types: cache.m3.medium, cache.m3.large, * cache.m3.xlarge, cache.m3.2xlarge *

            *

            * M4 node types: cache.m4.large, cache.m4.xlarge, * cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge *

            *
          • *
          • *

            * Previous generation: (not recommended) *

            *

            * T1 node types: cache.t1.micro *

            *

            * M1 node types: cache.m1.small, cache.m1.medium, * cache.m1.large, cache.m1.xlarge *

            *
          • *
          *
        • *
        • *

          * Compute optimized: *

          *
            *
          • *

            * Previous generation: (not recommended) *

            *

            * C1 node types: cache.c1.xlarge *

            *
          • *
          *
        • *
        • *

          * Memory optimized: *

          *
            *
          • *

            * Current generation: *

            *

            * R3 node types: cache.r3.large, cache.r3.xlarge, * cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge *

            *

            * R4 node types; cache.r4.large, cache.r4.xlarge, * cache.r4.2xlarge, cache.r4.4xlarge, cache.r4.8xlarge, * cache.r4.16xlarge *

            *
          • *
          • *

            * Previous generation: (not recommended) *

            *

            * M2 node types: cache.m2.xlarge, cache.m2.2xlarge, * cache.m2.4xlarge *

            *
          • *
          *
        • *
        *

        * Notes: *

        *
          *
        • *

          * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon VPC). *

          *
        • *
        • *

          * Redis (cluster mode disabled): Redis backup/restore is not supported on T1 and T2 instances. *

          *
        • *
        • *

          * Redis (cluster mode enabled): Backup/restore is not supported on T1 instances. *

          *
        • *
        • *

          * Redis Append-only files (AOF) functionality is not supported for T1 or T2 instances. *

          *
        • *
        *

        * For a complete listing of node types and specifications, see: *

        *
          *
        • *

          * Amazon ElastiCache Product Features and * Details *

          *
        • *
        • *

          * Cache Node Type-Specific Parameters for Memcached *

          *
        • *
        • *

          * Cache Node Type-Specific Parameters for Redis *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheNodeType(String cacheNodeType); /** *

          * The name of the cache engine (memcached or redis) used by the source cluster. *

          * * @param engine * The name of the cache engine (memcached or redis) used by the source * cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engine(String engine); /** *

          * The version of the cache engine version that is used by the source cluster. *

          * * @param engineVersion * The version of the cache engine version that is used by the source cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engineVersion(String engineVersion); /** *

          * The number of cache nodes in the source cluster. *

          *

          * For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between * 1 and 20. *

          * * @param numCacheNodes * The number of cache nodes in the source cluster.

          *

          * For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be * between 1 and 20. * @return Returns a reference to this object so that method calls can be chained together. */ Builder numCacheNodes(Integer numCacheNodes); /** *

          * The name of the Availability Zone in which the source cluster is located. *

          * * @param preferredAvailabilityZone * The name of the Availability Zone in which the source cluster is located. * @return Returns a reference to this object so that method calls can be chained together. */ Builder preferredAvailabilityZone(String preferredAvailabilityZone); /** *

          * The date and time when the source cluster was created. *

          * * @param cacheClusterCreateTime * The date and time when the source cluster was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheClusterCreateTime(Instant cacheClusterCreateTime); /** *

          * Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a * range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute * period. *

          *

          * Valid values for ddd are: *

          *
            *
          • *

            * sun *

            *
          • *
          • *

            * mon *

            *
          • *
          • *

            * tue *

            *
          • *
          • *

            * wed *

            *
          • *
          • *

            * thu *

            *
          • *
          • *

            * fri *

            *
          • *
          • *

            * sat *

            *
          • *
          *

          * Example: sun:23:00-mon:01:30 *

          * * @param preferredMaintenanceWindow * Specifies the weekly time range during which maintenance on the cluster is performed. It is specified * as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a * 60 minute period.

          *

          * Valid values for ddd are: *

          *
            *
          • *

            * sun *

            *
          • *
          • *

            * mon *

            *
          • *
          • *

            * tue *

            *
          • *
          • *

            * wed *

            *
          • *
          • *

            * thu *

            *
          • *
          • *

            * fri *

            *
          • *
          • *

            * sat *

            *
          • *
          *

          * Example: sun:23:00-mon:01:30 * @return Returns a reference to this object so that method calls can be chained together. */ Builder preferredMaintenanceWindow(String preferredMaintenanceWindow); /** *

          * The Amazon Resource Name (ARN) for the topic used by the source cluster for publishing notifications. *

          * * @param topicArn * The Amazon Resource Name (ARN) for the topic used by the source cluster for publishing notifications. * @return Returns a reference to this object so that method calls can be chained together. */ Builder topicArn(String topicArn); /** *

          * The port number used by each cache nodes in the source cluster. *

          * * @param port * The port number used by each cache nodes in the source cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder port(Integer port); /** *

          * The cache parameter group that is associated with the source cluster. *

          * * @param cacheParameterGroupName * The cache parameter group that is associated with the source cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheParameterGroupName(String cacheParameterGroupName); /** *

          * The name of the cache subnet group associated with the source cluster. *

          * * @param cacheSubnetGroupName * The name of the cache subnet group associated with the source cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheSubnetGroupName(String cacheSubnetGroupName); /** *

          * The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cluster. *

          * * @param vpcId * The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcId(String vpcId); /** *

          * This parameter is currently disabled. *

          * * @param autoMinorVersionUpgrade * This parameter is currently disabled. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade); /** *

          * For an automatic snapshot, the number of days for which ElastiCache retains the snapshot before deleting it. *

          *

          * For manual snapshots, this field reflects the SnapshotRetentionLimit for the source cluster when * the snapshot was created. This field is otherwise ignored: Manual snapshots do not expire, and can only be * deleted using the DeleteSnapshot operation. *

          *

          * Important If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. *

          * * @param snapshotRetentionLimit * For an automatic snapshot, the number of days for which ElastiCache retains the snapshot before * deleting it.

          *

          * For manual snapshots, this field reflects the SnapshotRetentionLimit for the source * cluster when the snapshot was created. This field is otherwise ignored: Manual snapshots do not * expire, and can only be deleted using the DeleteSnapshot operation. *

          *

          * Important If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. * @return Returns a reference to this object so that method calls can be chained together. */ Builder snapshotRetentionLimit(Integer snapshotRetentionLimit); /** *

          * The daily time range during which ElastiCache takes daily snapshots of the source cluster. *

          * * @param snapshotWindow * The daily time range during which ElastiCache takes daily snapshots of the source cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder snapshotWindow(String snapshotWindow); /** *

          * The number of node groups (shards) in this snapshot. When restoring from a snapshot, the number of node * groups (shards) in the snapshot and in the restored replication group must be the same. *

          * * @param numNodeGroups * The number of node groups (shards) in this snapshot. When restoring from a snapshot, the number of * node groups (shards) in the snapshot and in the restored replication group must be the same. * @return Returns a reference to this object so that method calls can be chained together. */ Builder numNodeGroups(Integer numNodeGroups); /** *

          * Indicates the status of Multi-AZ with automatic failover for the source Redis replication group. *

          *

          * Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on: *

          *
            *
          • *

            * Redis versions earlier than 2.8.6. *

            *
          • *
          • *

            * Redis (cluster mode disabled): T1 and T2 cache node types. *

            *
          • *
          • *

            * Redis (cluster mode enabled): T1 node types. *

            *
          • *
          * * @param automaticFailover * Indicates the status of Multi-AZ with automatic failover for the source Redis replication group.

          *

          * Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on: *

          *
            *
          • *

            * Redis versions earlier than 2.8.6. *

            *
          • *
          • *

            * Redis (cluster mode disabled): T1 and T2 cache node types. *

            *
          • *
          • *

            * Redis (cluster mode enabled): T1 node types. *

            *
          • * @see AutomaticFailoverStatus * @return Returns a reference to this object so that method calls can be chained together. * @see AutomaticFailoverStatus */ Builder automaticFailover(String automaticFailover); /** *

            * Indicates the status of Multi-AZ with automatic failover for the source Redis replication group. *

            *

            * Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on: *

            *
              *
            • *

              * Redis versions earlier than 2.8.6. *

              *
            • *
            • *

              * Redis (cluster mode disabled): T1 and T2 cache node types. *

              *
            • *
            • *

              * Redis (cluster mode enabled): T1 node types. *

              *
            • *
            * * @param automaticFailover * Indicates the status of Multi-AZ with automatic failover for the source Redis replication group.

            *

            * Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on: *

            *
              *
            • *

              * Redis versions earlier than 2.8.6. *

              *
            • *
            • *

              * Redis (cluster mode disabled): T1 and T2 cache node types. *

              *
            • *
            • *

              * Redis (cluster mode enabled): T1 node types. *

              *
            • * @see AutomaticFailoverStatus * @return Returns a reference to this object so that method calls can be chained together. * @see AutomaticFailoverStatus */ Builder automaticFailover(AutomaticFailoverStatus automaticFailover); /** *

              * A list of the cache nodes in the source cluster. *

              * * @param nodeSnapshots * A list of the cache nodes in the source cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder nodeSnapshots(Collection nodeSnapshots); /** *

              * A list of the cache nodes in the source cluster. *

              * * @param nodeSnapshots * A list of the cache nodes in the source cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder nodeSnapshots(NodeSnapshot... nodeSnapshots); /** *

              * A list of the cache nodes in the source cluster. *

              * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to * create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #nodeSnapshots(List)}. * * @param nodeSnapshots * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #nodeSnapshots(List) */ Builder nodeSnapshots(Consumer... nodeSnapshots); } static final class BuilderImpl implements Builder { private String snapshotName; private String replicationGroupId; private String replicationGroupDescription; private String cacheClusterId; private String snapshotStatus; private String snapshotSource; private String cacheNodeType; private String engine; private String engineVersion; private Integer numCacheNodes; private String preferredAvailabilityZone; private Instant cacheClusterCreateTime; private String preferredMaintenanceWindow; private String topicArn; private Integer port; private String cacheParameterGroupName; private String cacheSubnetGroupName; private String vpcId; private Boolean autoMinorVersionUpgrade; private Integer snapshotRetentionLimit; private String snapshotWindow; private Integer numNodeGroups; private String automaticFailover; private List nodeSnapshots = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(Snapshot model) { snapshotName(model.snapshotName); replicationGroupId(model.replicationGroupId); replicationGroupDescription(model.replicationGroupDescription); cacheClusterId(model.cacheClusterId); snapshotStatus(model.snapshotStatus); snapshotSource(model.snapshotSource); cacheNodeType(model.cacheNodeType); engine(model.engine); engineVersion(model.engineVersion); numCacheNodes(model.numCacheNodes); preferredAvailabilityZone(model.preferredAvailabilityZone); cacheClusterCreateTime(model.cacheClusterCreateTime); preferredMaintenanceWindow(model.preferredMaintenanceWindow); topicArn(model.topicArn); port(model.port); cacheParameterGroupName(model.cacheParameterGroupName); cacheSubnetGroupName(model.cacheSubnetGroupName); vpcId(model.vpcId); autoMinorVersionUpgrade(model.autoMinorVersionUpgrade); snapshotRetentionLimit(model.snapshotRetentionLimit); snapshotWindow(model.snapshotWindow); numNodeGroups(model.numNodeGroups); automaticFailover(model.automaticFailover); nodeSnapshots(model.nodeSnapshots); } public final String getSnapshotName() { return snapshotName; } @Override public final Builder snapshotName(String snapshotName) { this.snapshotName = snapshotName; return this; } public final void setSnapshotName(String snapshotName) { this.snapshotName = snapshotName; } public final String getReplicationGroupId() { return replicationGroupId; } @Override public final Builder replicationGroupId(String replicationGroupId) { this.replicationGroupId = replicationGroupId; return this; } public final void setReplicationGroupId(String replicationGroupId) { this.replicationGroupId = replicationGroupId; } public final String getReplicationGroupDescription() { return replicationGroupDescription; } @Override public final Builder replicationGroupDescription(String replicationGroupDescription) { this.replicationGroupDescription = replicationGroupDescription; return this; } public final void setReplicationGroupDescription(String replicationGroupDescription) { this.replicationGroupDescription = replicationGroupDescription; } public final String getCacheClusterId() { return cacheClusterId; } @Override public final Builder cacheClusterId(String cacheClusterId) { this.cacheClusterId = cacheClusterId; return this; } public final void setCacheClusterId(String cacheClusterId) { this.cacheClusterId = cacheClusterId; } public final String getSnapshotStatus() { return snapshotStatus; } @Override public final Builder snapshotStatus(String snapshotStatus) { this.snapshotStatus = snapshotStatus; return this; } public final void setSnapshotStatus(String snapshotStatus) { this.snapshotStatus = snapshotStatus; } public final String getSnapshotSource() { return snapshotSource; } @Override public final Builder snapshotSource(String snapshotSource) { this.snapshotSource = snapshotSource; return this; } public final void setSnapshotSource(String snapshotSource) { this.snapshotSource = snapshotSource; } public final String getCacheNodeType() { return cacheNodeType; } @Override public final Builder cacheNodeType(String cacheNodeType) { this.cacheNodeType = cacheNodeType; return this; } public final void setCacheNodeType(String cacheNodeType) { this.cacheNodeType = cacheNodeType; } public final String getEngine() { return engine; } @Override public final Builder engine(String engine) { this.engine = engine; return this; } public final void setEngine(String engine) { this.engine = engine; } 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 Integer getNumCacheNodes() { return numCacheNodes; } @Override public final Builder numCacheNodes(Integer numCacheNodes) { this.numCacheNodes = numCacheNodes; return this; } public final void setNumCacheNodes(Integer numCacheNodes) { this.numCacheNodes = numCacheNodes; } public final String getPreferredAvailabilityZone() { return preferredAvailabilityZone; } @Override public final Builder preferredAvailabilityZone(String preferredAvailabilityZone) { this.preferredAvailabilityZone = preferredAvailabilityZone; return this; } public final void setPreferredAvailabilityZone(String preferredAvailabilityZone) { this.preferredAvailabilityZone = preferredAvailabilityZone; } public final Instant getCacheClusterCreateTime() { return cacheClusterCreateTime; } @Override public final Builder cacheClusterCreateTime(Instant cacheClusterCreateTime) { this.cacheClusterCreateTime = cacheClusterCreateTime; return this; } public final void setCacheClusterCreateTime(Instant cacheClusterCreateTime) { this.cacheClusterCreateTime = cacheClusterCreateTime; } 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 String getTopicArn() { return topicArn; } @Override public final Builder topicArn(String topicArn) { this.topicArn = topicArn; return this; } public final void setTopicArn(String topicArn) { this.topicArn = topicArn; } public final Integer getPort() { return port; } @Override public final Builder port(Integer port) { this.port = port; return this; } public final void setPort(Integer port) { this.port = port; } public final String getCacheParameterGroupName() { return cacheParameterGroupName; } @Override public final Builder cacheParameterGroupName(String cacheParameterGroupName) { this.cacheParameterGroupName = cacheParameterGroupName; return this; } public final void setCacheParameterGroupName(String cacheParameterGroupName) { this.cacheParameterGroupName = cacheParameterGroupName; } public final String getCacheSubnetGroupName() { return cacheSubnetGroupName; } @Override public final Builder cacheSubnetGroupName(String cacheSubnetGroupName) { this.cacheSubnetGroupName = cacheSubnetGroupName; return this; } public final void setCacheSubnetGroupName(String cacheSubnetGroupName) { this.cacheSubnetGroupName = cacheSubnetGroupName; } public final String getVpcId() { return vpcId; } @Override public final Builder vpcId(String vpcId) { this.vpcId = vpcId; return this; } public final void setVpcId(String vpcId) { this.vpcId = vpcId; } 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 Integer getSnapshotRetentionLimit() { return snapshotRetentionLimit; } @Override public final Builder snapshotRetentionLimit(Integer snapshotRetentionLimit) { this.snapshotRetentionLimit = snapshotRetentionLimit; return this; } public final void setSnapshotRetentionLimit(Integer snapshotRetentionLimit) { this.snapshotRetentionLimit = snapshotRetentionLimit; } public final String getSnapshotWindow() { return snapshotWindow; } @Override public final Builder snapshotWindow(String snapshotWindow) { this.snapshotWindow = snapshotWindow; return this; } public final void setSnapshotWindow(String snapshotWindow) { this.snapshotWindow = snapshotWindow; } public final Integer getNumNodeGroups() { return numNodeGroups; } @Override public final Builder numNodeGroups(Integer numNodeGroups) { this.numNodeGroups = numNodeGroups; return this; } public final void setNumNodeGroups(Integer numNodeGroups) { this.numNodeGroups = numNodeGroups; } public final String getAutomaticFailoverAsString() { return automaticFailover; } @Override public final Builder automaticFailover(String automaticFailover) { this.automaticFailover = automaticFailover; return this; } @Override public final Builder automaticFailover(AutomaticFailoverStatus automaticFailover) { this.automaticFailover(automaticFailover.toString()); return this; } public final void setAutomaticFailover(String automaticFailover) { this.automaticFailover = automaticFailover; } public final Collection getNodeSnapshots() { return nodeSnapshots != null ? nodeSnapshots.stream().map(NodeSnapshot::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder nodeSnapshots(Collection nodeSnapshots) { this.nodeSnapshots = NodeSnapshotListCopier.copy(nodeSnapshots); return this; } @Override @SafeVarargs public final Builder nodeSnapshots(NodeSnapshot... nodeSnapshots) { nodeSnapshots(Arrays.asList(nodeSnapshots)); return this; } @Override @SafeVarargs public final Builder nodeSnapshots(Consumer... nodeSnapshots) { nodeSnapshots(Stream.of(nodeSnapshots).map(c -> NodeSnapshot.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setNodeSnapshots(Collection nodeSnapshots) { this.nodeSnapshots = NodeSnapshotListCopier.copyFromBuilder(nodeSnapshots); } @Override public Snapshot build() { return new Snapshot(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy