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

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

Go to download

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

There is a newer version: 2.28.4
Show newest version
/*
 * 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.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;

/**
 * 

* Used to specify changes to the OpenZFS configuration for the volume that you are updating. *

*/ @Generated("software.amazon.awssdk:codegen") public final class UpdateOpenZFSVolumeConfiguration implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField STORAGE_CAPACITY_RESERVATION_GIB_FIELD = SdkField . builder(MarshallingType.INTEGER) .memberName("StorageCapacityReservationGiB") .getter(getter(UpdateOpenZFSVolumeConfiguration::storageCapacityReservationGiB)) .setter(setter(Builder::storageCapacityReservationGiB)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StorageCapacityReservationGiB") .build()).build(); private static final SdkField STORAGE_CAPACITY_QUOTA_GIB_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("StorageCapacityQuotaGiB").getter(getter(UpdateOpenZFSVolumeConfiguration::storageCapacityQuotaGiB)) .setter(setter(Builder::storageCapacityQuotaGiB)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StorageCapacityQuotaGiB").build()) .build(); private static final SdkField RECORD_SIZE_KIB_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("RecordSizeKiB").getter(getter(UpdateOpenZFSVolumeConfiguration::recordSizeKiB)) .setter(setter(Builder::recordSizeKiB)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RecordSizeKiB").build()).build(); private static final SdkField DATA_COMPRESSION_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DataCompressionType").getter(getter(UpdateOpenZFSVolumeConfiguration::dataCompressionTypeAsString)) .setter(setter(Builder::dataCompressionType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DataCompressionType").build()) .build(); private static final SdkField> NFS_EXPORTS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("NfsExports") .getter(getter(UpdateOpenZFSVolumeConfiguration::nfsExports)) .setter(setter(Builder::nfsExports)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NfsExports").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(OpenZFSNfsExport::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> USER_AND_GROUP_QUOTAS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("UserAndGroupQuotas") .getter(getter(UpdateOpenZFSVolumeConfiguration::userAndGroupQuotas)) .setter(setter(Builder::userAndGroupQuotas)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UserAndGroupQuotas").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(OpenZFSUserOrGroupQuota::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField READ_ONLY_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("ReadOnly").getter(getter(UpdateOpenZFSVolumeConfiguration::readOnly)).setter(setter(Builder::readOnly)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReadOnly").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList( STORAGE_CAPACITY_RESERVATION_GIB_FIELD, STORAGE_CAPACITY_QUOTA_GIB_FIELD, RECORD_SIZE_KIB_FIELD, DATA_COMPRESSION_TYPE_FIELD, NFS_EXPORTS_FIELD, USER_AND_GROUP_QUOTAS_FIELD, READ_ONLY_FIELD)); private static final long serialVersionUID = 1L; private final Integer storageCapacityReservationGiB; private final Integer storageCapacityQuotaGiB; private final Integer recordSizeKiB; private final String dataCompressionType; private final List nfsExports; private final List userAndGroupQuotas; private final Boolean readOnly; private UpdateOpenZFSVolumeConfiguration(BuilderImpl builder) { this.storageCapacityReservationGiB = builder.storageCapacityReservationGiB; this.storageCapacityQuotaGiB = builder.storageCapacityQuotaGiB; this.recordSizeKiB = builder.recordSizeKiB; this.dataCompressionType = builder.dataCompressionType; this.nfsExports = builder.nfsExports; this.userAndGroupQuotas = builder.userAndGroupQuotas; this.readOnly = builder.readOnly; } /** *

* The amount of storage in gibibytes (GiB) to reserve from the parent volume. You can't reserve more storage than * the parent volume has reserved. You can specify a value of -1 to unset a volume's storage capacity * reservation. *

* * @return The amount of storage in gibibytes (GiB) to reserve from the parent volume. You can't reserve more * storage than the parent volume has reserved. You can specify a value of -1 to unset a * volume's storage capacity reservation. */ public final Integer storageCapacityReservationGiB() { return storageCapacityReservationGiB; } /** *

* The maximum amount of storage in gibibytes (GiB) that the volume can use from its parent. You can specify a quota * larger than the storage on the parent volume. You can specify a value of -1 to unset a volume's * storage capacity quota. *

* * @return The maximum amount of storage in gibibytes (GiB) that the volume can use from its parent. You can specify * a quota larger than the storage on the parent volume. You can specify a value of -1 to unset * a volume's storage capacity quota. */ public final Integer storageCapacityQuotaGiB() { return storageCapacityQuotaGiB; } /** *

* Specifies the record size of an OpenZFS volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, 64, 128, 256, * 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. Database workflows * can benefit from a smaller record size, while streaming workflows can benefit from a larger record size. For * additional guidance on when to set a custom record size, see Tips for * maximizing performance in the Amazon FSx for OpenZFS User Guide. *

* * @return Specifies the record size of an OpenZFS volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, 64, * 128, 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. * Database workflows can benefit from a smaller record size, while streaming workflows can benefit from a * larger record size. For additional guidance on when to set a custom record size, see Tips * for maximizing performance in the Amazon FSx for OpenZFS User Guide. */ public final Integer recordSizeKiB() { return recordSizeKiB; } /** *

* Specifies the method used to compress the data on the volume. The compression type is NONE by * default. *

*
    *
  • *

    * NONE - Doesn't compress the data on the volume. NONE is the default. *

    *
  • *
  • *

    * ZSTD - Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. Compared * to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization. *

    *
  • *
  • *

    * LZ4 - Compresses the data in the volume using the LZ4 compression algorithm. Compared to Z-Standard, * LZ4 is less compute-intensive and delivers higher write throughput speeds. *

    *
  • *
*

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

* * @return Specifies the method used to compress the data on the volume. The compression type is NONE * by default.

*
    *
  • *

    * NONE - Doesn't compress the data on the volume. NONE is the default. *

    *
  • *
  • *

    * ZSTD - Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. * Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization. *

    *
  • *
  • *

    * LZ4 - Compresses the data in the volume using the LZ4 compression algorithm. Compared to * Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds. *

    *
  • * @see OpenZFSDataCompressionType */ public final OpenZFSDataCompressionType dataCompressionType() { return OpenZFSDataCompressionType.fromValue(dataCompressionType); } /** *

    * Specifies the method used to compress the data on the volume. The compression type is NONE by * default. *

    *
      *
    • *

      * NONE - Doesn't compress the data on the volume. NONE is the default. *

      *
    • *
    • *

      * ZSTD - Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. Compared * to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization. *

      *
    • *
    • *

      * LZ4 - Compresses the data in the volume using the LZ4 compression algorithm. Compared to Z-Standard, * LZ4 is less compute-intensive and delivers higher write throughput speeds. *

      *
    • *
    *

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

    * * @return Specifies the method used to compress the data on the volume. The compression type is NONE * by default.

    *
      *
    • *

      * NONE - Doesn't compress the data on the volume. NONE is the default. *

      *
    • *
    • *

      * ZSTD - Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. * Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization. *

      *
    • *
    • *

      * LZ4 - Compresses the data in the volume using the LZ4 compression algorithm. Compared to * Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds. *

      *
    • * @see OpenZFSDataCompressionType */ public final String dataCompressionTypeAsString() { return dataCompressionType; } /** * For responses, this returns true if the service returned a value for the NfsExports 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 hasNfsExports() { return nfsExports != null && !(nfsExports instanceof SdkAutoConstructList); } /** *

      * The configuration object for mounting a Network File System (NFS) 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 #hasNfsExports} method. *

      * * @return The configuration object for mounting a Network File System (NFS) file system. */ public final List nfsExports() { return nfsExports; } /** * For responses, this returns true if the service returned a value for the UserAndGroupQuotas 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 hasUserAndGroupQuotas() { return userAndGroupQuotas != null && !(userAndGroupQuotas instanceof SdkAutoConstructList); } /** *

      * An object specifying how much storage users or groups can use on the volume. *

      *

      * 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 #hasUserAndGroupQuotas} method. *

      * * @return An object specifying how much storage users or groups can use on the volume. */ public final List userAndGroupQuotas() { return userAndGroupQuotas; } /** *

      * A Boolean value indicating whether the volume is read-only. *

      * * @return A Boolean value indicating whether the volume is read-only. */ public final Boolean readOnly() { return readOnly; } @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(storageCapacityReservationGiB()); hashCode = 31 * hashCode + Objects.hashCode(storageCapacityQuotaGiB()); hashCode = 31 * hashCode + Objects.hashCode(recordSizeKiB()); hashCode = 31 * hashCode + Objects.hashCode(dataCompressionTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasNfsExports() ? nfsExports() : null); hashCode = 31 * hashCode + Objects.hashCode(hasUserAndGroupQuotas() ? userAndGroupQuotas() : null); hashCode = 31 * hashCode + Objects.hashCode(readOnly()); 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 UpdateOpenZFSVolumeConfiguration)) { return false; } UpdateOpenZFSVolumeConfiguration other = (UpdateOpenZFSVolumeConfiguration) obj; return Objects.equals(storageCapacityReservationGiB(), other.storageCapacityReservationGiB()) && Objects.equals(storageCapacityQuotaGiB(), other.storageCapacityQuotaGiB()) && Objects.equals(recordSizeKiB(), other.recordSizeKiB()) && Objects.equals(dataCompressionTypeAsString(), other.dataCompressionTypeAsString()) && hasNfsExports() == other.hasNfsExports() && Objects.equals(nfsExports(), other.nfsExports()) && hasUserAndGroupQuotas() == other.hasUserAndGroupQuotas() && Objects.equals(userAndGroupQuotas(), other.userAndGroupQuotas()) && Objects.equals(readOnly(), other.readOnly()); } /** * 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("UpdateOpenZFSVolumeConfiguration") .add("StorageCapacityReservationGiB", storageCapacityReservationGiB()) .add("StorageCapacityQuotaGiB", storageCapacityQuotaGiB()).add("RecordSizeKiB", recordSizeKiB()) .add("DataCompressionType", dataCompressionTypeAsString()) .add("NfsExports", hasNfsExports() ? nfsExports() : null) .add("UserAndGroupQuotas", hasUserAndGroupQuotas() ? userAndGroupQuotas() : null).add("ReadOnly", readOnly()) .build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "StorageCapacityReservationGiB": return Optional.ofNullable(clazz.cast(storageCapacityReservationGiB())); case "StorageCapacityQuotaGiB": return Optional.ofNullable(clazz.cast(storageCapacityQuotaGiB())); case "RecordSizeKiB": return Optional.ofNullable(clazz.cast(recordSizeKiB())); case "DataCompressionType": return Optional.ofNullable(clazz.cast(dataCompressionTypeAsString())); case "NfsExports": return Optional.ofNullable(clazz.cast(nfsExports())); case "UserAndGroupQuotas": return Optional.ofNullable(clazz.cast(userAndGroupQuotas())); case "ReadOnly": return Optional.ofNullable(clazz.cast(readOnly())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((UpdateOpenZFSVolumeConfiguration) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The amount of storage in gibibytes (GiB) to reserve from the parent volume. You can't reserve more storage * than the parent volume has reserved. You can specify a value of -1 to unset a volume's storage * capacity reservation. *

      * * @param storageCapacityReservationGiB * The amount of storage in gibibytes (GiB) to reserve from the parent volume. You can't reserve more * storage than the parent volume has reserved. You can specify a value of -1 to unset a * volume's storage capacity reservation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder storageCapacityReservationGiB(Integer storageCapacityReservationGiB); /** *

      * The maximum amount of storage in gibibytes (GiB) that the volume can use from its parent. You can specify a * quota larger than the storage on the parent volume. You can specify a value of -1 to unset a * volume's storage capacity quota. *

      * * @param storageCapacityQuotaGiB * The maximum amount of storage in gibibytes (GiB) that the volume can use from its parent. You can * specify a quota larger than the storage on the parent volume. You can specify a value of * -1 to unset a volume's storage capacity quota. * @return Returns a reference to this object so that method calls can be chained together. */ Builder storageCapacityQuotaGiB(Integer storageCapacityQuotaGiB); /** *

      * Specifies the record size of an OpenZFS volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, 64, 128, * 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. Database * workflows can benefit from a smaller record size, while streaming workflows can benefit from a larger record * size. For additional guidance on when to set a custom record size, see Tips for * maximizing performance in the Amazon FSx for OpenZFS User Guide. *

      * * @param recordSizeKiB * Specifies the record size of an OpenZFS volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, 64, * 128, 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. * Database workflows can benefit from a smaller record size, while streaming workflows can benefit from * a larger record size. For additional guidance on when to set a custom record size, see Tips * for maximizing performance in the Amazon FSx for OpenZFS User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recordSizeKiB(Integer recordSizeKiB); /** *

      * Specifies the method used to compress the data on the volume. The compression type is NONE by * default. *

      *
        *
      • *

        * NONE - Doesn't compress the data on the volume. NONE is the default. *

        *
      • *
      • *

        * ZSTD - Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. * Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization. *

        *
      • *
      • *

        * LZ4 - Compresses the data in the volume using the LZ4 compression algorithm. Compared to * Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds. *

        *
      • *
      * * @param dataCompressionType * Specifies the method used to compress the data on the volume. The compression type is * NONE by default.

      *
        *
      • *

        * NONE - Doesn't compress the data on the volume. NONE is the default. *

        *
      • *
      • *

        * ZSTD - Compresses the data in the volume using the Zstandard (ZSTD) compression * algorithm. Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage * utilization. *

        *
      • *
      • *

        * LZ4 - Compresses the data in the volume using the LZ4 compression algorithm. Compared to * Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds. *

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

        * Specifies the method used to compress the data on the volume. The compression type is NONE by * default. *

        *
          *
        • *

          * NONE - Doesn't compress the data on the volume. NONE is the default. *

          *
        • *
        • *

          * ZSTD - Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. * Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization. *

          *
        • *
        • *

          * LZ4 - Compresses the data in the volume using the LZ4 compression algorithm. Compared to * Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds. *

          *
        • *
        * * @param dataCompressionType * Specifies the method used to compress the data on the volume. The compression type is * NONE by default.

        *
          *
        • *

          * NONE - Doesn't compress the data on the volume. NONE is the default. *

          *
        • *
        • *

          * ZSTD - Compresses the data in the volume using the Zstandard (ZSTD) compression * algorithm. Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage * utilization. *

          *
        • *
        • *

          * LZ4 - Compresses the data in the volume using the LZ4 compression algorithm. Compared to * Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds. *

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

          * The configuration object for mounting a Network File System (NFS) file system. *

          * * @param nfsExports * The configuration object for mounting a Network File System (NFS) file system. * @return Returns a reference to this object so that method calls can be chained together. */ Builder nfsExports(Collection nfsExports); /** *

          * The configuration object for mounting a Network File System (NFS) file system. *

          * * @param nfsExports * The configuration object for mounting a Network File System (NFS) file system. * @return Returns a reference to this object so that method calls can be chained together. */ Builder nfsExports(OpenZFSNfsExport... nfsExports); /** *

          * The configuration object for mounting a Network File System (NFS) file system. *

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

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

          * An object specifying how much storage users or groups can use on the volume. *

          * * @param userAndGroupQuotas * An object specifying how much storage users or groups can use on the volume. * @return Returns a reference to this object so that method calls can be chained together. */ Builder userAndGroupQuotas(Collection userAndGroupQuotas); /** *

          * An object specifying how much storage users or groups can use on the volume. *

          * * @param userAndGroupQuotas * An object specifying how much storage users or groups can use on the volume. * @return Returns a reference to this object so that method calls can be chained together. */ Builder userAndGroupQuotas(OpenZFSUserOrGroupQuota... userAndGroupQuotas); /** *

          * An object specifying how much storage users or groups can use on the volume. *

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

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

          * A Boolean value indicating whether the volume is read-only. *

          * * @param readOnly * A Boolean value indicating whether the volume is read-only. * @return Returns a reference to this object so that method calls can be chained together. */ Builder readOnly(Boolean readOnly); } static final class BuilderImpl implements Builder { private Integer storageCapacityReservationGiB; private Integer storageCapacityQuotaGiB; private Integer recordSizeKiB; private String dataCompressionType; private List nfsExports = DefaultSdkAutoConstructList.getInstance(); private List userAndGroupQuotas = DefaultSdkAutoConstructList.getInstance(); private Boolean readOnly; private BuilderImpl() { } private BuilderImpl(UpdateOpenZFSVolumeConfiguration model) { storageCapacityReservationGiB(model.storageCapacityReservationGiB); storageCapacityQuotaGiB(model.storageCapacityQuotaGiB); recordSizeKiB(model.recordSizeKiB); dataCompressionType(model.dataCompressionType); nfsExports(model.nfsExports); userAndGroupQuotas(model.userAndGroupQuotas); readOnly(model.readOnly); } public final Integer getStorageCapacityReservationGiB() { return storageCapacityReservationGiB; } public final void setStorageCapacityReservationGiB(Integer storageCapacityReservationGiB) { this.storageCapacityReservationGiB = storageCapacityReservationGiB; } @Override public final Builder storageCapacityReservationGiB(Integer storageCapacityReservationGiB) { this.storageCapacityReservationGiB = storageCapacityReservationGiB; return this; } public final Integer getStorageCapacityQuotaGiB() { return storageCapacityQuotaGiB; } public final void setStorageCapacityQuotaGiB(Integer storageCapacityQuotaGiB) { this.storageCapacityQuotaGiB = storageCapacityQuotaGiB; } @Override public final Builder storageCapacityQuotaGiB(Integer storageCapacityQuotaGiB) { this.storageCapacityQuotaGiB = storageCapacityQuotaGiB; return this; } public final Integer getRecordSizeKiB() { return recordSizeKiB; } public final void setRecordSizeKiB(Integer recordSizeKiB) { this.recordSizeKiB = recordSizeKiB; } @Override public final Builder recordSizeKiB(Integer recordSizeKiB) { this.recordSizeKiB = recordSizeKiB; return this; } public final String getDataCompressionType() { return dataCompressionType; } public final void setDataCompressionType(String dataCompressionType) { this.dataCompressionType = dataCompressionType; } @Override public final Builder dataCompressionType(String dataCompressionType) { this.dataCompressionType = dataCompressionType; return this; } @Override public final Builder dataCompressionType(OpenZFSDataCompressionType dataCompressionType) { this.dataCompressionType(dataCompressionType == null ? null : dataCompressionType.toString()); return this; } public final List getNfsExports() { List result = OpenZFSNfsExportsCopier.copyToBuilder(this.nfsExports); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setNfsExports(Collection nfsExports) { this.nfsExports = OpenZFSNfsExportsCopier.copyFromBuilder(nfsExports); } @Override public final Builder nfsExports(Collection nfsExports) { this.nfsExports = OpenZFSNfsExportsCopier.copy(nfsExports); return this; } @Override @SafeVarargs public final Builder nfsExports(OpenZFSNfsExport... nfsExports) { nfsExports(Arrays.asList(nfsExports)); return this; } @Override @SafeVarargs public final Builder nfsExports(Consumer... nfsExports) { nfsExports(Stream.of(nfsExports).map(c -> OpenZFSNfsExport.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final List getUserAndGroupQuotas() { List result = OpenZFSUserAndGroupQuotasCopier.copyToBuilder(this.userAndGroupQuotas); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setUserAndGroupQuotas(Collection userAndGroupQuotas) { this.userAndGroupQuotas = OpenZFSUserAndGroupQuotasCopier.copyFromBuilder(userAndGroupQuotas); } @Override public final Builder userAndGroupQuotas(Collection userAndGroupQuotas) { this.userAndGroupQuotas = OpenZFSUserAndGroupQuotasCopier.copy(userAndGroupQuotas); return this; } @Override @SafeVarargs public final Builder userAndGroupQuotas(OpenZFSUserOrGroupQuota... userAndGroupQuotas) { userAndGroupQuotas(Arrays.asList(userAndGroupQuotas)); return this; } @Override @SafeVarargs public final Builder userAndGroupQuotas(Consumer... userAndGroupQuotas) { userAndGroupQuotas(Stream.of(userAndGroupQuotas).map(c -> OpenZFSUserOrGroupQuota.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Boolean getReadOnly() { return readOnly; } public final void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } @Override public final Builder readOnly(Boolean readOnly) { this.readOnly = readOnly; return this; } @Override public UpdateOpenZFSVolumeConfiguration build() { return new UpdateOpenZFSVolumeConfiguration(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy