Class EventStream

java.lang.Object
com.ngrok.definitions.EventStream

public class EventStream extends Object
A class encapsulating the EventStream resource.
  • Constructor Details

    • EventStream

      public EventStream(String id, URI uri, OffsetDateTime createdAt, String metadata, String description, List<String> fields, String eventType, List<String> destinationIds, Double samplingRate)
      Creates a new instance of EventStream.
      Parameters:
      id - Unique identifier for this Event Stream.
      uri - URI of the Event Stream API resource.
      createdAt - Timestamp when the Event Stream was created, RFC 3339 format.
      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.
      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 are tcp_connection_closed and http_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.
      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.
  • Method Details

    • getId

      public String getId()
      Unique identifier for this Event Stream.
      Returns:
      the value of the property as a String
    • getUri

      public URI getUri()
      URI of the Event Stream API resource.
      Returns:
      the value of the property as a URI
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      Timestamp when the Event Stream was created, RFC 3339 format.
      Returns:
      the value of the property as a OffsetDateTime
    • getMetadata

      public String getMetadata()
      Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes.
      Returns:
      the value of the property as a String
    • getDescription

      public String getDescription()
      Human-readable description of the Event Stream. Optional, max 255 bytes.
      Returns:
      the value of the property as a String
    • getFields

      public List<String> getFields()
      A list of protocol-specific fields you want to collect on each event.
      Returns:
      the value of the property as a List<String>
    • getEventType

      public String getEventType()
      The protocol that determines which events will be collected. Supported values are tcp_connection_closed and http_request_complete.
      Returns:
      the value of the property as a String
    • getDestinationIds

      public List<String> getDestinationIds()
      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.
      Returns:
      the value of the property as a List<String>
    • getSamplingRate

      public double getSamplingRate()
      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.
      Returns:
      the value of the property as a double
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object