Package com.ngrok.services

# Class HttpResponseBackends.CreateCallBuilder

java.lang.Object
com.ngrok.services.HttpResponseBackends.CreateCallBuilder

Enclosing class:
  HttpResponseBackends

public class HttpResponseBackends.CreateCallBuilder extends Object
A builder object encapsulating state for an unsent Create API call.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `HttpResponseBackend`
  `blockingCall()`
  Initiates the API call and blocks until it returns.
  `HttpResponseBackends.CreateCallBuilder`
  `body(String body)`
  body to return as fixed content
  `HttpResponseBackends.CreateCallBuilder`
  `body(Optional<String> body)`
  body to return as fixed content
  `CompletionStage<HttpResponseBackend>`
  `call()`
  Initiates the API call asynchronously.
  `HttpResponseBackends.CreateCallBuilder`
  `description(String description)`
  human-readable description of this backend.
  `HttpResponseBackends.CreateCallBuilder`
  `description(Optional<String> description)`
  human-readable description of this backend.
  `HttpResponseBackends.CreateCallBuilder`
  `headers(Map<String,String> headers)`
  headers to return
  `HttpResponseBackends.CreateCallBuilder`
  `headers(Optional<Map<String,String>> headers)`
  headers to return
  `HttpResponseBackends.CreateCallBuilder`
  `metadata(String metadata)`
  arbitrary user-defined machine-readable data of this backend.
  `HttpResponseBackends.CreateCallBuilder`
  `metadata(Optional<String> metadata)`
  arbitrary user-defined machine-readable data of this backend.
  `HttpResponseBackends.CreateCallBuilder`
  `statusCode(int statusCode)`
  status code to return
  `HttpResponseBackends.CreateCallBuilder`
  `statusCode(Optional<Integer> statusCode)`
  status code to return

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

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

- ## Method Details

  - ### description

    public HttpResponseBackends.CreateCallBuilder description(String description)
    human-readable description of this backend. Optional
    Parameters:
      `description` - the value of the description parameter as a `String`
    Returns:
      the call builder instance

  - ### description

    public HttpResponseBackends.CreateCallBuilder description(Optional<String> description)
    human-readable description of this backend. Optional
    Parameters:
      `description` - the value of the description parameter as an `Optional` of `String`
    Returns:
      the call builder instance

  - ### metadata

    public HttpResponseBackends.CreateCallBuilder metadata(String metadata)
    arbitrary user-defined machine-readable data of this backend. Optional
    Parameters:
      `metadata` - the value of the metadata parameter as a `String`
    Returns:
      the call builder instance

  - ### metadata

    public HttpResponseBackends.CreateCallBuilder metadata(Optional<String> metadata)
    arbitrary user-defined machine-readable data of this backend. Optional
    Parameters:
      `metadata` - the value of the metadata parameter as an `Optional` of `String`
    Returns:
      the call builder instance

  - ### body

    public HttpResponseBackends.CreateCallBuilder body(String body)
    body to return as fixed content
    Parameters:
      `body` - the value of the body parameter as a `String`
    Returns:
      the call builder instance

  - ### body

    public HttpResponseBackends.CreateCallBuilder body(Optional<String> body)
    body to return as fixed content
    Parameters:
      `body` - the value of the body parameter as an `Optional` of `String`
    Returns:
      the call builder instance

  - ### headers

    public HttpResponseBackends.CreateCallBuilder headers(Map<String,String> headers)
    headers to return
    Parameters:
      `headers` - the value of the headers parameter as a `Map` of `String` to `String`
    Returns:
      the call builder instance

  - ### headers

    public HttpResponseBackends.CreateCallBuilder headers(Optional<Map<String,String>> headers)
    headers to return
    Parameters:
      `headers` - the value of the headers parameter as an `Optional` of `Map` of `String` to `String`
    Returns:
      the call builder instance

  - ### statusCode

    public HttpResponseBackends.CreateCallBuilder statusCode(int statusCode)
    status code to return
    Parameters:
      `statusCode` - the value of the status_code parameter as a `int`
    Returns:
      the call builder instance

  - ### statusCode

    public HttpResponseBackends.CreateCallBuilder statusCode(Optional<Integer> statusCode)
    status code to return
    Parameters:
      `statusCode` - the value of the status_code parameter as an `Optional` of `int`
    Returns:
      the call builder instance

  - ### call

    public CompletionStage<HttpResponseBackend> call()
    Initiates the API call asynchronously.
    Returns:
      a `CompletionStage` of `HttpResponseBackend`

  - ### blockingCall

    public HttpResponseBackend blockingCall() throws InterruptedException
    Initiates the API call and blocks until it returns.
    Returns:
      `HttpResponseBackend`
    Throws:
      `InterruptedException` - if the thread was interrupted during the call