다음을 통해 공유


GalleryDiskImage Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.GalleryDiskImage

Implements

public class GalleryDiskImage
implements JsonSerializable<GalleryDiskImage>

This is the disk image base class.

Constructor Summary

Constructor Description
GalleryDiskImage()

Creates an instance of GalleryDiskImage class.

Method Summary

Modifier and Type Method and Description
static GalleryDiskImage fromJson(JsonReader jsonReader)

Reads an instance of GalleryDiskImage from the JsonReader.

HostCaching hostCaching()

Get the hostCaching property: The host caching of the disk.

Integer sizeInGB()

Get the sizeInGB property: This property indicates the size of the VHD to be created.

GalleryDiskImageSource source()

Get the source property: The source for the disk image.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

GalleryDiskImage withHostCaching(HostCaching hostCaching)

Set the hostCaching property: The host caching of the disk.

GalleryDiskImage withSource(GalleryDiskImageSource source)

Set the source property: The source for the disk image.

Methods inherited from java.lang.Object

Constructor Details

GalleryDiskImage

public GalleryDiskImage()

Creates an instance of GalleryDiskImage class.

Method Details

fromJson

public static GalleryDiskImage fromJson(JsonReader jsonReader)

Reads an instance of GalleryDiskImage from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of GalleryDiskImage 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 GalleryDiskImage.

hostCaching

public HostCaching hostCaching()

Get the hostCaching property: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'.

Returns:

the hostCaching value.

sizeInGB

public Integer sizeInGB()

Get the sizeInGB property: This property indicates the size of the VHD to be created.

Returns:

the sizeInGB value.

source

public GalleryDiskImageSource source()

Get the source property: The source for the disk image.

Returns:

the source value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withHostCaching

public GalleryDiskImage withHostCaching(HostCaching hostCaching)

Set the hostCaching property: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'.

Parameters:

hostCaching - the hostCaching value to set.

Returns:

the GalleryDiskImage object itself.

withSource

public GalleryDiskImage withSource(GalleryDiskImageSource source)

Set the source property: The source for the disk image.

Parameters:

source - the source value to set.

Returns:

the GalleryDiskImage object itself.

Applies to