Class PutWatchRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutWatchRequest.Builder>
co.elastic.clients.elasticsearch.watcher.PutWatchRequest.Builder
- All Implemented Interfaces:
WithJson<PutWatchRequest.Builder>
,ObjectBuilder<PutWatchRequest>
- Enclosing class:
- PutWatchRequest
public static class PutWatchRequest.Builder
extends RequestBase.AbstractBuilder<PutWatchRequest.Builder>
implements ObjectBuilder<PutWatchRequest>
Builder for
PutWatchRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal PutWatchRequest.Builder
The list of actions that will be run if the condition matches.final PutWatchRequest.Builder
actions
(String key, Function<Action.Builder, ObjectBuilder<Action>> fn) The list of actions that will be run if the condition matches.final PutWatchRequest.Builder
The list of actions that will be run if the condition matches.final PutWatchRequest.Builder
The initial state of the watch.build()
Builds aPutWatchRequest
.final PutWatchRequest.Builder
The condition that defines if the actions should be run.final PutWatchRequest.Builder
condition
(ConditionVariant value) The condition that defines if the actions should be run.final PutWatchRequest.Builder
The condition that defines if the actions should be run.final PutWatchRequest.Builder
Required - The identifier for the watch.final PutWatchRequest.Builder
ifPrimaryTerm
(Long value) only update the watch if the last operation that has changed the watch has the specified primary termfinal PutWatchRequest.Builder
only update the watch if the last operation that has changed the watch has the specified sequence numberfinal PutWatchRequest.Builder
The input that defines the input that loads the data for the watch.final PutWatchRequest.Builder
input
(InputVariant value) The input that defines the input that loads the data for the watch.final PutWatchRequest.Builder
The input that defines the input that loads the data for the watch.final PutWatchRequest.Builder
Metadata JSON that will be copied into the history entries.final PutWatchRequest.Builder
Metadata JSON that will be copied into the history entries.protected PutWatchRequest.Builder
self()
final PutWatchRequest.Builder
throttlePeriod
(Time value) The minimum time between actions being run.final PutWatchRequest.Builder
The minimum time between actions being run.final PutWatchRequest.Builder
throttlePeriodInMillis
(Long value) Minimum time in milliseconds between actions being run.final PutWatchRequest.Builder
The transform that processes the watch payload to prepare it for the watch actions.final PutWatchRequest.Builder
transform
(TransformVariant value) The transform that processes the watch payload to prepare it for the watch actions.final PutWatchRequest.Builder
The transform that processes the watch payload to prepare it for the watch actions.final PutWatchRequest.Builder
The trigger that defines when the watch should run.final PutWatchRequest.Builder
trigger
(TriggerVariant value) The trigger that defines when the watch should run.final PutWatchRequest.Builder
The trigger that defines when the watch should run.final PutWatchRequest.Builder
Explicit version number for concurrency controlMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
actions
The list of actions that will be run if the condition matches.API name:
actions
Adds all entries of
map
toactions
. -
actions
The list of actions that will be run if the condition matches.API name:
actions
Adds an entry to
actions
. -
actions
public final PutWatchRequest.Builder actions(String key, Function<Action.Builder, ObjectBuilder<Action>> fn) The list of actions that will be run if the condition matches.API name:
actions
Adds an entry to
actions
using a builder lambda. -
active
The initial state of the watch. The default value istrue
, which means the watch is active by default.API name:
active
-
condition
The condition that defines if the actions should be run.API name:
condition
-
condition
public final PutWatchRequest.Builder condition(Function<Condition.Builder, ObjectBuilder<Condition>> fn) The condition that defines if the actions should be run.API name:
condition
-
condition
The condition that defines if the actions should be run.API name:
condition
-
id
Required - The identifier for the watch.API name:
id
-
ifPrimaryTerm
only update the watch if the last operation that has changed the watch has the specified primary termAPI name:
if_primary_term
-
ifSeqNo
only update the watch if the last operation that has changed the watch has the specified sequence numberAPI name:
if_seq_no
-
input
The input that defines the input that loads the data for the watch.API name:
input
-
input
The input that defines the input that loads the data for the watch.API name:
input
-
input
The input that defines the input that loads the data for the watch.API name:
input
-
metadata
Metadata JSON that will be copied into the history entries.API name:
metadata
Adds all entries of
map
tometadata
. -
metadata
Metadata JSON that will be copied into the history entries.API name:
metadata
Adds an entry to
metadata
. -
throttlePeriod
The minimum time between actions being run. The default is 5 seconds. This default can be changed in the config file with the settingxpack.watcher.throttle.period.default_period
. If both this value and thethrottle_period_in_millis
parameter are specified, Watcher uses the last parameter included in the request.API name:
throttle_period
-
throttlePeriod
The minimum time between actions being run. The default is 5 seconds. This default can be changed in the config file with the settingxpack.watcher.throttle.period.default_period
. If both this value and thethrottle_period_in_millis
parameter are specified, Watcher uses the last parameter included in the request.API name:
throttle_period
-
throttlePeriodInMillis
Minimum time in milliseconds between actions being run. Defaults to 5000. If both this value and the throttle_period parameter are specified, Watcher uses the last parameter included in the request.API name:
throttle_period_in_millis
-
transform
The transform that processes the watch payload to prepare it for the watch actions.API name:
transform
-
transform
public final PutWatchRequest.Builder transform(Function<Transform.Builder, ObjectBuilder<Transform>> fn) The transform that processes the watch payload to prepare it for the watch actions.API name:
transform
-
transform
The transform that processes the watch payload to prepare it for the watch actions.API name:
transform
-
trigger
The trigger that defines when the watch should run.API name:
trigger
-
trigger
The trigger that defines when the watch should run.API name:
trigger
-
trigger
The trigger that defines when the watch should run.API name:
trigger
-
version
Explicit version number for concurrency controlAPI name:
version
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutWatchRequest.Builder>
-
build
Builds aPutWatchRequest
.- Specified by:
build
in interfaceObjectBuilder<PutWatchRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-