GalleryDataDiskImage Class

public final class GalleryDataDiskImage
extends GalleryDiskImage

This is the data disk image.

Constructor Summary

Constructor Description
GalleryDataDiskImage()

Creates an instance of GalleryDataDiskImage class.

Method Summary

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

Reads an instance of GalleryDataDiskImage from the JsonReader.

int lun()

Get the lun property: This property specifies the logical unit number of the data disk.

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.

GalleryDataDiskImage withHostCaching(HostCaching hostCaching)

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

GalleryDataDiskImage withLun(int lun)

Set the lun property: This property specifies the logical unit number of the data disk.

GalleryDataDiskImage 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

GalleryDataDiskImage

public GalleryDataDiskImage()

Creates an instance of GalleryDataDiskImage class.

Method Details

fromJson

public static GalleryDataDiskImage fromJson(JsonReader jsonReader)

Reads an instance of GalleryDataDiskImage from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of GalleryDataDiskImage if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

lun

public int lun()

Get the lun property: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.

Returns:

the lun value.

sizeInGB

public Integer sizeInGB()

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

Overrides:

GalleryDataDiskImage.sizeInGB()

Returns:

the sizeInGB value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

GalleryDataDiskImage.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

GalleryDataDiskImage.validate()

withHostCaching

public GalleryDataDiskImage withHostCaching(HostCaching hostCaching)

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

Overrides:

GalleryDataDiskImage.withHostCaching(HostCaching hostCaching)

Parameters:

hostCaching

withLun

public GalleryDataDiskImage withLun(int lun)

Set the lun property: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.

Parameters:

lun - the lun value to set.

Returns:

the GalleryDataDiskImage object itself.

withSource

public GalleryDataDiskImage withSource(GalleryDiskImageSource source)

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

Overrides:

GalleryDataDiskImage.withSource(GalleryDiskImageSource source)

Parameters:

source

Applies to