Class SharedGalleryOSDiskImage

java.lang.Object
com.azure.resourcemanager.compute.models.SharedGalleryDiskImage
com.azure.resourcemanager.compute.models.SharedGalleryOSDiskImage
All Implemented Interfaces:
com.azure.json.JsonSerializable<SharedGalleryDiskImage>

public final class SharedGalleryOSDiskImage extends SharedGalleryDiskImage
This is the OS disk image.
  • Constructor Details

    • SharedGalleryOSDiskImage

      public SharedGalleryOSDiskImage()
      Creates an instance of SharedGalleryOSDiskImage class.
  • Method Details

    • diskSizeGB

      public Integer diskSizeGB()
      Get the diskSizeGB property: This property indicates the size of the VHD to be created.
      Overrides:
      diskSizeGB in class SharedGalleryDiskImage
      Returns:
      the diskSizeGB value.
    • withHostCaching

      public SharedGalleryOSDiskImage withHostCaching(SharedGalleryHostCaching hostCaching)
      Set the hostCaching property: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'.
      Overrides:
      withHostCaching in class SharedGalleryDiskImage
      Parameters:
      hostCaching - the hostCaching value to set.
      Returns:
      the SharedGalleryDiskImage object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class SharedGalleryDiskImage
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SharedGalleryDiskImage>
      Overrides:
      toJson in class SharedGalleryDiskImage
      Throws:
      IOException
    • fromJson

      public static SharedGalleryOSDiskImage fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SharedGalleryOSDiskImage from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SharedGalleryOSDiskImage 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 SharedGalleryOSDiskImage.