Package com.ngrok.services

# Class EventSubscriptions.CreateCallBuilder

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

Enclosing class:
  EventSubscriptions

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `EventSubscription`
  `blockingCall()`
  Initiates the API call and blocks until it returns.
  `CompletionStage<EventSubscription>`
  `call()`
  Initiates the API call asynchronously.
  `EventSubscriptions.CreateCallBuilder`
  `description(String description)`
  Arbitrary customer supplied information intended to be human readable.
  `EventSubscriptions.CreateCallBuilder`
  `description(Optional<String> description)`
  Arbitrary customer supplied information intended to be human readable.
  `EventSubscriptions.CreateCallBuilder`
  `destinationIds(List<String> destinationIds)`
  A list of Event Destination IDs which should be used for this Event Subscription.
  `EventSubscriptions.CreateCallBuilder`
  `destinationIds(Optional<List<String>> destinationIds)`
  A list of Event Destination IDs which should be used for this Event Subscription.
  `EventSubscriptions.CreateCallBuilder`
  `metadata(String metadata)`
  Arbitrary customer supplied information intended to be machine readable.
  `EventSubscriptions.CreateCallBuilder`
  `metadata(Optional<String> metadata)`
  Arbitrary customer supplied information intended to be machine readable.
  `EventSubscriptions.CreateCallBuilder`
  `sources(List<EventSourceReplace> sources)`
  Sources containing the types for which this event subscription will trigger
  `EventSubscriptions.CreateCallBuilder`
  `sources(Optional<List<EventSourceReplace>> sources)`
  Sources containing the types for which this event subscription will trigger

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

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

- ## Method Details

  - ### metadata

    public EventSubscriptions.CreateCallBuilder metadata(String metadata)
    Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars.
    Parameters:
      `metadata` - the value of the metadata parameter as a `String`
    Returns:
      the call builder instance

  - ### metadata

    public EventSubscriptions.CreateCallBuilder metadata(Optional<String> metadata)
    Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars.
    Parameters:
      `metadata` - the value of the metadata parameter as an `Optional` of `String`
    Returns:
      the call builder instance

  - ### description

    public EventSubscriptions.CreateCallBuilder description(String description)
    Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars.
    Parameters:
      `description` - the value of the description parameter as a `String`
    Returns:
      the call builder instance

  - ### description

    public EventSubscriptions.CreateCallBuilder description(Optional<String> description)
    Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars.
    Parameters:
      `description` - the value of the description parameter as an `Optional` of `String`
    Returns:
      the call builder instance

  - ### sources

    public EventSubscriptions.CreateCallBuilder sources(List<EventSourceReplace> sources)
    Sources containing the types for which this event subscription will trigger
    Parameters:
      `sources` - the value of the sources parameter as a `List` of `EventSourceReplace`
    Returns:
      the call builder instance

  - ### sources

    public EventSubscriptions.CreateCallBuilder sources(Optional<List<EventSourceReplace>> sources)
    Sources containing the types for which this event subscription will trigger
    Parameters:
      `sources` - the value of the sources parameter as an `Optional` of `List` of `EventSourceReplace`
    Returns:
      the call builder instance

  - ### destinationIds

    public EventSubscriptions.CreateCallBuilder destinationIds(List<String> destinationIds)
    A list of Event Destination IDs which should be used for this Event Subscription.
    Parameters:
      `destinationIds` - the value of the destination_ids parameter as a `List` of `String`
    Returns:
      the call builder instance

  - ### destinationIds

    public EventSubscriptions.CreateCallBuilder destinationIds(Optional<List<String>> destinationIds)
    A list of Event Destination IDs which should be used for this Event Subscription.
    Parameters:
      `destinationIds` - the value of the destination_ids parameter as an `Optional` of `List` of `String`
    Returns:
      the call builder instance

  - ### call

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

  - ### blockingCall

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