다음을 통해 공유


GalleryOSDiskImage Class

public final class GalleryOSDiskImage
extends GalleryDiskImage

This is the OS disk image.

Constructor Summary

Constructor Description
GalleryOSDiskImage()

Creates an instance of GalleryOSDiskImage class.

Method Summary

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

Reads an instance of GalleryOSDiskImage from the JsonReader.

Integer sizeInGB()

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

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

GalleryOSDiskImage withHostCaching(HostCaching hostCaching)

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

GalleryOSDiskImage withSource(GalleryDiskImageSource source)

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

Methods inherited from GalleryDiskImage

Methods inherited from java.lang.Object

Constructor Details

GalleryOSDiskImage

public GalleryOSDiskImage()

Creates an instance of GalleryOSDiskImage class.

Method Details

fromJson

public static GalleryOSDiskImage fromJson(JsonReader jsonReader)

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.

sizeInGB

public Integer sizeInGB()

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

Overrides:

GalleryOSDiskImage.sizeInGB()

Returns:

the sizeInGB value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

GalleryOSDiskImage.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

GalleryOSDiskImage.validate()

withHostCaching

public GalleryOSDiskImage withHostCaching(HostCaching hostCaching)

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

Overrides:

GalleryOSDiskImage.withHostCaching(HostCaching hostCaching)

Parameters:

hostCaching

withSource

public GalleryOSDiskImage withSource(GalleryDiskImageSource source)

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

Overrides:

GalleryOSDiskImage.withSource(GalleryDiskImageSource source)

Parameters:

source

Applies to