Package com.ngrok

# Class DefaultNgrokApiClient.Builder

java.lang.Object
com.ngrok.DefaultNgrokApiClient.Builder

Enclosing class:
  DefaultNgrokApiClient

public static class DefaultNgrokApiClient.Builder extends Object
Builder class for the default API client.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DefaultNgrokApiClient.Builder`
  `baseUri(URI baseUri)`
  Sets the API base URI.
  `DefaultNgrokApiClient.Builder`
  `baseUri(Optional<URI> baseUri)`
  Sets the API base URI.
  `DefaultNgrokApiClient`
  `build()`
  Builds the ngrok API client instance.
  `DefaultNgrokApiClient.Builder`
  `httpClient(com.linecorp.armeria.client.WebClient httpClient)`
  Sets the HTTP client to use to make requests.
  `DefaultNgrokApiClient.Builder`
  `httpClient(Optional<com.linecorp.armeria.client.WebClient> httpClient)`
  Sets the HTTP client to use to make requests.
  `DefaultNgrokApiClient.Builder`
  `objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)`
  Sets the Jackson object mapper to use to serialize request bodies and deserialize response bodies.
  `DefaultNgrokApiClient.Builder`
  `objectMapper(Optional<com.fasterxml.jackson.databind.ObjectMapper> objectMapper)`
  Sets the Jackson object mapper to use to serialize request bodies and deserialize response bodies.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### httpClient

    public DefaultNgrokApiClient.Builder httpClient(com.linecorp.armeria.client.WebClient httpClient)
    Sets the HTTP client to use to make requests.
    Parameters:
      `httpClient` - a HTTP client
    Returns:
      the client builder

  - ### httpClient

    public DefaultNgrokApiClient.Builder httpClient(Optional<com.linecorp.armeria.client.WebClient> httpClient)
    Sets the HTTP client to use to make requests.
    Parameters:
      `httpClient` - an optional HTTP client
    Returns:
      the client builder

  - ### baseUri

    public DefaultNgrokApiClient.Builder baseUri(URI baseUri)
    Sets the API base URI.
    Parameters:
      `baseUri` - a URI
    Returns:
      the client builder
    See Also:
      - `NgrokApiClient.DEFAULT_BASE_URI`

  - ### baseUri

    public DefaultNgrokApiClient.Builder baseUri(Optional<URI> baseUri)
    Sets the API base URI.
    Parameters:
      `baseUri` - an optional URI
    Returns:
      the client builder
    See Also:
      - `NgrokApiClient.DEFAULT_BASE_URI`

  - ### objectMapper

    public DefaultNgrokApiClient.Builder objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    Sets the Jackson object mapper to use to serialize request bodies and deserialize response bodies. Be sure to pass something that can handle `Optional` and `OffsetDateTime`.
    Parameters:
      `objectMapper` - an object mapper
    Returns:
      the client builder
    See Also:
      - `Jdk8Module`
      - `JavaTimeModule`

  - ### objectMapper

    public DefaultNgrokApiClient.Builder objectMapper(Optional<com.fasterxml.jackson.databind.ObjectMapper> objectMapper)
    Sets the Jackson object mapper to use to serialize request bodies and deserialize response bodies. Be sure to pass something that can handle `Optional` and `OffsetDateTime`.
    Parameters:
      `objectMapper` - an object mapper
    Returns:
      the client builder
    See Also:
      - `Jdk8Module`
      - `JavaTimeModule`

  - ### build

    public DefaultNgrokApiClient build()
    Builds the ngrok API client instance.
    Returns:
      an api client