Class DataDisksToDetach

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

public final class DataDisksToDetach extends Object implements com.azure.json.JsonSerializable<DataDisksToDetach>
Describes the data disk to be detached.
  • Constructor Details

    • DataDisksToDetach

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

    • diskId

      public String diskId()
      Get the diskId property: ID of the managed data disk.
      Returns:
      the diskId value.
    • withDiskId

      public DataDisksToDetach withDiskId(String diskId)
      Set the diskId property: ID of the managed data disk.
      Parameters:
      diskId - the diskId value to set.
      Returns:
      the DataDisksToDetach object itself.
    • detachOption

      public DiskDetachOptionTypes detachOption()
      Get the detachOption property: Supported options available for Detach of a disk from a VM. Refer to DetachOption object reference for more details.
      Returns:
      the detachOption value.
    • withDetachOption

      public DataDisksToDetach withDetachOption(DiskDetachOptionTypes detachOption)
      Set the detachOption property: Supported options available for Detach of a disk from a VM. Refer to DetachOption object reference for more details.
      Parameters:
      detachOption - the detachOption value to set.
      Returns:
      the DataDisksToDetach 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<DataDisksToDetach>
      Throws:
      IOException
    • fromJson

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