Class Storage

java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.Storage
All Implemented Interfaces:
com.azure.json.JsonSerializable<Storage>

public final class Storage extends Object implements com.azure.json.JsonSerializable<Storage>
Storage properties of a server.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of Storage class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the autoGrow property: Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero and conditions allow for automatically growing storage size.
    static Storage
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Storage from the JsonReader.
    Get the iops property: Maximum IOPS supported for storage.
    Get the storageSizeGB property: Size of storage assigned to a server.
    Get the throughput property: Maximum throughput supported for storage.
    Get the tier property: Storage tier of a server.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the type property: Type of storage assigned to a server.
    void
    Validates the instance.
    Set the autoGrow property: Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero and conditions allow for automatically growing storage size.
    Set the iops property: Maximum IOPS supported for storage.
    withStorageSizeGB(Integer storageSizeGB)
    Set the storageSizeGB property: Size of storage assigned to a server.
    withThroughput(Integer throughput)
    Set the throughput property: Maximum throughput supported for storage.
    Set the tier property: Storage tier of a server.
    Set the type property: Type of storage assigned to a server.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • Storage

      public Storage()
      Creates an instance of Storage class.
  • Method Details

    • storageSizeGB

      public Integer storageSizeGB()
      Get the storageSizeGB property: Size of storage assigned to a server.
      Returns:
      the storageSizeGB value.
    • withStorageSizeGB

      public Storage withStorageSizeGB(Integer storageSizeGB)
      Set the storageSizeGB property: Size of storage assigned to a server.
      Parameters:
      storageSizeGB - the storageSizeGB value to set.
      Returns:
      the Storage object itself.
    • autoGrow

      public StorageAutoGrow autoGrow()
      Get the autoGrow property: Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero and conditions allow for automatically growing storage size.
      Returns:
      the autoGrow value.
    • withAutoGrow

      public Storage withAutoGrow(StorageAutoGrow autoGrow)
      Set the autoGrow property: Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero and conditions allow for automatically growing storage size.
      Parameters:
      autoGrow - the autoGrow value to set.
      Returns:
      the Storage object itself.
    • tier

      Get the tier property: Storage tier of a server.
      Returns:
      the tier value.
    • withTier

      public Storage withTier(AzureManagedDiskPerformanceTier tier)
      Set the tier property: Storage tier of a server.
      Parameters:
      tier - the tier value to set.
      Returns:
      the Storage object itself.
    • iops

      public Integer iops()
      Get the iops property: Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS.
      Returns:
      the iops value.
    • withIops

      public Storage withIops(Integer iops)
      Set the iops property: Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS.
      Parameters:
      iops - the iops value to set.
      Returns:
      the Storage object itself.
    • throughput

      public Integer throughput()
      Get the throughput property: Maximum throughput supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS.
      Returns:
      the throughput value.
    • withThroughput

      public Storage withThroughput(Integer throughput)
      Set the throughput property: Maximum throughput supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS.
      Parameters:
      throughput - the throughput value to set.
      Returns:
      the Storage object itself.
    • type

      public StorageType type()
      Get the type property: Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or UltraSSD_LRS. If not specified, it defaults to Premium_LRS.
      Returns:
      the type value.
    • withType

      public Storage withType(StorageType type)
      Set the type property: Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or UltraSSD_LRS. If not specified, it defaults to Premium_LRS.
      Parameters:
      type - the type value to set.
      Returns:
      the Storage object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<Storage>
      Throws:
      IOException
    • fromJson

      public static Storage fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of Storage from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of Storage if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the Storage.