Package com.ngrok.definitions

# Class ApiKey

java.lang.Object
com.ngrok.definitions.ApiKey

public class ApiKey extends Object
A class encapsulating the `ApiKey` resource.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ApiKey(String id, URI uri, String description, String metadata, OffsetDateTime createdAt, Optional<String> token)`
  Creates a new instance of `ApiKey`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `OffsetDateTime`
  `getCreatedAt()`
  timestamp when the api key was created, RFC 3339 format
  `String`
  `getDescription()`
  human-readable description of what uses the API key to authenticate.
  `String`
  `getId()`
  unique API key resource identifier
  `String`
  `getMetadata()`
  arbitrary user-defined data of this API key.
  `Optional<String>`
  `getToken()`
  the bearer token that can be placed into the Authorization header to authenticate request to the ngrok API.
  `URI`
  `getUri()`
  URI to the API resource of this API key
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ApiKey

    public ApiKey(String id, URI uri, String description, String metadata, OffsetDateTime createdAt, Optional<String> token)
    Creates a new instance of `ApiKey`.
    Parameters:
      `id` - unique API key resource identifier
      `uri` - URI to the API resource of this API key
      `description` - human-readable description of what uses the API key to authenticate. optional, max 255 bytes.
      `metadata` - arbitrary user-defined data of this API key. optional, max 4096 bytes
      `createdAt` - timestamp when the api key was created, RFC 3339 format
      `token` - the bearer token that can be placed into the Authorization header to authenticate request to the ngrok API. This value is only available one time, on the API response from key creation. Otherwise it is null.

- ## Method Details

  - ### getId

    public String getId()
    unique API key resource identifier
    Returns:
      the value of the property as a `String`

  - ### getUri

    public URI getUri()
    URI to the API resource of this API key
    Returns:
      the value of the property as a `URI`

  - ### getDescription

    public String getDescription()
    human-readable description of what uses the API key to authenticate. optional, max 255 bytes.
    Returns:
      the value of the property as a `String`

  - ### getMetadata

    public String getMetadata()
    arbitrary user-defined data of this API key. optional, max 4096 bytes
    Returns:
      the value of the property as a `String`

  - ### getCreatedAt

    public OffsetDateTime getCreatedAt()
    timestamp when the api key was created, RFC 3339 format
    Returns:
      the value of the property as a `OffsetDateTime`

  - ### getToken

    public Optional<String> getToken()
    the bearer token that can be placed into the Authorization header to authenticate request to the ngrok API. This value is only available one time, on the API response from key creation. Otherwise it is null.
    Returns:
      the value of the property as a `String` wrapped in an `Optional`

  - ### 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`