Class DataDiskProperties

java.lang.Object
com.azure.resourcemanager.devtestlabs.models.DataDiskProperties

public final class DataDiskProperties extends Object
Request body for adding a new or existing data disk to a virtual machine.
  • Constructor Details

    • DataDiskProperties

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

    • attachNewDataDiskOptions

      public AttachNewDataDiskOptions attachNewDataDiskOptions()
      Get the attachNewDataDiskOptions property: Specifies options to attach a new disk to the virtual machine.
      Returns:
      the attachNewDataDiskOptions value.
    • withAttachNewDataDiskOptions

      public DataDiskProperties withAttachNewDataDiskOptions(AttachNewDataDiskOptions attachNewDataDiskOptions)
      Set the attachNewDataDiskOptions property: Specifies options to attach a new disk to the virtual machine.
      Parameters:
      attachNewDataDiskOptions - the attachNewDataDiskOptions value to set.
      Returns:
      the DataDiskProperties object itself.
    • existingLabDiskId

      public String existingLabDiskId()
      Get the existingLabDiskId property: Specifies the existing lab disk id to attach to virtual machine.
      Returns:
      the existingLabDiskId value.
    • withExistingLabDiskId

      public DataDiskProperties withExistingLabDiskId(String existingLabDiskId)
      Set the existingLabDiskId property: Specifies the existing lab disk id to attach to virtual machine.
      Parameters:
      existingLabDiskId - the existingLabDiskId value to set.
      Returns:
      the DataDiskProperties object itself.
    • hostCaching

      public HostCachingOptions hostCaching()
      Get the hostCaching property: Caching option for a data disk (i.e. None, ReadOnly, ReadWrite).
      Returns:
      the hostCaching value.
    • withHostCaching

      public DataDiskProperties withHostCaching(HostCachingOptions hostCaching)
      Set the hostCaching property: Caching option for a data disk (i.e. None, ReadOnly, ReadWrite).
      Parameters:
      hostCaching - the hostCaching value to set.
      Returns:
      the DataDiskProperties object itself.
    • validate

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