Class SharedGalleryDataDiskImage
java.lang.Object
com.azure.resourcemanager.compute.models.SharedGalleryDiskImage
com.azure.resourcemanager.compute.models.SharedGalleryDataDiskImage
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SharedGalleryDiskImage>
This is the data disk image.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SharedGalleryDataDiskImage class. -
Method Summary
Modifier and TypeMethodDescriptionGet the diskSizeGB property: This property indicates the size of the VHD to be created.static SharedGalleryDataDiskImagefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SharedGalleryDataDiskImage from the JsonReader.intlun()Get the lun property: This property specifies the logical unit number of the data disk.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withHostCaching(SharedGalleryHostCaching hostCaching) Set the hostCaching property: The host caching of the disk.withLun(int lun) Set the lun property: This property specifies the logical unit number of the data disk.Methods inherited from class SharedGalleryDiskImage
hostCachingMethods 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
-
SharedGalleryDataDiskImage
public SharedGalleryDataDiskImage()Creates an instance of SharedGalleryDataDiskImage class.
-
-
Method Details
-
lun
public int lun()Get the lun property: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.- Returns:
- the lun value.
-
withLun
Set the lun property: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.- Parameters:
lun- the lun value to set.- Returns:
- the SharedGalleryDataDiskImage object itself.
-
diskSizeGB
Get the diskSizeGB property: This property indicates the size of the VHD to be created.- Overrides:
diskSizeGBin classSharedGalleryDiskImage- Returns:
- the diskSizeGB value.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classSharedGalleryDiskImage- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SharedGalleryDiskImage>- Overrides:
toJsonin classSharedGalleryDiskImage- Throws:
IOException
-
fromJson
public static SharedGalleryDataDiskImage fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SharedGalleryDataDiskImage from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SharedGalleryDataDiskImage 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 SharedGalleryDataDiskImage.
-