/* * Copyright 2018-2023 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.cloudhsmv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information about a backup of an AWS CloudHSM cluster. All backup objects contain the BackupId
,
* BackupState
, ClusterId
, and CreateTimestamp
parameters. Backups that were
* copied into a destination region additionally contain the CopyTimestamp
, SourceBackup
,
* SourceCluster
, and SourceRegion
parameters. A backup that is pending deletion will include
* the DeleteTimestamp
parameter.
*
* The identifier (ID) of the backup. *
*/ private String backupId; /** ** The state of the backup. *
*/ private String backupState; /** ** The identifier (ID) of the cluster that was backed up. *
*/ private String clusterId; /** ** The date and time when the backup was created. *
*/ private java.util.Date createTimestamp; /** ** The date and time when the backup was copied from a source backup. *
*/ private java.util.Date copyTimestamp; /** *
* Specifies whether the service should exempt a backup from the retention policy for the cluster. True
* exempts a backup from the retention policy. False
means the service applies the backup retention
* policy defined at the cluster.
*
* The AWS Region that contains the source backup from which the new backup was copied. *
*/ private String sourceRegion; /** ** The identifier (ID) of the source backup from which the new backup was copied. *
*/ private String sourceBackup; /** ** The identifier (ID) of the cluster containing the source backup from which the new backup was copied. *
*/ private String sourceCluster; /** ** The date and time when the backup will be permanently deleted. *
*/ private java.util.Date deleteTimestamp; /** ** The list of tags for the backup. *
*/ private java.util.List* The identifier (ID) of the backup. *
* * @param backupId * The identifier (ID) of the backup. */ public void setBackupId(String backupId) { this.backupId = backupId; } /** ** The identifier (ID) of the backup. *
* * @return The identifier (ID) of the backup. */ public String getBackupId() { return this.backupId; } /** ** The identifier (ID) of the backup. *
* * @param backupId * The identifier (ID) of the backup. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withBackupId(String backupId) { setBackupId(backupId); return this; } /** ** The state of the backup. *
* * @param backupState * The state of the backup. * @see BackupState */ public void setBackupState(String backupState) { this.backupState = backupState; } /** ** The state of the backup. *
* * @return The state of the backup. * @see BackupState */ public String getBackupState() { return this.backupState; } /** ** The state of the backup. *
* * @param backupState * The state of the backup. * @return Returns a reference to this object so that method calls can be chained together. * @see BackupState */ public Backup withBackupState(String backupState) { setBackupState(backupState); return this; } /** ** The state of the backup. *
* * @param backupState * The state of the backup. * @return Returns a reference to this object so that method calls can be chained together. * @see BackupState */ public Backup withBackupState(BackupState backupState) { this.backupState = backupState.toString(); return this; } /** ** The identifier (ID) of the cluster that was backed up. *
* * @param clusterId * The identifier (ID) of the cluster that was backed up. */ public void setClusterId(String clusterId) { this.clusterId = clusterId; } /** ** The identifier (ID) of the cluster that was backed up. *
* * @return The identifier (ID) of the cluster that was backed up. */ public String getClusterId() { return this.clusterId; } /** ** The identifier (ID) of the cluster that was backed up. *
* * @param clusterId * The identifier (ID) of the cluster that was backed up. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withClusterId(String clusterId) { setClusterId(clusterId); return this; } /** ** The date and time when the backup was created. *
* * @param createTimestamp * The date and time when the backup was created. */ public void setCreateTimestamp(java.util.Date createTimestamp) { this.createTimestamp = createTimestamp; } /** ** The date and time when the backup was created. *
* * @return The date and time when the backup was created. */ public java.util.Date getCreateTimestamp() { return this.createTimestamp; } /** ** The date and time when the backup was created. *
* * @param createTimestamp * The date and time when the backup was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withCreateTimestamp(java.util.Date createTimestamp) { setCreateTimestamp(createTimestamp); return this; } /** ** The date and time when the backup was copied from a source backup. *
* * @param copyTimestamp * The date and time when the backup was copied from a source backup. */ public void setCopyTimestamp(java.util.Date copyTimestamp) { this.copyTimestamp = copyTimestamp; } /** ** The date and time when the backup was copied from a source backup. *
* * @return The date and time when the backup was copied from a source backup. */ public java.util.Date getCopyTimestamp() { return this.copyTimestamp; } /** ** The date and time when the backup was copied from a source backup. *
* * @param copyTimestamp * The date and time when the backup was copied from a source backup. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withCopyTimestamp(java.util.Date copyTimestamp) { setCopyTimestamp(copyTimestamp); return this; } /** *
* Specifies whether the service should exempt a backup from the retention policy for the cluster. True
* exempts a backup from the retention policy. False
means the service applies the backup retention
* policy defined at the cluster.
*
True
exempts a backup from the retention policy. False
means the service applies
* the backup retention policy defined at the cluster.
*/
public void setNeverExpires(Boolean neverExpires) {
this.neverExpires = neverExpires;
}
/**
*
* Specifies whether the service should exempt a backup from the retention policy for the cluster. True
* exempts a backup from the retention policy. False
means the service applies the backup retention
* policy defined at the cluster.
*
True
exempts a backup from the retention policy. False
means the service
* applies the backup retention policy defined at the cluster.
*/
public Boolean getNeverExpires() {
return this.neverExpires;
}
/**
*
* Specifies whether the service should exempt a backup from the retention policy for the cluster. True
* exempts a backup from the retention policy. False
means the service applies the backup retention
* policy defined at the cluster.
*
True
exempts a backup from the retention policy. False
means the service applies
* the backup retention policy defined at the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Backup withNeverExpires(Boolean neverExpires) {
setNeverExpires(neverExpires);
return this;
}
/**
*
* Specifies whether the service should exempt a backup from the retention policy for the cluster. True
* exempts a backup from the retention policy. False
means the service applies the backup retention
* policy defined at the cluster.
*
True
exempts a backup from the retention policy. False
means the service
* applies the backup retention policy defined at the cluster.
*/
public Boolean isNeverExpires() {
return this.neverExpires;
}
/**
* * The AWS Region that contains the source backup from which the new backup was copied. *
* * @param sourceRegion * The AWS Region that contains the source backup from which the new backup was copied. */ public void setSourceRegion(String sourceRegion) { this.sourceRegion = sourceRegion; } /** ** The AWS Region that contains the source backup from which the new backup was copied. *
* * @return The AWS Region that contains the source backup from which the new backup was copied. */ public String getSourceRegion() { return this.sourceRegion; } /** ** The AWS Region that contains the source backup from which the new backup was copied. *
* * @param sourceRegion * The AWS Region that contains the source backup from which the new backup was copied. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withSourceRegion(String sourceRegion) { setSourceRegion(sourceRegion); return this; } /** ** The identifier (ID) of the source backup from which the new backup was copied. *
* * @param sourceBackup * The identifier (ID) of the source backup from which the new backup was copied. */ public void setSourceBackup(String sourceBackup) { this.sourceBackup = sourceBackup; } /** ** The identifier (ID) of the source backup from which the new backup was copied. *
* * @return The identifier (ID) of the source backup from which the new backup was copied. */ public String getSourceBackup() { return this.sourceBackup; } /** ** The identifier (ID) of the source backup from which the new backup was copied. *
* * @param sourceBackup * The identifier (ID) of the source backup from which the new backup was copied. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withSourceBackup(String sourceBackup) { setSourceBackup(sourceBackup); return this; } /** ** The identifier (ID) of the cluster containing the source backup from which the new backup was copied. *
* * @param sourceCluster * The identifier (ID) of the cluster containing the source backup from which the new backup was copied. */ public void setSourceCluster(String sourceCluster) { this.sourceCluster = sourceCluster; } /** ** The identifier (ID) of the cluster containing the source backup from which the new backup was copied. *
* * @return The identifier (ID) of the cluster containing the source backup from which the new backup was copied. */ public String getSourceCluster() { return this.sourceCluster; } /** ** The identifier (ID) of the cluster containing the source backup from which the new backup was copied. *
* * @param sourceCluster * The identifier (ID) of the cluster containing the source backup from which the new backup was copied. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withSourceCluster(String sourceCluster) { setSourceCluster(sourceCluster); return this; } /** ** The date and time when the backup will be permanently deleted. *
* * @param deleteTimestamp * The date and time when the backup will be permanently deleted. */ public void setDeleteTimestamp(java.util.Date deleteTimestamp) { this.deleteTimestamp = deleteTimestamp; } /** ** The date and time when the backup will be permanently deleted. *
* * @return The date and time when the backup will be permanently deleted. */ public java.util.Date getDeleteTimestamp() { return this.deleteTimestamp; } /** ** The date and time when the backup will be permanently deleted. *
* * @param deleteTimestamp * The date and time when the backup will be permanently deleted. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withDeleteTimestamp(java.util.Date deleteTimestamp) { setDeleteTimestamp(deleteTimestamp); return this; } /** ** The list of tags for the backup. *
* * @return The list of tags for the backup. */ public java.util.List* The list of tags for the backup. *
* * @param tagList * The list of tags for the backup. */ public void setTagList(java.util.Collection* The list of tags for the backup. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagList(java.util.Collection)} or {@link #withTagList(java.util.Collection)} if you want to override * the existing values. *
* * @param tagList * The list of tags for the backup. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withTagList(Tag... tagList) { if (this.tagList == null) { setTagList(new java.util.ArrayList* The list of tags for the backup. *
* * @param tagList * The list of tags for the backup. * @return Returns a reference to this object so that method calls can be chained together. */ public Backup withTagList(java.util.Collection