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

software.amazon.awssdk.services.fsx.model.Backup Maven / Gradle / Ivy

/*
 * 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.fsx.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
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 java.util.stream.Collectors;
import java.util.stream.Stream;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* A backup of an Amazon FSx for Windows File Server, Amazon FSx for Lustre file system, Amazon FSx for NetApp ONTAP * volume, or Amazon FSx for OpenZFS file system. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Backup implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField BACKUP_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("BackupId").getter(getter(Backup::backupId)).setter(setter(Builder::backupId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupId").build()).build(); private static final SdkField LIFECYCLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Lifecycle").getter(getter(Backup::lifecycleAsString)).setter(setter(Builder::lifecycle)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Lifecycle").build()).build(); private static final SdkField FAILURE_DETAILS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("FailureDetails") .getter(getter(Backup::failureDetails)).setter(setter(Builder::failureDetails)) .constructor(BackupFailureDetails::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailureDetails").build()).build(); private static final SdkField TYPE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Type") .getter(getter(Backup::typeAsString)).setter(setter(Builder::type)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Type").build()).build(); private static final SdkField PROGRESS_PERCENT_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("ProgressPercent").getter(getter(Backup::progressPercent)).setter(setter(Builder::progressPercent)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProgressPercent").build()).build(); private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreationTime").getter(getter(Backup::creationTime)).setter(setter(Builder::creationTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build(); private static final SdkField KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("KmsKeyId").getter(getter(Backup::kmsKeyId)).setter(setter(Builder::kmsKeyId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KmsKeyId").build()).build(); private static final SdkField RESOURCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ResourceARN").getter(getter(Backup::resourceARN)).setter(setter(Builder::resourceARN)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceARN").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(Backup::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Tag::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField FILE_SYSTEM_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("FileSystem").getter(getter(Backup::fileSystem)).setter(setter(Builder::fileSystem)) .constructor(FileSystem::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FileSystem").build()).build(); private static final SdkField DIRECTORY_INFORMATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("DirectoryInformation") .getter(getter(Backup::directoryInformation)).setter(setter(Builder::directoryInformation)) .constructor(ActiveDirectoryBackupAttributes::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DirectoryInformation").build()) .build(); private static final SdkField OWNER_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("OwnerId").getter(getter(Backup::ownerId)).setter(setter(Builder::ownerId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OwnerId").build()).build(); private static final SdkField SOURCE_BACKUP_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SourceBackupId").getter(getter(Backup::sourceBackupId)).setter(setter(Builder::sourceBackupId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceBackupId").build()).build(); private static final SdkField SOURCE_BACKUP_REGION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SourceBackupRegion").getter(getter(Backup::sourceBackupRegion)) .setter(setter(Builder::sourceBackupRegion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceBackupRegion").build()) .build(); private static final SdkField RESOURCE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ResourceType").getter(getter(Backup::resourceTypeAsString)).setter(setter(Builder::resourceType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceType").build()).build(); private static final SdkField VOLUME_FIELD = SdkField. builder(MarshallingType.SDK_POJO).memberName("Volume") .getter(getter(Backup::volume)).setter(setter(Builder::volume)).constructor(Volume::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Volume").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BACKUP_ID_FIELD, LIFECYCLE_FIELD, FAILURE_DETAILS_FIELD, TYPE_FIELD, PROGRESS_PERCENT_FIELD, CREATION_TIME_FIELD, KMS_KEY_ID_FIELD, RESOURCE_ARN_FIELD, TAGS_FIELD, FILE_SYSTEM_FIELD, DIRECTORY_INFORMATION_FIELD, OWNER_ID_FIELD, SOURCE_BACKUP_ID_FIELD, SOURCE_BACKUP_REGION_FIELD, RESOURCE_TYPE_FIELD, VOLUME_FIELD)); private static final long serialVersionUID = 1L; private final String backupId; private final String lifecycle; private final BackupFailureDetails failureDetails; private final String type; private final Integer progressPercent; private final Instant creationTime; private final String kmsKeyId; private final String resourceARN; private final List tags; private final FileSystem fileSystem; private final ActiveDirectoryBackupAttributes directoryInformation; private final String ownerId; private final String sourceBackupId; private final String sourceBackupRegion; private final String resourceType; private final Volume volume; private Backup(BuilderImpl builder) { this.backupId = builder.backupId; this.lifecycle = builder.lifecycle; this.failureDetails = builder.failureDetails; this.type = builder.type; this.progressPercent = builder.progressPercent; this.creationTime = builder.creationTime; this.kmsKeyId = builder.kmsKeyId; this.resourceARN = builder.resourceARN; this.tags = builder.tags; this.fileSystem = builder.fileSystem; this.directoryInformation = builder.directoryInformation; this.ownerId = builder.ownerId; this.sourceBackupId = builder.sourceBackupId; this.sourceBackupRegion = builder.sourceBackupRegion; this.resourceType = builder.resourceType; this.volume = builder.volume; } /** *

* The ID of the backup. *

* * @return The ID of the backup. */ public final String backupId() { return backupId; } /** *

* The lifecycle status of the backup. *

*
    *
  • *

    * AVAILABLE - The backup is fully available. *

    *
  • *
  • *

    * PENDING - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started creating * the backup. *

    *
  • *
  • *

    * CREATING - Amazon FSx is creating the backup. *

    *
  • *
  • *

    * TRANSFERRING - For user-initiated backups on Lustre file systems only; Amazon FSx is transferring * the backup to Amazon S3. *

    *
  • *
  • *

    * COPYING - Amazon FSx is copying the backup. *

    *
  • *
  • *

    * DELETED - Amazon FSx deleted the backup and it's no longer available. *

    *
  • *
  • *

    * FAILED - Amazon FSx couldn't finish the backup. *

    *
  • *
*

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

* * @return The lifecycle status of the backup.

*
    *
  • *

    * AVAILABLE - The backup is fully available. *

    *
  • *
  • *

    * PENDING - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started * creating the backup. *

    *
  • *
  • *

    * CREATING - Amazon FSx is creating the backup. *

    *
  • *
  • *

    * TRANSFERRING - For user-initiated backups on Lustre file systems only; Amazon FSx is * transferring the backup to Amazon S3. *

    *
  • *
  • *

    * COPYING - Amazon FSx is copying the backup. *

    *
  • *
  • *

    * DELETED - Amazon FSx deleted the backup and it's no longer available. *

    *
  • *
  • *

    * FAILED - Amazon FSx couldn't finish the backup. *

    *
  • * @see BackupLifecycle */ public final BackupLifecycle lifecycle() { return BackupLifecycle.fromValue(lifecycle); } /** *

    * The lifecycle status of the backup. *

    *
      *
    • *

      * AVAILABLE - The backup is fully available. *

      *
    • *
    • *

      * PENDING - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started creating * the backup. *

      *
    • *
    • *

      * CREATING - Amazon FSx is creating the backup. *

      *
    • *
    • *

      * TRANSFERRING - For user-initiated backups on Lustre file systems only; Amazon FSx is transferring * the backup to Amazon S3. *

      *
    • *
    • *

      * COPYING - Amazon FSx is copying the backup. *

      *
    • *
    • *

      * DELETED - Amazon FSx deleted the backup and it's no longer available. *

      *
    • *
    • *

      * FAILED - Amazon FSx couldn't finish the backup. *

      *
    • *
    *

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

    * * @return The lifecycle status of the backup.

    *
      *
    • *

      * AVAILABLE - The backup is fully available. *

      *
    • *
    • *

      * PENDING - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started * creating the backup. *

      *
    • *
    • *

      * CREATING - Amazon FSx is creating the backup. *

      *
    • *
    • *

      * TRANSFERRING - For user-initiated backups on Lustre file systems only; Amazon FSx is * transferring the backup to Amazon S3. *

      *
    • *
    • *

      * COPYING - Amazon FSx is copying the backup. *

      *
    • *
    • *

      * DELETED - Amazon FSx deleted the backup and it's no longer available. *

      *
    • *
    • *

      * FAILED - Amazon FSx couldn't finish the backup. *

      *
    • * @see BackupLifecycle */ public final String lifecycleAsString() { return lifecycle; } /** *

      * Details explaining any failures that occurred when creating a backup. *

      * * @return Details explaining any failures that occurred when creating a backup. */ public final BackupFailureDetails failureDetails() { return failureDetails; } /** *

      * The type of the file-system backup. *

      *

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

      * * @return The type of the file-system backup. * @see BackupType */ public final BackupType type() { return BackupType.fromValue(type); } /** *

      * The type of the file-system backup. *

      *

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

      * * @return The type of the file-system backup. * @see BackupType */ public final String typeAsString() { return type; } /** * Returns the value of the ProgressPercent property for this object. * * @return The value of the ProgressPercent property for this object. */ public final Integer progressPercent() { return progressPercent; } /** *

      * The time when a particular backup was created. *

      * * @return The time when a particular backup was created. */ public final Instant creationTime() { return creationTime; } /** *

      * The ID of the Key Management Service (KMS) key used to encrypt the backup of the Amazon FSx file system's data at * rest. *

      * * @return The ID of the Key Management Service (KMS) key used to encrypt the backup of the Amazon FSx file system's * data at rest. */ public final String kmsKeyId() { return kmsKeyId; } /** *

      * The Amazon Resource Name (ARN) for the backup resource. *

      * * @return The Amazon Resource Name (ARN) for the backup resource. */ public final String resourceARN() { return resourceARN; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

      * The tags associated with a particular file system. *

      *

      * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

      * * @return The tags associated with a particular file system. */ public final List tags() { return tags; } /** *

      * The metadata of the file system associated with the backup. This metadata is persisted even if the file system is * deleted. *

      * * @return The metadata of the file system associated with the backup. This metadata is persisted even if the file * system is deleted. */ public final FileSystem fileSystem() { return fileSystem; } /** *

      * The configuration of the self-managed Microsoft Active Directory directory to which the Windows File Server * instance is joined. *

      * * @return The configuration of the self-managed Microsoft Active Directory directory to which the Windows File * Server instance is joined. */ public final ActiveDirectoryBackupAttributes directoryInformation() { return directoryInformation; } /** * Returns the value of the OwnerId property for this object. * * @return The value of the OwnerId property for this object. */ public final String ownerId() { return ownerId; } /** * Returns the value of the SourceBackupId property for this object. * * @return The value of the SourceBackupId property for this object. */ public final String sourceBackupId() { return sourceBackupId; } /** *

      * The source Region of the backup. Specifies the Region from where this backup is copied. *

      * * @return The source Region of the backup. Specifies the Region from where this backup is copied. */ public final String sourceBackupRegion() { return sourceBackupRegion; } /** *

      * Specifies the resource type that's backed up. *

      *

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

      * * @return Specifies the resource type that's backed up. * @see ResourceType */ public final ResourceType resourceType() { return ResourceType.fromValue(resourceType); } /** *

      * Specifies the resource type that's backed up. *

      *

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

      * * @return Specifies the resource type that's backed up. * @see ResourceType */ public final String resourceTypeAsString() { return resourceType; } /** * Returns the value of the Volume property for this object. * * @return The value of the Volume property for this object. */ public final Volume volume() { return volume; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(backupId()); hashCode = 31 * hashCode + Objects.hashCode(lifecycleAsString()); hashCode = 31 * hashCode + Objects.hashCode(failureDetails()); hashCode = 31 * hashCode + Objects.hashCode(typeAsString()); hashCode = 31 * hashCode + Objects.hashCode(progressPercent()); hashCode = 31 * hashCode + Objects.hashCode(creationTime()); hashCode = 31 * hashCode + Objects.hashCode(kmsKeyId()); hashCode = 31 * hashCode + Objects.hashCode(resourceARN()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(fileSystem()); hashCode = 31 * hashCode + Objects.hashCode(directoryInformation()); hashCode = 31 * hashCode + Objects.hashCode(ownerId()); hashCode = 31 * hashCode + Objects.hashCode(sourceBackupId()); hashCode = 31 * hashCode + Objects.hashCode(sourceBackupRegion()); hashCode = 31 * hashCode + Objects.hashCode(resourceTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(volume()); 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 Backup)) { return false; } Backup other = (Backup) obj; return Objects.equals(backupId(), other.backupId()) && Objects.equals(lifecycleAsString(), other.lifecycleAsString()) && Objects.equals(failureDetails(), other.failureDetails()) && Objects.equals(typeAsString(), other.typeAsString()) && Objects.equals(progressPercent(), other.progressPercent()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(kmsKeyId(), other.kmsKeyId()) && Objects.equals(resourceARN(), other.resourceARN()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(fileSystem(), other.fileSystem()) && Objects.equals(directoryInformation(), other.directoryInformation()) && Objects.equals(ownerId(), other.ownerId()) && Objects.equals(sourceBackupId(), other.sourceBackupId()) && Objects.equals(sourceBackupRegion(), other.sourceBackupRegion()) && Objects.equals(resourceTypeAsString(), other.resourceTypeAsString()) && Objects.equals(volume(), other.volume()); } /** * 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("Backup").add("BackupId", backupId()).add("Lifecycle", lifecycleAsString()) .add("FailureDetails", failureDetails()).add("Type", typeAsString()).add("ProgressPercent", progressPercent()) .add("CreationTime", creationTime()).add("KmsKeyId", kmsKeyId()).add("ResourceARN", resourceARN()) .add("Tags", hasTags() ? tags() : null).add("FileSystem", fileSystem()) .add("DirectoryInformation", directoryInformation()).add("OwnerId", ownerId()) .add("SourceBackupId", sourceBackupId()).add("SourceBackupRegion", sourceBackupRegion()) .add("ResourceType", resourceTypeAsString()).add("Volume", volume()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "BackupId": return Optional.ofNullable(clazz.cast(backupId())); case "Lifecycle": return Optional.ofNullable(clazz.cast(lifecycleAsString())); case "FailureDetails": return Optional.ofNullable(clazz.cast(failureDetails())); case "Type": return Optional.ofNullable(clazz.cast(typeAsString())); case "ProgressPercent": return Optional.ofNullable(clazz.cast(progressPercent())); case "CreationTime": return Optional.ofNullable(clazz.cast(creationTime())); case "KmsKeyId": return Optional.ofNullable(clazz.cast(kmsKeyId())); case "ResourceARN": return Optional.ofNullable(clazz.cast(resourceARN())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "FileSystem": return Optional.ofNullable(clazz.cast(fileSystem())); case "DirectoryInformation": return Optional.ofNullable(clazz.cast(directoryInformation())); case "OwnerId": return Optional.ofNullable(clazz.cast(ownerId())); case "SourceBackupId": return Optional.ofNullable(clazz.cast(sourceBackupId())); case "SourceBackupRegion": return Optional.ofNullable(clazz.cast(sourceBackupRegion())); case "ResourceType": return Optional.ofNullable(clazz.cast(resourceTypeAsString())); case "Volume": return Optional.ofNullable(clazz.cast(volume())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Backup) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The ID of the backup. *

      * * @param backupId * The ID of the backup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder backupId(String backupId); /** *

      * The lifecycle status of the backup. *

      *
        *
      • *

        * AVAILABLE - The backup is fully available. *

        *
      • *
      • *

        * PENDING - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started * creating the backup. *

        *
      • *
      • *

        * CREATING - Amazon FSx is creating the backup. *

        *
      • *
      • *

        * TRANSFERRING - For user-initiated backups on Lustre file systems only; Amazon FSx is * transferring the backup to Amazon S3. *

        *
      • *
      • *

        * COPYING - Amazon FSx is copying the backup. *

        *
      • *
      • *

        * DELETED - Amazon FSx deleted the backup and it's no longer available. *

        *
      • *
      • *

        * FAILED - Amazon FSx couldn't finish the backup. *

        *
      • *
      * * @param lifecycle * The lifecycle status of the backup.

      *
        *
      • *

        * AVAILABLE - The backup is fully available. *

        *
      • *
      • *

        * PENDING - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't * started creating the backup. *

        *
      • *
      • *

        * CREATING - Amazon FSx is creating the backup. *

        *
      • *
      • *

        * TRANSFERRING - For user-initiated backups on Lustre file systems only; Amazon FSx is * transferring the backup to Amazon S3. *

        *
      • *
      • *

        * COPYING - Amazon FSx is copying the backup. *

        *
      • *
      • *

        * DELETED - Amazon FSx deleted the backup and it's no longer available. *

        *
      • *
      • *

        * FAILED - Amazon FSx couldn't finish the backup. *

        *
      • * @see BackupLifecycle * @return Returns a reference to this object so that method calls can be chained together. * @see BackupLifecycle */ Builder lifecycle(String lifecycle); /** *

        * The lifecycle status of the backup. *

        *
          *
        • *

          * AVAILABLE - The backup is fully available. *

          *
        • *
        • *

          * PENDING - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started * creating the backup. *

          *
        • *
        • *

          * CREATING - Amazon FSx is creating the backup. *

          *
        • *
        • *

          * TRANSFERRING - For user-initiated backups on Lustre file systems only; Amazon FSx is * transferring the backup to Amazon S3. *

          *
        • *
        • *

          * COPYING - Amazon FSx is copying the backup. *

          *
        • *
        • *

          * DELETED - Amazon FSx deleted the backup and it's no longer available. *

          *
        • *
        • *

          * FAILED - Amazon FSx couldn't finish the backup. *

          *
        • *
        * * @param lifecycle * The lifecycle status of the backup.

        *
          *
        • *

          * AVAILABLE - The backup is fully available. *

          *
        • *
        • *

          * PENDING - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't * started creating the backup. *

          *
        • *
        • *

          * CREATING - Amazon FSx is creating the backup. *

          *
        • *
        • *

          * TRANSFERRING - For user-initiated backups on Lustre file systems only; Amazon FSx is * transferring the backup to Amazon S3. *

          *
        • *
        • *

          * COPYING - Amazon FSx is copying the backup. *

          *
        • *
        • *

          * DELETED - Amazon FSx deleted the backup and it's no longer available. *

          *
        • *
        • *

          * FAILED - Amazon FSx couldn't finish the backup. *

          *
        • * @see BackupLifecycle * @return Returns a reference to this object so that method calls can be chained together. * @see BackupLifecycle */ Builder lifecycle(BackupLifecycle lifecycle); /** *

          * Details explaining any failures that occurred when creating a backup. *

          * * @param failureDetails * Details explaining any failures that occurred when creating a backup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder failureDetails(BackupFailureDetails failureDetails); /** *

          * Details explaining any failures that occurred when creating a backup. *

          * This is a convenience method that creates an instance of the {@link BackupFailureDetails.Builder} avoiding * the need to create one manually via {@link BackupFailureDetails#builder()}. * *

          * When the {@link Consumer} completes, {@link BackupFailureDetails.Builder#build()} is called immediately and * its result is passed to {@link #failureDetails(BackupFailureDetails)}. * * @param failureDetails * a consumer that will call methods on {@link BackupFailureDetails.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #failureDetails(BackupFailureDetails) */ default Builder failureDetails(Consumer failureDetails) { return failureDetails(BackupFailureDetails.builder().applyMutation(failureDetails).build()); } /** *

          * The type of the file-system backup. *

          * * @param type * The type of the file-system backup. * @see BackupType * @return Returns a reference to this object so that method calls can be chained together. * @see BackupType */ Builder type(String type); /** *

          * The type of the file-system backup. *

          * * @param type * The type of the file-system backup. * @see BackupType * @return Returns a reference to this object so that method calls can be chained together. * @see BackupType */ Builder type(BackupType type); /** * Sets the value of the ProgressPercent property for this object. * * @param progressPercent * The new value for the ProgressPercent property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder progressPercent(Integer progressPercent); /** *

          * The time when a particular backup was created. *

          * * @param creationTime * The time when a particular backup was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationTime(Instant creationTime); /** *

          * The ID of the Key Management Service (KMS) key used to encrypt the backup of the Amazon FSx file system's * data at rest. *

          * * @param kmsKeyId * The ID of the Key Management Service (KMS) key used to encrypt the backup of the Amazon FSx file * system's data at rest. * @return Returns a reference to this object so that method calls can be chained together. */ Builder kmsKeyId(String kmsKeyId); /** *

          * The Amazon Resource Name (ARN) for the backup resource. *

          * * @param resourceARN * The Amazon Resource Name (ARN) for the backup resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceARN(String resourceARN); /** *

          * The tags associated with a particular file system. *

          * * @param tags * The tags associated with a particular file system. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

          * The tags associated with a particular file system. *

          * * @param tags * The tags associated with a particular file system. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

          * The tags associated with a particular file system. *

          * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.fsx.model.Tag.Builder} avoiding the need to create one manually via * {@link software.amazon.awssdk.services.fsx.model.Tag#builder()}. * *

          * When the {@link Consumer} completes, {@link software.amazon.awssdk.services.fsx.model.Tag.Builder#build()} is * called immediately and its result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on {@link software.amazon.awssdk.services.fsx.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); /** *

          * The metadata of the file system associated with the backup. This metadata is persisted even if the file * system is deleted. *

          * * @param fileSystem * The metadata of the file system associated with the backup. This metadata is persisted even if the * file system is deleted. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fileSystem(FileSystem fileSystem); /** *

          * The metadata of the file system associated with the backup. This metadata is persisted even if the file * system is deleted. *

          * This is a convenience method that creates an instance of the {@link FileSystem.Builder} avoiding the need to * create one manually via {@link FileSystem#builder()}. * *

          * When the {@link Consumer} completes, {@link FileSystem.Builder#build()} is called immediately and its result * is passed to {@link #fileSystem(FileSystem)}. * * @param fileSystem * a consumer that will call methods on {@link FileSystem.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #fileSystem(FileSystem) */ default Builder fileSystem(Consumer fileSystem) { return fileSystem(FileSystem.builder().applyMutation(fileSystem).build()); } /** *

          * The configuration of the self-managed Microsoft Active Directory directory to which the Windows File Server * instance is joined. *

          * * @param directoryInformation * The configuration of the self-managed Microsoft Active Directory directory to which the Windows File * Server instance is joined. * @return Returns a reference to this object so that method calls can be chained together. */ Builder directoryInformation(ActiveDirectoryBackupAttributes directoryInformation); /** *

          * The configuration of the self-managed Microsoft Active Directory directory to which the Windows File Server * instance is joined. *

          * This is a convenience method that creates an instance of the {@link ActiveDirectoryBackupAttributes.Builder} * avoiding the need to create one manually via {@link ActiveDirectoryBackupAttributes#builder()}. * *

          * When the {@link Consumer} completes, {@link ActiveDirectoryBackupAttributes.Builder#build()} is called * immediately and its result is passed to {@link #directoryInformation(ActiveDirectoryBackupAttributes)}. * * @param directoryInformation * a consumer that will call methods on {@link ActiveDirectoryBackupAttributes.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #directoryInformation(ActiveDirectoryBackupAttributes) */ default Builder directoryInformation(Consumer directoryInformation) { return directoryInformation(ActiveDirectoryBackupAttributes.builder().applyMutation(directoryInformation).build()); } /** * Sets the value of the OwnerId property for this object. * * @param ownerId * The new value for the OwnerId property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ownerId(String ownerId); /** * Sets the value of the SourceBackupId property for this object. * * @param sourceBackupId * The new value for the SourceBackupId property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceBackupId(String sourceBackupId); /** *

          * The source Region of the backup. Specifies the Region from where this backup is copied. *

          * * @param sourceBackupRegion * The source Region of the backup. Specifies the Region from where this backup is copied. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceBackupRegion(String sourceBackupRegion); /** *

          * Specifies the resource type that's backed up. *

          * * @param resourceType * Specifies the resource type that's backed up. * @see ResourceType * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ Builder resourceType(String resourceType); /** *

          * Specifies the resource type that's backed up. *

          * * @param resourceType * Specifies the resource type that's backed up. * @see ResourceType * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ Builder resourceType(ResourceType resourceType); /** * Sets the value of the Volume property for this object. * * @param volume * The new value for the Volume property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder volume(Volume volume); /** * Sets the value of the Volume property for this object. * * This is a convenience method that creates an instance of the {@link Volume.Builder} avoiding the need to * create one manually via {@link Volume#builder()}. * *

          * When the {@link Consumer} completes, {@link Volume.Builder#build()} is called immediately and its result is * passed to {@link #volume(Volume)}. * * @param volume * a consumer that will call methods on {@link Volume.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #volume(Volume) */ default Builder volume(Consumer volume) { return volume(Volume.builder().applyMutation(volume).build()); } } static final class BuilderImpl implements Builder { private String backupId; private String lifecycle; private BackupFailureDetails failureDetails; private String type; private Integer progressPercent; private Instant creationTime; private String kmsKeyId; private String resourceARN; private List tags = DefaultSdkAutoConstructList.getInstance(); private FileSystem fileSystem; private ActiveDirectoryBackupAttributes directoryInformation; private String ownerId; private String sourceBackupId; private String sourceBackupRegion; private String resourceType; private Volume volume; private BuilderImpl() { } private BuilderImpl(Backup model) { backupId(model.backupId); lifecycle(model.lifecycle); failureDetails(model.failureDetails); type(model.type); progressPercent(model.progressPercent); creationTime(model.creationTime); kmsKeyId(model.kmsKeyId); resourceARN(model.resourceARN); tags(model.tags); fileSystem(model.fileSystem); directoryInformation(model.directoryInformation); ownerId(model.ownerId); sourceBackupId(model.sourceBackupId); sourceBackupRegion(model.sourceBackupRegion); resourceType(model.resourceType); volume(model.volume); } public final String getBackupId() { return backupId; } public final void setBackupId(String backupId) { this.backupId = backupId; } @Override public final Builder backupId(String backupId) { this.backupId = backupId; return this; } public final String getLifecycle() { return lifecycle; } public final void setLifecycle(String lifecycle) { this.lifecycle = lifecycle; } @Override public final Builder lifecycle(String lifecycle) { this.lifecycle = lifecycle; return this; } @Override public final Builder lifecycle(BackupLifecycle lifecycle) { this.lifecycle(lifecycle == null ? null : lifecycle.toString()); return this; } public final BackupFailureDetails.Builder getFailureDetails() { return failureDetails != null ? failureDetails.toBuilder() : null; } public final void setFailureDetails(BackupFailureDetails.BuilderImpl failureDetails) { this.failureDetails = failureDetails != null ? failureDetails.build() : null; } @Override public final Builder failureDetails(BackupFailureDetails failureDetails) { this.failureDetails = failureDetails; return this; } public final String getType() { return type; } public final void setType(String type) { this.type = type; } @Override public final Builder type(String type) { this.type = type; return this; } @Override public final Builder type(BackupType type) { this.type(type == null ? null : type.toString()); return this; } public final Integer getProgressPercent() { return progressPercent; } public final void setProgressPercent(Integer progressPercent) { this.progressPercent = progressPercent; } @Override public final Builder progressPercent(Integer progressPercent) { this.progressPercent = progressPercent; return this; } public final Instant getCreationTime() { return creationTime; } public final void setCreationTime(Instant creationTime) { this.creationTime = creationTime; } @Override public final Builder creationTime(Instant creationTime) { this.creationTime = creationTime; return this; } public final String getKmsKeyId() { return kmsKeyId; } public final void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } @Override public final Builder kmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; return this; } public final String getResourceARN() { return resourceARN; } public final void setResourceARN(String resourceARN) { this.resourceARN = resourceARN; } @Override public final Builder resourceARN(String resourceARN) { this.resourceARN = resourceARN; return this; } public final List getTags() { List result = TagsCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagsCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagsCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final FileSystem.Builder getFileSystem() { return fileSystem != null ? fileSystem.toBuilder() : null; } public final void setFileSystem(FileSystem.BuilderImpl fileSystem) { this.fileSystem = fileSystem != null ? fileSystem.build() : null; } @Override public final Builder fileSystem(FileSystem fileSystem) { this.fileSystem = fileSystem; return this; } public final ActiveDirectoryBackupAttributes.Builder getDirectoryInformation() { return directoryInformation != null ? directoryInformation.toBuilder() : null; } public final void setDirectoryInformation(ActiveDirectoryBackupAttributes.BuilderImpl directoryInformation) { this.directoryInformation = directoryInformation != null ? directoryInformation.build() : null; } @Override public final Builder directoryInformation(ActiveDirectoryBackupAttributes directoryInformation) { this.directoryInformation = directoryInformation; return this; } public final String getOwnerId() { return ownerId; } public final void setOwnerId(String ownerId) { this.ownerId = ownerId; } @Override public final Builder ownerId(String ownerId) { this.ownerId = ownerId; return this; } public final String getSourceBackupId() { return sourceBackupId; } public final void setSourceBackupId(String sourceBackupId) { this.sourceBackupId = sourceBackupId; } @Override public final Builder sourceBackupId(String sourceBackupId) { this.sourceBackupId = sourceBackupId; return this; } public final String getSourceBackupRegion() { return sourceBackupRegion; } public final void setSourceBackupRegion(String sourceBackupRegion) { this.sourceBackupRegion = sourceBackupRegion; } @Override public final Builder sourceBackupRegion(String sourceBackupRegion) { this.sourceBackupRegion = sourceBackupRegion; return this; } public final String getResourceType() { return resourceType; } public final void setResourceType(String resourceType) { this.resourceType = resourceType; } @Override public final Builder resourceType(String resourceType) { this.resourceType = resourceType; return this; } @Override public final Builder resourceType(ResourceType resourceType) { this.resourceType(resourceType == null ? null : resourceType.toString()); return this; } public final Volume.Builder getVolume() { return volume != null ? volume.toBuilder() : null; } public final void setVolume(Volume.BuilderImpl volume) { this.volume = volume != null ? volume.build() : null; } @Override public final Builder volume(Volume volume) { this.volume = volume; return this; } @Override public Backup build() { return new Backup(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy