Class Encryption

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

public final class Encryption extends Object implements com.azure.json.JsonSerializable<Encryption>
Encryption at rest settings for disk or snapshot.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the diskEncryptionSetId property: ResourceId of the disk encryption set to use for enabling encryption at rest.
    static Encryption
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Encryption from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the type property: The type of key used to encrypt the data of the disk.
    void
    Validates the instance.
    withDiskEncryptionSetId(String diskEncryptionSetId)
    Set the diskEncryptionSetId property: ResourceId of the disk encryption set to use for enabling encryption at rest.
    Set the type property: The type of key used to encrypt the data of the 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

    • Encryption

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

    • diskEncryptionSetId

      public String diskEncryptionSetId()
      Get the diskEncryptionSetId property: ResourceId of the disk encryption set to use for enabling encryption at rest.
      Returns:
      the diskEncryptionSetId value.
    • withDiskEncryptionSetId

      public Encryption withDiskEncryptionSetId(String diskEncryptionSetId)
      Set the diskEncryptionSetId property: ResourceId of the disk encryption set to use for enabling encryption at rest.
      Parameters:
      diskEncryptionSetId - the diskEncryptionSetId value to set.
      Returns:
      the Encryption object itself.
    • type

      public EncryptionType type()
      Get the type property: The type of key used to encrypt the data of the disk.
      Returns:
      the type value.
    • withType

      public Encryption withType(EncryptionType type)
      Set the type property: The type of key used to encrypt the data of the disk.
      Parameters:
      type - the type value to set.
      Returns:
      the Encryption 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<Encryption>
      Throws:
      IOException
    • fromJson

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