All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.backup.model.BackupJob Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Backup module holds the client classes that are used for communicating with Backup.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright 2014-2019 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.List;
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 a backup job. *

*/ @Generated("software.amazon.awssdk:codegen") public final class BackupJob implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField BACKUP_JOB_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(BackupJob::backupJobId)).setter(setter(Builder::backupJobId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupJobId").build()).build(); private static final SdkField BACKUP_VAULT_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(BackupJob::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) .getter(getter(BackupJob::backupVaultArn)).setter(setter(Builder::backupVaultArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupVaultArn").build()).build(); private static final SdkField RECOVERY_POINT_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(BackupJob::recoveryPointArn)).setter(setter(Builder::recoveryPointArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RecoveryPointArn").build()).build(); private static final SdkField RESOURCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(BackupJob::resourceArn)).setter(setter(Builder::resourceArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceArn").build()).build(); private static final SdkField CREATION_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(BackupJob::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) .getter(getter(BackupJob::completionDate)).setter(setter(Builder::completionDate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CompletionDate").build()).build(); private static final SdkField STATE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(BackupJob::stateAsString)).setter(setter(Builder::state)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("State").build()).build(); private static final SdkField STATUS_MESSAGE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(BackupJob::statusMessage)).setter(setter(Builder::statusMessage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatusMessage").build()).build(); private static final SdkField PERCENT_DONE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(BackupJob::percentDone)).setter(setter(Builder::percentDone)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PercentDone").build()).build(); private static final SdkField BACKUP_SIZE_IN_BYTES_FIELD = SdkField. builder(MarshallingType.LONG) .getter(getter(BackupJob::backupSizeInBytes)).setter(setter(Builder::backupSizeInBytes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupSizeInBytes").build()).build(); private static final SdkField IAM_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(BackupJob::iamRoleArn)).setter(setter(Builder::iamRoleArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IamRoleArn").build()).build(); private static final SdkField CREATED_BY_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(BackupJob::createdBy)) .setter(setter(Builder::createdBy)).constructor(RecoveryPointCreator::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedBy").build()).build(); private static final SdkField EXPECTED_COMPLETION_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(BackupJob::expectedCompletionDate)).setter(setter(Builder::expectedCompletionDate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExpectedCompletionDate").build()) .build(); private static final SdkField START_BY_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(BackupJob::startBy)).setter(setter(Builder::startBy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StartBy").build()).build(); private static final SdkField RESOURCE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(BackupJob::resourceType)).setter(setter(Builder::resourceType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceType").build()).build(); private static final SdkField BYTES_TRANSFERRED_FIELD = SdkField. builder(MarshallingType.LONG) .getter(getter(BackupJob::bytesTransferred)).setter(setter(Builder::bytesTransferred)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BytesTransferred").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BACKUP_JOB_ID_FIELD, BACKUP_VAULT_NAME_FIELD, BACKUP_VAULT_ARN_FIELD, RECOVERY_POINT_ARN_FIELD, RESOURCE_ARN_FIELD, CREATION_DATE_FIELD, COMPLETION_DATE_FIELD, STATE_FIELD, STATUS_MESSAGE_FIELD, PERCENT_DONE_FIELD, BACKUP_SIZE_IN_BYTES_FIELD, IAM_ROLE_ARN_FIELD, CREATED_BY_FIELD, EXPECTED_COMPLETION_DATE_FIELD, START_BY_FIELD, RESOURCE_TYPE_FIELD, BYTES_TRANSFERRED_FIELD)); private static final long serialVersionUID = 1L; private final String backupJobId; private final String backupVaultName; private final String backupVaultArn; private final String recoveryPointArn; private final String resourceArn; private final Instant creationDate; private final Instant completionDate; private final String state; private final String statusMessage; private final String percentDone; private final Long backupSizeInBytes; private final String iamRoleArn; private final RecoveryPointCreator createdBy; private final Instant expectedCompletionDate; private final Instant startBy; private final String resourceType; private final Long bytesTransferred; private BackupJob(BuilderImpl builder) { this.backupJobId = builder.backupJobId; this.backupVaultName = builder.backupVaultName; this.backupVaultArn = builder.backupVaultArn; this.recoveryPointArn = builder.recoveryPointArn; this.resourceArn = builder.resourceArn; this.creationDate = builder.creationDate; this.completionDate = builder.completionDate; this.state = builder.state; this.statusMessage = builder.statusMessage; this.percentDone = builder.percentDone; this.backupSizeInBytes = builder.backupSizeInBytes; this.iamRoleArn = builder.iamRoleArn; this.createdBy = builder.createdBy; this.expectedCompletionDate = builder.expectedCompletionDate; this.startBy = builder.startBy; this.resourceType = builder.resourceType; this.bytesTransferred = builder.bytesTransferred; } /** *

* Uniquely identifies a request to AWS Backup to back up a resource. *

* * @return Uniquely identifies a request to AWS Backup to back up a resource. */ public String backupJobId() { return backupJobId; } /** *

* 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 AWS 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 AWS Region where they are created. They consist of * lowercase letters, numbers, and hyphens. */ public String backupVaultName() { return backupVaultName; } /** *

* An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, * arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. *

* * @return An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, * arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. */ public String backupVaultArn() { return backupVaultArn; } /** *

* An 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 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 recoveryPointArn() { return recoveryPointArn; } /** *

* 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 String resourceArn() { return resourceArn; } /** *

* The date and time a backup job 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 backup job 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 Instant creationDate() { return creationDate; } /** *

* The date and time a job to create a backup job 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 create a backup job 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 Instant completionDate() { return completionDate; } /** *

* The current state of a resource recovery point. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link BackupJobState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

* * @return The current state of a resource recovery point. * @see BackupJobState */ public BackupJobState state() { return BackupJobState.fromValue(state); } /** *

* The current state of a resource recovery point. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link BackupJobState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

* * @return The current state of a resource recovery point. * @see BackupJobState */ public String stateAsString() { return state; } /** *

* A detailed message explaining the status of the job to back up a resource. *

* * @return A detailed message explaining the status of the job to back up a resource. */ public String statusMessage() { return statusMessage; } /** *

* Contains an estimated percentage complete of a job at the time the job status was queried. *

* * @return Contains an estimated percentage complete of a job at the time the job status was queried. */ public String percentDone() { return percentDone; } /** *

* The size, in bytes, of a backup. *

* * @return The size, in bytes, of a backup. */ public Long backupSizeInBytes() { return backupSizeInBytes; } /** *

* 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 String iamRoleArn() { return iamRoleArn; } /** *

* Contains identifying information about the creation of a backup job, including the BackupPlanArn, * BackupPlanId, BackupPlanVersion, and BackupRuleId of the backup plan used * to create it. *

* * @return Contains identifying information about the creation of a backup job, including the * BackupPlanArn, BackupPlanId, BackupPlanVersion, and * BackupRuleId of the backup plan used to create it. */ public RecoveryPointCreator createdBy() { return createdBy; } /** *

* The date and time a job to back up resources is expected to be completed, in Unix format and Coordinated * Universal Time (UTC). The value of ExpectedCompletionDate 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 back up resources is expected to be completed, in Unix format and Coordinated * Universal Time (UTC). The value of ExpectedCompletionDate is accurate to milliseconds. For * example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. */ public Instant expectedCompletionDate() { return expectedCompletionDate; } /** *

* Specifies the time in Unix format and Coordinated Universal Time (UTC) when a backup job must be started before * it is canceled. The value is calculated by adding the start window to the scheduled time. So if the scheduled * time were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00 PM on the date * specified. The value of StartBy is accurate to milliseconds. For example, the value 1516925490.087 * represents Friday, January 26, 2018 12:11:30.087 AM. *

* * @return Specifies the time in Unix format and Coordinated Universal Time (UTC) when a backup job must be started * before it is canceled. The value is calculated by adding the start window to the scheduled time. So if * the scheduled time were 6:00 PM and the start window is 2 hours, the StartBy time would be * 8:00 PM on the date specified. The value of StartBy is accurate to milliseconds. For * example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. */ public Instant startBy() { return startBy; } /** *

* The type of AWS resource to be backed-up; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an * Amazon Relational Database Service (Amazon RDS) database. *

* * @return The type of AWS resource to be backed-up; for example, an Amazon Elastic Block Store (Amazon EBS) volume * or an Amazon Relational Database Service (Amazon RDS) database. */ public String resourceType() { return resourceType; } /** *

* The size in bytes transferred to a backup vault at the time that the job status was queried. *

* * @return The size in bytes transferred to a backup vault at the time that the job status was queried. */ public Long bytesTransferred() { return bytesTransferred; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(backupJobId()); hashCode = 31 * hashCode + Objects.hashCode(backupVaultName()); hashCode = 31 * hashCode + Objects.hashCode(backupVaultArn()); hashCode = 31 * hashCode + Objects.hashCode(recoveryPointArn()); hashCode = 31 * hashCode + Objects.hashCode(resourceArn()); hashCode = 31 * hashCode + Objects.hashCode(creationDate()); hashCode = 31 * hashCode + Objects.hashCode(completionDate()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(statusMessage()); hashCode = 31 * hashCode + Objects.hashCode(percentDone()); hashCode = 31 * hashCode + Objects.hashCode(backupSizeInBytes()); hashCode = 31 * hashCode + Objects.hashCode(iamRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(createdBy()); hashCode = 31 * hashCode + Objects.hashCode(expectedCompletionDate()); hashCode = 31 * hashCode + Objects.hashCode(startBy()); hashCode = 31 * hashCode + Objects.hashCode(resourceType()); hashCode = 31 * hashCode + Objects.hashCode(bytesTransferred()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof BackupJob)) { return false; } BackupJob other = (BackupJob) obj; return Objects.equals(backupJobId(), other.backupJobId()) && Objects.equals(backupVaultName(), other.backupVaultName()) && Objects.equals(backupVaultArn(), other.backupVaultArn()) && Objects.equals(recoveryPointArn(), other.recoveryPointArn()) && Objects.equals(resourceArn(), other.resourceArn()) && Objects.equals(creationDate(), other.creationDate()) && Objects.equals(completionDate(), other.completionDate()) && Objects.equals(stateAsString(), other.stateAsString()) && Objects.equals(statusMessage(), other.statusMessage()) && Objects.equals(percentDone(), other.percentDone()) && Objects.equals(backupSizeInBytes(), other.backupSizeInBytes()) && Objects.equals(iamRoleArn(), other.iamRoleArn()) && Objects.equals(createdBy(), other.createdBy()) && Objects.equals(expectedCompletionDate(), other.expectedCompletionDate()) && Objects.equals(startBy(), other.startBy()) && Objects.equals(resourceType(), other.resourceType()) && Objects.equals(bytesTransferred(), other.bytesTransferred()); } /** * 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 String toString() { return ToString.builder("BackupJob").add("BackupJobId", backupJobId()).add("BackupVaultName", backupVaultName()) .add("BackupVaultArn", backupVaultArn()).add("RecoveryPointArn", recoveryPointArn()) .add("ResourceArn", resourceArn()).add("CreationDate", creationDate()).add("CompletionDate", completionDate()) .add("State", stateAsString()).add("StatusMessage", statusMessage()).add("PercentDone", percentDone()) .add("BackupSizeInBytes", backupSizeInBytes()).add("IamRoleArn", iamRoleArn()).add("CreatedBy", createdBy()) .add("ExpectedCompletionDate", expectedCompletionDate()).add("StartBy", startBy()) .add("ResourceType", resourceType()).add("BytesTransferred", bytesTransferred()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "BackupJobId": return Optional.ofNullable(clazz.cast(backupJobId())); case "BackupVaultName": return Optional.ofNullable(clazz.cast(backupVaultName())); case "BackupVaultArn": return Optional.ofNullable(clazz.cast(backupVaultArn())); case "RecoveryPointArn": return Optional.ofNullable(clazz.cast(recoveryPointArn())); case "ResourceArn": return Optional.ofNullable(clazz.cast(resourceArn())); case "CreationDate": return Optional.ofNullable(clazz.cast(creationDate())); case "CompletionDate": return Optional.ofNullable(clazz.cast(completionDate())); case "State": return Optional.ofNullable(clazz.cast(stateAsString())); case "StatusMessage": return Optional.ofNullable(clazz.cast(statusMessage())); case "PercentDone": return Optional.ofNullable(clazz.cast(percentDone())); case "BackupSizeInBytes": return Optional.ofNullable(clazz.cast(backupSizeInBytes())); case "IamRoleArn": return Optional.ofNullable(clazz.cast(iamRoleArn())); case "CreatedBy": return Optional.ofNullable(clazz.cast(createdBy())); case "ExpectedCompletionDate": return Optional.ofNullable(clazz.cast(expectedCompletionDate())); case "StartBy": return Optional.ofNullable(clazz.cast(startBy())); case "ResourceType": return Optional.ofNullable(clazz.cast(resourceType())); case "BytesTransferred": return Optional.ofNullable(clazz.cast(bytesTransferred())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((BackupJob) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Uniquely identifies a request to AWS Backup to back up a resource. *

* * @param backupJobId * Uniquely identifies a request to AWS Backup to back up a resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder backupJobId(String backupJobId); /** *

* 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 AWS 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 AWS 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. */ Builder backupVaultName(String backupVaultName); /** *

* An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, * arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. *

* * @param backupVaultArn * An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, * arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. * @return Returns a reference to this object so that method calls can be chained together. */ Builder backupVaultArn(String backupVaultArn); /** *

* An 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 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. */ Builder recoveryPointArn(String recoveryPointArn); /** *

* An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. *

* * @param resourceArn * An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceArn(String resourceArn); /** *

* The date and time a backup job 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 backup job 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. */ Builder creationDate(Instant creationDate); /** *

* The date and time a job to create a backup job 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. *

* * @param completionDate * The date and time a job to create a backup job 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 Returns a reference to this object so that method calls can be chained together. */ Builder completionDate(Instant completionDate); /** *

* The current state of a resource recovery point. *

* * @param state * The current state of a resource recovery point. * @see BackupJobState * @return Returns a reference to this object so that method calls can be chained together. * @see BackupJobState */ Builder state(String state); /** *

* The current state of a resource recovery point. *

* * @param state * The current state of a resource recovery point. * @see BackupJobState * @return Returns a reference to this object so that method calls can be chained together. * @see BackupJobState */ Builder state(BackupJobState state); /** *

* A detailed message explaining the status of the job to back up a resource. *

* * @param statusMessage * A detailed message explaining the status of the job to back up a resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder statusMessage(String statusMessage); /** *

* Contains an estimated percentage complete of a job at the time the job status was queried. *

* * @param percentDone * Contains an estimated percentage complete of a job at the time the job status was queried. * @return Returns a reference to this object so that method calls can be chained together. */ Builder percentDone(String percentDone); /** *

* The size, in bytes, of a backup. *

* * @param backupSizeInBytes * The size, in bytes, of a backup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder backupSizeInBytes(Long backupSizeInBytes); /** *

* Specifies the IAM role ARN used to create the target recovery point; for example, * arn:aws:iam::123456789012:role/S3Access. *

* * @param iamRoleArn * Specifies the IAM role ARN used to create the target recovery point; for example, * arn:aws:iam::123456789012:role/S3Access. * @return Returns a reference to this object so that method calls can be chained together. */ Builder iamRoleArn(String iamRoleArn); /** *

* Contains identifying information about the creation of a backup job, including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the backup plan * used to create it. *

* * @param createdBy * Contains identifying information about the creation of a backup job, including the * BackupPlanArn, BackupPlanId, BackupPlanVersion, and * BackupRuleId of the backup plan used to create it. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdBy(RecoveryPointCreator createdBy); /** *

* Contains identifying information about the creation of a backup job, including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the backup plan * used to create it. *

* This is a convenience that creates an instance of the {@link RecoveryPointCreator.Builder} avoiding the need * to create one manually via {@link RecoveryPointCreator#builder()}. * * When the {@link Consumer} completes, {@link RecoveryPointCreator.Builder#build()} is called immediately and * its result is passed to {@link #createdBy(RecoveryPointCreator)}. * * @param createdBy * a consumer that will call methods on {@link RecoveryPointCreator.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #createdBy(RecoveryPointCreator) */ default Builder createdBy(Consumer createdBy) { return createdBy(RecoveryPointCreator.builder().applyMutation(createdBy).build()); } /** *

* The date and time a job to back up resources is expected to be completed, in Unix format and Coordinated * Universal Time (UTC). The value of ExpectedCompletionDate is accurate to milliseconds. For * example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

* * @param expectedCompletionDate * The date and time a job to back up resources is expected to be completed, in Unix format and * Coordinated Universal Time (UTC). The value of ExpectedCompletionDate 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. */ Builder expectedCompletionDate(Instant expectedCompletionDate); /** *

* Specifies the time in Unix format and Coordinated Universal Time (UTC) when a backup job must be started * before it is canceled. The value is calculated by adding the start window to the scheduled time. So if the * scheduled time were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00 PM * on the date specified. The value of StartBy is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. *

* * @param startBy * Specifies the time in Unix format and Coordinated Universal Time (UTC) when a backup job must be * started before it is canceled. The value is calculated by adding the start window to the scheduled * time. So if the scheduled time were 6:00 PM and the start window is 2 hours, the StartBy * time would be 8:00 PM on the date specified. The value of StartBy 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. */ Builder startBy(Instant startBy); /** *

* The type of AWS resource to be backed-up; for example, an Amazon Elastic Block Store (Amazon EBS) volume or * an Amazon Relational Database Service (Amazon RDS) database. *

* * @param resourceType * The type of AWS resource to be backed-up; for example, an Amazon Elastic Block Store (Amazon EBS) * volume or an Amazon Relational Database Service (Amazon RDS) database. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceType(String resourceType); /** *

* The size in bytes transferred to a backup vault at the time that the job status was queried. *

* * @param bytesTransferred * The size in bytes transferred to a backup vault at the time that the job status was queried. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bytesTransferred(Long bytesTransferred); } static final class BuilderImpl implements Builder { private String backupJobId; private String backupVaultName; private String backupVaultArn; private String recoveryPointArn; private String resourceArn; private Instant creationDate; private Instant completionDate; private String state; private String statusMessage; private String percentDone; private Long backupSizeInBytes; private String iamRoleArn; private RecoveryPointCreator createdBy; private Instant expectedCompletionDate; private Instant startBy; private String resourceType; private Long bytesTransferred; private BuilderImpl() { } private BuilderImpl(BackupJob model) { backupJobId(model.backupJobId); backupVaultName(model.backupVaultName); backupVaultArn(model.backupVaultArn); recoveryPointArn(model.recoveryPointArn); resourceArn(model.resourceArn); creationDate(model.creationDate); completionDate(model.completionDate); state(model.state); statusMessage(model.statusMessage); percentDone(model.percentDone); backupSizeInBytes(model.backupSizeInBytes); iamRoleArn(model.iamRoleArn); createdBy(model.createdBy); expectedCompletionDate(model.expectedCompletionDate); startBy(model.startBy); resourceType(model.resourceType); bytesTransferred(model.bytesTransferred); } public final String getBackupJobId() { return backupJobId; } @Override public final Builder backupJobId(String backupJobId) { this.backupJobId = backupJobId; return this; } public final void setBackupJobId(String backupJobId) { this.backupJobId = backupJobId; } public final String getBackupVaultName() { return backupVaultName; } @Override public final Builder backupVaultName(String backupVaultName) { this.backupVaultName = backupVaultName; return this; } public final void setBackupVaultName(String backupVaultName) { this.backupVaultName = backupVaultName; } public final String getBackupVaultArn() { return backupVaultArn; } @Override public final Builder backupVaultArn(String backupVaultArn) { this.backupVaultArn = backupVaultArn; return this; } public final void setBackupVaultArn(String backupVaultArn) { this.backupVaultArn = backupVaultArn; } public final String getRecoveryPointArn() { return recoveryPointArn; } @Override public final Builder recoveryPointArn(String recoveryPointArn) { this.recoveryPointArn = recoveryPointArn; return this; } public final void setRecoveryPointArn(String recoveryPointArn) { this.recoveryPointArn = recoveryPointArn; } public final String getResourceArn() { return resourceArn; } @Override public final Builder resourceArn(String resourceArn) { this.resourceArn = resourceArn; return this; } public final void setResourceArn(String resourceArn) { this.resourceArn = resourceArn; } public final Instant getCreationDate() { return creationDate; } @Override public final Builder creationDate(Instant creationDate) { this.creationDate = creationDate; return this; } public final void setCreationDate(Instant creationDate) { this.creationDate = creationDate; } public final Instant getCompletionDate() { return completionDate; } @Override public final Builder completionDate(Instant completionDate) { this.completionDate = completionDate; return this; } public final void setCompletionDate(Instant completionDate) { this.completionDate = completionDate; } public final String getStateAsString() { return state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(BackupJobState state) { this.state(state.toString()); return this; } public final void setState(String state) { this.state = state; } public final String getStatusMessage() { return statusMessage; } @Override public final Builder statusMessage(String statusMessage) { this.statusMessage = statusMessage; return this; } public final void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } public final String getPercentDone() { return percentDone; } @Override public final Builder percentDone(String percentDone) { this.percentDone = percentDone; return this; } public final void setPercentDone(String percentDone) { this.percentDone = percentDone; } public final Long getBackupSizeInBytes() { return backupSizeInBytes; } @Override public final Builder backupSizeInBytes(Long backupSizeInBytes) { this.backupSizeInBytes = backupSizeInBytes; return this; } public final void setBackupSizeInBytes(Long backupSizeInBytes) { this.backupSizeInBytes = backupSizeInBytes; } public final String getIamRoleArn() { return iamRoleArn; } @Override public final Builder iamRoleArn(String iamRoleArn) { this.iamRoleArn = iamRoleArn; return this; } public final void setIamRoleArn(String iamRoleArn) { this.iamRoleArn = iamRoleArn; } public final RecoveryPointCreator.Builder getCreatedBy() { return createdBy != null ? createdBy.toBuilder() : null; } @Override public final Builder createdBy(RecoveryPointCreator createdBy) { this.createdBy = createdBy; return this; } public final void setCreatedBy(RecoveryPointCreator.BuilderImpl createdBy) { this.createdBy = createdBy != null ? createdBy.build() : null; } public final Instant getExpectedCompletionDate() { return expectedCompletionDate; } @Override public final Builder expectedCompletionDate(Instant expectedCompletionDate) { this.expectedCompletionDate = expectedCompletionDate; return this; } public final void setExpectedCompletionDate(Instant expectedCompletionDate) { this.expectedCompletionDate = expectedCompletionDate; } public final Instant getStartBy() { return startBy; } @Override public final Builder startBy(Instant startBy) { this.startBy = startBy; return this; } public final void setStartBy(Instant startBy) { this.startBy = startBy; } public final String getResourceType() { return resourceType; } @Override public final Builder resourceType(String resourceType) { this.resourceType = resourceType; return this; } public final void setResourceType(String resourceType) { this.resourceType = resourceType; } public final Long getBytesTransferred() { return bytesTransferred; } @Override public final Builder bytesTransferred(Long bytesTransferred) { this.bytesTransferred = bytesTransferred; return this; } public final void setBytesTransferred(Long bytesTransferred) { this.bytesTransferred = bytesTransferred; } @Override public BackupJob build() { return new BackupJob(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy