Class GalleryDataDiskImage
java.lang.Object
com.azure.resourcemanager.compute.models.GalleryDiskImage
com.azure.resourcemanager.compute.models.GalleryDataDiskImage
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GalleryDiskImage>
This is the data disk image.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GalleryDataDiskImagefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GalleryDataDiskImage from the JsonReader.intlun()Get the lun property: This property specifies the logical unit number of the data disk.sizeInGB()Get the sizeInGB property: This property indicates the size of the VHD to be created.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withHostCaching(HostCaching 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.withSource(GalleryDiskImageSource source) Set the source property: The source for the disk image.Methods inherited from class com.azure.resourcemanager.compute.models.GalleryDiskImage
hostCaching, sourceMethods 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
-
GalleryDataDiskImage
public GalleryDataDiskImage()Creates an instance of GalleryDataDiskImage 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 GalleryDataDiskImage object itself.
-
sizeInGB
Get the sizeInGB property: This property indicates the size of the VHD to be created.- Overrides:
sizeInGBin classGalleryDiskImage- Returns:
- the sizeInGB value.
-
withHostCaching
Set the hostCaching property: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'.- Overrides:
withHostCachingin classGalleryDiskImage- Parameters:
hostCaching- the hostCaching value to set.- Returns:
- the GalleryDiskImage object itself.
-
withSource
Set the source property: The source for the disk image.- Overrides:
withSourcein classGalleryDiskImage- Parameters:
source- the source value to set.- Returns:
- the GalleryDiskImage object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classGalleryDiskImage- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<GalleryDiskImage>- Overrides:
toJsonin classGalleryDiskImage- Throws:
IOException
-
fromJson
public static GalleryDataDiskImage fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of GalleryDataDiskImage from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of GalleryDataDiskImage 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 GalleryDataDiskImage.
-