Package com.ngrok.services

# Class EventSources.CreateCallBuilder

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

Enclosing class:
  EventSources

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `EventSource`
  `blockingCall()`
  Initiates the API call and blocks until it returns.
  `CompletionStage<EventSource>`
  `call()`
  Initiates the API call asynchronously.
  `EventSources.CreateCallBuilder`
  `type(String type)`
  Type of event for which an event subscription will trigger
  `EventSources.CreateCallBuilder`
  `type(Optional<String> type)`
  Type of event for which an event subscription will trigger

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

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

- ## Method Details

  - ### type

    public EventSources.CreateCallBuilder type(String type)
    Type of event for which an event subscription will trigger
    Parameters:
      `type` - the value of the type parameter as a `String`
    Returns:
      the call builder instance

  - ### type

    public EventSources.CreateCallBuilder type(Optional<String> type)
    Type of event for which an event subscription will trigger
    Parameters:
      `type` - the value of the type parameter as an `Optional` of `String`
    Returns:
      the call builder instance

  - ### call

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

  - ### blockingCall

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