com.amazonaws.services.backup.model.RecoveryPointByResource Maven / Gradle / Ivy
Show all versions of aws-java-sdk-backup 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.backup.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Contains detailed information about a saved recovery point.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RecoveryPointByResource implements Serializable, Cloneable, StructuredPojo {
/**
*
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*
*/
private String recoveryPointArn;
/**
*
* The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The value of
* CreationDate
is accurate to milliseconds. For example, the value 1516925490.087 represents Friday,
* January 26, 2018 12:11:30.087 AM.
*
*/
private java.util.Date creationDate;
/**
*
* A status code specifying the state of the recovery point.
*
*/
private String status;
/**
*
* A message explaining the reason of the recovery point deletion failure.
*
*/
private String statusMessage;
/**
*
* The server-side encryption key that is used to protect your backups; for example,
* arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.
*
*/
private String encryptionKeyArn;
/**
*
* The size, in bytes, of a backup.
*
*/
private Long backupSizeBytes;
/**
*
* The name of a logical container where backups are stored. Backup vaults are identified by names that are unique
* to the account used to create them and the Amazon Web Services Region where they are created. They consist of
* lowercase letters, numbers, and hyphens.
*
*/
private String backupVaultName;
/**
*
* This is a boolean value indicating this is a parent (composite) recovery point.
*
*/
private Boolean isParent;
/**
*
* This is the Amazon Resource Name (ARN) of the parent (composite) recovery point.
*
*/
private String parentRecoveryPointArn;
/**
*
* This is the non-unique name of the resource that belongs to the specified backup.
*
*/
private String resourceName;
/**
*
* This is the type of vault in which the described recovery point is stored.
*
*/
private String vaultType;
/**
*
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*
*
* @param recoveryPointArn
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*/
public void setRecoveryPointArn(String recoveryPointArn) {
this.recoveryPointArn = recoveryPointArn;
}
/**
*
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*
*
* @return An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*/
public String getRecoveryPointArn() {
return this.recoveryPointArn;
}
/**
*
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*
*
* @param recoveryPointArn
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecoveryPointByResource withRecoveryPointArn(String recoveryPointArn) {
setRecoveryPointArn(recoveryPointArn);
return this;
}
/**
*
* The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The value of
* CreationDate
is accurate to milliseconds. For example, the value 1516925490.087 represents Friday,
* January 26, 2018 12:11:30.087 AM.
*
*
* @param creationDate
* The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The
* value of CreationDate
is accurate to milliseconds. For example, the value 1516925490.087
* represents Friday, January 26, 2018 12:11:30.087 AM.
*/
public void setCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
}
/**
*
* The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The value of
* CreationDate
is accurate to milliseconds. For example, the value 1516925490.087 represents Friday,
* January 26, 2018 12:11:30.087 AM.
*
*
* @return The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The
* value of CreationDate
is accurate to milliseconds. For example, the value 1516925490.087
* represents Friday, January 26, 2018 12:11:30.087 AM.
*/
public java.util.Date getCreationDate() {
return this.creationDate;
}
/**
*
* The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The value of
* CreationDate
is accurate to milliseconds. For example, the value 1516925490.087 represents Friday,
* January 26, 2018 12:11:30.087 AM.
*
*
* @param creationDate
* The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The
* value of CreationDate
is accurate to milliseconds. For example, the value 1516925490.087
* represents Friday, January 26, 2018 12:11:30.087 AM.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecoveryPointByResource withCreationDate(java.util.Date creationDate) {
setCreationDate(creationDate);
return this;
}
/**
*
* A status code specifying the state of the recovery point.
*
*
* @param status
* A status code specifying the state of the recovery point.
* @see RecoveryPointStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* A status code specifying the state of the recovery point.
*
*
* @return A status code specifying the state of the recovery point.
* @see RecoveryPointStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* A status code specifying the state of the recovery point.
*
*
* @param status
* A status code specifying the state of the recovery point.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecoveryPointStatus
*/
public RecoveryPointByResource withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* A status code specifying the state of the recovery point.
*
*
* @param status
* A status code specifying the state of the recovery point.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecoveryPointStatus
*/
public RecoveryPointByResource withStatus(RecoveryPointStatus status) {
this.status = status.toString();
return this;
}
/**
*
* A message explaining the reason of the recovery point deletion failure.
*
*
* @param statusMessage
* A message explaining the reason of the recovery point deletion failure.
*/
public void setStatusMessage(String statusMessage) {
this.statusMessage = statusMessage;
}
/**
*
* A message explaining the reason of the recovery point deletion failure.
*
*
* @return A message explaining the reason of the recovery point deletion failure.
*/
public String getStatusMessage() {
return this.statusMessage;
}
/**
*
* A message explaining the reason of the recovery point deletion failure.
*
*
* @param statusMessage
* A message explaining the reason of the recovery point deletion failure.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecoveryPointByResource withStatusMessage(String statusMessage) {
setStatusMessage(statusMessage);
return this;
}
/**
*
* The server-side encryption key that is used to protect your backups; for example,
* arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.
*
*
* @param encryptionKeyArn
* The server-side encryption key that is used to protect your backups; for example,
* arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.
*/
public void setEncryptionKeyArn(String encryptionKeyArn) {
this.encryptionKeyArn = encryptionKeyArn;
}
/**
*
* The server-side encryption key that is used to protect your backups; for example,
* arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.
*
*
* @return The server-side encryption key that is used to protect your backups; for example,
* arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.
*/
public String getEncryptionKeyArn() {
return this.encryptionKeyArn;
}
/**
*
* The server-side encryption key that is used to protect your backups; for example,
* arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.
*
*
* @param encryptionKeyArn
* The server-side encryption key that is used to protect your backups; for example,
* arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecoveryPointByResource withEncryptionKeyArn(String encryptionKeyArn) {
setEncryptionKeyArn(encryptionKeyArn);
return this;
}
/**
*
* The size, in bytes, of a backup.
*
*
* @param backupSizeBytes
* The size, in bytes, of a backup.
*/
public void setBackupSizeBytes(Long backupSizeBytes) {
this.backupSizeBytes = backupSizeBytes;
}
/**
*
* The size, in bytes, of a backup.
*
*
* @return The size, in bytes, of a backup.
*/
public Long getBackupSizeBytes() {
return this.backupSizeBytes;
}
/**
*
* The size, in bytes, of a backup.
*
*
* @param backupSizeBytes
* The size, in bytes, of a backup.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecoveryPointByResource withBackupSizeBytes(Long backupSizeBytes) {
setBackupSizeBytes(backupSizeBytes);
return this;
}
/**
*
* The name of a logical container where backups are stored. Backup vaults are identified by names that are unique
* to the account used to create them and the Amazon Web Services Region where they are created. They consist of
* lowercase letters, numbers, and hyphens.
*
*
* @param backupVaultName
* The name of a logical container where backups are stored. Backup vaults are identified by names that are
* unique to the account used to create them and the Amazon Web Services Region where they are created. They
* consist of lowercase letters, numbers, and hyphens.
*/
public void setBackupVaultName(String backupVaultName) {
this.backupVaultName = backupVaultName;
}
/**
*
* The name of a logical container where backups are stored. Backup vaults are identified by names that are unique
* to the account used to create them and the Amazon Web Services Region where they are created. They consist of
* lowercase letters, numbers, and hyphens.
*
*
* @return The name of a logical container where backups are stored. Backup vaults are identified by names that are
* unique to the account used to create them and the Amazon Web Services Region where they are created. They
* consist of lowercase letters, numbers, and hyphens.
*/
public String getBackupVaultName() {
return this.backupVaultName;
}
/**
*
* The name of a logical container where backups are stored. Backup vaults are identified by names that are unique
* to the account used to create them and the Amazon Web Services Region where they are created. They consist of
* lowercase letters, numbers, and hyphens.
*
*
* @param backupVaultName
* The name of a logical container where backups are stored. Backup vaults are identified by names that are
* unique to the account used to create them and the Amazon Web Services Region where they are created. They
* consist of lowercase letters, numbers, and hyphens.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecoveryPointByResource withBackupVaultName(String backupVaultName) {
setBackupVaultName(backupVaultName);
return this;
}
/**
*
* This is a boolean value indicating this is a parent (composite) recovery point.
*
*
* @param isParent
* This is a boolean value indicating this is a parent (composite) recovery point.
*/
public void setIsParent(Boolean isParent) {
this.isParent = isParent;
}
/**
*
* This is a boolean value indicating this is a parent (composite) recovery point.
*
*
* @return This is a boolean value indicating this is a parent (composite) recovery point.
*/
public Boolean getIsParent() {
return this.isParent;
}
/**
*
* This is a boolean value indicating this is a parent (composite) recovery point.
*
*
* @param isParent
* This is a boolean value indicating this is a parent (composite) recovery point.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecoveryPointByResource withIsParent(Boolean isParent) {
setIsParent(isParent);
return this;
}
/**
*
* This is a boolean value indicating this is a parent (composite) recovery point.
*
*
* @return This is a boolean value indicating this is a parent (composite) recovery point.
*/
public Boolean isParent() {
return this.isParent;
}
/**
*
* This is the Amazon Resource Name (ARN) of the parent (composite) recovery point.
*
*
* @param parentRecoveryPointArn
* This is the Amazon Resource Name (ARN) of the parent (composite) recovery point.
*/
public void setParentRecoveryPointArn(String parentRecoveryPointArn) {
this.parentRecoveryPointArn = parentRecoveryPointArn;
}
/**
*
* This is the Amazon Resource Name (ARN) of the parent (composite) recovery point.
*
*
* @return This is the Amazon Resource Name (ARN) of the parent (composite) recovery point.
*/
public String getParentRecoveryPointArn() {
return this.parentRecoveryPointArn;
}
/**
*
* This is the Amazon Resource Name (ARN) of the parent (composite) recovery point.
*
*
* @param parentRecoveryPointArn
* This is the Amazon Resource Name (ARN) of the parent (composite) recovery point.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecoveryPointByResource withParentRecoveryPointArn(String parentRecoveryPointArn) {
setParentRecoveryPointArn(parentRecoveryPointArn);
return this;
}
/**
*
* This is the non-unique name of the resource that belongs to the specified backup.
*
*
* @param resourceName
* This is the non-unique name of the resource that belongs to the specified backup.
*/
public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
/**
*
* This is the non-unique name of the resource that belongs to the specified backup.
*
*
* @return This is the non-unique name of the resource that belongs to the specified backup.
*/
public String getResourceName() {
return this.resourceName;
}
/**
*
* This is the non-unique name of the resource that belongs to the specified backup.
*
*
* @param resourceName
* This is the non-unique name of the resource that belongs to the specified backup.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecoveryPointByResource withResourceName(String resourceName) {
setResourceName(resourceName);
return this;
}
/**
*
* This is the type of vault in which the described recovery point is stored.
*
*
* @param vaultType
* This is the type of vault in which the described recovery point is stored.
* @see VaultType
*/
public void setVaultType(String vaultType) {
this.vaultType = vaultType;
}
/**
*
* This is the type of vault in which the described recovery point is stored.
*
*
* @return This is the type of vault in which the described recovery point is stored.
* @see VaultType
*/
public String getVaultType() {
return this.vaultType;
}
/**
*
* This is the type of vault in which the described recovery point is stored.
*
*
* @param vaultType
* This is the type of vault in which the described recovery point is stored.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VaultType
*/
public RecoveryPointByResource withVaultType(String vaultType) {
setVaultType(vaultType);
return this;
}
/**
*
* This is the type of vault in which the described recovery point is stored.
*
*
* @param vaultType
* This is the type of vault in which the described recovery point is stored.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VaultType
*/
public RecoveryPointByResource withVaultType(VaultType vaultType) {
this.vaultType = vaultType.toString();
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 (getRecoveryPointArn() != null)
sb.append("RecoveryPointArn: ").append(getRecoveryPointArn()).append(",");
if (getCreationDate() != null)
sb.append("CreationDate: ").append(getCreationDate()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getStatusMessage() != null)
sb.append("StatusMessage: ").append(getStatusMessage()).append(",");
if (getEncryptionKeyArn() != null)
sb.append("EncryptionKeyArn: ").append(getEncryptionKeyArn()).append(",");
if (getBackupSizeBytes() != null)
sb.append("BackupSizeBytes: ").append(getBackupSizeBytes()).append(",");
if (getBackupVaultName() != null)
sb.append("BackupVaultName: ").append(getBackupVaultName()).append(",");
if (getIsParent() != null)
sb.append("IsParent: ").append(getIsParent()).append(",");
if (getParentRecoveryPointArn() != null)
sb.append("ParentRecoveryPointArn: ").append(getParentRecoveryPointArn()).append(",");
if (getResourceName() != null)
sb.append("ResourceName: ").append(getResourceName()).append(",");
if (getVaultType() != null)
sb.append("VaultType: ").append(getVaultType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RecoveryPointByResource == false)
return false;
RecoveryPointByResource other = (RecoveryPointByResource) obj;
if (other.getRecoveryPointArn() == null ^ this.getRecoveryPointArn() == null)
return false;
if (other.getRecoveryPointArn() != null && other.getRecoveryPointArn().equals(this.getRecoveryPointArn()) == false)
return false;
if (other.getCreationDate() == null ^ this.getCreationDate() == null)
return false;
if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == 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.getStatusMessage() == null ^ this.getStatusMessage() == null)
return false;
if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false)
return false;
if (other.getEncryptionKeyArn() == null ^ this.getEncryptionKeyArn() == null)
return false;
if (other.getEncryptionKeyArn() != null && other.getEncryptionKeyArn().equals(this.getEncryptionKeyArn()) == false)
return false;
if (other.getBackupSizeBytes() == null ^ this.getBackupSizeBytes() == null)
return false;
if (other.getBackupSizeBytes() != null && other.getBackupSizeBytes().equals(this.getBackupSizeBytes()) == false)
return false;
if (other.getBackupVaultName() == null ^ this.getBackupVaultName() == null)
return false;
if (other.getBackupVaultName() != null && other.getBackupVaultName().equals(this.getBackupVaultName()) == false)
return false;
if (other.getIsParent() == null ^ this.getIsParent() == null)
return false;
if (other.getIsParent() != null && other.getIsParent().equals(this.getIsParent()) == false)
return false;
if (other.getParentRecoveryPointArn() == null ^ this.getParentRecoveryPointArn() == null)
return false;
if (other.getParentRecoveryPointArn() != null && other.getParentRecoveryPointArn().equals(this.getParentRecoveryPointArn()) == false)
return false;
if (other.getResourceName() == null ^ this.getResourceName() == null)
return false;
if (other.getResourceName() != null && other.getResourceName().equals(this.getResourceName()) == false)
return false;
if (other.getVaultType() == null ^ this.getVaultType() == null)
return false;
if (other.getVaultType() != null && other.getVaultType().equals(this.getVaultType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRecoveryPointArn() == null) ? 0 : getRecoveryPointArn().hashCode());
hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode());
hashCode = prime * hashCode + ((getEncryptionKeyArn() == null) ? 0 : getEncryptionKeyArn().hashCode());
hashCode = prime * hashCode + ((getBackupSizeBytes() == null) ? 0 : getBackupSizeBytes().hashCode());
hashCode = prime * hashCode + ((getBackupVaultName() == null) ? 0 : getBackupVaultName().hashCode());
hashCode = prime * hashCode + ((getIsParent() == null) ? 0 : getIsParent().hashCode());
hashCode = prime * hashCode + ((getParentRecoveryPointArn() == null) ? 0 : getParentRecoveryPointArn().hashCode());
hashCode = prime * hashCode + ((getResourceName() == null) ? 0 : getResourceName().hashCode());
hashCode = prime * hashCode + ((getVaultType() == null) ? 0 : getVaultType().hashCode());
return hashCode;
}
@Override
public RecoveryPointByResource clone() {
try {
return (RecoveryPointByResource) 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.backup.model.transform.RecoveryPointByResourceMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}