Class KeyReleasePolicy

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

public final class KeyReleasePolicy extends Object implements com.azure.json.JsonSerializable<KeyReleasePolicy>
The KeyReleasePolicy model.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the contentType property: Content type and version of key release policy.
    byte[]
    Get the data property: Blob encoding the policy rules under which the key can be released.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of KeyReleasePolicy from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withContentType(String contentType)
    Set the contentType property: Content type and version of key release policy.
    withData(byte[] data)
    Set the data property: Blob encoding the policy rules under which the key can be released.

    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

    • KeyReleasePolicy

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

    • contentType

      public String contentType()
      Get the contentType property: Content type and version of key release policy.
      Returns:
      the contentType value.
    • withContentType

      public KeyReleasePolicy withContentType(String contentType)
      Set the contentType property: Content type and version of key release policy.
      Parameters:
      contentType - the contentType value to set.
      Returns:
      the KeyReleasePolicy object itself.
    • data

      public byte[] data()
      Get the data property: Blob encoding the policy rules under which the key can be released.
      Returns:
      the data value.
    • withData

      public KeyReleasePolicy withData(byte[] data)
      Set the data property: Blob encoding the policy rules under which the key can be released.
      Parameters:
      data - the data value to set.
      Returns:
      the KeyReleasePolicy 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<KeyReleasePolicy>
      Throws:
      IOException
    • fromJson

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