Package com.ngrok.services
Class EventStreams.CreateCallBuilder
java.lang.Object
com.ngrok.services.EventStreams.CreateCallBuilder
- Enclosing class:
- EventStreams
A builder object encapsulating state for an unsent Create 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.The protocol that determines which events will be collected.The protocol that determines which events will be collected.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. -
eventType
The protocol that determines which events will be collected. Supported values aretcp_connection_closedandhttp_request_complete.- Parameters:
eventType- the value of the event_type parameter as aString- Returns:
- the call builder instance
-
eventType
The protocol that determines which events will be collected. Supported values aretcp_connection_closedandhttp_request_complete. -
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
-