Class GalleryDiskImage
java.lang.Object
com.azure.resourcemanager.compute.models.GalleryDiskImage
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GalleryDiskImage>
- Direct Known Subclasses:
GalleryDataDiskImage,GalleryOSDiskImage
public class GalleryDiskImage
extends Object
implements com.azure.json.JsonSerializable<GalleryDiskImage>
This is the disk image base class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GalleryDiskImagefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GalleryDiskImage from the JsonReader.Get the hostCaching property: The host caching of the disk.sizeInGB()Get the sizeInGB property: This property indicates the size of the VHD to be created.source()Get the source property: The source for the disk image.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.withSource(GalleryDiskImageSource source) Set the source property: The source for the disk image.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
-
GalleryDiskImage
public GalleryDiskImage()Creates an instance of GalleryDiskImage class.
-
-
Method Details
-
sizeInGB
Get the sizeInGB property: This property indicates the size of the VHD to be created.- Returns:
- the sizeInGB value.
-
hostCaching
Get the hostCaching property: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'.- Returns:
- the hostCaching value.
-
withHostCaching
Set the hostCaching property: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'.- Parameters:
hostCaching- the hostCaching value to set.- Returns:
- the GalleryDiskImage object itself.
-
source
Get the source property: The source for the disk image.- Returns:
- the source value.
-
withSource
Set the source property: The source for the disk image.- Parameters:
source- the source value to set.- Returns:
- the GalleryDiskImage 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<GalleryDiskImage>- Throws:
IOException
-
fromJson
Reads an instance of GalleryDiskImage from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of GalleryDiskImage 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 GalleryDiskImage.
-