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.redshift.model;
  

Describes a snapshot.

  
  public class Snapshot implements SerializableCloneable {

    
The snapshot identifier that is provided in the request.
  
      private String snapshotIdentifier;

    
The identifier of the cluster for which the snapshot was taken.
  
      private String clusterIdentifier;

    
The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.
  
      private java.util.Date snapshotCreateTime;

    
The snapshot status. The value of the status depends on the API operation used.
  • CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
  • DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
  • DeleteClusterSnapshot returns status as "deleted".
  
      private String status;

    
The port that the cluster is listening on.
  
      private Integer port;

    
The Availability Zone in which the cluster was created.
  
      private String availabilityZone;

    
The time (UTC) when the cluster was originally created.
  
      private java.util.Date clusterCreateTime;

    
The master user name for the cluster.
  
      private String masterUsername;

    
The version ID of the Amazon Redshift engine that is running on the cluster.
  
      private String clusterVersion;

    
The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot will be of type "manual".
  
      private String snapshotType;

    
The node type of the nodes in the cluster.
  
      private String nodeType;

    
The number of nodes in the cluster.
  
      private Integer numberOfNodes;

    
The name of the database that was created when the cluster was created.
  
     private String dBName;

    
The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output.
 
     private String vpcId;

    
If true, the data in the snapshot is encrypted at rest.
 
     private Boolean encrypted;

    
The AWS Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.
 
     private String kmsKeyId;

    
A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster. true indicates that the data is encrypted using HSM keys.
 
     private Boolean encryptedWithHSM;

    
A list of the AWS customer accounts authorized to restore the snapshot. Returns null if no accounts are authorized. Visible only to the snapshot owner.
 
For manual snapshots, the AWS customer account used to create or copy the snapshot. For automatic snapshots, the owner of the cluster. The owner can perform all snapshot actions, such as sharing a manual snapshot.
 
     private String ownerAccount;

    
The size of the complete set of backup data that would be used to restore the cluster.
 
     private Double totalBackupSizeInMegaBytes;

    
The size of the incremental backup.
 
The number of megabytes that have been transferred to the snapshot backup.
 
     private Double backupProgressInMegaBytes;

    
The number of megabytes per second being transferred to the snapshot backup. Returns 0 for a completed backup.
 
The estimate of the time remaining before the snapshot backup will complete. Returns 0 for a completed backup.
 
     private Long estimatedSecondsToCompletion;

    
The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.
 
     private Long elapsedTimeInSeconds;

    
The source region from which the snapshot was copied.
 
     private String sourceRegion;

    
The list of tags for the cluster snapshot.
 
The snapshot identifier that is provided in the request.

Returns:
The snapshot identifier that is provided in the request.
 
     public String getSnapshotIdentifier() {
         return ;
     }
    
    
The snapshot identifier that is provided in the request.

Parameters:
snapshotIdentifier The snapshot identifier that is provided in the request.
 
     public void setSnapshotIdentifier(String snapshotIdentifier) {
         this. = snapshotIdentifier;
     }
    
    
The snapshot identifier that is provided in the request.

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

Parameters:
snapshotIdentifier The snapshot identifier that is provided in the request.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withSnapshotIdentifier(String snapshotIdentifier) {
         this. = snapshotIdentifier;
         return this;
     }

    
The identifier of the cluster for which the snapshot was taken.

Returns:
The identifier of the cluster for which the snapshot was taken.
 
     public String getClusterIdentifier() {
         return ;
     }
    
    
The identifier of the cluster for which the snapshot was taken.

Parameters:
clusterIdentifier The identifier of the cluster for which the snapshot was taken.
 
     public void setClusterIdentifier(String clusterIdentifier) {
         this. = clusterIdentifier;
     }
    
    
The identifier of the cluster for which the snapshot was taken.

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

Parameters:
clusterIdentifier The identifier of the cluster for which the snapshot was taken.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withClusterIdentifier(String clusterIdentifier) {
         this. = clusterIdentifier;
         return this;
     }

    
The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.

Returns:
The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.
 
     public java.util.Date getSnapshotCreateTime() {
         return ;
     }
    
    
The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.

Parameters:
snapshotCreateTime The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.
 
     public void setSnapshotCreateTime(java.util.Date snapshotCreateTime) {
         this. = snapshotCreateTime;
     }
    
    
The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.

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

Parameters:
snapshotCreateTime The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withSnapshotCreateTime(java.util.Date snapshotCreateTime) {
         this. = snapshotCreateTime;
         return this;
     }

    
The snapshot status. The value of the status depends on the API operation used.
  • CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
  • DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
  • DeleteClusterSnapshot returns status as "deleted".

Returns:
The snapshot status. The value of the status depends on the API operation used.
  • CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
  • DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
  • DeleteClusterSnapshot returns status as "deleted".
 
     public String getStatus() {
         return ;
     }
    
    
The snapshot status. The value of the status depends on the API operation used.
  • CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
  • DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
  • DeleteClusterSnapshot returns status as "deleted".

Parameters:
status The snapshot status. The value of the status depends on the API operation used.
  • CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
  • DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
  • DeleteClusterSnapshot returns status as "deleted".
 
     public void setStatus(String status) {
         this. = status;
     }
    
    
The snapshot status. The value of the status depends on the API operation used.
  • CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
  • DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
  • DeleteClusterSnapshot returns status as "deleted".

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

Parameters:
status The snapshot status. The value of the status depends on the API operation used.
  • CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
  • DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
  • DeleteClusterSnapshot returns status as "deleted".
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withStatus(String status) {
         this. = status;
         return this;
     }

    
The port that the cluster is listening on.

Returns:
The port that the cluster is listening on.
 
     public Integer getPort() {
         return ;
     }
    
    
The port that the cluster is listening on.

Parameters:
port The port that the cluster is listening on.
 
     public void setPort(Integer port) {
         this. = port;
     }
    
    
The port that the cluster is listening on.

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

Parameters:
port The port that the cluster is listening on.
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 Availability Zone in which the cluster was created.

Returns:
The Availability Zone in which the cluster was created.
 
     public String getAvailabilityZone() {
         return ;
     }
    
    
The Availability Zone in which the cluster was created.

Parameters:
availabilityZone The Availability Zone in which the cluster was created.
 
     public void setAvailabilityZone(String availabilityZone) {
         this. = availabilityZone;
     }
    
    
The Availability Zone in which the cluster was created.

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

Parameters:
availabilityZone The Availability Zone in which the cluster was created.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withAvailabilityZone(String availabilityZone) {
         this. = availabilityZone;
         return this;
     }

    
The time (UTC) when the cluster was originally created.

Returns:
The time (UTC) when the cluster was originally created.
 
     public java.util.Date getClusterCreateTime() {
         return ;
     }
    
    
The time (UTC) when the cluster was originally created.

Parameters:
clusterCreateTime The time (UTC) when the cluster was originally created.
 
     public void setClusterCreateTime(java.util.Date clusterCreateTime) {
         this. = clusterCreateTime;
     }
    
    
The time (UTC) when the cluster was originally created.

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

Parameters:
clusterCreateTime The time (UTC) when the cluster was originally created.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withClusterCreateTime(java.util.Date clusterCreateTime) {
         this. = clusterCreateTime;
         return this;
     }

    
The master user name for the cluster.

Returns:
The master user name for the cluster.
 
     public String getMasterUsername() {
         return ;
     }
    
    
The master user name for the cluster.

Parameters:
masterUsername The master user name for the cluster.
 
     public void setMasterUsername(String masterUsername) {
         this. = masterUsername;
     }
    
    
The master user name for the cluster.

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

Parameters:
masterUsername The master user name for the cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withMasterUsername(String masterUsername) {
         this. = masterUsername;
         return this;
     }

    
The version ID of the Amazon Redshift engine that is running on the cluster.

Returns:
The version ID of the Amazon Redshift engine that is running on the cluster.
 
     public String getClusterVersion() {
         return ;
     }
    
    
The version ID of the Amazon Redshift engine that is running on the cluster.

Parameters:
clusterVersion The version ID of the Amazon Redshift engine that is running on the cluster.
 
     public void setClusterVersion(String clusterVersion) {
         this. = clusterVersion;
     }
    
    
The version ID of the Amazon Redshift engine that is running on the cluster.

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

Parameters:
clusterVersion The version ID of the Amazon Redshift engine that is running on the cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withClusterVersion(String clusterVersion) {
         this. = clusterVersion;
         return this;
     }

    
The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot will be of type "manual".

Returns:
The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot will be of type "manual".
 
     public String getSnapshotType() {
         return ;
     }
    
    
The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot will be of type "manual".

Parameters:
snapshotType The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot will be of type "manual".
 
     public void setSnapshotType(String snapshotType) {
         this. = snapshotType;
     }
    
    
The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot will be of type "manual".

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

Parameters:
snapshotType The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot will be of type "manual".
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withSnapshotType(String snapshotType) {
         this. = snapshotType;
         return this;
     }

    
The node type of the nodes in the cluster.

Returns:
The node type of the nodes in the cluster.
 
     public String getNodeType() {
         return ;
     }
    
    
The node type of the nodes in the cluster.

Parameters:
nodeType The node type of the nodes in the cluster.
 
     public void setNodeType(String nodeType) {
         this. = nodeType;
     }
    
    
The node type of the nodes in the cluster.

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

Parameters:
nodeType The node type of the nodes in the cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withNodeType(String nodeType) {
         this. = nodeType;
         return this;
     }

    
The number of nodes in the cluster.

Returns:
The number of nodes in the cluster.
 
     public Integer getNumberOfNodes() {
         return ;
     }
    
    
The number of nodes in the cluster.

Parameters:
numberOfNodes The number of nodes in the cluster.
 
     public void setNumberOfNodes(Integer numberOfNodes) {
         this. = numberOfNodes;
     }
    
    
The number of nodes in the cluster.

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

Parameters:
numberOfNodes The number of nodes in the cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withNumberOfNodes(Integer numberOfNodes) {
         this. = numberOfNodes;
         return this;
     }

    
The name of the database that was created when the cluster was created.

Returns:
The name of the database that was created when the cluster was created.
 
     public String getDBName() {
         return ;
     }
    
    
The name of the database that was created when the cluster was created.

Parameters:
dBName The name of the database that was created when the cluster was created.
 
     public void setDBName(String dBName) {
         this. = dBName;
     }
    
    
The name of the database that was created when the cluster was created.

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

Parameters:
dBName The name of the database that was created when the cluster was created.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withDBName(String dBName) {
         this. = dBName;
         return this;
     }

    
The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output.

Returns:
The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output.
 
     public String getVpcId() {
         return ;
     }
    
    
The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output.

Parameters:
vpcId The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output.
 
     public void setVpcId(String vpcId) {
         this. = vpcId;
     }
    
    
The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output.

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

Parameters:
vpcId The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withVpcId(String vpcId) {
         this. = vpcId;
         return this;
     }

    
If true, the data in the snapshot is encrypted at rest.

Returns:
If true, the data in the snapshot is encrypted at rest.
 
     public Boolean isEncrypted() {
         return ;
     }
    
    
If true, the data in the snapshot is encrypted at rest.

Parameters:
encrypted If true, the data in the snapshot is encrypted at rest.
 
     public void setEncrypted(Boolean encrypted) {
         this. = encrypted;
     }
    
    
If true, the data in the snapshot is encrypted at rest.

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

Parameters:
encrypted If true, the data in the snapshot is encrypted at rest.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withEncrypted(Boolean encrypted) {
         this. = encrypted;
         return this;
     }

    
If true, the data in the snapshot is encrypted at rest.

Returns:
If true, the data in the snapshot is encrypted at rest.
 
     public Boolean getEncrypted() {
         return ;
     }

    
The AWS Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.

Returns:
The AWS Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.
 
     public String getKmsKeyId() {
         return ;
     }
    
    
The AWS Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.

Parameters:
kmsKeyId The AWS Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.
 
     public void setKmsKeyId(String kmsKeyId) {
         this. = kmsKeyId;
     }
    
    
The AWS Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.

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

Parameters:
kmsKeyId The AWS Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withKmsKeyId(String kmsKeyId) {
         this. = kmsKeyId;
         return this;
     }

    
A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster. true indicates that the data is encrypted using HSM keys.

Returns:
A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster. true indicates that the data is encrypted using HSM keys.
 
     public Boolean isEncryptedWithHSM() {
         return ;
     }
    
    
A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster. true indicates that the data is encrypted using HSM keys.

Parameters:
encryptedWithHSM A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster. true indicates that the data is encrypted using HSM keys.
 
     public void setEncryptedWithHSM(Boolean encryptedWithHSM) {
         this. = encryptedWithHSM;
     }
    
    
A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster. true indicates that the data is encrypted using HSM keys.

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

Parameters:
encryptedWithHSM A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster. true indicates that the data is encrypted using HSM keys.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withEncryptedWithHSM(Boolean encryptedWithHSM) {
         this. = encryptedWithHSM;
         return this;
     }

    
A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster. true indicates that the data is encrypted using HSM keys.

Returns:
A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster. true indicates that the data is encrypted using HSM keys.
 
     public Boolean getEncryptedWithHSM() {
         return ;
     }

    
A list of the AWS customer accounts authorized to restore the snapshot. Returns null if no accounts are authorized. Visible only to the snapshot owner.

Returns:
A list of the AWS customer accounts authorized to restore the snapshot. Returns null if no accounts are authorized. Visible only to the snapshot owner.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A list of the AWS customer accounts authorized to restore the snapshot. Returns null if no accounts are authorized. Visible only to the snapshot owner.

Parameters:
accountsWithRestoreAccess A list of the AWS customer accounts authorized to restore the snapshot. Returns null if no accounts are authorized. Visible only to the snapshot owner.
 
     public void setAccountsWithRestoreAccess(java.util.Collection<AccountWithRestoreAccessaccountsWithRestoreAccess) {
         if (accountsWithRestoreAccess == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<AccountWithRestoreAccessaccountsWithRestoreAccessCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<AccountWithRestoreAccess>(accountsWithRestoreAccess.size());
         accountsWithRestoreAccessCopy.addAll(accountsWithRestoreAccess);
         this. = accountsWithRestoreAccessCopy;
     }
    
    
A list of the AWS customer accounts authorized to restore the snapshot. Returns null if no accounts are authorized. Visible only to the snapshot owner.

NOTE: This method appends the values to the existing list (if any). Use setAccountsWithRestoreAccess(java.util.Collection) or withAccountsWithRestoreAccess(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:
accountsWithRestoreAccess A list of the AWS customer accounts authorized to restore the snapshot. Returns null if no accounts are authorized. Visible only to the snapshot owner.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withAccountsWithRestoreAccess(AccountWithRestoreAccess... accountsWithRestoreAccess) {
         if (getAccountsWithRestoreAccess() == nullsetAccountsWithRestoreAccess(new java.util.ArrayList<AccountWithRestoreAccess>(accountsWithRestoreAccess.length));
         for (AccountWithRestoreAccess value : accountsWithRestoreAccess) {
             getAccountsWithRestoreAccess().add(value);
         }
         return this;
     }
    
    
A list of the AWS customer accounts authorized to restore the snapshot. Returns null if no accounts are authorized. Visible only to the snapshot owner.

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

Parameters:
accountsWithRestoreAccess A list of the AWS customer accounts authorized to restore the snapshot. Returns null if no accounts are authorized. Visible only to the snapshot owner.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Snapshot withAccountsWithRestoreAccess(java.util.Collection<AccountWithRestoreAccessaccountsWithRestoreAccess) {
         if (accountsWithRestoreAccess == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<AccountWithRestoreAccessaccountsWithRestoreAccessCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<AccountWithRestoreAccess>(accountsWithRestoreAccess.size());
             accountsWithRestoreAccessCopy.addAll(accountsWithRestoreAccess);
             this. = accountsWithRestoreAccessCopy;
         }
 
         return this;
     }

    
For manual snapshots, the AWS customer account used to create or copy the snapshot. For automatic snapshots, the owner of the cluster. The owner can perform all snapshot actions, such as sharing a manual snapshot.

Returns:
For manual snapshots, the AWS customer account used to create or copy the snapshot. For automatic snapshots, the owner of the cluster. The owner can perform all snapshot actions, such as sharing a manual snapshot.
 
     public String getOwnerAccount() {
         return ;
     }
    
    
For manual snapshots, the AWS customer account used to create or copy the snapshot. For automatic snapshots, the owner of the cluster. The owner can perform all snapshot actions, such as sharing a manual snapshot.

Parameters:
ownerAccount For manual snapshots, the AWS customer account used to create or copy the snapshot. For automatic snapshots, the owner of the cluster. The owner can perform all snapshot actions, such as sharing a manual snapshot.
 
     public void setOwnerAccount(String ownerAccount) {
         this. = ownerAccount;
     }
    
    
For manual snapshots, the AWS customer account used to create or copy the snapshot. For automatic snapshots, the owner of the cluster. The owner can perform all snapshot actions, such as sharing a manual snapshot.

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

Parameters:
ownerAccount For manual snapshots, the AWS customer account used to create or copy the snapshot. For automatic snapshots, the owner of the cluster. The owner can perform all snapshot actions, such as sharing a manual snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withOwnerAccount(String ownerAccount) {
        this. = ownerAccount;
        return this;
    }

    
The size of the complete set of backup data that would be used to restore the cluster.

Returns:
The size of the complete set of backup data that would be used to restore the cluster.
        return ;
    }
    
    
The size of the complete set of backup data that would be used to restore the cluster.

Parameters:
totalBackupSizeInMegaBytes The size of the complete set of backup data that would be used to restore the cluster.
    public void setTotalBackupSizeInMegaBytes(Double totalBackupSizeInMegaBytes) {
        this. = totalBackupSizeInMegaBytes;
    }
    
    
The size of the complete set of backup data that would be used to restore the cluster.

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

Parameters:
totalBackupSizeInMegaBytes The size of the complete set of backup data that would be used to restore the cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withTotalBackupSizeInMegaBytes(Double totalBackupSizeInMegaBytes) {
        this. = totalBackupSizeInMegaBytes;
        return this;
    }

    
The size of the incremental backup.

Returns:
The size of the incremental backup.
    }
    
    
The size of the incremental backup.

Parameters:
actualIncrementalBackupSizeInMegaBytes The size of the incremental backup.
    public void setActualIncrementalBackupSizeInMegaBytes(Double actualIncrementalBackupSizeInMegaBytes) {
        this. = actualIncrementalBackupSizeInMegaBytes;
    }
    
    
The size of the incremental backup.

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

Parameters:
actualIncrementalBackupSizeInMegaBytes The size of the incremental backup.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withActualIncrementalBackupSizeInMegaBytes(Double actualIncrementalBackupSizeInMegaBytes) {
        this. = actualIncrementalBackupSizeInMegaBytes;
        return this;
    }

    
The number of megabytes that have been transferred to the snapshot backup.

Returns:
The number of megabytes that have been transferred to the snapshot backup.
        return ;
    }
    
    
The number of megabytes that have been transferred to the snapshot backup.

Parameters:
backupProgressInMegaBytes The number of megabytes that have been transferred to the snapshot backup.
    public void setBackupProgressInMegaBytes(Double backupProgressInMegaBytes) {
        this. = backupProgressInMegaBytes;
    }
    
    
The number of megabytes that have been transferred to the snapshot backup.

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

Parameters:
backupProgressInMegaBytes The number of megabytes that have been transferred to the snapshot backup.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withBackupProgressInMegaBytes(Double backupProgressInMegaBytes) {
        this. = backupProgressInMegaBytes;
        return this;
    }

    
The number of megabytes per second being transferred to the snapshot backup. Returns 0 for a completed backup.

Returns:
The number of megabytes per second being transferred to the snapshot backup. Returns 0 for a completed backup.
    }
    
    
The number of megabytes per second being transferred to the snapshot backup. Returns 0 for a completed backup.

Parameters:
currentBackupRateInMegaBytesPerSecond The number of megabytes per second being transferred to the snapshot backup. Returns 0 for a completed backup.
    public void setCurrentBackupRateInMegaBytesPerSecond(Double currentBackupRateInMegaBytesPerSecond) {
        this. = currentBackupRateInMegaBytesPerSecond;
    }
    
    
The number of megabytes per second being transferred to the snapshot backup. Returns 0 for a completed backup.

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

Parameters:
currentBackupRateInMegaBytesPerSecond The number of megabytes per second being transferred to the snapshot backup. Returns 0 for a completed backup.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withCurrentBackupRateInMegaBytesPerSecond(Double currentBackupRateInMegaBytesPerSecond) {
        this. = currentBackupRateInMegaBytesPerSecond;
        return this;
    }

    
The estimate of the time remaining before the snapshot backup will complete. Returns 0 for a completed backup.

Returns:
The estimate of the time remaining before the snapshot backup will complete. Returns 0 for a completed backup.
        return ;
    }
    
    
The estimate of the time remaining before the snapshot backup will complete. Returns 0 for a completed backup.

Parameters:
estimatedSecondsToCompletion The estimate of the time remaining before the snapshot backup will complete. Returns 0 for a completed backup.
    public void setEstimatedSecondsToCompletion(Long estimatedSecondsToCompletion) {
        this. = estimatedSecondsToCompletion;
    }
    
    
The estimate of the time remaining before the snapshot backup will complete. Returns 0 for a completed backup.

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

Parameters:
estimatedSecondsToCompletion The estimate of the time remaining before the snapshot backup will complete. Returns 0 for a completed backup.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withEstimatedSecondsToCompletion(Long estimatedSecondsToCompletion) {
        this. = estimatedSecondsToCompletion;
        return this;
    }

    
The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.

Returns:
The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.
    public Long getElapsedTimeInSeconds() {
        return ;
    }
    
    
The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.

Parameters:
elapsedTimeInSeconds The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.
    public void setElapsedTimeInSeconds(Long elapsedTimeInSeconds) {
        this. = elapsedTimeInSeconds;
    }
    
    
The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.

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

Parameters:
elapsedTimeInSeconds The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withElapsedTimeInSeconds(Long elapsedTimeInSeconds) {
        this. = elapsedTimeInSeconds;
        return this;
    }

    
The source region from which the snapshot was copied.

Returns:
The source region from which the snapshot was copied.
    public String getSourceRegion() {
        return ;
    }
    
    
The source region from which the snapshot was copied.

Parameters:
sourceRegion The source region from which the snapshot was copied.
    public void setSourceRegion(String sourceRegion) {
        this. = sourceRegion;
    }
    
    
The source region from which the snapshot was copied.

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

Parameters:
sourceRegion The source region from which the snapshot was copied.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withSourceRegion(String sourceRegion) {
        this. = sourceRegion;
        return this;
    }

    
The list of tags for the cluster snapshot.

Returns:
The list of tags for the cluster snapshot.
    public java.util.List<TaggetTags() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The list of tags for the cluster snapshot.

Parameters:
tags The list of tags for the cluster snapshot.
    public void setTags(java.util.Collection<Tagtags) {
        if (tags == null) {
            this. = null;
            return;
        }
        tagsCopy.addAll(tags);
        this. = tagsCopy;
    }
    
    
The list of tags for the cluster snapshot.

NOTE: This method appends the values to the existing list (if any). Use setTags(java.util.Collection) or withTags(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:
tags The list of tags for the cluster snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withTags(Tag... tags) {
        if (getTags() == nullsetTags(new java.util.ArrayList<Tag>(tags.length));
        for (Tag value : tags) {
            getTags().add(value);
        }
        return this;
    }
    
    
The list of tags for the cluster snapshot.

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

Parameters:
tags The list of tags for the cluster snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Snapshot withTags(java.util.Collection<Tagtags) {
        if (tags == null) {
            this. = null;
        } else {
            tagsCopy.addAll(tags);
            this. = tagsCopy;
        }
        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 (getSnapshotIdentifier() != nullsb.append("SnapshotIdentifier: " + getSnapshotIdentifier() + ",");
        if (getClusterIdentifier() != nullsb.append("ClusterIdentifier: " + getClusterIdentifier() + ",");
        if (getSnapshotCreateTime() != nullsb.append("SnapshotCreateTime: " + getSnapshotCreateTime() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getPort() != nullsb.append("Port: " + getPort() + ",");
        if (getAvailabilityZone() != nullsb.append("AvailabilityZone: " + getAvailabilityZone() + ",");
        if (getClusterCreateTime() != nullsb.append("ClusterCreateTime: " + getClusterCreateTime() + ",");
        if (getMasterUsername() != nullsb.append("MasterUsername: " + getMasterUsername() + ",");
        if (getClusterVersion() != nullsb.append("ClusterVersion: " + getClusterVersion() + ",");
        if (getSnapshotType() != nullsb.append("SnapshotType: " + getSnapshotType() + ",");
        if (getNodeType() != nullsb.append("NodeType: " + getNodeType() + ",");
        if (getNumberOfNodes() != nullsb.append("NumberOfNodes: " + getNumberOfNodes() + ",");
        if (getDBName() != nullsb.append("DBName: " + getDBName() + ",");
        if (getVpcId() != nullsb.append("VpcId: " + getVpcId() + ",");
        if (isEncrypted() != nullsb.append("Encrypted: " + isEncrypted() + ",");
        if (getKmsKeyId() != nullsb.append("KmsKeyId: " + getKmsKeyId() + ",");
        if (isEncryptedWithHSM() != nullsb.append("EncryptedWithHSM: " + isEncryptedWithHSM() + ",");
        if (getAccountsWithRestoreAccess() != nullsb.append("AccountsWithRestoreAccess: " + getAccountsWithRestoreAccess() + ",");
        if (getOwnerAccount() != nullsb.append("OwnerAccount: " + getOwnerAccount() + ",");
        if (getTotalBackupSizeInMegaBytes() != nullsb.append("TotalBackupSizeInMegaBytes: " + getTotalBackupSizeInMegaBytes() + ",");
        if (getActualIncrementalBackupSizeInMegaBytes() != nullsb.append("ActualIncrementalBackupSizeInMegaBytes: " + getActualIncrementalBackupSizeInMegaBytes() + ",");
        if (getBackupProgressInMegaBytes() != nullsb.append("BackupProgressInMegaBytes: " + getBackupProgressInMegaBytes() + ",");
        if (getCurrentBackupRateInMegaBytesPerSecond() != nullsb.append("CurrentBackupRateInMegaBytesPerSecond: " + getCurrentBackupRateInMegaBytesPerSecond() + ",");
        if (getEstimatedSecondsToCompletion() != nullsb.append("EstimatedSecondsToCompletion: " + getEstimatedSecondsToCompletion() + ",");
        if (getElapsedTimeInSeconds() != nullsb.append("ElapsedTimeInSeconds: " + getElapsedTimeInSeconds() + ",");
        if (getSourceRegion() != nullsb.append("SourceRegion: " + getSourceRegion() + ",");
        if (getTags() != nullsb.append("Tags: " + getTags() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSnapshotIdentifier() == null) ? 0 : getSnapshotIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotCreateTime() == null) ? 0 : getSnapshotCreateTime().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode()); 
        hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); 
        hashCode = prime * hashCode + ((getClusterCreateTime() == null) ? 0 : getClusterCreateTime().hashCode()); 
        hashCode = prime * hashCode + ((getMasterUsername() == null) ? 0 : getMasterUsername().hashCode()); 
        hashCode = prime * hashCode + ((getClusterVersion() == null) ? 0 : getClusterVersion().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotType() == null) ? 0 : getSnapshotType().hashCode()); 
        hashCode = prime * hashCode + ((getNodeType() == null) ? 0 : getNodeType().hashCode()); 
        hashCode = prime * hashCode + ((getNumberOfNodes() == null) ? 0 : getNumberOfNodes().hashCode()); 
        hashCode = prime * hashCode + ((getDBName() == null) ? 0 : getDBName().hashCode()); 
        hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); 
        hashCode = prime * hashCode + ((isEncrypted() == null) ? 0 : isEncrypted().hashCode()); 
        hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); 
        hashCode = prime * hashCode + ((isEncryptedWithHSM() == null) ? 0 : isEncryptedWithHSM().hashCode()); 
        hashCode = prime * hashCode + ((getAccountsWithRestoreAccess() == null) ? 0 : getAccountsWithRestoreAccess().hashCode()); 
        hashCode = prime * hashCode + ((getOwnerAccount() == null) ? 0 : getOwnerAccount().hashCode()); 
        hashCode = prime * hashCode + ((getTotalBackupSizeInMegaBytes() == null) ? 0 : getTotalBackupSizeInMegaBytes().hashCode()); 
        hashCode = prime * hashCode + ((getActualIncrementalBackupSizeInMegaBytes() == null) ? 0 : getActualIncrementalBackupSizeInMegaBytes().hashCode()); 
        hashCode = prime * hashCode + ((getBackupProgressInMegaBytes() == null) ? 0 : getBackupProgressInMegaBytes().hashCode()); 
        hashCode = prime * hashCode + ((getCurrentBackupRateInMegaBytesPerSecond() == null) ? 0 : getCurrentBackupRateInMegaBytesPerSecond().hashCode()); 
        hashCode = prime * hashCode + ((getEstimatedSecondsToCompletion() == null) ? 0 : getEstimatedSecondsToCompletion().hashCode()); 
        hashCode = prime * hashCode + ((getElapsedTimeInSeconds() == null) ? 0 : getElapsedTimeInSeconds().hashCode()); 
        hashCode = prime * hashCode + ((getSourceRegion() == null) ? 0 : getSourceRegion().hashCode()); 
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().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.getSnapshotIdentifier() == null ^ this.getSnapshotIdentifier() == nullreturn false;
        if (other.getSnapshotIdentifier() != null && other.getSnapshotIdentifier().equals(this.getSnapshotIdentifier()) == falsereturn false
        if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == nullreturn false;
        if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == falsereturn false
        if (other.getSnapshotCreateTime() == null ^ this.getSnapshotCreateTime() == nullreturn false;
        if (other.getSnapshotCreateTime() != null && other.getSnapshotCreateTime().equals(this.getSnapshotCreateTime()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getPort() == null ^ this.getPort() == nullreturn false;
        if (other.getPort() != null && other.getPort().equals(this.getPort()) == falsereturn false
        if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == nullreturn false;
        if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == falsereturn false
        if (other.getClusterCreateTime() == null ^ this.getClusterCreateTime() == nullreturn false;
        if (other.getClusterCreateTime() != null && other.getClusterCreateTime().equals(this.getClusterCreateTime()) == falsereturn false
        if (other.getMasterUsername() == null ^ this.getMasterUsername() == nullreturn false;
        if (other.getMasterUsername() != null && other.getMasterUsername().equals(this.getMasterUsername()) == falsereturn false
        if (other.getClusterVersion() == null ^ this.getClusterVersion() == nullreturn false;
        if (other.getClusterVersion() != null && other.getClusterVersion().equals(this.getClusterVersion()) == falsereturn false
        if (other.getSnapshotType() == null ^ this.getSnapshotType() == nullreturn false;
        if (other.getSnapshotType() != null && other.getSnapshotType().equals(this.getSnapshotType()) == falsereturn false
        if (other.getNodeType() == null ^ this.getNodeType() == nullreturn false;
        if (other.getNodeType() != null && other.getNodeType().equals(this.getNodeType()) == falsereturn false
        if (other.getNumberOfNodes() == null ^ this.getNumberOfNodes() == nullreturn false;
        if (other.getNumberOfNodes() != null && other.getNumberOfNodes().equals(this.getNumberOfNodes()) == falsereturn false
        if (other.getDBName() == null ^ this.getDBName() == nullreturn false;
        if (other.getDBName() != null && other.getDBName().equals(this.getDBName()) == falsereturn false
        if (other.getVpcId() == null ^ this.getVpcId() == nullreturn false;
        if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == falsereturn false
        if (other.isEncrypted() == null ^ this.isEncrypted() == nullreturn false;
        if (other.isEncrypted() != null && other.isEncrypted().equals(this.isEncrypted()) == falsereturn false
        if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == nullreturn false;
        if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == falsereturn false
        if (other.isEncryptedWithHSM() == null ^ this.isEncryptedWithHSM() == nullreturn false;
        if (other.isEncryptedWithHSM() != null && other.isEncryptedWithHSM().equals(this.isEncryptedWithHSM()) == falsereturn false
        if (other.getAccountsWithRestoreAccess() == null ^ this.getAccountsWithRestoreAccess() == nullreturn false;
        if (other.getAccountsWithRestoreAccess() != null && other.getAccountsWithRestoreAccess().equals(this.getAccountsWithRestoreAccess()) == falsereturn false
        if (other.getOwnerAccount() == null ^ this.getOwnerAccount() == nullreturn false;
        if (other.getOwnerAccount() != null && other.getOwnerAccount().equals(this.getOwnerAccount()) == falsereturn false
        if (other.getTotalBackupSizeInMegaBytes() == null ^ this.getTotalBackupSizeInMegaBytes() == nullreturn false;
        if (other.getTotalBackupSizeInMegaBytes() != null && other.getTotalBackupSizeInMegaBytes().equals(this.getTotalBackupSizeInMegaBytes()) == falsereturn false
        if (other.getActualIncrementalBackupSizeInMegaBytes() == null ^ this.getActualIncrementalBackupSizeInMegaBytes() == nullreturn false;
        if (other.getActualIncrementalBackupSizeInMegaBytes() != null && other.getActualIncrementalBackupSizeInMegaBytes().equals(this.getActualIncrementalBackupSizeInMegaBytes()) == falsereturn false
        if (other.getBackupProgressInMegaBytes() == null ^ this.getBackupProgressInMegaBytes() == nullreturn false;
        if (other.getBackupProgressInMegaBytes() != null && other.getBackupProgressInMegaBytes().equals(this.getBackupProgressInMegaBytes()) == falsereturn false
        if (other.getCurrentBackupRateInMegaBytesPerSecond() == null ^ this.getCurrentBackupRateInMegaBytesPerSecond() == nullreturn false;
        if (other.getCurrentBackupRateInMegaBytesPerSecond() != null && other.getCurrentBackupRateInMegaBytesPerSecond().equals(this.getCurrentBackupRateInMegaBytesPerSecond()) == falsereturn false
        if (other.getEstimatedSecondsToCompletion() == null ^ this.getEstimatedSecondsToCompletion() == nullreturn false;
        if (other.getEstimatedSecondsToCompletion() != null && other.getEstimatedSecondsToCompletion().equals(this.getEstimatedSecondsToCompletion()) == falsereturn false
        if (other.getElapsedTimeInSeconds() == null ^ this.getElapsedTimeInSeconds() == nullreturn false;
        if (other.getElapsedTimeInSeconds() != null && other.getElapsedTimeInSeconds().equals(this.getElapsedTimeInSeconds()) == falsereturn false
        if (other.getSourceRegion() == null ^ this.getSourceRegion() == nullreturn false;
        if (other.getSourceRegion() != null && other.getSourceRegion().equals(this.getSourceRegion()) == falsereturn false
        if (other.getTags() == null ^ this.getTags() == nullreturn false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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