Class GalleryOSDiskImage
java.lang.Object
com.azure.resourcemanager.compute.models.GalleryDiskImage
com.azure.resourcemanager.compute.models.GalleryOSDiskImage
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GalleryDiskImage>
This is the OS disk image.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GalleryOSDiskImagefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GalleryOSDiskImage from the JsonReader.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.withSource(GalleryDiskImageSource source) Set the source property: The source for the disk image.Methods inherited from class GalleryDiskImage
hostCaching, sourceMethods 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
-
GalleryOSDiskImage
public GalleryOSDiskImage()Creates an instance of GalleryOSDiskImage class.
-
-
Method Details
-
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
Reads an instance of GalleryOSDiskImage from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of GalleryOSDiskImage 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 GalleryOSDiskImage.
-