Package com.ngrok.services
Class EventStreams.UpdateCallBuilder
java.lang.Object
com.ngrok.services.EventStreams.UpdateCallBuilder
- Enclosing class:
- EventStreams
A builder object encapsulating state for an unsent Update API call.
-
Method Summary
Modifier and TypeMethodDescriptionInitiates the API call and blocks until it returns.call()Initiates the API call asynchronously.description(String description)Human-readable description of the Event Stream.description(Optional<String> description)Human-readable description of the Event Stream.destinationIds(List<String> destinationIds)A list of Event Destination IDs which should be used for this Event Stream.destinationIds(Optional<List<String>> destinationIds)A list of Event Destination IDs which should be used for this Event Stream.A list of protocol-specific fields you want to collect on each event.A list of protocol-specific fields you want to collect on each event.Arbitrary user-defined machine-readable data of this Event Stream.Arbitrary user-defined machine-readable data of this Event Stream.samplingRate(double samplingRate)The percentage of all events you would like to capture.samplingRate(Optional<Double> samplingRate)The percentage of all events you would like to capture.
-
Method Details
-
metadata
Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes.- Parameters:
metadata- the value of the metadata parameter as aString- Returns:
- the call builder instance
-
metadata
Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes. -
description
Human-readable description of the Event Stream. Optional, max 255 bytes.- Parameters:
description- the value of the description parameter as aString- Returns:
- the call builder instance
-
description
Human-readable description of the Event Stream. Optional, max 255 bytes. -
fields
A list of protocol-specific fields you want to collect on each event. -
fields
A list of protocol-specific fields you want to collect on each event. -
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. -
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. -
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 adouble- Returns:
- the call builder instance
-
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 anOptionalofdouble- Returns:
- the call builder instance
-
call
Initiates the API call asynchronously.- Returns:
- a
CompletionStageofEventStream
-
blockingCall
Initiates the API call and blocks until it returns.- Returns:
EventStream- Throws:
InterruptedException- if the thread was interrupted during the call
-