Class SplunkEvent.Builder

java.lang.Object
org.apache.beam.sdk.io.splunk.SplunkEvent.Builder
Enclosing class:
SplunkEvent

public abstract static class SplunkEvent.Builder extends Object
A builder class for creating a SplunkEvent.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • withTime

      public SplunkEvent.Builder withTime(Long time)
      Assigns time value to the event metadata.
      Parameters:
      time - time value to assign
    • withHost

      public SplunkEvent.Builder withHost(String host)
      Assigns host value to the event metadata.
      Parameters:
      host - host value to assign
    • withSource

      public SplunkEvent.Builder withSource(String source)
      Assigns source value to the event metadata.
      Parameters:
      source - source value to assign
    • withSourceType

      public SplunkEvent.Builder withSourceType(String sourceType)
      Assigns sourceType value to the event metadata.
      Parameters:
      sourceType - sourceType value to assign
    • withIndex

      public SplunkEvent.Builder withIndex(String index)
      Assigns index value to the event metadata.
      Parameters:
      index - index value to assign
    • withFields

      public SplunkEvent.Builder withFields(JsonObject fields)
      Assigns fields value to the event metadata.
      Parameters:
      fields - fields value to assign
    • withEvent

      public SplunkEvent.Builder withEvent(String event)
      Assigns the event payload to be sent to the HEC endpoint.
      Parameters:
      event - payload to be sent to HEC
    • create

      public SplunkEvent create()
      Creates a SplunkEvent object.