Class DataDisksToAttach
java.lang.Object
com.azure.resourcemanager.compute.models.DataDisksToAttach
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DataDisksToAttach>
public final class DataDisksToAttach
extends Object
implements com.azure.json.JsonSerializable<DataDisksToAttach>
Describes the data disk to be attached.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaching()Get the caching property: Specifies the caching requirements.Get the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion.Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed disk.diskId()Get the diskId property: ID of the managed data disk.static DataDisksToAttachfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DataDisksToAttach from the JsonReader.lun()Get the lun property: The logical unit number of the data disk.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCaching(CachingTypes caching) Set the caching property: Specifies the caching requirements.withDeleteOption(DiskDeleteOptionTypes deleteOption) Set the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion.withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet) Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed disk.withDiskId(String diskId) Set the diskId property: ID of the managed data disk.Set the lun property: The logical unit number of the data disk.withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the 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
-
DataDisksToAttach
public DataDisksToAttach()Creates an instance of DataDisksToAttach 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 DataDisksToAttach object itself.
-
lun
Get the lun property: The logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. If not specified, lun would be auto assigned.- Returns:
- the lun value.
-
withLun
Set the lun property: The logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. If not specified, lun would be auto assigned.- Parameters:
lun- the lun value to set.- Returns:
- the DataDisksToAttach object itself.
-
caching
Get the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**.- Returns:
- the caching value.
-
withCaching
Set the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**.- Parameters:
caching- the caching value to set.- Returns:
- the DataDisksToAttach object itself.
-
deleteOption
Get the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**.- Returns:
- the deleteOption value.
-
withDeleteOption
Set the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**.- Parameters:
deleteOption- the deleteOption value to set.- Returns:
- the DataDisksToAttach object itself.
-
diskEncryptionSet
Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed disk.- Returns:
- the diskEncryptionSet value.
-
withDiskEncryptionSet
Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed disk.- Parameters:
diskEncryptionSet- the diskEncryptionSet value to set.- Returns:
- the DataDisksToAttach object itself.
-
writeAcceleratorEnabled
Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.- Returns:
- the writeAcceleratorEnabled value.
-
withWriteAcceleratorEnabled
Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.- Parameters:
writeAcceleratorEnabled- the writeAcceleratorEnabled value to set.- Returns:
- the DataDisksToAttach 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<DataDisksToAttach>- Throws:
IOException
-
fromJson
Reads an instance of DataDisksToAttach from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of DataDisksToAttach 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 DataDisksToAttach.
-