Class ImageDiskReference
java.lang.Object
com.azure.resourcemanager.compute.models.ImageDiskReference
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ImageDiskReference>
public final class ImageDiskReference
extends Object
implements com.azure.json.JsonSerializable<ImageDiskReference>
The source image used for creating the disk.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the communityGalleryImageId property: A relative uri containing a community Azure Compute Gallery image reference.static ImageDiskReferencefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ImageDiskReference from the JsonReader.id()Get the id property: A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.lun()Get the lun property: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use.Get the sharedGalleryImageId property: A relative uri containing a direct shared Azure Compute Gallery image reference.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCommunityGalleryImageId(String communityGalleryImageId) Set the communityGalleryImageId property: A relative uri containing a community Azure Compute Gallery image reference.Set the id property: A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.Set the lun property: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use.withSharedGalleryImageId(String sharedGalleryImageId) Set the sharedGalleryImageId property: A relative uri containing a direct shared Azure Compute Gallery image reference.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
-
ImageDiskReference
public ImageDiskReference()Creates an instance of ImageDiskReference class.
-
-
Method Details
-
id
Get the id property: A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.- Returns:
- the id value.
-
withId
Set the id property: A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.- Parameters:
id- the id value to set.- Returns:
- the ImageDiskReference object itself.
-
communityGalleryImageId
Get the communityGalleryImageId property: A relative uri containing a community Azure Compute Gallery image reference.- Returns:
- the communityGalleryImageId value.
-
withCommunityGalleryImageId
Set the communityGalleryImageId property: A relative uri containing a community Azure Compute Gallery image reference.- Parameters:
communityGalleryImageId- the communityGalleryImageId value to set.- Returns:
- the ImageDiskReference object itself.
-
lun
Get the lun property: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.- Returns:
- the lun value.
-
withLun
Set the lun property: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.- Parameters:
lun- the lun value to set.- Returns:
- the ImageDiskReference 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<ImageDiskReference>- Throws:
IOException
-
fromJson
Reads an instance of ImageDiskReference from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ImageDiskReference 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 ImageDiskReference.
-