Class AttachNewDataDiskOptions
java.lang.Object
com.azure.resourcemanager.devtestlabs.models.AttachNewDataDiskOptions
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AttachNewDataDiskOptions>
public final class AttachNewDataDiskOptions
extends Object
implements com.azure.json.JsonSerializable<AttachNewDataDiskOptions>
Properties to attach new disk to the Virtual Machine.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AttachNewDataDiskOptions class. -
Method Summary
Modifier and TypeMethodDescriptiondiskName()
Get the diskName property: The name of the disk to be attached.Get the diskSizeGiB property: Size of the disk to be attached in Gibibytes.diskType()
Get the diskType property: The storage type for the disk (i.e.static AttachNewDataDiskOptions
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AttachNewDataDiskOptions from the JsonReader.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withDiskName
(String diskName) Set the diskName property: The name of the disk to be attached.withDiskSizeGiB
(Integer diskSizeGiB) Set the diskSizeGiB property: Size of the disk to be attached in Gibibytes.withDiskType
(StorageType diskType) Set the diskType property: The storage type for the disk (i.e.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
-
AttachNewDataDiskOptions
public AttachNewDataDiskOptions()Creates an instance of AttachNewDataDiskOptions class.
-
-
Method Details
-
diskSizeGiB
Get the diskSizeGiB property: Size of the disk to be attached in Gibibytes.- Returns:
- the diskSizeGiB value.
-
withDiskSizeGiB
Set the diskSizeGiB property: Size of the disk to be attached in Gibibytes.- Parameters:
diskSizeGiB
- the diskSizeGiB value to set.- Returns:
- the AttachNewDataDiskOptions object itself.
-
diskName
Get the diskName property: The name of the disk to be attached.- Returns:
- the diskName value.
-
withDiskName
Set the diskName property: The name of the disk to be attached.- Parameters:
diskName
- the diskName value to set.- Returns:
- the AttachNewDataDiskOptions object itself.
-
diskType
Get the diskType property: The storage type for the disk (i.e. Standard, Premium).- Returns:
- the diskType value.
-
withDiskType
Set the diskType property: The storage type for the disk (i.e. Standard, Premium).- Parameters:
diskType
- the diskType value to set.- Returns:
- the AttachNewDataDiskOptions 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<AttachNewDataDiskOptions>
- Throws:
IOException
-
fromJson
public static AttachNewDataDiskOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AttachNewDataDiskOptions from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of AttachNewDataDiskOptions 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 AttachNewDataDiskOptions.
-