OSDisk Class

  • java.lang.Object
    • com.azure.resourcemanager.batch.models.OSDisk

Implements

public final class OSDisk
implements JsonSerializable<OSDisk>

Settings for the operating system disk of the virtual machine.

Constructor Summary

Constructor Description
OSDisk()

Creates an instance of OSDisk class.

Method Summary

Modifier and Type Method and Description
CachingType caching()

Get the caching property: The type of caching to enable for the disk.

Integer diskSizeGB()

Get the diskSizeGB property: The initial disk size in GB when creating new OS disk.

DiffDiskSettings ephemeralOSDiskSettings()

Get the ephemeralOSDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.

static OSDisk fromJson(JsonReader jsonReader)

Reads an instance of OSDisk from the JsonReader.

ManagedDisk managedDisk()

Get the managedDisk property: The managedDisk property.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

OSDisk withCaching(CachingType caching)

Set the caching property: The type of caching to enable for the disk.

OSDisk withDiskSizeGB(Integer diskSizeGB)

Set the diskSizeGB property: The initial disk size in GB when creating new OS disk.

OSDisk withEphemeralOSDiskSettings(DiffDiskSettings ephemeralOSDiskSettings)

Set the ephemeralOSDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.

OSDisk withManagedDisk(ManagedDisk managedDisk)

Set the managedDisk property: The managedDisk property.

OSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled)

Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.

Boolean writeAcceleratorEnabled()

Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.

Methods inherited from java.lang.Object

Constructor Details

OSDisk

public OSDisk()

Creates an instance of OSDisk class.

Method Details

caching

public CachingType caching()

Get the caching property: The type of caching to enable for the disk.

Returns:

the caching value.

diskSizeGB

public Integer diskSizeGB()

Get the diskSizeGB property: The initial disk size in GB when creating new OS disk.

Returns:

the diskSizeGB value.

ephemeralOSDiskSettings

public DiffDiskSettings ephemeralOSDiskSettings()

Get the ephemeralOSDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.

Returns:

the ephemeralOSDiskSettings 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 an error occurs while reading the OSDisk.

managedDisk

public ManagedDisk managedDisk()

Get the managedDisk property: The managedDisk property.

Returns:

the managedDisk value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCaching

public OSDisk withCaching(CachingType caching)

Set the caching property: The type of caching to enable for the disk.

Parameters:

caching - the caching value to set.

Returns:

the OSDisk object itself.

withDiskSizeGB

public OSDisk withDiskSizeGB(Integer diskSizeGB)

Set the diskSizeGB property: The initial disk size in GB when creating new OS disk.

Parameters:

diskSizeGB - the diskSizeGB value to set.

Returns:

the OSDisk object itself.

withEphemeralOSDiskSettings

public OSDisk withEphemeralOSDiskSettings(DiffDiskSettings ephemeralOSDiskSettings)

Set the ephemeralOSDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.

Parameters:

ephemeralOSDiskSettings - the ephemeralOSDiskSettings value to set.

Returns:

the OSDisk object itself.

withManagedDisk

public OSDisk withManagedDisk(ManagedDisk managedDisk)

Set the managedDisk property: The managedDisk property.

Parameters:

managedDisk - the managedDisk value to set.

Returns:

the OSDisk object itself.

withWriteAcceleratorEnabled

public OSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled)

Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.

Parameters:

writeAcceleratorEnabled - the writeAcceleratorEnabled value to set.

Returns:

the OSDisk object itself.

writeAcceleratorEnabled

public Boolean writeAcceleratorEnabled()

Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.

Returns:

the writeAcceleratorEnabled value.

Applies to