com.amazonaws.services.redshiftserverless.model.Snapshot Maven / Gradle / Ivy
Show all versions of aws-java-sdk-redshiftserverless Show documentation
/*
* Copyright 2019-2024 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.redshiftserverless.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A snapshot object that contains databases.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Snapshot implements Serializable, Cloneable, StructuredPojo {
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
*
*/
private java.util.List accountsWithProvisionedRestoreAccess;
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
*
*/
private java.util.List accountsWithRestoreAccess;
/**
*
* The size of the incremental backup in megabytes.
*
*/
private Double actualIncrementalBackupSizeInMegaBytes;
/**
*
* The Amazon Resource Name (ARN) for the namespace's admin user credentials secret.
*
*/
private String adminPasswordSecretArn;
/**
*
* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials
* secret.
*
*/
private String adminPasswordSecretKmsKeyId;
/**
*
* The username of the database within a snapshot.
*
*/
private String adminUsername;
/**
*
* The size in megabytes of the data that has been backed up to a snapshot.
*
*/
private Double backupProgressInMegaBytes;
/**
*
* The rate at which data is backed up into a snapshot in megabytes per second.
*
*/
private Double currentBackupRateInMegaBytesPerSecond;
/**
*
* The amount of time it took to back up data into a snapshot.
*
*/
private Long elapsedTimeInSeconds;
/**
*
* The estimated amount of seconds until the snapshot completes backup.
*
*/
private Long estimatedSecondsToCompletion;
/**
*
* The unique identifier of the KMS key used to encrypt the snapshot.
*
*/
private String kmsKeyId;
/**
*
* The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
*
*/
private String namespaceArn;
/**
*
* The name of the namepsace.
*
*/
private String namespaceName;
/**
*
* The owner Amazon Web Services; account of the snapshot.
*
*/
private String ownerAccount;
/**
*
* The Amazon Resource Name (ARN) of the snapshot.
*
*/
private String snapshotArn;
/**
*
* The timestamp of when the snapshot was created.
*
*/
private java.util.Date snapshotCreateTime;
/**
*
* The name of the snapshot.
*
*/
private String snapshotName;
/**
*
* The amount of days until the snapshot is deleted.
*
*/
private Integer snapshotRemainingDays;
/**
*
* The period of time, in days, of how long the snapshot is retained.
*
*/
private Integer snapshotRetentionPeriod;
/**
*
* The timestamp of when data within the snapshot started getting retained.
*
*/
private java.util.Date snapshotRetentionStartTime;
/**
*
* The status of the snapshot.
*
*/
private String status;
/**
*
* The total size, in megabytes, of how big the snapshot is.
*
*/
private Double totalBackupSizeInMegaBytes;
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
*
*
* @return All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
*/
public java.util.List getAccountsWithProvisionedRestoreAccess() {
return accountsWithProvisionedRestoreAccess;
}
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
*
*
* @param accountsWithProvisionedRestoreAccess
* All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
*/
public void setAccountsWithProvisionedRestoreAccess(java.util.Collection accountsWithProvisionedRestoreAccess) {
if (accountsWithProvisionedRestoreAccess == null) {
this.accountsWithProvisionedRestoreAccess = null;
return;
}
this.accountsWithProvisionedRestoreAccess = new java.util.ArrayList(accountsWithProvisionedRestoreAccess);
}
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAccountsWithProvisionedRestoreAccess(java.util.Collection)} or
* {@link #withAccountsWithProvisionedRestoreAccess(java.util.Collection)} if you want to override the existing
* values.
*
*
* @param accountsWithProvisionedRestoreAccess
* All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withAccountsWithProvisionedRestoreAccess(String... accountsWithProvisionedRestoreAccess) {
if (this.accountsWithProvisionedRestoreAccess == null) {
setAccountsWithProvisionedRestoreAccess(new java.util.ArrayList(accountsWithProvisionedRestoreAccess.length));
}
for (String ele : accountsWithProvisionedRestoreAccess) {
this.accountsWithProvisionedRestoreAccess.add(ele);
}
return this;
}
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
*
*
* @param accountsWithProvisionedRestoreAccess
* All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withAccountsWithProvisionedRestoreAccess(java.util.Collection accountsWithProvisionedRestoreAccess) {
setAccountsWithProvisionedRestoreAccess(accountsWithProvisionedRestoreAccess);
return this;
}
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
*
*
* @return All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
*/
public java.util.List getAccountsWithRestoreAccess() {
return accountsWithRestoreAccess;
}
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
*
*
* @param accountsWithRestoreAccess
* All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
*/
public void setAccountsWithRestoreAccess(java.util.Collection accountsWithRestoreAccess) {
if (accountsWithRestoreAccess == null) {
this.accountsWithRestoreAccess = null;
return;
}
this.accountsWithRestoreAccess = new java.util.ArrayList(accountsWithRestoreAccess);
}
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAccountsWithRestoreAccess(java.util.Collection)} or
* {@link #withAccountsWithRestoreAccess(java.util.Collection)} if you want to override the existing values.
*
*
* @param accountsWithRestoreAccess
* All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withAccountsWithRestoreAccess(String... accountsWithRestoreAccess) {
if (this.accountsWithRestoreAccess == null) {
setAccountsWithRestoreAccess(new java.util.ArrayList(accountsWithRestoreAccess.length));
}
for (String ele : accountsWithRestoreAccess) {
this.accountsWithRestoreAccess.add(ele);
}
return this;
}
/**
*
* All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
*
*
* @param accountsWithRestoreAccess
* All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withAccountsWithRestoreAccess(java.util.Collection accountsWithRestoreAccess) {
setAccountsWithRestoreAccess(accountsWithRestoreAccess);
return this;
}
/**
*
* The size of the incremental backup in megabytes.
*
*
* @param actualIncrementalBackupSizeInMegaBytes
* The size of the incremental backup in megabytes.
*/
public void setActualIncrementalBackupSizeInMegaBytes(Double actualIncrementalBackupSizeInMegaBytes) {
this.actualIncrementalBackupSizeInMegaBytes = actualIncrementalBackupSizeInMegaBytes;
}
/**
*
* The size of the incremental backup in megabytes.
*
*
* @return The size of the incremental backup in megabytes.
*/
public Double getActualIncrementalBackupSizeInMegaBytes() {
return this.actualIncrementalBackupSizeInMegaBytes;
}
/**
*
* The size of the incremental backup in megabytes.
*
*
* @param actualIncrementalBackupSizeInMegaBytes
* The size of the incremental backup in megabytes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withActualIncrementalBackupSizeInMegaBytes(Double actualIncrementalBackupSizeInMegaBytes) {
setActualIncrementalBackupSizeInMegaBytes(actualIncrementalBackupSizeInMegaBytes);
return this;
}
/**
*
* The Amazon Resource Name (ARN) for the namespace's admin user credentials secret.
*
*
* @param adminPasswordSecretArn
* The Amazon Resource Name (ARN) for the namespace's admin user credentials secret.
*/
public void setAdminPasswordSecretArn(String adminPasswordSecretArn) {
this.adminPasswordSecretArn = adminPasswordSecretArn;
}
/**
*
* The Amazon Resource Name (ARN) for the namespace's admin user credentials secret.
*
*
* @return The Amazon Resource Name (ARN) for the namespace's admin user credentials secret.
*/
public String getAdminPasswordSecretArn() {
return this.adminPasswordSecretArn;
}
/**
*
* The Amazon Resource Name (ARN) for the namespace's admin user credentials secret.
*
*
* @param adminPasswordSecretArn
* The Amazon Resource Name (ARN) for the namespace's admin user credentials secret.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withAdminPasswordSecretArn(String adminPasswordSecretArn) {
setAdminPasswordSecretArn(adminPasswordSecretArn);
return this;
}
/**
*
* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials
* secret.
*
*
* @param adminPasswordSecretKmsKeyId
* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials
* secret.
*/
public void setAdminPasswordSecretKmsKeyId(String adminPasswordSecretKmsKeyId) {
this.adminPasswordSecretKmsKeyId = adminPasswordSecretKmsKeyId;
}
/**
*
* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials
* secret.
*
*
* @return The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin
* credentials secret.
*/
public String getAdminPasswordSecretKmsKeyId() {
return this.adminPasswordSecretKmsKeyId;
}
/**
*
* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials
* secret.
*
*
* @param adminPasswordSecretKmsKeyId
* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials
* secret.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withAdminPasswordSecretKmsKeyId(String adminPasswordSecretKmsKeyId) {
setAdminPasswordSecretKmsKeyId(adminPasswordSecretKmsKeyId);
return this;
}
/**
*
* The username of the database within a snapshot.
*
*
* @param adminUsername
* The username of the database within a snapshot.
*/
public void setAdminUsername(String adminUsername) {
this.adminUsername = adminUsername;
}
/**
*
* The username of the database within a snapshot.
*
*
* @return The username of the database within a snapshot.
*/
public String getAdminUsername() {
return this.adminUsername;
}
/**
*
* The username of the database within a snapshot.
*
*
* @param adminUsername
* The username of the database within a snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withAdminUsername(String adminUsername) {
setAdminUsername(adminUsername);
return this;
}
/**
*
* The size in megabytes of the data that has been backed up to a snapshot.
*
*
* @param backupProgressInMegaBytes
* The size in megabytes of the data that has been backed up to a snapshot.
*/
public void setBackupProgressInMegaBytes(Double backupProgressInMegaBytes) {
this.backupProgressInMegaBytes = backupProgressInMegaBytes;
}
/**
*
* The size in megabytes of the data that has been backed up to a snapshot.
*
*
* @return The size in megabytes of the data that has been backed up to a snapshot.
*/
public Double getBackupProgressInMegaBytes() {
return this.backupProgressInMegaBytes;
}
/**
*
* The size in megabytes of the data that has been backed up to a snapshot.
*
*
* @param backupProgressInMegaBytes
* The size in megabytes of the data that has been backed up to a snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withBackupProgressInMegaBytes(Double backupProgressInMegaBytes) {
setBackupProgressInMegaBytes(backupProgressInMegaBytes);
return this;
}
/**
*
* The rate at which data is backed up into a snapshot in megabytes per second.
*
*
* @param currentBackupRateInMegaBytesPerSecond
* The rate at which data is backed up into a snapshot in megabytes per second.
*/
public void setCurrentBackupRateInMegaBytesPerSecond(Double currentBackupRateInMegaBytesPerSecond) {
this.currentBackupRateInMegaBytesPerSecond = currentBackupRateInMegaBytesPerSecond;
}
/**
*
* The rate at which data is backed up into a snapshot in megabytes per second.
*
*
* @return The rate at which data is backed up into a snapshot in megabytes per second.
*/
public Double getCurrentBackupRateInMegaBytesPerSecond() {
return this.currentBackupRateInMegaBytesPerSecond;
}
/**
*
* The rate at which data is backed up into a snapshot in megabytes per second.
*
*
* @param currentBackupRateInMegaBytesPerSecond
* The rate at which data is backed up into a snapshot in megabytes per second.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withCurrentBackupRateInMegaBytesPerSecond(Double currentBackupRateInMegaBytesPerSecond) {
setCurrentBackupRateInMegaBytesPerSecond(currentBackupRateInMegaBytesPerSecond);
return this;
}
/**
*
* The amount of time it took to back up data into a snapshot.
*
*
* @param elapsedTimeInSeconds
* The amount of time it took to back up data into a snapshot.
*/
public void setElapsedTimeInSeconds(Long elapsedTimeInSeconds) {
this.elapsedTimeInSeconds = elapsedTimeInSeconds;
}
/**
*
* The amount of time it took to back up data into a snapshot.
*
*
* @return The amount of time it took to back up data into a snapshot.
*/
public Long getElapsedTimeInSeconds() {
return this.elapsedTimeInSeconds;
}
/**
*
* The amount of time it took to back up data into a snapshot.
*
*
* @param elapsedTimeInSeconds
* The amount of time it took to back up data into a snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withElapsedTimeInSeconds(Long elapsedTimeInSeconds) {
setElapsedTimeInSeconds(elapsedTimeInSeconds);
return this;
}
/**
*
* The estimated amount of seconds until the snapshot completes backup.
*
*
* @param estimatedSecondsToCompletion
* The estimated amount of seconds until the snapshot completes backup.
*/
public void setEstimatedSecondsToCompletion(Long estimatedSecondsToCompletion) {
this.estimatedSecondsToCompletion = estimatedSecondsToCompletion;
}
/**
*
* The estimated amount of seconds until the snapshot completes backup.
*
*
* @return The estimated amount of seconds until the snapshot completes backup.
*/
public Long getEstimatedSecondsToCompletion() {
return this.estimatedSecondsToCompletion;
}
/**
*
* The estimated amount of seconds until the snapshot completes backup.
*
*
* @param estimatedSecondsToCompletion
* The estimated amount of seconds until the snapshot completes backup.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withEstimatedSecondsToCompletion(Long estimatedSecondsToCompletion) {
setEstimatedSecondsToCompletion(estimatedSecondsToCompletion);
return this;
}
/**
*
* The unique identifier of the KMS key used to encrypt the snapshot.
*
*
* @param kmsKeyId
* The unique identifier of the KMS key used to encrypt the snapshot.
*/
public void setKmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
/**
*
* The unique identifier of the KMS key used to encrypt the snapshot.
*
*
* @return The unique identifier of the KMS key used to encrypt the snapshot.
*/
public String getKmsKeyId() {
return this.kmsKeyId;
}
/**
*
* The unique identifier of the KMS key used to encrypt the snapshot.
*
*
* @param kmsKeyId
* The unique identifier of the KMS key used to encrypt the snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withKmsKeyId(String kmsKeyId) {
setKmsKeyId(kmsKeyId);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
*
*
* @param namespaceArn
* The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
*/
public void setNamespaceArn(String namespaceArn) {
this.namespaceArn = namespaceArn;
}
/**
*
* The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
*
*
* @return The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
*/
public String getNamespaceArn() {
return this.namespaceArn;
}
/**
*
* The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
*
*
* @param namespaceArn
* The Amazon Resource Name (ARN) of the namespace the snapshot was created from.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withNamespaceArn(String namespaceArn) {
setNamespaceArn(namespaceArn);
return this;
}
/**
*
* The name of the namepsace.
*
*
* @param namespaceName
* The name of the namepsace.
*/
public void setNamespaceName(String namespaceName) {
this.namespaceName = namespaceName;
}
/**
*
* The name of the namepsace.
*
*
* @return The name of the namepsace.
*/
public String getNamespaceName() {
return this.namespaceName;
}
/**
*
* The name of the namepsace.
*
*
* @param namespaceName
* The name of the namepsace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withNamespaceName(String namespaceName) {
setNamespaceName(namespaceName);
return this;
}
/**
*
* The owner Amazon Web Services; account of the snapshot.
*
*
* @param ownerAccount
* The owner Amazon Web Services; account of the snapshot.
*/
public void setOwnerAccount(String ownerAccount) {
this.ownerAccount = ownerAccount;
}
/**
*
* The owner Amazon Web Services; account of the snapshot.
*
*
* @return The owner Amazon Web Services; account of the snapshot.
*/
public String getOwnerAccount() {
return this.ownerAccount;
}
/**
*
* The owner Amazon Web Services; account of the snapshot.
*
*
* @param ownerAccount
* The owner Amazon Web Services; account of the snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withOwnerAccount(String ownerAccount) {
setOwnerAccount(ownerAccount);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the snapshot.
*
*
* @param snapshotArn
* The Amazon Resource Name (ARN) of the snapshot.
*/
public void setSnapshotArn(String snapshotArn) {
this.snapshotArn = snapshotArn;
}
/**
*
* The Amazon Resource Name (ARN) of the snapshot.
*
*
* @return The Amazon Resource Name (ARN) of the snapshot.
*/
public String getSnapshotArn() {
return this.snapshotArn;
}
/**
*
* The Amazon Resource Name (ARN) of the snapshot.
*
*
* @param snapshotArn
* The Amazon Resource Name (ARN) of the snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withSnapshotArn(String snapshotArn) {
setSnapshotArn(snapshotArn);
return this;
}
/**
*
* The timestamp of when the snapshot was created.
*
*
* @param snapshotCreateTime
* The timestamp of when the snapshot was created.
*/
public void setSnapshotCreateTime(java.util.Date snapshotCreateTime) {
this.snapshotCreateTime = snapshotCreateTime;
}
/**
*
* The timestamp of when the snapshot was created.
*
*
* @return The timestamp of when the snapshot was created.
*/
public java.util.Date getSnapshotCreateTime() {
return this.snapshotCreateTime;
}
/**
*
* The timestamp of when the snapshot was created.
*
*
* @param snapshotCreateTime
* The timestamp of when the snapshot was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withSnapshotCreateTime(java.util.Date snapshotCreateTime) {
setSnapshotCreateTime(snapshotCreateTime);
return this;
}
/**
*
* The name of the snapshot.
*
*
* @param snapshotName
* The name of the snapshot.
*/
public void setSnapshotName(String snapshotName) {
this.snapshotName = snapshotName;
}
/**
*
* The name of the snapshot.
*
*
* @return The name of the snapshot.
*/
public String getSnapshotName() {
return this.snapshotName;
}
/**
*
* The name of the snapshot.
*
*
* @param snapshotName
* The name of the snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withSnapshotName(String snapshotName) {
setSnapshotName(snapshotName);
return this;
}
/**
*
* The amount of days until the snapshot is deleted.
*
*
* @param snapshotRemainingDays
* The amount of days until the snapshot is deleted.
*/
public void setSnapshotRemainingDays(Integer snapshotRemainingDays) {
this.snapshotRemainingDays = snapshotRemainingDays;
}
/**
*
* The amount of days until the snapshot is deleted.
*
*
* @return The amount of days until the snapshot is deleted.
*/
public Integer getSnapshotRemainingDays() {
return this.snapshotRemainingDays;
}
/**
*
* The amount of days until the snapshot is deleted.
*
*
* @param snapshotRemainingDays
* The amount of days until the snapshot is deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withSnapshotRemainingDays(Integer snapshotRemainingDays) {
setSnapshotRemainingDays(snapshotRemainingDays);
return this;
}
/**
*
* The period of time, in days, of how long the snapshot is retained.
*
*
* @param snapshotRetentionPeriod
* The period of time, in days, of how long the snapshot is retained.
*/
public void setSnapshotRetentionPeriod(Integer snapshotRetentionPeriod) {
this.snapshotRetentionPeriod = snapshotRetentionPeriod;
}
/**
*
* The period of time, in days, of how long the snapshot is retained.
*
*
* @return The period of time, in days, of how long the snapshot is retained.
*/
public Integer getSnapshotRetentionPeriod() {
return this.snapshotRetentionPeriod;
}
/**
*
* The period of time, in days, of how long the snapshot is retained.
*
*
* @param snapshotRetentionPeriod
* The period of time, in days, of how long the snapshot is retained.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withSnapshotRetentionPeriod(Integer snapshotRetentionPeriod) {
setSnapshotRetentionPeriod(snapshotRetentionPeriod);
return this;
}
/**
*
* The timestamp of when data within the snapshot started getting retained.
*
*
* @param snapshotRetentionStartTime
* The timestamp of when data within the snapshot started getting retained.
*/
public void setSnapshotRetentionStartTime(java.util.Date snapshotRetentionStartTime) {
this.snapshotRetentionStartTime = snapshotRetentionStartTime;
}
/**
*
* The timestamp of when data within the snapshot started getting retained.
*
*
* @return The timestamp of when data within the snapshot started getting retained.
*/
public java.util.Date getSnapshotRetentionStartTime() {
return this.snapshotRetentionStartTime;
}
/**
*
* The timestamp of when data within the snapshot started getting retained.
*
*
* @param snapshotRetentionStartTime
* The timestamp of when data within the snapshot started getting retained.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withSnapshotRetentionStartTime(java.util.Date snapshotRetentionStartTime) {
setSnapshotRetentionStartTime(snapshotRetentionStartTime);
return this;
}
/**
*
* The status of the snapshot.
*
*
* @param status
* The status of the snapshot.
* @see SnapshotStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the snapshot.
*
*
* @return The status of the snapshot.
* @see SnapshotStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the snapshot.
*
*
* @param status
* The status of the snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
* @see SnapshotStatus
*/
public Snapshot withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the snapshot.
*
*
* @param status
* The status of the snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
* @see SnapshotStatus
*/
public Snapshot withStatus(SnapshotStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The total size, in megabytes, of how big the snapshot is.
*
*
* @param totalBackupSizeInMegaBytes
* The total size, in megabytes, of how big the snapshot is.
*/
public void setTotalBackupSizeInMegaBytes(Double totalBackupSizeInMegaBytes) {
this.totalBackupSizeInMegaBytes = totalBackupSizeInMegaBytes;
}
/**
*
* The total size, in megabytes, of how big the snapshot is.
*
*
* @return The total size, in megabytes, of how big the snapshot is.
*/
public Double getTotalBackupSizeInMegaBytes() {
return this.totalBackupSizeInMegaBytes;
}
/**
*
* The total size, in megabytes, of how big the snapshot is.
*
*
* @param totalBackupSizeInMegaBytes
* The total size, in megabytes, of how big the snapshot is.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Snapshot withTotalBackupSizeInMegaBytes(Double totalBackupSizeInMegaBytes) {
setTotalBackupSizeInMegaBytes(totalBackupSizeInMegaBytes);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getAccountsWithProvisionedRestoreAccess() != null)
sb.append("AccountsWithProvisionedRestoreAccess: ").append(getAccountsWithProvisionedRestoreAccess()).append(",");
if (getAccountsWithRestoreAccess() != null)
sb.append("AccountsWithRestoreAccess: ").append(getAccountsWithRestoreAccess()).append(",");
if (getActualIncrementalBackupSizeInMegaBytes() != null)
sb.append("ActualIncrementalBackupSizeInMegaBytes: ").append(getActualIncrementalBackupSizeInMegaBytes()).append(",");
if (getAdminPasswordSecretArn() != null)
sb.append("AdminPasswordSecretArn: ").append(getAdminPasswordSecretArn()).append(",");
if (getAdminPasswordSecretKmsKeyId() != null)
sb.append("AdminPasswordSecretKmsKeyId: ").append(getAdminPasswordSecretKmsKeyId()).append(",");
if (getAdminUsername() != null)
sb.append("AdminUsername: ").append(getAdminUsername()).append(",");
if (getBackupProgressInMegaBytes() != null)
sb.append("BackupProgressInMegaBytes: ").append(getBackupProgressInMegaBytes()).append(",");
if (getCurrentBackupRateInMegaBytesPerSecond() != null)
sb.append("CurrentBackupRateInMegaBytesPerSecond: ").append(getCurrentBackupRateInMegaBytesPerSecond()).append(",");
if (getElapsedTimeInSeconds() != null)
sb.append("ElapsedTimeInSeconds: ").append(getElapsedTimeInSeconds()).append(",");
if (getEstimatedSecondsToCompletion() != null)
sb.append("EstimatedSecondsToCompletion: ").append(getEstimatedSecondsToCompletion()).append(",");
if (getKmsKeyId() != null)
sb.append("KmsKeyId: ").append(getKmsKeyId()).append(",");
if (getNamespaceArn() != null)
sb.append("NamespaceArn: ").append(getNamespaceArn()).append(",");
if (getNamespaceName() != null)
sb.append("NamespaceName: ").append(getNamespaceName()).append(",");
if (getOwnerAccount() != null)
sb.append("OwnerAccount: ").append(getOwnerAccount()).append(",");
if (getSnapshotArn() != null)
sb.append("SnapshotArn: ").append(getSnapshotArn()).append(",");
if (getSnapshotCreateTime() != null)
sb.append("SnapshotCreateTime: ").append(getSnapshotCreateTime()).append(",");
if (getSnapshotName() != null)
sb.append("SnapshotName: ").append(getSnapshotName()).append(",");
if (getSnapshotRemainingDays() != null)
sb.append("SnapshotRemainingDays: ").append(getSnapshotRemainingDays()).append(",");
if (getSnapshotRetentionPeriod() != null)
sb.append("SnapshotRetentionPeriod: ").append(getSnapshotRetentionPeriod()).append(",");
if (getSnapshotRetentionStartTime() != null)
sb.append("SnapshotRetentionStartTime: ").append(getSnapshotRetentionStartTime()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getTotalBackupSizeInMegaBytes() != null)
sb.append("TotalBackupSizeInMegaBytes: ").append(getTotalBackupSizeInMegaBytes());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Snapshot == false)
return false;
Snapshot other = (Snapshot) obj;
if (other.getAccountsWithProvisionedRestoreAccess() == null ^ this.getAccountsWithProvisionedRestoreAccess() == null)
return false;
if (other.getAccountsWithProvisionedRestoreAccess() != null
&& other.getAccountsWithProvisionedRestoreAccess().equals(this.getAccountsWithProvisionedRestoreAccess()) == false)
return false;
if (other.getAccountsWithRestoreAccess() == null ^ this.getAccountsWithRestoreAccess() == null)
return false;
if (other.getAccountsWithRestoreAccess() != null && other.getAccountsWithRestoreAccess().equals(this.getAccountsWithRestoreAccess()) == false)
return false;
if (other.getActualIncrementalBackupSizeInMegaBytes() == null ^ this.getActualIncrementalBackupSizeInMegaBytes() == null)
return false;
if (other.getActualIncrementalBackupSizeInMegaBytes() != null
&& other.getActualIncrementalBackupSizeInMegaBytes().equals(this.getActualIncrementalBackupSizeInMegaBytes()) == false)
return false;
if (other.getAdminPasswordSecretArn() == null ^ this.getAdminPasswordSecretArn() == null)
return false;
if (other.getAdminPasswordSecretArn() != null && other.getAdminPasswordSecretArn().equals(this.getAdminPasswordSecretArn()) == false)
return false;
if (other.getAdminPasswordSecretKmsKeyId() == null ^ this.getAdminPasswordSecretKmsKeyId() == null)
return false;
if (other.getAdminPasswordSecretKmsKeyId() != null && other.getAdminPasswordSecretKmsKeyId().equals(this.getAdminPasswordSecretKmsKeyId()) == false)
return false;
if (other.getAdminUsername() == null ^ this.getAdminUsername() == null)
return false;
if (other.getAdminUsername() != null && other.getAdminUsername().equals(this.getAdminUsername()) == false)
return false;
if (other.getBackupProgressInMegaBytes() == null ^ this.getBackupProgressInMegaBytes() == null)
return false;
if (other.getBackupProgressInMegaBytes() != null && other.getBackupProgressInMegaBytes().equals(this.getBackupProgressInMegaBytes()) == false)
return false;
if (other.getCurrentBackupRateInMegaBytesPerSecond() == null ^ this.getCurrentBackupRateInMegaBytesPerSecond() == null)
return false;
if (other.getCurrentBackupRateInMegaBytesPerSecond() != null
&& other.getCurrentBackupRateInMegaBytesPerSecond().equals(this.getCurrentBackupRateInMegaBytesPerSecond()) == false)
return false;
if (other.getElapsedTimeInSeconds() == null ^ this.getElapsedTimeInSeconds() == null)
return false;
if (other.getElapsedTimeInSeconds() != null && other.getElapsedTimeInSeconds().equals(this.getElapsedTimeInSeconds()) == false)
return false;
if (other.getEstimatedSecondsToCompletion() == null ^ this.getEstimatedSecondsToCompletion() == null)
return false;
if (other.getEstimatedSecondsToCompletion() != null && other.getEstimatedSecondsToCompletion().equals(this.getEstimatedSecondsToCompletion()) == false)
return false;
if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null)
return false;
if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false)
return false;
if (other.getNamespaceArn() == null ^ this.getNamespaceArn() == null)
return false;
if (other.getNamespaceArn() != null && other.getNamespaceArn().equals(this.getNamespaceArn()) == false)
return false;
if (other.getNamespaceName() == null ^ this.getNamespaceName() == null)
return false;
if (other.getNamespaceName() != null && other.getNamespaceName().equals(this.getNamespaceName()) == false)
return false;
if (other.getOwnerAccount() == null ^ this.getOwnerAccount() == null)
return false;
if (other.getOwnerAccount() != null && other.getOwnerAccount().equals(this.getOwnerAccount()) == false)
return false;
if (other.getSnapshotArn() == null ^ this.getSnapshotArn() == null)
return false;
if (other.getSnapshotArn() != null && other.getSnapshotArn().equals(this.getSnapshotArn()) == false)
return false;
if (other.getSnapshotCreateTime() == null ^ this.getSnapshotCreateTime() == null)
return false;
if (other.getSnapshotCreateTime() != null && other.getSnapshotCreateTime().equals(this.getSnapshotCreateTime()) == false)
return false;
if (other.getSnapshotName() == null ^ this.getSnapshotName() == null)
return false;
if (other.getSnapshotName() != null && other.getSnapshotName().equals(this.getSnapshotName()) == false)
return false;
if (other.getSnapshotRemainingDays() == null ^ this.getSnapshotRemainingDays() == null)
return false;
if (other.getSnapshotRemainingDays() != null && other.getSnapshotRemainingDays().equals(this.getSnapshotRemainingDays()) == false)
return false;
if (other.getSnapshotRetentionPeriod() == null ^ this.getSnapshotRetentionPeriod() == null)
return false;
if (other.getSnapshotRetentionPeriod() != null && other.getSnapshotRetentionPeriod().equals(this.getSnapshotRetentionPeriod()) == false)
return false;
if (other.getSnapshotRetentionStartTime() == null ^ this.getSnapshotRetentionStartTime() == null)
return false;
if (other.getSnapshotRetentionStartTime() != null && other.getSnapshotRetentionStartTime().equals(this.getSnapshotRetentionStartTime()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getTotalBackupSizeInMegaBytes() == null ^ this.getTotalBackupSizeInMegaBytes() == null)
return false;
if (other.getTotalBackupSizeInMegaBytes() != null && other.getTotalBackupSizeInMegaBytes().equals(this.getTotalBackupSizeInMegaBytes()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAccountsWithProvisionedRestoreAccess() == null) ? 0 : getAccountsWithProvisionedRestoreAccess().hashCode());
hashCode = prime * hashCode + ((getAccountsWithRestoreAccess() == null) ? 0 : getAccountsWithRestoreAccess().hashCode());
hashCode = prime * hashCode + ((getActualIncrementalBackupSizeInMegaBytes() == null) ? 0 : getActualIncrementalBackupSizeInMegaBytes().hashCode());
hashCode = prime * hashCode + ((getAdminPasswordSecretArn() == null) ? 0 : getAdminPasswordSecretArn().hashCode());
hashCode = prime * hashCode + ((getAdminPasswordSecretKmsKeyId() == null) ? 0 : getAdminPasswordSecretKmsKeyId().hashCode());
hashCode = prime * hashCode + ((getAdminUsername() == null) ? 0 : getAdminUsername().hashCode());
hashCode = prime * hashCode + ((getBackupProgressInMegaBytes() == null) ? 0 : getBackupProgressInMegaBytes().hashCode());
hashCode = prime * hashCode + ((getCurrentBackupRateInMegaBytesPerSecond() == null) ? 0 : getCurrentBackupRateInMegaBytesPerSecond().hashCode());
hashCode = prime * hashCode + ((getElapsedTimeInSeconds() == null) ? 0 : getElapsedTimeInSeconds().hashCode());
hashCode = prime * hashCode + ((getEstimatedSecondsToCompletion() == null) ? 0 : getEstimatedSecondsToCompletion().hashCode());
hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode());
hashCode = prime * hashCode + ((getNamespaceArn() == null) ? 0 : getNamespaceArn().hashCode());
hashCode = prime * hashCode + ((getNamespaceName() == null) ? 0 : getNamespaceName().hashCode());
hashCode = prime * hashCode + ((getOwnerAccount() == null) ? 0 : getOwnerAccount().hashCode());
hashCode = prime * hashCode + ((getSnapshotArn() == null) ? 0 : getSnapshotArn().hashCode());
hashCode = prime * hashCode + ((getSnapshotCreateTime() == null) ? 0 : getSnapshotCreateTime().hashCode());
hashCode = prime * hashCode + ((getSnapshotName() == null) ? 0 : getSnapshotName().hashCode());
hashCode = prime * hashCode + ((getSnapshotRemainingDays() == null) ? 0 : getSnapshotRemainingDays().hashCode());
hashCode = prime * hashCode + ((getSnapshotRetentionPeriod() == null) ? 0 : getSnapshotRetentionPeriod().hashCode());
hashCode = prime * hashCode + ((getSnapshotRetentionStartTime() == null) ? 0 : getSnapshotRetentionStartTime().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getTotalBackupSizeInMegaBytes() == null) ? 0 : getTotalBackupSizeInMegaBytes().hashCode());
return hashCode;
}
@Override
public Snapshot clone() {
try {
return (Snapshot) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.redshiftserverless.model.transform.SnapshotMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}