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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the detachOption property: Supported options available for Detach of a disk from a VM.diskId()Get the diskId property: ID of the managed data disk.static DataDisksToDetachfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DataDisksToDetach from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDetachOption(DiskDetachOptionTypes detachOption) Set the detachOption property: Supported options available for Detach of a disk from a VM.withDiskId(String diskId) Set the diskId property: ID of the managed data disk.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DataDisksToDetach
public DataDisksToDetach()Creates an instance of DataDisksToDetach class.
-
-
Method Details
-
diskId
Get the diskId property: ID of the managed data disk.- Returns:
- the diskId value.
-
withDiskId
Set the diskId property: ID of the managed data disk.- Parameters:
diskId- the diskId value to set.- Returns:
- the DataDisksToDetach object itself.
-
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
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DataDisksToDetach>- Throws:
IOException
-
fromJson
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.
-