Class AttachNewDataDiskOptions

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

public final class AttachNewDataDiskOptions extends Object implements com.azure.json.JsonSerializable<AttachNewDataDiskOptions>
Properties to attach new disk to the Virtual Machine.
  • Constructor Details

    • AttachNewDataDiskOptions

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

    • diskSizeGiB

      public Integer diskSizeGiB()
      Get the diskSizeGiB property: Size of the disk to be attached in Gibibytes.
      Returns:
      the diskSizeGiB value.
    • withDiskSizeGiB

      public AttachNewDataDiskOptions withDiskSizeGiB(Integer diskSizeGiB)
      Set the diskSizeGiB property: Size of the disk to be attached in Gibibytes.
      Parameters:
      diskSizeGiB - the diskSizeGiB value to set.
      Returns:
      the AttachNewDataDiskOptions object itself.
    • diskName

      public String diskName()
      Get the diskName property: The name of the disk to be attached.
      Returns:
      the diskName value.
    • withDiskName

      public AttachNewDataDiskOptions withDiskName(String diskName)
      Set the diskName property: The name of the disk to be attached.
      Parameters:
      diskName - the diskName value to set.
      Returns:
      the AttachNewDataDiskOptions object itself.
    • diskType

      public StorageType diskType()
      Get the diskType property: The storage type for the disk (i.e. Standard, Premium).
      Returns:
      the diskType value.
    • withDiskType

      public AttachNewDataDiskOptions withDiskType(StorageType diskType)
      Set the diskType property: The storage type for the disk (i.e. Standard, Premium).
      Parameters:
      diskType - the diskType value to set.
      Returns:
      the AttachNewDataDiskOptions 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<AttachNewDataDiskOptions>
      Throws:
      IOException
    • fromJson

      public static AttachNewDataDiskOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AttachNewDataDiskOptions from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AttachNewDataDiskOptions 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 AttachNewDataDiskOptions.