software.amazon.awssdk.services.backup.model.RecoveryPointByBackupVault Maven / Gradle / Ivy
Show all versions of backup Show documentation
/*
* Copyright 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 software.amazon.awssdk.services.backup.model;
import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Contains detailed information about the recovery points stored in a backup vault.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class RecoveryPointByBackupVault implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField RECOVERY_POINT_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RecoveryPointArn").getter(getter(RecoveryPointByBackupVault::recoveryPointArn))
.setter(setter(Builder::recoveryPointArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RecoveryPointArn").build()).build();
private static final SdkField BACKUP_VAULT_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("BackupVaultName").getter(getter(RecoveryPointByBackupVault::backupVaultName))
.setter(setter(Builder::backupVaultName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupVaultName").build()).build();
private static final SdkField BACKUP_VAULT_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("BackupVaultArn").getter(getter(RecoveryPointByBackupVault::backupVaultArn))
.setter(setter(Builder::backupVaultArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupVaultArn").build()).build();
private static final SdkField SOURCE_BACKUP_VAULT_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("SourceBackupVaultArn").getter(getter(RecoveryPointByBackupVault::sourceBackupVaultArn))
.setter(setter(Builder::sourceBackupVaultArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceBackupVaultArn").build())
.build();
private static final SdkField RESOURCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ResourceArn").getter(getter(RecoveryPointByBackupVault::resourceArn))
.setter(setter(Builder::resourceArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceArn").build()).build();
private static final SdkField RESOURCE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ResourceType").getter(getter(RecoveryPointByBackupVault::resourceType))
.setter(setter(Builder::resourceType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceType").build()).build();
private static final SdkField CREATED_BY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CreatedBy")
.getter(getter(RecoveryPointByBackupVault::createdBy)).setter(setter(Builder::createdBy))
.constructor(RecoveryPointCreator::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedBy").build()).build();
private static final SdkField IAM_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("IamRoleArn").getter(getter(RecoveryPointByBackupVault::iamRoleArn)).setter(setter(Builder::iamRoleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IamRoleArn").build()).build();
private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status")
.getter(getter(RecoveryPointByBackupVault::statusAsString)).setter(setter(Builder::status))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build();
private static final SdkField STATUS_MESSAGE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StatusMessage").getter(getter(RecoveryPointByBackupVault::statusMessage))
.setter(setter(Builder::statusMessage))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatusMessage").build()).build();
private static final SdkField CREATION_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreationDate").getter(getter(RecoveryPointByBackupVault::creationDate))
.setter(setter(Builder::creationDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationDate").build()).build();
private static final SdkField COMPLETION_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CompletionDate").getter(getter(RecoveryPointByBackupVault::completionDate))
.setter(setter(Builder::completionDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CompletionDate").build()).build();
private static final SdkField BACKUP_SIZE_IN_BYTES_FIELD = SdkField. builder(MarshallingType.LONG)
.memberName("BackupSizeInBytes").getter(getter(RecoveryPointByBackupVault::backupSizeInBytes))
.setter(setter(Builder::backupSizeInBytes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupSizeInBytes").build()).build();
private static final SdkField CALCULATED_LIFECYCLE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CalculatedLifecycle")
.getter(getter(RecoveryPointByBackupVault::calculatedLifecycle)).setter(setter(Builder::calculatedLifecycle))
.constructor(CalculatedLifecycle::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CalculatedLifecycle").build())
.build();
private static final SdkField LIFECYCLE_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Lifecycle").getter(getter(RecoveryPointByBackupVault::lifecycle)).setter(setter(Builder::lifecycle))
.constructor(Lifecycle::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Lifecycle").build()).build();
private static final SdkField ENCRYPTION_KEY_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EncryptionKeyArn").getter(getter(RecoveryPointByBackupVault::encryptionKeyArn))
.setter(setter(Builder::encryptionKeyArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EncryptionKeyArn").build()).build();
private static final SdkField IS_ENCRYPTED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("IsEncrypted").getter(getter(RecoveryPointByBackupVault::isEncrypted))
.setter(setter(Builder::isEncrypted))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IsEncrypted").build()).build();
private static final SdkField LAST_RESTORE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("LastRestoreTime").getter(getter(RecoveryPointByBackupVault::lastRestoreTime))
.setter(setter(Builder::lastRestoreTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastRestoreTime").build()).build();
private static final SdkField PARENT_RECOVERY_POINT_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ParentRecoveryPointArn").getter(getter(RecoveryPointByBackupVault::parentRecoveryPointArn))
.setter(setter(Builder::parentRecoveryPointArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ParentRecoveryPointArn").build())
.build();
private static final SdkField COMPOSITE_MEMBER_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CompositeMemberIdentifier").getter(getter(RecoveryPointByBackupVault::compositeMemberIdentifier))
.setter(setter(Builder::compositeMemberIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CompositeMemberIdentifier").build())
.build();
private static final SdkField IS_PARENT_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("IsParent").getter(getter(RecoveryPointByBackupVault::isParent)).setter(setter(Builder::isParent))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IsParent").build()).build();
private static final SdkField RESOURCE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ResourceName").getter(getter(RecoveryPointByBackupVault::resourceName))
.setter(setter(Builder::resourceName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceName").build()).build();
private static final SdkField VAULT_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("VaultType").getter(getter(RecoveryPointByBackupVault::vaultTypeAsString))
.setter(setter(Builder::vaultType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VaultType").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(RECOVERY_POINT_ARN_FIELD,
BACKUP_VAULT_NAME_FIELD, BACKUP_VAULT_ARN_FIELD, SOURCE_BACKUP_VAULT_ARN_FIELD, RESOURCE_ARN_FIELD,
RESOURCE_TYPE_FIELD, CREATED_BY_FIELD, IAM_ROLE_ARN_FIELD, STATUS_FIELD, STATUS_MESSAGE_FIELD, CREATION_DATE_FIELD,
COMPLETION_DATE_FIELD, BACKUP_SIZE_IN_BYTES_FIELD, CALCULATED_LIFECYCLE_FIELD, LIFECYCLE_FIELD,
ENCRYPTION_KEY_ARN_FIELD, IS_ENCRYPTED_FIELD, LAST_RESTORE_TIME_FIELD, PARENT_RECOVERY_POINT_ARN_FIELD,
COMPOSITE_MEMBER_IDENTIFIER_FIELD, IS_PARENT_FIELD, RESOURCE_NAME_FIELD, VAULT_TYPE_FIELD));
private static final Map> SDK_NAME_TO_FIELD = Collections
.unmodifiableMap(new HashMap>() {
{
put("RecoveryPointArn", RECOVERY_POINT_ARN_FIELD);
put("BackupVaultName", BACKUP_VAULT_NAME_FIELD);
put("BackupVaultArn", BACKUP_VAULT_ARN_FIELD);
put("SourceBackupVaultArn", SOURCE_BACKUP_VAULT_ARN_FIELD);
put("ResourceArn", RESOURCE_ARN_FIELD);
put("ResourceType", RESOURCE_TYPE_FIELD);
put("CreatedBy", CREATED_BY_FIELD);
put("IamRoleArn", IAM_ROLE_ARN_FIELD);
put("Status", STATUS_FIELD);
put("StatusMessage", STATUS_MESSAGE_FIELD);
put("CreationDate", CREATION_DATE_FIELD);
put("CompletionDate", COMPLETION_DATE_FIELD);
put("BackupSizeInBytes", BACKUP_SIZE_IN_BYTES_FIELD);
put("CalculatedLifecycle", CALCULATED_LIFECYCLE_FIELD);
put("Lifecycle", LIFECYCLE_FIELD);
put("EncryptionKeyArn", ENCRYPTION_KEY_ARN_FIELD);
put("IsEncrypted", IS_ENCRYPTED_FIELD);
put("LastRestoreTime", LAST_RESTORE_TIME_FIELD);
put("ParentRecoveryPointArn", PARENT_RECOVERY_POINT_ARN_FIELD);
put("CompositeMemberIdentifier", COMPOSITE_MEMBER_IDENTIFIER_FIELD);
put("IsParent", IS_PARENT_FIELD);
put("ResourceName", RESOURCE_NAME_FIELD);
put("VaultType", VAULT_TYPE_FIELD);
}
});
private static final long serialVersionUID = 1L;
private final String recoveryPointArn;
private final String backupVaultName;
private final String backupVaultArn;
private final String sourceBackupVaultArn;
private final String resourceArn;
private final String resourceType;
private final RecoveryPointCreator createdBy;
private final String iamRoleArn;
private final String status;
private final String statusMessage;
private final Instant creationDate;
private final Instant completionDate;
private final Long backupSizeInBytes;
private final CalculatedLifecycle calculatedLifecycle;
private final Lifecycle lifecycle;
private final String encryptionKeyArn;
private final Boolean isEncrypted;
private final Instant lastRestoreTime;
private final String parentRecoveryPointArn;
private final String compositeMemberIdentifier;
private final Boolean isParent;
private final String resourceName;
private final String vaultType;
private RecoveryPointByBackupVault(BuilderImpl builder) {
this.recoveryPointArn = builder.recoveryPointArn;
this.backupVaultName = builder.backupVaultName;
this.backupVaultArn = builder.backupVaultArn;
this.sourceBackupVaultArn = builder.sourceBackupVaultArn;
this.resourceArn = builder.resourceArn;
this.resourceType = builder.resourceType;
this.createdBy = builder.createdBy;
this.iamRoleArn = builder.iamRoleArn;
this.status = builder.status;
this.statusMessage = builder.statusMessage;
this.creationDate = builder.creationDate;
this.completionDate = builder.completionDate;
this.backupSizeInBytes = builder.backupSizeInBytes;
this.calculatedLifecycle = builder.calculatedLifecycle;
this.lifecycle = builder.lifecycle;
this.encryptionKeyArn = builder.encryptionKeyArn;
this.isEncrypted = builder.isEncrypted;
this.lastRestoreTime = builder.lastRestoreTime;
this.parentRecoveryPointArn = builder.parentRecoveryPointArn;
this.compositeMemberIdentifier = builder.compositeMemberIdentifier;
this.isParent = builder.isParent;
this.resourceName = builder.resourceName;
this.vaultType = builder.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
.
*
*
* @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 final String recoveryPointArn() {
return recoveryPointArn;
}
/**
*
* 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.
*
*
* @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.
*/
public final String backupVaultName() {
return backupVaultName;
}
/**
*
* An ARN that uniquely identifies a backup vault; for example,
* arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault
.
*
*
* @return An ARN that uniquely identifies a backup vault; for example,
* arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault
.
*/
public final String backupVaultArn() {
return backupVaultArn;
}
/**
*
* The backup vault where the recovery point was originally copied from. If the recovery point is restored to the
* same account this value will be null
.
*
*
* @return The backup vault where the recovery point was originally copied from. If the recovery point is restored
* to the same account this value will be null
.
*/
public final String sourceBackupVaultArn() {
return sourceBackupVaultArn;
}
/**
*
* An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.
*
*
* @return An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.
*/
public final String resourceArn() {
return resourceArn;
}
/**
*
* The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon Elastic Block Store
* (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database. For Windows Volume Shadow
* Copy Service (VSS) backups, the only supported resource type is Amazon EC2.
*
*
* @return The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon Elastic Block
* Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database. For Windows
* Volume Shadow Copy Service (VSS) backups, the only supported resource type is Amazon EC2.
*/
public final String resourceType() {
return resourceType;
}
/**
*
* Contains identifying information about the creation of a recovery point, including the BackupPlanArn
, BackupPlanId
, BackupPlanVersion
, and BackupRuleId
of the backup plan
* that is used to create it.
*
*
* @return Contains identifying information about the creation of a recovery point, including the
* BackupPlanArn
, BackupPlanId
, BackupPlanVersion
, and
* BackupRuleId
of the backup plan that is used to create it.
*/
public final RecoveryPointCreator createdBy() {
return createdBy;
}
/**
*
* Specifies the IAM role ARN used to create the target recovery point; for example,
* arn:aws:iam::123456789012:role/S3Access
.
*
*
* @return Specifies the IAM role ARN used to create the target recovery point; for example,
* arn:aws:iam::123456789012:role/S3Access
.
*/
public final String iamRoleArn() {
return iamRoleArn;
}
/**
*
* A status code specifying the state of the recovery point.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link RecoveryPointStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #statusAsString}.
*
*
* @return A status code specifying the state of the recovery point.
* @see RecoveryPointStatus
*/
public final RecoveryPointStatus status() {
return RecoveryPointStatus.fromValue(status);
}
/**
*
* A status code specifying the state of the recovery point.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link RecoveryPointStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #statusAsString}.
*
*
* @return A status code specifying the state of the recovery point.
* @see RecoveryPointStatus
*/
public final String statusAsString() {
return status;
}
/**
*
* A message explaining the current status of the recovery point.
*
*
* @return A message explaining the current status of the recovery point.
*/
public final String statusMessage() {
return statusMessage;
}
/**
*
* 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 final Instant creationDate() {
return creationDate;
}
/**
*
* The date and time a job to restore a recovery point is completed, in Unix format and Coordinated Universal Time
* (UTC). The value of CompletionDate
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 job to restore a recovery point is completed, in Unix format and Coordinated
* Universal Time (UTC). The value of CompletionDate
is accurate to milliseconds. For example,
* the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
*/
public final Instant completionDate() {
return completionDate;
}
/**
*
* The size, in bytes, of a backup.
*
*
* @return The size, in bytes, of a backup.
*/
public final Long backupSizeInBytes() {
return backupSizeInBytes;
}
/**
*
* A CalculatedLifecycle
object containing DeleteAt
and MoveToColdStorageAt
* timestamps.
*
*
* @return A CalculatedLifecycle
object containing DeleteAt
and
* MoveToColdStorageAt
timestamps.
*/
public final CalculatedLifecycle calculatedLifecycle() {
return calculatedLifecycle;
}
/**
*
* The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup
* transitions and expires backups automatically according to the lifecycle that you define.
*
*
* Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the
* “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to
* cold after days” setting cannot be changed after a backup has been transitioned to cold.
*
*
* Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.
*
*
* @return The lifecycle defines when a protected resource is transitioned to cold storage and when it expires.
* Backup transitions and expires backups automatically according to the lifecycle that you define.
*
* Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore,
* the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The
* “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
*
*
* Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.
*/
public final Lifecycle lifecycle() {
return lifecycle;
}
/**
*
* 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 final String encryptionKeyArn() {
return encryptionKeyArn;
}
/**
*
* A Boolean value that is returned as TRUE
if the specified recovery point is encrypted, or
* FALSE
if the recovery point is not encrypted.
*
*
* @return A Boolean value that is returned as TRUE
if the specified recovery point is encrypted, or
* FALSE
if the recovery point is not encrypted.
*/
public final Boolean isEncrypted() {
return isEncrypted;
}
/**
*
* The date and time a recovery point was last restored, in Unix format and Coordinated Universal Time (UTC). The
* value of LastRestoreTime
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 was last restored, in Unix format and Coordinated Universal Time
* (UTC). The value of LastRestoreTime
is accurate to milliseconds. For example, the value
* 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
*/
public final Instant lastRestoreTime() {
return lastRestoreTime;
}
/**
*
* The Amazon Resource Name (ARN) of the parent (composite) recovery point.
*
*
* @return The Amazon Resource Name (ARN) of the parent (composite) recovery point.
*/
public final String parentRecoveryPointArn() {
return parentRecoveryPointArn;
}
/**
*
* The identifier of a resource within a composite group, such as nested (child) recovery point belonging to a
* composite (parent) stack. The ID is transferred from the logical ID within a stack.
*
*
* @return The identifier of a resource within a composite group, such as nested (child) recovery point belonging to
* a composite (parent) stack. The ID is transferred from the logical ID within a stack.
*/
public final String compositeMemberIdentifier() {
return compositeMemberIdentifier;
}
/**
*
* 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 final Boolean isParent() {
return isParent;
}
/**
*
* The non-unique name of the resource that belongs to the specified backup.
*
*
* @return The non-unique name of the resource that belongs to the specified backup.
*/
public final String resourceName() {
return resourceName;
}
/**
*
* The type of vault in which the described recovery point is stored.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #vaultType} will
* return {@link VaultType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #vaultTypeAsString}.
*
*
* @return The type of vault in which the described recovery point is stored.
* @see VaultType
*/
public final VaultType vaultType() {
return VaultType.fromValue(vaultType);
}
/**
*
* The type of vault in which the described recovery point is stored.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #vaultType} will
* return {@link VaultType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #vaultTypeAsString}.
*
*
* @return The type of vault in which the described recovery point is stored.
* @see VaultType
*/
public final String vaultTypeAsString() {
return vaultType;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(recoveryPointArn());
hashCode = 31 * hashCode + Objects.hashCode(backupVaultName());
hashCode = 31 * hashCode + Objects.hashCode(backupVaultArn());
hashCode = 31 * hashCode + Objects.hashCode(sourceBackupVaultArn());
hashCode = 31 * hashCode + Objects.hashCode(resourceArn());
hashCode = 31 * hashCode + Objects.hashCode(resourceType());
hashCode = 31 * hashCode + Objects.hashCode(createdBy());
hashCode = 31 * hashCode + Objects.hashCode(iamRoleArn());
hashCode = 31 * hashCode + Objects.hashCode(statusAsString());
hashCode = 31 * hashCode + Objects.hashCode(statusMessage());
hashCode = 31 * hashCode + Objects.hashCode(creationDate());
hashCode = 31 * hashCode + Objects.hashCode(completionDate());
hashCode = 31 * hashCode + Objects.hashCode(backupSizeInBytes());
hashCode = 31 * hashCode + Objects.hashCode(calculatedLifecycle());
hashCode = 31 * hashCode + Objects.hashCode(lifecycle());
hashCode = 31 * hashCode + Objects.hashCode(encryptionKeyArn());
hashCode = 31 * hashCode + Objects.hashCode(isEncrypted());
hashCode = 31 * hashCode + Objects.hashCode(lastRestoreTime());
hashCode = 31 * hashCode + Objects.hashCode(parentRecoveryPointArn());
hashCode = 31 * hashCode + Objects.hashCode(compositeMemberIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(isParent());
hashCode = 31 * hashCode + Objects.hashCode(resourceName());
hashCode = 31 * hashCode + Objects.hashCode(vaultTypeAsString());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof RecoveryPointByBackupVault)) {
return false;
}
RecoveryPointByBackupVault other = (RecoveryPointByBackupVault) obj;
return Objects.equals(recoveryPointArn(), other.recoveryPointArn())
&& Objects.equals(backupVaultName(), other.backupVaultName())
&& Objects.equals(backupVaultArn(), other.backupVaultArn())
&& Objects.equals(sourceBackupVaultArn(), other.sourceBackupVaultArn())
&& Objects.equals(resourceArn(), other.resourceArn()) && Objects.equals(resourceType(), other.resourceType())
&& Objects.equals(createdBy(), other.createdBy()) && Objects.equals(iamRoleArn(), other.iamRoleArn())
&& Objects.equals(statusAsString(), other.statusAsString())
&& Objects.equals(statusMessage(), other.statusMessage()) && Objects.equals(creationDate(), other.creationDate())
&& Objects.equals(completionDate(), other.completionDate())
&& Objects.equals(backupSizeInBytes(), other.backupSizeInBytes())
&& Objects.equals(calculatedLifecycle(), other.calculatedLifecycle())
&& Objects.equals(lifecycle(), other.lifecycle()) && Objects.equals(encryptionKeyArn(), other.encryptionKeyArn())
&& Objects.equals(isEncrypted(), other.isEncrypted())
&& Objects.equals(lastRestoreTime(), other.lastRestoreTime())
&& Objects.equals(parentRecoveryPointArn(), other.parentRecoveryPointArn())
&& Objects.equals(compositeMemberIdentifier(), other.compositeMemberIdentifier())
&& Objects.equals(isParent(), other.isParent()) && Objects.equals(resourceName(), other.resourceName())
&& Objects.equals(vaultTypeAsString(), other.vaultTypeAsString());
}
/**
* 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.
*/
@Override
public final String toString() {
return ToString.builder("RecoveryPointByBackupVault").add("RecoveryPointArn", recoveryPointArn())
.add("BackupVaultName", backupVaultName()).add("BackupVaultArn", backupVaultArn())
.add("SourceBackupVaultArn", sourceBackupVaultArn()).add("ResourceArn", resourceArn())
.add("ResourceType", resourceType()).add("CreatedBy", createdBy()).add("IamRoleArn", iamRoleArn())
.add("Status", statusAsString()).add("StatusMessage", statusMessage()).add("CreationDate", creationDate())
.add("CompletionDate", completionDate()).add("BackupSizeInBytes", backupSizeInBytes())
.add("CalculatedLifecycle", calculatedLifecycle()).add("Lifecycle", lifecycle())
.add("EncryptionKeyArn", encryptionKeyArn()).add("IsEncrypted", isEncrypted())
.add("LastRestoreTime", lastRestoreTime()).add("ParentRecoveryPointArn", parentRecoveryPointArn())
.add("CompositeMemberIdentifier", compositeMemberIdentifier()).add("IsParent", isParent())
.add("ResourceName", resourceName()).add("VaultType", vaultTypeAsString()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "RecoveryPointArn":
return Optional.ofNullable(clazz.cast(recoveryPointArn()));
case "BackupVaultName":
return Optional.ofNullable(clazz.cast(backupVaultName()));
case "BackupVaultArn":
return Optional.ofNullable(clazz.cast(backupVaultArn()));
case "SourceBackupVaultArn":
return Optional.ofNullable(clazz.cast(sourceBackupVaultArn()));
case "ResourceArn":
return Optional.ofNullable(clazz.cast(resourceArn()));
case "ResourceType":
return Optional.ofNullable(clazz.cast(resourceType()));
case "CreatedBy":
return Optional.ofNullable(clazz.cast(createdBy()));
case "IamRoleArn":
return Optional.ofNullable(clazz.cast(iamRoleArn()));
case "Status":
return Optional.ofNullable(clazz.cast(statusAsString()));
case "StatusMessage":
return Optional.ofNullable(clazz.cast(statusMessage()));
case "CreationDate":
return Optional.ofNullable(clazz.cast(creationDate()));
case "CompletionDate":
return Optional.ofNullable(clazz.cast(completionDate()));
case "BackupSizeInBytes":
return Optional.ofNullable(clazz.cast(backupSizeInBytes()));
case "CalculatedLifecycle":
return Optional.ofNullable(clazz.cast(calculatedLifecycle()));
case "Lifecycle":
return Optional.ofNullable(clazz.cast(lifecycle()));
case "EncryptionKeyArn":
return Optional.ofNullable(clazz.cast(encryptionKeyArn()));
case "IsEncrypted":
return Optional.ofNullable(clazz.cast(isEncrypted()));
case "LastRestoreTime":
return Optional.ofNullable(clazz.cast(lastRestoreTime()));
case "ParentRecoveryPointArn":
return Optional.ofNullable(clazz.cast(parentRecoveryPointArn()));
case "CompositeMemberIdentifier":
return Optional.ofNullable(clazz.cast(compositeMemberIdentifier()));
case "IsParent":
return Optional.ofNullable(clazz.cast(isParent()));
case "ResourceName":
return Optional.ofNullable(clazz.cast(resourceName()));
case "VaultType":
return Optional.ofNullable(clazz.cast(vaultTypeAsString()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Function