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

public final class Disk extends Object implements com.azure.json.JsonSerializable<Disk>
Describes a disk on the machine.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the diskType property: The type of the disk.
    static Disk
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Disk from the JsonReader.
    Get the generatedId property: The generated ID of the disk.
    id()
    Get the id property: The ID of the disk.
    Get the maxSizeInBytes property: The size of the disk, in bytes.
    Get the name property: The name of the disk.
    Get the path property: The path of the disk.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the usedSpaceInBytes property: The amount of space used on the disk, in bytes.
    void
    Validates the instance.
    withDiskType(String diskType)
    Set the diskType property: The type of the disk.
    withGeneratedId(String generatedId)
    Set the generatedId property: The generated ID of the disk.
    Set the id property: The ID of the disk.
    withMaxSizeInBytes(Long maxSizeInBytes)
    Set the maxSizeInBytes property: The size of the disk, in bytes.
    Set the name property: The name of the disk.
    Set the path property: The path of the disk.
    withUsedSpaceInBytes(Long usedSpaceInBytes)
    Set the usedSpaceInBytes property: The amount of space used on the disk, in bytes.

    Methods inherited from class java.lang.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

    • Disk

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

    • path

      public String path()
      Get the path property: The path of the disk.
      Returns:
      the path value.
    • withPath

      public Disk withPath(String path)
      Set the path property: The path of the disk.
      Parameters:
      path - the path value to set.
      Returns:
      the Disk object itself.
    • diskType

      public String diskType()
      Get the diskType property: The type of the disk.
      Returns:
      the diskType value.
    • withDiskType

      public Disk withDiskType(String diskType)
      Set the diskType property: The type of the disk.
      Parameters:
      diskType - the diskType value to set.
      Returns:
      the Disk object itself.
    • generatedId

      public String generatedId()
      Get the generatedId property: The generated ID of the disk.
      Returns:
      the generatedId value.
    • withGeneratedId

      public Disk withGeneratedId(String generatedId)
      Set the generatedId property: The generated ID of the disk.
      Parameters:
      generatedId - the generatedId value to set.
      Returns:
      the Disk object itself.
    • id

      public String id()
      Get the id property: The ID of the disk.
      Returns:
      the id value.
    • withId

      public Disk withId(String id)
      Set the id property: The ID of the disk.
      Parameters:
      id - the id value to set.
      Returns:
      the Disk object itself.
    • name

      public String name()
      Get the name property: The name of the disk.
      Returns:
      the name value.
    • withName

      public Disk withName(String name)
      Set the name property: The name of the disk.
      Parameters:
      name - the name value to set.
      Returns:
      the Disk object itself.
    • maxSizeInBytes

      public Long maxSizeInBytes()
      Get the maxSizeInBytes property: The size of the disk, in bytes.
      Returns:
      the maxSizeInBytes value.
    • withMaxSizeInBytes

      public Disk withMaxSizeInBytes(Long maxSizeInBytes)
      Set the maxSizeInBytes property: The size of the disk, in bytes.
      Parameters:
      maxSizeInBytes - the maxSizeInBytes value to set.
      Returns:
      the Disk object itself.
    • usedSpaceInBytes

      public Long usedSpaceInBytes()
      Get the usedSpaceInBytes property: The amount of space used on the disk, in bytes.
      Returns:
      the usedSpaceInBytes value.
    • withUsedSpaceInBytes

      public Disk withUsedSpaceInBytes(Long usedSpaceInBytes)
      Set the usedSpaceInBytes property: The amount of space used on the disk, in bytes.
      Parameters:
      usedSpaceInBytes - the usedSpaceInBytes value to set.
      Returns:
      the Disk 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<Disk>
      Throws:
      IOException
    • fromJson

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