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 Summary
ConstructorsConstructorDescriptionCreates an instance of ClientEncryptionKeyResource class. -
Method Summary
Modifier and TypeMethodDescriptionGet the encryptionAlgorithm property: Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.static ClientEncryptionKeyResource
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ClientEncryptionKeyResource from the JsonReader.id()
Get the id property: Name of the ClientEncryptionKey.Get the keyWrapMetadata property: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withEncryptionAlgorithm
(String encryptionAlgorithm) Set the encryptionAlgorithm property: Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.Set the id property: Name of the ClientEncryptionKey.withKeyWrapMetadata
(KeyWrapMetadata keyWrapMetadata) Set the keyWrapMetadata property: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.withWrappedDataEncryptionKey
(byte[] wrappedDataEncryptionKey) Set the wrappedDataEncryptionKey property: Wrapped (encrypted) form of the key represented as a byte array.byte[]
Get the wrappedDataEncryptionKey property: Wrapped (encrypted) form of the key represented as a byte array.Methods inherited from class java.lang.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
-
ClientEncryptionKeyResource
public ClientEncryptionKeyResource()Creates an instance of ClientEncryptionKeyResource class.
-
-
Method Details
-
id
Get the id property: Name of the ClientEncryptionKey.- Returns:
- the id value.
-
withId
Set the id property: Name of the ClientEncryptionKey.- Parameters:
id
- the id value to set.- Returns:
- the ClientEncryptionKeyResource object itself.
-
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
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
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
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
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
- Specified by:
toJson
in interfacecom.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.
-