Class EventStreams.UpdateCallBuilder

java.lang.Object
com.ngrok.services.EventStreams.UpdateCallBuilder
Enclosing class:
EventStreams

public class EventStreams.UpdateCallBuilder extends Object
A builder object encapsulating state for an unsent Update API call.
  • Method Details

    • metadata

      public EventStreams.UpdateCallBuilder metadata(String metadata)
      Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes.
      Parameters:
      metadata - the value of the metadata parameter as a String
      Returns:
      the call builder instance
    • metadata

      public EventStreams.UpdateCallBuilder metadata(Optional<String> metadata)
      Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes.
      Parameters:
      metadata - the value of the metadata parameter as an Optional of String
      Returns:
      the call builder instance
    • description

      public EventStreams.UpdateCallBuilder description(String description)
      Human-readable description of the Event Stream. Optional, max 255 bytes.
      Parameters:
      description - the value of the description parameter as a String
      Returns:
      the call builder instance
    • description

      public EventStreams.UpdateCallBuilder description(Optional<String> description)
      Human-readable description of the Event Stream. Optional, max 255 bytes.
      Parameters:
      description - the value of the description parameter as an Optional of String
      Returns:
      the call builder instance
    • fields

      public EventStreams.UpdateCallBuilder fields(List<String> fields)
      A list of protocol-specific fields you want to collect on each event.
      Parameters:
      fields - the value of the fields parameter as a List<String>
      Returns:
      the call builder instance
    • fields

      public EventStreams.UpdateCallBuilder fields(Optional<List<String>> fields)
      A list of protocol-specific fields you want to collect on each event.
      Parameters:
      fields - the value of the fields parameter as an Optional of List<String>
      Returns:
      the call builder instance
    • destinationIds

      public EventStreams.UpdateCallBuilder destinationIds(List<String> destinationIds)
      A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination.
      Parameters:
      destinationIds - the value of the destination_ids parameter as a List<String>
      Returns:
      the call builder instance
    • destinationIds

      public EventStreams.UpdateCallBuilder destinationIds(Optional<List<String>> destinationIds)
      A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination.
      Parameters:
      destinationIds - the value of the destination_ids parameter as an Optional of List<String>
      Returns:
      the call builder instance
    • samplingRate

      public EventStreams.UpdateCallBuilder samplingRate(double samplingRate)
      The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events.
      Parameters:
      samplingRate - the value of the sampling_rate parameter as a double
      Returns:
      the call builder instance
    • samplingRate

      public EventStreams.UpdateCallBuilder samplingRate(Optional<Double> samplingRate)
      The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events.
      Parameters:
      samplingRate - the value of the sampling_rate parameter as an Optional of double
      Returns:
      the call builder instance
    • call

      public CompletionStage<EventStream> call()
      Initiates the API call asynchronously.
      Returns:
      a CompletionStage of EventStream
    • blockingCall

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