Class KeyWrapMetadata
java.lang.Object
com.azure.resourcemanager.cosmos.models.KeyWrapMetadata
- All Implemented Interfaces:
com.azure.json.JsonSerializable<KeyWrapMetadata>
public final class KeyWrapMetadata
extends Object
implements com.azure.json.JsonSerializable<KeyWrapMetadata>
Represents key wrap metadata that a key wrapping provider can use to wrap/unwrap a client encryption key.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the algorithm property: Algorithm used in wrapping and unwrapping of the data encryption key.static KeyWrapMetadatafromJson(com.azure.json.JsonReader jsonReader) Reads an instance of KeyWrapMetadata from the JsonReader.name()Get the name property: The name of associated KeyEncryptionKey (aka CustomerManagedKey).com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: ProviderName of KeyStoreProvider.voidvalidate()Validates the instance.value()Get the value property: Reference / link to the KeyEncryptionKey.withAlgorithm(String algorithm) Set the algorithm property: Algorithm used in wrapping and unwrapping of the data encryption key.Set the name property: The name of associated KeyEncryptionKey (aka CustomerManagedKey).Set the type property: ProviderName of KeyStoreProvider.Set the value property: Reference / link to the KeyEncryptionKey.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
KeyWrapMetadata
public KeyWrapMetadata()Creates an instance of KeyWrapMetadata class.
-
-
Method Details
-
name
Get the name property: The name of associated KeyEncryptionKey (aka CustomerManagedKey).- Returns:
- the name value.
-
withName
Set the name property: The name of associated KeyEncryptionKey (aka CustomerManagedKey).- Parameters:
name- the name value to set.- Returns:
- the KeyWrapMetadata object itself.
-
type
Get the type property: ProviderName of KeyStoreProvider.- Returns:
- the type value.
-
withType
Set the type property: ProviderName of KeyStoreProvider.- Parameters:
type- the type value to set.- Returns:
- the KeyWrapMetadata object itself.
-
value
Get the value property: Reference / link to the KeyEncryptionKey.- Returns:
- the value value.
-
withValue
Set the value property: Reference / link to the KeyEncryptionKey.- Parameters:
value- the value value to set.- Returns:
- the KeyWrapMetadata object itself.
-
algorithm
Get the algorithm property: Algorithm used in wrapping and unwrapping of the data encryption key.- Returns:
- the algorithm value.
-
withAlgorithm
Set the algorithm property: Algorithm used in wrapping and unwrapping of the data encryption key.- Parameters:
algorithm- the algorithm value to set.- Returns:
- the KeyWrapMetadata object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<KeyWrapMetadata>- Throws:
IOException
-
fromJson
Reads an instance of KeyWrapMetadata from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of KeyWrapMetadata 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 KeyWrapMetadata.
-