OsDisk Class

  • java.lang.Object
    • com.azure.resourcemanager.networkcloud.models.OsDisk

Implements

public final class OsDisk
implements JsonSerializable<OsDisk>

OsDisk represents configuration of the boot disk.

Constructor Summary

Constructor Description
OsDisk()

Creates an instance of OsDisk class.

Method Summary

Modifier and Type Method and Description
OsDiskCreateOption createOption()

Get the createOption property: The strategy for creating the OS disk.

OsDiskDeleteOption deleteOption()

Get the deleteOption property: The strategy for deleting the OS disk.

long diskSizeGB()

Get the diskSizeGB property: The size of the disk.

static OsDisk fromJson(JsonReader jsonReader)

Reads an instance of OsDisk from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

OsDisk withCreateOption(OsDiskCreateOption createOption)

Set the createOption property: The strategy for creating the OS disk.

OsDisk withDeleteOption(OsDiskDeleteOption deleteOption)

Set the deleteOption property: The strategy for deleting the OS disk.

OsDisk withDiskSizeGB(long diskSizeGB)

Set the diskSizeGB property: The size of the disk.

Methods inherited from java.lang.Object

Constructor Details

OsDisk

public OsDisk()

Creates an instance of OsDisk class.

Method Details

createOption

public OsDiskCreateOption createOption()

Get the createOption property: The strategy for creating the OS disk.

Returns:

the createOption value.

deleteOption

public OsDiskDeleteOption deleteOption()

Get the deleteOption property: The strategy for deleting the OS disk.

Returns:

the deleteOption value.

diskSizeGB

public long diskSizeGB()

Get the diskSizeGB property: The size of the disk. Required if the createOption is Ephemeral. Allocations are measured in gibibytes.

Returns:

the diskSizeGB value.

fromJson

public static OsDisk fromJson(JsonReader jsonReader)

Reads an instance of OsDisk from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCreateOption

public OsDisk withCreateOption(OsDiskCreateOption createOption)

Set the createOption property: The strategy for creating the OS disk.

Parameters:

createOption - the createOption value to set.

Returns:

the OsDisk object itself.

withDeleteOption

public OsDisk withDeleteOption(OsDiskDeleteOption deleteOption)

Set the deleteOption property: The strategy for deleting the OS disk.

Parameters:

deleteOption - the deleteOption value to set.

Returns:

the OsDisk object itself.

withDiskSizeGB

public OsDisk withDiskSizeGB(long diskSizeGB)

Set the diskSizeGB property: The size of the disk. Required if the createOption is Ephemeral. Allocations are measured in gibibytes.

Parameters:

diskSizeGB - the diskSizeGB value to set.

Returns:

the OsDisk object itself.

Applies to