Class SharedGalleryDiskImage
java.lang.Object
com.azure.resourcemanager.compute.models.SharedGalleryDiskImage
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SharedGalleryDiskImage>
- Direct Known Subclasses:
SharedGalleryDataDiskImage, SharedGalleryOSDiskImage
public class SharedGalleryDiskImage
extends Object
implements com.azure.json.JsonSerializable<SharedGalleryDiskImage>
This is the disk image base class.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SharedGalleryDiskImage class. -
Method Summary
Modifier and TypeMethodDescriptionGet the diskSizeGB property: This property indicates the size of the VHD to be created.static SharedGalleryDiskImagefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SharedGalleryDiskImage from the JsonReader.Get the hostCaching property: The host caching of the 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.Methods 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
-
SharedGalleryDiskImage
public SharedGalleryDiskImage()Creates an instance of SharedGalleryDiskImage class.
-
-
Method Details
-
diskSizeGB
Get the diskSizeGB property: This property indicates the size of the VHD to be created.- Returns:
- the diskSizeGB value.
-
hostCaching
Get the hostCaching property: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'.- Returns:
- the hostCaching value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SharedGalleryDiskImage>- Throws:
IOException
-
fromJson
public static SharedGalleryDiskImage fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SharedGalleryDiskImage from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SharedGalleryDiskImage 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 SharedGalleryDiskImage.
-