Class DataDiskImageEncryption

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

public final class DataDiskImageEncryption extends DiskImageEncryption
Contains encryption settings for a data disk image.
  • Constructor Details

    • DataDiskImageEncryption

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

    • 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.
    • withLun

      public DataDiskImageEncryption 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 DataDiskImageEncryption object itself.
    • withDiskEncryptionSetId

      public DataDiskImageEncryption withDiskEncryptionSetId(String diskEncryptionSetId)
      Set the diskEncryptionSetId property: A relative URI containing the resource ID of the disk encryption set.
      Overrides:
      withDiskEncryptionSetId in class DiskImageEncryption
      Parameters:
      diskEncryptionSetId - the diskEncryptionSetId value to set.
      Returns:
      the DiskImageEncryption object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class DiskImageEncryption
      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<DiskImageEncryption>
      Overrides:
      toJson in class DiskImageEncryption
      Throws:
      IOException
    • fromJson

      public static DataDiskImageEncryption fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DataDiskImageEncryption from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DataDiskImageEncryption if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the DataDiskImageEncryption.