Class DiffDiskSettings

java.lang.Object
com.azure.resourcemanager.compute.models.DiffDiskSettings
All Implemented Interfaces:
com.azure.json.JsonSerializable<DiffDiskSettings>

public final class DiffDiskSettings extends Object implements com.azure.json.JsonSerializable<DiffDiskSettings>
Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The ephemeral disk settings can only be specified for managed disk.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of DiffDiskSettings class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the enableFullCaching property: Specifies whether or not to enable full caching for this VM which will cache the OS disk locally on the host and make this VM more resilient to storage outages.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of DiffDiskSettings from the JsonReader.
    Get the option property: Specifies the ephemeral disk settings for operating system disk.
    Get the placement property: Specifies the ephemeral disk placement for operating system disk.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withEnableFullCaching(Boolean enableFullCaching)
    Set the enableFullCaching property: Specifies whether or not to enable full caching for this VM which will cache the OS disk locally on the host and make this VM more resilient to storage outages.
    Set the option property: Specifies the ephemeral disk settings for operating system disk.
    Set the placement property: Specifies the ephemeral disk placement for operating system disk.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • DiffDiskSettings

      public DiffDiskSettings()
      Creates an instance of DiffDiskSettings class.
  • Method Details

    • option

      public DiffDiskOptions option()
      Get the option property: Specifies the ephemeral disk settings for operating system disk.
      Returns:
      the option value.
    • withOption

      public DiffDiskSettings withOption(DiffDiskOptions option)
      Set the option property: Specifies the ephemeral disk settings for operating system disk.
      Parameters:
      option - the option value to set.
      Returns:
      the DiffDiskSettings object itself.
    • placement

      public DiffDiskPlacement placement()
      Get the placement property: Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk,** **NvmeDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** or **NvmeDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
      Returns:
      the placement value.
    • withPlacement

      public DiffDiskSettings withPlacement(DiffDiskPlacement placement)
      Set the placement property: Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk,** **NvmeDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** or **NvmeDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
      Parameters:
      placement - the placement value to set.
      Returns:
      the DiffDiskSettings object itself.
    • enableFullCaching

      public Boolean enableFullCaching()
      Get the enableFullCaching property: Specifies whether or not to enable full caching for this VM which will cache the OS disk locally on the host and make this VM more resilient to storage outages.
      Returns:
      the enableFullCaching value.
    • withEnableFullCaching

      public DiffDiskSettings withEnableFullCaching(Boolean enableFullCaching)
      Set the enableFullCaching property: Specifies whether or not to enable full caching for this VM which will cache the OS disk locally on the host and make this VM more resilient to storage outages.
      Parameters:
      enableFullCaching - the enableFullCaching value to set.
      Returns:
      the DiffDiskSettings object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<DiffDiskSettings>
      Throws:
      IOException
    • fromJson

      public static DiffDiskSettings fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DiffDiskSettings from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DiffDiskSettings 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 DiffDiskSettings.