Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 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 com.amazonaws.services.elasticache.model;
  

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

  
  public class Snapshot implements SerializableCloneable {

    
The name of a snapshot. For an automatic snapshot, the name is system-generated; for a manual snapshot, this is the user-provided name.
  
      private String snapshotName;

    
The user-supplied identifier of the source cache cluster.
  
      private String cacheClusterId;

    
The status of the snapshot. Valid values: creating | available | restoring | copying | deleting.
  
      private String snapshotStatus;

    
Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual).
  
      private String snapshotSource;

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

Valid node types are as follows:

  • General purpose:
    • Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge
    • Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge
  • Compute optimized: cache.c1.xlarge
  • Memory optimized
    • Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge
    • Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge

Notes:

  • All t2 instances are created in an Amazon Virtual Private Cloud (VPC).
  • Redis backup/restore is not supported for t2 instances.
  • Redis Append-only files (AOF) functionality is not supported for t1 or t2 instances.

For a complete listing of cache node types and specifications, see Amazon ElastiCache Product Features and Details and Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis.

  
      private String cacheNodeType;

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

    
The version of the cache engine version that is used by the source cache cluster.
  
      private String engineVersion;

    
The number of cache nodes in the source cache cluster.

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

 
     private Integer numCacheNodes;

    
The name of the Availability Zone in which the source cache cluster is located.
 
     private String preferredAvailabilityZone;

    
The date and time when the source cache cluster was created.
 
     private java.util.Date cacheClusterCreateTime;

    
Specifies the weekly time range during which maintenance on the cache 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:05:00-sun:09:00

 
     private String preferredMaintenanceWindow;

    
The Amazon Resource Name (ARN) for the topic used by the source cache cluster for publishing notifications.
 
     private String topicArn;

    
The port number used by each cache nodes in the source cache cluster.
 
     private Integer port;

    
The cache parameter group that is associated with the source cache cluster.
 
     private String cacheParameterGroupName;

    
The name of the cache subnet group associated with the source cache cluster.
 
     private String cacheSubnetGroupName;

    
The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cache cluster.
 
     private String vpcId;

    
This parameter is currently disabled.
 
     private Boolean autoMinorVersionUpgrade;

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

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

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

 
     private Integer snapshotRetentionLimit;

    
The daily time range during which ElastiCache takes daily snapshots of the source cache cluster.
 
     private String snapshotWindow;

    
A list of the cache nodes in the source cache cluster.
 
The name of a snapshot. For an automatic snapshot, the name is system-generated; for a manual snapshot, this is the user-provided name.

Returns:
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 getSnapshotName() {
         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.

Parameters:
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.
 
     public void setSnapshotName(String snapshotName) {
         this. = 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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withSnapshotName(String snapshotName) {
         this. = snapshotName;
         return this;
     }

    
The user-supplied identifier of the source cache cluster.

Returns:
The user-supplied identifier of the source cache cluster.
 
     public String getCacheClusterId() {
         return ;
     }
    
    
The user-supplied identifier of the source cache cluster.

Parameters:
cacheClusterId The user-supplied identifier of the source cache cluster.
 
     public void setCacheClusterId(String cacheClusterId) {
         this. = cacheClusterId;
     }
    
    
The user-supplied identifier of the source cache cluster.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cacheClusterId The user-supplied identifier of the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withCacheClusterId(String cacheClusterId) {
         this. = cacheClusterId;
         return this;
     }

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

Returns:
The status of the snapshot. Valid values: creating | available | restoring | copying | deleting.
 
     public String getSnapshotStatus() {
         return ;
     }
    
    
The status of the snapshot. Valid values: creating | available | restoring | copying | deleting.

Parameters:
snapshotStatus The status of the snapshot. Valid values: creating | available | restoring | copying | deleting.
 
     public void setSnapshotStatus(String snapshotStatus) {
         this. = snapshotStatus;
     }
    
    
The status of the snapshot. Valid values: creating | available | restoring | copying | deleting.

Returns a reference to this object so that method calls can be chained together.

Parameters:
snapshotStatus The status of the snapshot. Valid values: creating | available | restoring | copying | deleting.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withSnapshotStatus(String snapshotStatus) {
         this. = snapshotStatus;
         return this;
     }

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

Returns:
Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual).
 
     public String getSnapshotSource() {
         return ;
     }
    
    
Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual).

Parameters:
snapshotSource Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual).
 
     public void setSnapshotSource(String snapshotSource) {
         this. = snapshotSource;
     }
    
    
Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual).

Returns a reference to this object so that method calls can be chained together.

Parameters:
snapshotSource Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual).
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withSnapshotSource(String snapshotSource) {
         this. = snapshotSource;
         return this;
     }

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

Valid node types are as follows:

  • General purpose:
    • Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge
    • Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge
  • Compute optimized: cache.c1.xlarge
  • Memory optimized
    • Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge
    • Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge

Notes:

  • All t2 instances are created in an Amazon Virtual Private Cloud (VPC).
  • Redis backup/restore is not supported for t2 instances.
  • Redis Append-only files (AOF) functionality is not supported for t1 or t2 instances.

For a complete listing of cache node types and specifications, see Amazon ElastiCache Product Features and Details and Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis.

Returns:
The name of the compute and memory capacity node type for the source cache cluster.

Valid node types are as follows:

  • General purpose:
    • Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge
    • Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge
  • Compute optimized: cache.c1.xlarge
  • Memory optimized
    • Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge
    • Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge

Notes:

  • All t2 instances are created in an Amazon Virtual Private Cloud (VPC).
  • Redis backup/restore is not supported for t2 instances.
  • Redis Append-only files (AOF) functionality is not supported for t1 or t2 instances.

For a complete listing of cache node types and specifications, see Amazon ElastiCache Product Features and Details and Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis.

 
     public String getCacheNodeType() {
         return ;
     }
    
    
The name of the compute and memory capacity node type for the source cache cluster.

Valid node types are as follows:

  • General purpose:
    • Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge
    • Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge
  • Compute optimized: cache.c1.xlarge
  • Memory optimized
    • Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge
    • Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge

Notes:

  • All t2 instances are created in an Amazon Virtual Private Cloud (VPC).
  • Redis backup/restore is not supported for t2 instances.
  • Redis Append-only files (AOF) functionality is not supported for t1 or t2 instances.

For a complete listing of cache node types and specifications, see Amazon ElastiCache Product Features and Details and Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis.

Parameters:
cacheNodeType The name of the compute and memory capacity node type for the source cache cluster.

Valid node types are as follows:

  • General purpose:
    • Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge
    • Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge
  • Compute optimized: cache.c1.xlarge
  • Memory optimized
    • Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge
    • Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge

Notes:

  • All t2 instances are created in an Amazon Virtual Private Cloud (VPC).
  • Redis backup/restore is not supported for t2 instances.
  • Redis Append-only files (AOF) functionality is not supported for t1 or t2 instances.

For a complete listing of cache node types and specifications, see Amazon ElastiCache Product Features and Details and Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis.

 
     public void setCacheNodeType(String cacheNodeType) {
         this. = cacheNodeType;
     }
    
    
The name of the compute and memory capacity node type for the source cache cluster.

Valid node types are as follows:

  • General purpose:
    • Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge
    • Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge
  • Compute optimized: cache.c1.xlarge
  • Memory optimized
    • Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge
    • Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge

Notes:

  • All t2 instances are created in an Amazon Virtual Private Cloud (VPC).
  • Redis backup/restore is not supported for t2 instances.
  • Redis Append-only files (AOF) functionality is not supported for t1 or t2 instances.

For a complete listing of cache node types and specifications, see Amazon ElastiCache Product Features and Details and Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cacheNodeType The name of the compute and memory capacity node type for the source cache cluster.

Valid node types are as follows:

  • General purpose:
    • Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge
    • Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge
  • Compute optimized: cache.c1.xlarge
  • Memory optimized
    • Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge
    • Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge

Notes:

  • All t2 instances are created in an Amazon Virtual Private Cloud (VPC).
  • Redis backup/restore is not supported for t2 instances.
  • Redis Append-only files (AOF) functionality is not supported for t1 or t2 instances.

For a complete listing of cache node types and specifications, see Amazon ElastiCache Product Features and Details and Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withCacheNodeType(String cacheNodeType) {
         this. = cacheNodeType;
         return this;
     }

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

Returns:
The name of the cache engine (memcached or redis) used by the source cache cluster.
 
     public String getEngine() {
         return ;
     }
    
    
The name of the cache engine (memcached or redis) used by the source cache cluster.

Parameters:
engine The name of the cache engine (memcached or redis) used by the source cache cluster.
 
     public void setEngine(String engine) {
         this. = engine;
     }
    
    
The name of the cache engine (memcached or redis) used by the source cache cluster.

Returns a reference to this object so that method calls can be chained together.

Parameters:
engine The name of the cache engine (memcached or redis) used by the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withEngine(String engine) {
         this. = engine;
         return this;
     }

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

Returns:
The version of the cache engine version that is used by the source cache cluster.
 
     public String getEngineVersion() {
         return ;
     }
    
    
The version of the cache engine version that is used by the source cache cluster.

Parameters:
engineVersion The version of the cache engine version that is used by the source cache cluster.
 
     public void setEngineVersion(String engineVersion) {
         this. = engineVersion;
     }
    
    
The version of the cache engine version that is used by the source cache cluster.

Returns a reference to this object so that method calls can be chained together.

Parameters:
engineVersion The version of the cache engine version that is used by the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withEngineVersion(String engineVersion) {
         this. = engineVersion;
         return this;
     }

    
The number of cache nodes in the source cache cluster.

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

Returns:
The number of cache nodes in the source cache cluster.

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

 
     public Integer getNumCacheNodes() {
         return ;
     }
    
    
The number of cache nodes in the source cache cluster.

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

Parameters:
numCacheNodes The number of cache nodes in the source cache cluster.

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

 
     public void setNumCacheNodes(Integer numCacheNodes) {
         this. = numCacheNodes;
     }
    
    
The number of cache nodes in the source cache cluster.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
numCacheNodes The number of cache nodes in the source cache cluster.

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

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withNumCacheNodes(Integer numCacheNodes) {
         this. = numCacheNodes;
         return this;
     }

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

Returns:
The name of the Availability Zone in which the source cache cluster is located.
 
     public String getPreferredAvailabilityZone() {
         return ;
     }
    
    
The name of the Availability Zone in which the source cache cluster is located.

Parameters:
preferredAvailabilityZone The name of the Availability Zone in which the source cache cluster is located.
 
     public void setPreferredAvailabilityZone(String preferredAvailabilityZone) {
         this. = preferredAvailabilityZone;
     }
    
    
The name of the Availability Zone in which the source cache cluster is located.

Returns a reference to this object so that method calls can be chained together.

Parameters:
preferredAvailabilityZone The name of the Availability Zone in which the source cache cluster is located.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withPreferredAvailabilityZone(String preferredAvailabilityZone) {
         this. = preferredAvailabilityZone;
         return this;
     }

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

Returns:
The date and time when the source cache cluster was created.
 
     public java.util.Date getCacheClusterCreateTime() {
         return ;
     }
    
    
The date and time when the source cache cluster was created.

Parameters:
cacheClusterCreateTime The date and time when the source cache cluster was created.
 
     public void setCacheClusterCreateTime(java.util.Date cacheClusterCreateTime) {
         this. = cacheClusterCreateTime;
     }
    
    
The date and time when the source cache cluster was created.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cacheClusterCreateTime The date and time when the source cache cluster was created.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withCacheClusterCreateTime(java.util.Date cacheClusterCreateTime) {
         this. = cacheClusterCreateTime;
         return this;
     }

    
Specifies the weekly time range during which maintenance on the cache 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:05:00-sun:09:00

Returns:
Specifies the weekly time range during which maintenance on the cache 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:05:00-sun:09:00

 
         return ;
     }
    
    
Specifies the weekly time range during which maintenance on the cache 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:05:00-sun:09:00

Parameters:
preferredMaintenanceWindow Specifies the weekly time range during which maintenance on the cache 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:05:00-sun:09:00

 
     public void setPreferredMaintenanceWindow(String preferredMaintenanceWindow) {
         this. = preferredMaintenanceWindow;
     }
    
    
Specifies the weekly time range during which maintenance on the cache 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:05:00-sun:09:00

Returns a reference to this object so that method calls can be chained together.

Parameters:
preferredMaintenanceWindow Specifies the weekly time range during which maintenance on the cache 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:05:00-sun:09:00

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withPreferredMaintenanceWindow(String preferredMaintenanceWindow) {
         this. = preferredMaintenanceWindow;
         return this;
     }

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

Returns:
The Amazon Resource Name (ARN) for the topic used by the source cache cluster for publishing notifications.
 
     public String getTopicArn() {
         return ;
     }
    
    
The Amazon Resource Name (ARN) for the topic used by the source cache cluster for publishing notifications.

Parameters:
topicArn The Amazon Resource Name (ARN) for the topic used by the source cache cluster for publishing notifications.
 
     public void setTopicArn(String topicArn) {
         this. = topicArn;
     }
    
    
The Amazon Resource Name (ARN) for the topic used by the source cache cluster for publishing notifications.

Returns a reference to this object so that method calls can be chained together.

Parameters:
topicArn The Amazon Resource Name (ARN) for the topic used by the source cache cluster for publishing notifications.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withTopicArn(String topicArn) {
         this. = topicArn;
         return this;
     }

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

Returns:
The port number used by each cache nodes in the source cache cluster.
 
     public Integer getPort() {
         return ;
     }
    
    
The port number used by each cache nodes in the source cache cluster.

Parameters:
port The port number used by each cache nodes in the source cache cluster.
 
     public void setPort(Integer port) {
         this. = port;
     }
    
    
The port number used by each cache nodes in the source cache cluster.

Returns a reference to this object so that method calls can be chained together.

Parameters:
port The port number used by each cache nodes in the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withPort(Integer port) {
         this. = port;
         return this;
     }

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

Returns:
The cache parameter group that is associated with the source cache cluster.
 
     public String getCacheParameterGroupName() {
         return ;
     }
    
    
The cache parameter group that is associated with the source cache cluster.

Parameters:
cacheParameterGroupName The cache parameter group that is associated with the source cache cluster.
 
     public void setCacheParameterGroupName(String cacheParameterGroupName) {
         this. = cacheParameterGroupName;
     }
    
    
The cache parameter group that is associated with the source cache cluster.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cacheParameterGroupName The cache parameter group that is associated with the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withCacheParameterGroupName(String cacheParameterGroupName) {
         this. = cacheParameterGroupName;
         return this;
     }

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

Returns:
The name of the cache subnet group associated with the source cache cluster.
 
     public String getCacheSubnetGroupName() {
         return ;
     }
    
    
The name of the cache subnet group associated with the source cache cluster.

Parameters:
cacheSubnetGroupName The name of the cache subnet group associated with the source cache cluster.
 
     public void setCacheSubnetGroupName(String cacheSubnetGroupName) {
         this. = cacheSubnetGroupName;
     }
    
    
The name of the cache subnet group associated with the source cache cluster.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cacheSubnetGroupName The name of the cache subnet group associated with the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withCacheSubnetGroupName(String cacheSubnetGroupName) {
         this. = cacheSubnetGroupName;
         return this;
     }

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

Returns:
The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cache cluster.
 
     public String getVpcId() {
         return ;
     }
    
    
The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cache cluster.

Parameters:
vpcId The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cache cluster.
 
     public void setVpcId(String vpcId) {
         this. = vpcId;
     }
    
    
The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cache cluster.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpcId The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
    public Snapshot withVpcId(String vpcId) {
        this. = vpcId;
        return this;
    }

    
This parameter is currently disabled.

Returns:
This parameter is currently disabled.
        return ;
    }
    
    
This parameter is currently disabled.

Parameters:
autoMinorVersionUpgrade This parameter is currently disabled.
    public void setAutoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) {
        this. = autoMinorVersionUpgrade;
    }
    
    
This parameter is currently disabled.

Returns a reference to this object so that method calls can be chained together.

Parameters:
autoMinorVersionUpgrade This parameter is currently disabled.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withAutoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) {
        this. = autoMinorVersionUpgrade;
        return this;
    }

    
This parameter is currently disabled.

Returns:
This parameter is currently disabled.
        return ;
    }

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

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

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

Returns:
For an automatic snapshot, the number of days for which ElastiCache will retain the snapshot before deleting it.

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

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 will retain the snapshot before deleting it.

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

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

Parameters:
snapshotRetentionLimit For an automatic snapshot, the number of days for which ElastiCache will retain the snapshot before deleting it.

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

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

    public void setSnapshotRetentionLimit(Integer snapshotRetentionLimit) {
        this. = snapshotRetentionLimit;
    }
    
    
For an automatic snapshot, the number of days for which ElastiCache will retain the snapshot before deleting it.

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

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
snapshotRetentionLimit For an automatic snapshot, the number of days for which ElastiCache will retain the snapshot before deleting it.

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

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

Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withSnapshotRetentionLimit(Integer snapshotRetentionLimit) {
        this. = snapshotRetentionLimit;
        return this;
    }

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

Returns:
The daily time range during which ElastiCache takes daily snapshots of the source cache cluster.
    public String getSnapshotWindow() {
        return ;
    }
    
    
The daily time range during which ElastiCache takes daily snapshots of the source cache cluster.

Parameters:
snapshotWindow The daily time range during which ElastiCache takes daily snapshots of the source cache cluster.
    public void setSnapshotWindow(String snapshotWindow) {
        this. = snapshotWindow;
    }
    
    
The daily time range during which ElastiCache takes daily snapshots of the source cache cluster.

Returns a reference to this object so that method calls can be chained together.

Parameters:
snapshotWindow The daily time range during which ElastiCache takes daily snapshots of the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withSnapshotWindow(String snapshotWindow) {
        this. = snapshotWindow;
        return this;
    }

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

Returns:
A list of the cache nodes in the source cache cluster.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of the cache nodes in the source cache cluster.

Parameters:
nodeSnapshots A list of the cache nodes in the source cache cluster.
    public void setNodeSnapshots(java.util.Collection<NodeSnapshotnodeSnapshots) {
        if (nodeSnapshots == null) {
            this. = null;
            return;
        }
        nodeSnapshotsCopy.addAll(nodeSnapshots);
        this. = nodeSnapshotsCopy;
    }
    
    
A list of the cache nodes in the source cache cluster.

NOTE: This method appends the values to the existing list (if any). Use setNodeSnapshots(java.util.Collection) or withNodeSnapshots(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
nodeSnapshots A list of the cache nodes in the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withNodeSnapshots(NodeSnapshot... nodeSnapshots) {
        if (getNodeSnapshots() == nullsetNodeSnapshots(new java.util.ArrayList<NodeSnapshot>(nodeSnapshots.length));
        for (NodeSnapshot value : nodeSnapshots) {
            getNodeSnapshots().add(value);
        }
        return this;
    }
    
    
A list of the cache nodes in the source cache cluster.

Returns a reference to this object so that method calls can be chained together.

Parameters:
nodeSnapshots A list of the cache nodes in the source cache cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withNodeSnapshots(java.util.Collection<NodeSnapshotnodeSnapshots) {
        if (nodeSnapshots == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<NodeSnapshotnodeSnapshotsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<NodeSnapshot>(nodeSnapshots.size());
            nodeSnapshotsCopy.addAll(nodeSnapshots);
            this. = nodeSnapshotsCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getSnapshotName() != nullsb.append("SnapshotName: " + getSnapshotName() + ",");
        if (getCacheClusterId() != nullsb.append("CacheClusterId: " + getCacheClusterId() + ",");
        if (getSnapshotStatus() != nullsb.append("SnapshotStatus: " + getSnapshotStatus() + ",");
        if (getSnapshotSource() != nullsb.append("SnapshotSource: " + getSnapshotSource() + ",");
        if (getCacheNodeType() != nullsb.append("CacheNodeType: " + getCacheNodeType() + ",");
        if (getEngine() != nullsb.append("Engine: " + getEngine() + ",");
        if (getEngineVersion() != nullsb.append("EngineVersion: " + getEngineVersion() + ",");
        if (getNumCacheNodes() != nullsb.append("NumCacheNodes: " + getNumCacheNodes() + ",");
        if (getPreferredAvailabilityZone() != nullsb.append("PreferredAvailabilityZone: " + getPreferredAvailabilityZone() + ",");
        if (getCacheClusterCreateTime() != nullsb.append("CacheClusterCreateTime: " + getCacheClusterCreateTime() + ",");
        if (getPreferredMaintenanceWindow() != nullsb.append("PreferredMaintenanceWindow: " + getPreferredMaintenanceWindow() + ",");
        if (getTopicArn() != nullsb.append("TopicArn: " + getTopicArn() + ",");
        if (getPort() != nullsb.append("Port: " + getPort() + ",");
        if (getCacheParameterGroupName() != nullsb.append("CacheParameterGroupName: " + getCacheParameterGroupName() + ",");
        if (getCacheSubnetGroupName() != nullsb.append("CacheSubnetGroupName: " + getCacheSubnetGroupName() + ",");
        if (getVpcId() != nullsb.append("VpcId: " + getVpcId() + ",");
        if (isAutoMinorVersionUpgrade() != nullsb.append("AutoMinorVersionUpgrade: " + isAutoMinorVersionUpgrade() + ",");
        if (getSnapshotRetentionLimit() != nullsb.append("SnapshotRetentionLimit: " + getSnapshotRetentionLimit() + ",");
        if (getSnapshotWindow() != nullsb.append("SnapshotWindow: " + getSnapshotWindow() + ",");
        if (getNodeSnapshots() != nullsb.append("NodeSnapshots: " + getNodeSnapshots() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSnapshotName() == null) ? 0 : getSnapshotName().hashCode()); 
        hashCode = prime * hashCode + ((getCacheClusterId() == null) ? 0 : getCacheClusterId().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotStatus() == null) ? 0 : getSnapshotStatus().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotSource() == null) ? 0 : getSnapshotSource().hashCode()); 
        hashCode = prime * hashCode + ((getCacheNodeType() == null) ? 0 : getCacheNodeType().hashCode()); 
        hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); 
        hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); 
        hashCode = prime * hashCode + ((getNumCacheNodes() == null) ? 0 : getNumCacheNodes().hashCode()); 
        hashCode = prime * hashCode + ((getPreferredAvailabilityZone() == null) ? 0 : getPreferredAvailabilityZone().hashCode()); 
        hashCode = prime * hashCode + ((getCacheClusterCreateTime() == null) ? 0 : getCacheClusterCreateTime().hashCode()); 
        hashCode = prime * hashCode + ((getPreferredMaintenanceWindow() == null) ? 0 : getPreferredMaintenanceWindow().hashCode()); 
        hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); 
        hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode()); 
        hashCode = prime * hashCode + ((getCacheParameterGroupName() == null) ? 0 : getCacheParameterGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getCacheSubnetGroupName() == null) ? 0 : getCacheSubnetGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); 
        hashCode = prime * hashCode + ((isAutoMinorVersionUpgrade() == null) ? 0 : isAutoMinorVersionUpgrade().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotRetentionLimit() == null) ? 0 : getSnapshotRetentionLimit().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotWindow() == null) ? 0 : getSnapshotWindow().hashCode()); 
        hashCode = prime * hashCode + ((getNodeSnapshots() == null) ? 0 : getNodeSnapshots().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof Snapshot == falsereturn false;
        Snapshot other = (Snapshot)obj;
        
        if (other.getSnapshotName() == null ^ this.getSnapshotName() == nullreturn false;
        if (other.getSnapshotName() != null && other.getSnapshotName().equals(this.getSnapshotName()) == falsereturn false
        if (other.getCacheClusterId() == null ^ this.getCacheClusterId() == nullreturn false;
        if (other.getCacheClusterId() != null && other.getCacheClusterId().equals(this.getCacheClusterId()) == falsereturn false
        if (other.getSnapshotStatus() == null ^ this.getSnapshotStatus() == nullreturn false;
        if (other.getSnapshotStatus() != null && other.getSnapshotStatus().equals(this.getSnapshotStatus()) == falsereturn false
        if (other.getSnapshotSource() == null ^ this.getSnapshotSource() == nullreturn false;
        if (other.getSnapshotSource() != null && other.getSnapshotSource().equals(this.getSnapshotSource()) == falsereturn false
        if (other.getCacheNodeType() == null ^ this.getCacheNodeType() == nullreturn false;
        if (other.getCacheNodeType() != null && other.getCacheNodeType().equals(this.getCacheNodeType()) == falsereturn false
        if (other.getEngine() == null ^ this.getEngine() == nullreturn false;
        if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == falsereturn false
        if (other.getEngineVersion() == null ^ this.getEngineVersion() == nullreturn false;
        if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == falsereturn false
        if (other.getNumCacheNodes() == null ^ this.getNumCacheNodes() == nullreturn false;
        if (other.getNumCacheNodes() != null && other.getNumCacheNodes().equals(this.getNumCacheNodes()) == falsereturn false
        if (other.getPreferredAvailabilityZone() == null ^ this.getPreferredAvailabilityZone() == nullreturn false;
        if (other.getPreferredAvailabilityZone() != null && other.getPreferredAvailabilityZone().equals(this.getPreferredAvailabilityZone()) == falsereturn false
        if (other.getCacheClusterCreateTime() == null ^ this.getCacheClusterCreateTime() == nullreturn false;
        if (other.getCacheClusterCreateTime() != null && other.getCacheClusterCreateTime().equals(this.getCacheClusterCreateTime()) == falsereturn false
        if (other.getPreferredMaintenanceWindow() == null ^ this.getPreferredMaintenanceWindow() == nullreturn false;
        if (other.getPreferredMaintenanceWindow() != null && other.getPreferredMaintenanceWindow().equals(this.getPreferredMaintenanceWindow()) == falsereturn false
        if (other.getTopicArn() == null ^ this.getTopicArn() == nullreturn false;
        if (other.getTopicArn() != null && other.getTopicArn().equals(this.getTopicArn()) == falsereturn false
        if (other.getPort() == null ^ this.getPort() == nullreturn false;
        if (other.getPort() != null && other.getPort().equals(this.getPort()) == falsereturn false
        if (other.getCacheParameterGroupName() == null ^ this.getCacheParameterGroupName() == nullreturn false;
        if (other.getCacheParameterGroupName() != null && other.getCacheParameterGroupName().equals(this.getCacheParameterGroupName()) == falsereturn false
        if (other.getCacheSubnetGroupName() == null ^ this.getCacheSubnetGroupName() == nullreturn false;
        if (other.getCacheSubnetGroupName() != null && other.getCacheSubnetGroupName().equals(this.getCacheSubnetGroupName()) == falsereturn false
        if (other.getVpcId() == null ^ this.getVpcId() == nullreturn false;
        if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == falsereturn false
        if (other.isAutoMinorVersionUpgrade() == null ^ this.isAutoMinorVersionUpgrade() == nullreturn false;
        if (other.isAutoMinorVersionUpgrade() != null && other.isAutoMinorVersionUpgrade().equals(this.isAutoMinorVersionUpgrade()) == falsereturn false
        if (other.getSnapshotRetentionLimit() == null ^ this.getSnapshotRetentionLimit() == nullreturn false;
        if (other.getSnapshotRetentionLimit() != null && other.getSnapshotRetentionLimit().equals(this.getSnapshotRetentionLimit()) == falsereturn false
        if (other.getSnapshotWindow() == null ^ this.getSnapshotWindow() == nullreturn false;
        if (other.getSnapshotWindow() != null && other.getSnapshotWindow().equals(this.getSnapshotWindow()) == falsereturn false
        if (other.getNodeSnapshots() == null ^ this.getNodeSnapshots() == nullreturn false;
        if (other.getNodeSnapshots() != null && other.getNodeSnapshots().equals(this.getNodeSnapshots()) == falsereturn false
        return true;
    }
    
    @Override
    public Snapshot clone() {
        try {
            return (Snapshotsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X