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
    Constructor
    Description
    Creates an instance of KeyWrapMetadata class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the algorithm property: Algorithm used in wrapping and unwrapping of the data encryption key.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of KeyWrapMetadata from the JsonReader.
    Get the name property: The name of associated KeyEncryptionKey (aka CustomerManagedKey).
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the type property: ProviderName of KeyStoreProvider.
    void
    Validates the instance.
    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, wait

    Methods 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

      public String name()
      Get the name property: The name of associated KeyEncryptionKey (aka CustomerManagedKey).
      Returns:
      the name value.
    • withName

      public KeyWrapMetadata withName(String name)
      Set the name property: The name of associated KeyEncryptionKey (aka CustomerManagedKey).
      Parameters:
      name - the name value to set.
      Returns:
      the KeyWrapMetadata object itself.
    • type

      public String type()
      Get the type property: ProviderName of KeyStoreProvider.
      Returns:
      the type value.
    • withType

      public KeyWrapMetadata withType(String type)
      Set the type property: ProviderName of KeyStoreProvider.
      Parameters:
      type - the type value to set.
      Returns:
      the KeyWrapMetadata object itself.
    • value

      public String value()
      Get the value property: Reference / link to the KeyEncryptionKey.
      Returns:
      the value value.
    • withValue

      public KeyWrapMetadata withValue(String value)
      Set the value property: Reference / link to the KeyEncryptionKey.
      Parameters:
      value - the value value to set.
      Returns:
      the KeyWrapMetadata object itself.
    • algorithm

      public String algorithm()
      Get the algorithm property: Algorithm used in wrapping and unwrapping of the data encryption key.
      Returns:
      the algorithm value.
    • withAlgorithm

      public KeyWrapMetadata withAlgorithm(String algorithm)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<KeyWrapMetadata>
      Throws:
      IOException
    • fromJson

      public static KeyWrapMetadata fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.