Class TlsCertificate

java.lang.Object
com.ngrok.definitions.TlsCertificate

public class TlsCertificate extends Object
A class encapsulating the TlsCertificate resource.
  • Constructor Details

    • TlsCertificate

      public TlsCertificate(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, String certificatePem, String subjectCommonName, TlsCertificateSaNs subjectAlternativeNames, Optional<OffsetDateTime> issuedAt, OffsetDateTime notBefore, OffsetDateTime notAfter, List<String> keyUsages, List<String> extendedKeyUsages, String privateKeyType, String issuerCommonName, String serialNumber, String subjectOrganization, String subjectOrganizationalUnit, String subjectLocality, String subjectProvince, String subjectCountry)
      Creates a new instance of TlsCertificate.
      Parameters:
      id - unique identifier for this TLS certificate
      uri - URI of the TLS certificate API resource
      createdAt - timestamp when the TLS certificate was created, RFC 3339 format
      description - human-readable description of this TLS certificate. optional, max 255 bytes.
      metadata - arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes.
      certificatePem - chain of PEM-encoded certificates, leaf first. See Certificate Bundles.
      subjectCommonName - subject common name from the leaf of this TLS certificate
      subjectAlternativeNames - subject alternative names (SANs) from the leaf of this TLS certificate
      issuedAt - timestamp (in RFC 3339 format) when this TLS certificate was issued automatically, or null if this certificate was user-uploaded
      notBefore - timestamp when this TLS certificate becomes valid, RFC 3339 format
      notAfter - timestamp when this TLS certificate becomes invalid, RFC 3339 format
      keyUsages - set of actions the private key of this TLS certificate can be used for
      extendedKeyUsages - extended set of actions the private key of this TLS certificate can be used for
      privateKeyType - type of the private key of this TLS certificate. One of rsa, ecdsa, or ed25519.
      issuerCommonName - issuer common name from the leaf of this TLS certificate
      serialNumber - serial number of the leaf of this TLS certificate
      subjectOrganization - subject organization from the leaf of this TLS certificate
      subjectOrganizationalUnit - subject organizational unit from the leaf of this TLS certificate
      subjectLocality - subject locality from the leaf of this TLS certificate
      subjectProvince - subject province from the leaf of this TLS certificate
      subjectCountry - subject country from the leaf of this TLS certificate
  • Method Details

    • getId

      public String getId()
      unique identifier for this TLS certificate
      Returns:
      the value of the property as a String
    • getUri

      public URI getUri()
      URI of the TLS certificate API resource
      Returns:
      the value of the property as a URI
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      timestamp when the TLS certificate was created, RFC 3339 format
      Returns:
      the value of the property as a OffsetDateTime
    • getDescription

      public String getDescription()
      human-readable description of this TLS certificate. optional, max 255 bytes.
      Returns:
      the value of the property as a String
    • getMetadata

      public String getMetadata()
      arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes.
      Returns:
      the value of the property as a String
    • getCertificatePem

      public String getCertificatePem()
      chain of PEM-encoded certificates, leaf first. See Certificate Bundles.
      Returns:
      the value of the property as a String
    • getSubjectCommonName

      public String getSubjectCommonName()
      subject common name from the leaf of this TLS certificate
      Returns:
      the value of the property as a String
    • getSubjectAlternativeNames

      public TlsCertificateSaNs getSubjectAlternativeNames()
      subject alternative names (SANs) from the leaf of this TLS certificate
      Returns:
      the value of the property as a TlsCertificateSaNs
    • getIssuedAt

      public Optional<OffsetDateTime> getIssuedAt()
      timestamp (in RFC 3339 format) when this TLS certificate was issued automatically, or null if this certificate was user-uploaded
      Returns:
      the value of the property as a OffsetDateTime wrapped in an Optional
    • getNotBefore

      public OffsetDateTime getNotBefore()
      timestamp when this TLS certificate becomes valid, RFC 3339 format
      Returns:
      the value of the property as a OffsetDateTime
    • getNotAfter

      public OffsetDateTime getNotAfter()
      timestamp when this TLS certificate becomes invalid, RFC 3339 format
      Returns:
      the value of the property as a OffsetDateTime
    • getKeyUsages

      public List<String> getKeyUsages()
      set of actions the private key of this TLS certificate can be used for
      Returns:
      the value of the property as a List of String
    • getExtendedKeyUsages

      public List<String> getExtendedKeyUsages()
      extended set of actions the private key of this TLS certificate can be used for
      Returns:
      the value of the property as a List of String
    • getPrivateKeyType

      public String getPrivateKeyType()
      type of the private key of this TLS certificate. One of rsa, ecdsa, or ed25519.
      Returns:
      the value of the property as a String
    • getIssuerCommonName

      public String getIssuerCommonName()
      issuer common name from the leaf of this TLS certificate
      Returns:
      the value of the property as a String
    • getSerialNumber

      public String getSerialNumber()
      serial number of the leaf of this TLS certificate
      Returns:
      the value of the property as a String
    • getSubjectOrganization

      public String getSubjectOrganization()
      subject organization from the leaf of this TLS certificate
      Returns:
      the value of the property as a String
    • getSubjectOrganizationalUnit

      public String getSubjectOrganizationalUnit()
      subject organizational unit from the leaf of this TLS certificate
      Returns:
      the value of the property as a String
    • getSubjectLocality

      public String getSubjectLocality()
      subject locality from the leaf of this TLS certificate
      Returns:
      the value of the property as a String
    • getSubjectProvince

      public String getSubjectProvince()
      subject province from the leaf of this TLS certificate
      Returns:
      the value of the property as a String
    • getSubjectCountry

      public String getSubjectCountry()
      subject country from the leaf of this TLS certificate
      Returns:
      the value of the property as a String
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object