Class KeyAttributes

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

public final class KeyAttributes extends Object implements com.azure.json.JsonSerializable<KeyAttributes>
The object attributes managed by the Azure Key Vault service.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the created property: Creation time in seconds since 1970-01-01T00:00:00Z.
    Get the enabled property: Determines whether or not the object is enabled.
    Get the expires property: Expiry date in seconds since 1970-01-01T00:00:00Z.
    Get the exportable property: Indicates if the private key can be exported.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of KeyAttributes from the JsonReader.
    Get the notBefore property: Not before date in seconds since 1970-01-01T00:00:00Z.
    Get the recoveryLevel property: The deletion recovery level currently in effect for the object.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the updated property: Last updated time in seconds since 1970-01-01T00:00:00Z.
    void
    Validates the instance.
    Set the enabled property: Determines whether or not the object is enabled.
    withExpires(Long expires)
    Set the expires property: Expiry date in seconds since 1970-01-01T00:00:00Z.
    withExportable(Boolean exportable)
    Set the exportable property: Indicates if the private key can be exported.
    withNotBefore(Long notBefore)
    Set the notBefore property: Not before date in seconds since 1970-01-01T00:00:00Z.

    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

    • KeyAttributes

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

    • enabled

      public Boolean enabled()
      Get the enabled property: Determines whether or not the object is enabled.
      Returns:
      the enabled value.
    • withEnabled

      public KeyAttributes withEnabled(Boolean enabled)
      Set the enabled property: Determines whether or not the object is enabled.
      Parameters:
      enabled - the enabled value to set.
      Returns:
      the KeyAttributes object itself.
    • notBefore

      public Long notBefore()
      Get the notBefore property: Not before date in seconds since 1970-01-01T00:00:00Z.
      Returns:
      the notBefore value.
    • withNotBefore

      public KeyAttributes withNotBefore(Long notBefore)
      Set the notBefore property: Not before date in seconds since 1970-01-01T00:00:00Z.
      Parameters:
      notBefore - the notBefore value to set.
      Returns:
      the KeyAttributes object itself.
    • expires

      public Long expires()
      Get the expires property: Expiry date in seconds since 1970-01-01T00:00:00Z.
      Returns:
      the expires value.
    • withExpires

      public KeyAttributes withExpires(Long expires)
      Set the expires property: Expiry date in seconds since 1970-01-01T00:00:00Z.
      Parameters:
      expires - the expires value to set.
      Returns:
      the KeyAttributes object itself.
    • created

      public Long created()
      Get the created property: Creation time in seconds since 1970-01-01T00:00:00Z.
      Returns:
      the created value.
    • updated

      public Long updated()
      Get the updated property: Last updated time in seconds since 1970-01-01T00:00:00Z.
      Returns:
      the updated value.
    • recoveryLevel

      public DeletionRecoveryLevel recoveryLevel()
      Get the recoveryLevel property: The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object can be permanently deleted by a privileged user; otherwise, only the system can purge the object at the end of the retention interval.
      Returns:
      the recoveryLevel value.
    • exportable

      public Boolean exportable()
      Get the exportable property: Indicates if the private key can be exported.
      Returns:
      the exportable value.
    • withExportable

      public KeyAttributes withExportable(Boolean exportable)
      Set the exportable property: Indicates if the private key can be exported.
      Parameters:
      exportable - the exportable value to set.
      Returns:
      the KeyAttributes 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<KeyAttributes>
      Throws:
      IOException
    • fromJson

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