Class ClientEncryptionKeyResource

java.lang.Object
com.azure.resourcemanager.cosmos.models.ClientEncryptionKeyResource
All Implemented Interfaces:
com.azure.json.JsonSerializable<ClientEncryptionKeyResource>
Direct Known Subclasses:
ClientEncryptionKeyGetPropertiesResource

public class ClientEncryptionKeyResource extends Object implements com.azure.json.JsonSerializable<ClientEncryptionKeyResource>
Cosmos DB client encryption key resource object.
  • Constructor Details

    • ClientEncryptionKeyResource

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

    • id

      public String id()
      Get the id property: Name of the ClientEncryptionKey.
      Returns:
      the id value.
    • withId

      public ClientEncryptionKeyResource withId(String id)
      Set the id property: Name of the ClientEncryptionKey.
      Parameters:
      id - the id value to set.
      Returns:
      the ClientEncryptionKeyResource object itself.
    • encryptionAlgorithm

      public String encryptionAlgorithm()
      Get the encryptionAlgorithm property: Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.
      Returns:
      the encryptionAlgorithm value.
    • withEncryptionAlgorithm

      public ClientEncryptionKeyResource withEncryptionAlgorithm(String encryptionAlgorithm)
      Set the encryptionAlgorithm property: Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.
      Parameters:
      encryptionAlgorithm - the encryptionAlgorithm value to set.
      Returns:
      the ClientEncryptionKeyResource object itself.
    • wrappedDataEncryptionKey

      public byte[] wrappedDataEncryptionKey()
      Get the wrappedDataEncryptionKey property: Wrapped (encrypted) form of the key represented as a byte array.
      Returns:
      the wrappedDataEncryptionKey value.
    • withWrappedDataEncryptionKey

      public ClientEncryptionKeyResource withWrappedDataEncryptionKey(byte[] wrappedDataEncryptionKey)
      Set the wrappedDataEncryptionKey property: Wrapped (encrypted) form of the key represented as a byte array.
      Parameters:
      wrappedDataEncryptionKey - the wrappedDataEncryptionKey value to set.
      Returns:
      the ClientEncryptionKeyResource object itself.
    • keyWrapMetadata

      public KeyWrapMetadata keyWrapMetadata()
      Get the keyWrapMetadata property: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.
      Returns:
      the keyWrapMetadata value.
    • withKeyWrapMetadata

      public ClientEncryptionKeyResource withKeyWrapMetadata(KeyWrapMetadata keyWrapMetadata)
      Set the keyWrapMetadata property: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.
      Parameters:
      keyWrapMetadata - the keyWrapMetadata value to set.
      Returns:
      the ClientEncryptionKeyResource 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<ClientEncryptionKeyResource>
      Throws:
      IOException
    • fromJson

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