Class ComputeDataDisk

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

public final class ComputeDataDisk extends Object implements com.azure.json.JsonSerializable<ComputeDataDisk>
A data disks attached to a virtual machine.
  • Constructor Details

    • ComputeDataDisk

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

    • name

      public String name()
      Get the name property: Gets data disk name.
      Returns:
      the name value.
    • withName

      public ComputeDataDisk withName(String name)
      Set the name property: Gets data disk name.
      Parameters:
      name - the name value to set.
      Returns:
      the ComputeDataDisk object itself.
    • diskUri

      public String diskUri()
      Get the diskUri property: When backed by a blob, the URI of underlying blob.
      Returns:
      the diskUri value.
    • withDiskUri

      public ComputeDataDisk withDiskUri(String diskUri)
      Set the diskUri property: When backed by a blob, the URI of underlying blob.
      Parameters:
      diskUri - the diskUri value to set.
      Returns:
      the ComputeDataDisk object itself.
    • managedDiskId

      public String managedDiskId()
      Get the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource.
      Returns:
      the managedDiskId value.
    • withManagedDiskId

      public ComputeDataDisk withManagedDiskId(String managedDiskId)
      Set the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource.
      Parameters:
      managedDiskId - the managedDiskId value to set.
      Returns:
      the ComputeDataDisk object itself.
    • diskSizeGiB

      public Integer diskSizeGiB()
      Get the diskSizeGiB property: Gets data disk size in GiB.
      Returns:
      the diskSizeGiB value.
    • withDiskSizeGiB

      public ComputeDataDisk withDiskSizeGiB(Integer diskSizeGiB)
      Set the diskSizeGiB property: Gets data disk size in GiB.
      Parameters:
      diskSizeGiB - the diskSizeGiB value to set.
      Returns:
      the ComputeDataDisk 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<ComputeDataDisk>
      Throws:
      IOException
    • fromJson

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