Class AttachDetachDataDisksRequest
java.lang.Object
com.azure.resourcemanager.compute.models.AttachDetachDataDisksRequest
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AttachDetachDataDisksRequest>
public final class AttachDetachDataDisksRequest
extends Object
implements com.azure.json.JsonSerializable<AttachDetachDataDisksRequest>
Specifies the input for attaching and detaching a list of managed data disks.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AttachDetachDataDisksRequest class. -
Method Summary
Modifier and TypeMethodDescriptionGet the dataDisksToAttach property: The list of managed data disks to be attached.Get the dataDisksToDetach property: The list of managed data disks to be detached.static AttachDetachDataDisksRequestfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AttachDetachDataDisksRequest from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDataDisksToAttach(List<DataDisksToAttach> dataDisksToAttach) Set the dataDisksToAttach property: The list of managed data disks to be attached.withDataDisksToDetach(List<DataDisksToDetach> dataDisksToDetach) Set the dataDisksToDetach property: The list of managed data disks to be detached.Methods inherited from class 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
-
AttachDetachDataDisksRequest
public AttachDetachDataDisksRequest()Creates an instance of AttachDetachDataDisksRequest class.
-
-
Method Details
-
dataDisksToAttach
Get the dataDisksToAttach property: The list of managed data disks to be attached.- Returns:
- the dataDisksToAttach value.
-
withDataDisksToAttach
public AttachDetachDataDisksRequest withDataDisksToAttach(List<DataDisksToAttach> dataDisksToAttach) Set the dataDisksToAttach property: The list of managed data disks to be attached.- Parameters:
dataDisksToAttach- the dataDisksToAttach value to set.- Returns:
- the AttachDetachDataDisksRequest object itself.
-
dataDisksToDetach
Get the dataDisksToDetach property: The list of managed data disks to be detached.- Returns:
- the dataDisksToDetach value.
-
withDataDisksToDetach
public AttachDetachDataDisksRequest withDataDisksToDetach(List<DataDisksToDetach> dataDisksToDetach) Set the dataDisksToDetach property: The list of managed data disks to be detached.- Parameters:
dataDisksToDetach- the dataDisksToDetach value to set.- Returns:
- the AttachDetachDataDisksRequest 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<AttachDetachDataDisksRequest>- Throws:
IOException
-
fromJson
public static AttachDetachDataDisksRequest fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AttachDetachDataDisksRequest from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of AttachDetachDataDisksRequest 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 AttachDetachDataDisksRequest.
-