Class GalleryDiskImageSource

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

public final class GalleryDiskImageSource extends GalleryArtifactVersionSource
The source for the disk image.
  • Constructor Details

    • GalleryDiskImageSource

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

    • uri

      public String uri()
      Get the uri property: The uri of the gallery artifact version source. Currently used to specify vhd/blob source.
      Returns:
      the uri value.
    • withUri

      public GalleryDiskImageSource withUri(String uri)
      Set the uri property: The uri of the gallery artifact version source. Currently used to specify vhd/blob source.
      Parameters:
      uri - the uri value to set.
      Returns:
      the GalleryDiskImageSource object itself.
    • storageAccountId

      public String storageAccountId()
      Get the storageAccountId property: The Storage Account Id that contains the vhd blob being used as a source for this artifact version.
      Returns:
      the storageAccountId value.
    • withStorageAccountId

      public GalleryDiskImageSource withStorageAccountId(String storageAccountId)
      Set the storageAccountId property: The Storage Account Id that contains the vhd blob being used as a source for this artifact version.
      Parameters:
      storageAccountId - the storageAccountId value to set.
      Returns:
      the GalleryDiskImageSource object itself.
    • withId

      public GalleryDiskImageSource withId(String id)
      Set the id property: The id of the gallery artifact version source.
      Overrides:
      withId in class GalleryArtifactVersionSource
      Parameters:
      id - the id value to set.
      Returns:
      the GalleryArtifactVersionSource object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class GalleryArtifactVersionSource
      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<GalleryArtifactVersionSource>
      Overrides:
      toJson in class GalleryArtifactVersionSource
      Throws:
      IOException
    • fromJson

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