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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the diskSizeGiB property: Gets data disk size in GiB.diskUri()
Get the diskUri property: When backed by a blob, the URI of underlying blob.static ComputeDataDisk
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ComputeDataDisk from the JsonReader.Get the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource.name()
Get the name property: Gets data disk name.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withDiskSizeGiB
(Integer diskSizeGiB) Set the diskSizeGiB property: Gets data disk size in GiB.withDiskUri
(String diskUri) Set the diskUri property: When backed by a blob, the URI of underlying blob.withManagedDiskId
(String managedDiskId) Set the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource.Set the name property: Gets data disk name.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
-
ComputeDataDisk
public ComputeDataDisk()Creates an instance of ComputeDataDisk class.
-
-
Method Details
-
name
Get the name property: Gets data disk name.- Returns:
- the name value.
-
withName
Set the name property: Gets data disk name.- Parameters:
name
- the name value to set.- Returns:
- the ComputeDataDisk object itself.
-
diskUri
Get the diskUri property: When backed by a blob, the URI of underlying blob.- Returns:
- the diskUri value.
-
withDiskUri
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
Get the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource.- Returns:
- the managedDiskId value.
-
withManagedDiskId
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
Get the diskSizeGiB property: Gets data disk size in GiB.- Returns:
- the diskSizeGiB value.
-
withDiskSizeGiB
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ComputeDataDisk>
- Throws:
IOException
-
fromJson
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.
-