Class ExecuteWatchRequest.Builder

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.watcher.ExecuteWatchRequest.Builder
All Implemented Interfaces:
ObjectBuilder<ExecuteWatchRequest>
Enclosing class:
ExecuteWatchRequest

public static class ExecuteWatchRequest.Builder
extends ObjectBuilderBase
implements ObjectBuilder<ExecuteWatchRequest>
Builder for ExecuteWatchRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • actionModes

      public final ExecuteWatchRequest.Builder actionModes​(java.util.Map<java.lang.String,​ActionExecutionMode> map)
      Determines how to handle the watch actions as part of the watch execution. See Action execution modes for more information.

      API name: action_modes

      Adds all entries of map to actionModes.

    • actionModes

      public final ExecuteWatchRequest.Builder actionModes​(java.lang.String key, ActionExecutionMode value)
      Determines how to handle the watch actions as part of the watch execution. See Action execution modes for more information.

      API name: action_modes

      Adds an entry to actionModes.

    • alternativeInput

      public final ExecuteWatchRequest.Builder alternativeInput​(java.util.Map<java.lang.String,​JsonData> map)
      When present, the watch uses this object as a payload instead of executing its own input.

      API name: alternative_input

      Adds all entries of map to alternativeInput.

    • alternativeInput

      public final ExecuteWatchRequest.Builder alternativeInput​(java.lang.String key, JsonData value)
      When present, the watch uses this object as a payload instead of executing its own input.

      API name: alternative_input

      Adds an entry to alternativeInput.

    • debug

      public final ExecuteWatchRequest.Builder debug​(@Nullable java.lang.Boolean value)
      Defines whether the watch runs in debug mode.

      API name: debug

    • id

      public final ExecuteWatchRequest.Builder id​(@Nullable java.lang.String value)
      Identifier for the watch.

      API name: id

    • ignoreCondition

      public final ExecuteWatchRequest.Builder ignoreCondition​(@Nullable java.lang.Boolean value)
      When set to true, the watch execution uses the always condition. This can also be specified as an HTTP parameter.

      API name: ignore_condition

    • recordExecution

      public final ExecuteWatchRequest.Builder recordExecution​(@Nullable java.lang.Boolean value)
      When set to true, the watch record representing the watch execution result is persisted to the .watcher-history index for the current time. In addition, the status of the watch is updated, possibly throttling subsequent executions. This can also be specified as an HTTP parameter.

      API name: record_execution

    • simulatedActions

      public final ExecuteWatchRequest.Builder simulatedActions​(@Nullable SimulatedActions value)
      API name: simulated_actions
    • simulatedActions

      public final ExecuteWatchRequest.Builder simulatedActions​(java.util.function.Function<SimulatedActions.Builder,​ObjectBuilder<SimulatedActions>> fn)
      API name: simulated_actions
    • triggerData

      public final ExecuteWatchRequest.Builder triggerData​(@Nullable ScheduleTriggerEvent value)
      This structure is parsed as the data of the trigger event that will be used during the watch execution

      API name: trigger_data

    • triggerData

      public final ExecuteWatchRequest.Builder triggerData​(java.util.function.Function<ScheduleTriggerEvent.Builder,​ObjectBuilder<ScheduleTriggerEvent>> fn)
      This structure is parsed as the data of the trigger event that will be used during the watch execution

      API name: trigger_data

    • watch

      public final ExecuteWatchRequest.Builder watch​(@Nullable Watch value)
      When present, this watch is used instead of the one specified in the request. This watch is not persisted to the index and record_execution cannot be set.

      API name: watch

    • watch

      public final ExecuteWatchRequest.Builder watch​(java.util.function.Function<Watch.Builder,​ObjectBuilder<Watch>> fn)
      When present, this watch is used instead of the one specified in the request. This watch is not persisted to the index and record_execution cannot be set.

      API name: watch

    • build

      public ExecuteWatchRequest build()
      Specified by:
      build in interface ObjectBuilder<ExecuteWatchRequest>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.