Class KeyVaultCertificate

java.lang.Object
com.azure.security.keyvault.certificates.models.KeyVaultCertificate
All Implemented Interfaces:
com.azure.json.JsonSerializable<KeyVaultCertificate>
Direct Known Subclasses:
KeyVaultCertificateWithPolicy

public class KeyVaultCertificate extends Object implements com.azure.json.JsonSerializable<KeyVaultCertificate>
Represents a certificate with all of its properties.
  • Method Details

    • getProperties

      public CertificateProperties getProperties()
      Get the certificate properties.
      Returns:
      the certificate properties.
    • setProperties

      public KeyVaultCertificate setProperties(CertificateProperties properties)
      Set the certificate properties
      Parameters:
      properties - the certificate properties
      Returns:
      the updated certificate object itself.
      Throws:
      NullPointerException - if certificateProperties is null
    • getId

      public String getId()
      Get the certificate identifier
      Returns:
      the certificate identifier
    • getName

      public String getName()
      Get the certificate name
      Returns:
      the certificate name
    • getKeyId

      public String getKeyId()
      Get the key id of the certificate
      Returns:
      the key Id.
    • getSecretId

      public String getSecretId()
      Get the secret id of the certificate
      Returns:
      the secret Id.
    • getCer

      public byte[] getCer()
      Get the cer content of the certificate
      Returns:
      the cer content.
    • isCertificateOrderPreserved

      public Boolean isCertificateOrderPreserved()
      Get a value indicating whether the order of certificate chain is to be preserved in the vault. The default value is false, which sets the leaf certificate at index 0.
      Returns:
      The preserve certificate order status.
    • toJson

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

      public static KeyVaultCertificate fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads a JSON stream into a KeyVaultCertificate.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      The KeyVaultCertificate that the JSON stream represented, may return null.
      Throws:
      IOException - If a KeyVaultCertificate fails to be read from the jsonReader.