Class DetectionRule.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<DetectionRule.Builder>
co.elastic.clients.elasticsearch.ml.DetectionRule.Builder
- All Implemented Interfaces:
WithJson<DetectionRule.Builder>
,ObjectBuilder<DetectionRule>
- Enclosing class:
- DetectionRule
public static class DetectionRule.Builder
extends WithJsonObjectBuilderBase<DetectionRule.Builder>
implements ObjectBuilder<DetectionRule>
Builder for
DetectionRule
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal DetectionRule.Builder
actions
(RuleAction value, RuleAction... values) The set of actions to be triggered when the rule applies.final DetectionRule.Builder
actions
(List<RuleAction> list) The set of actions to be triggered when the rule applies.build()
Builds aDetectionRule
.final DetectionRule.Builder
conditions
(RuleCondition value, RuleCondition... values) An array of numeric conditions when the rule applies.final DetectionRule.Builder
An array of numeric conditions when the rule applies.final DetectionRule.Builder
conditions
(List<RuleCondition> list) An array of numeric conditions when the rule applies.final DetectionRule.Builder
A scope of series where the rule applies.final DetectionRule.Builder
scope
(String key, Function<FilterRef.Builder, ObjectBuilder<FilterRef>> fn) A scope of series where the rule applies.final DetectionRule.Builder
A scope of series where the rule applies.protected DetectionRule.Builder
self()
Methods 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 set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined.API name:
actions
Adds all elements of
list
toactions
. -
actions
The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined.API name:
actions
Adds one or more values to
actions
. -
conditions
An array of numeric conditions when the rule applies. A rule must either have a non-empty scope or at least one condition. Multiple conditions are combined together with a logical AND.API name:
conditions
Adds all elements of
list
toconditions
. -
conditions
An array of numeric conditions when the rule applies. A rule must either have a non-empty scope or at least one condition. Multiple conditions are combined together with a logical AND.API name:
conditions
Adds one or more values to
conditions
. -
conditions
public final DetectionRule.Builder conditions(Function<RuleCondition.Builder, ObjectBuilder<RuleCondition>> fn) An array of numeric conditions when the rule applies. A rule must either have a non-empty scope or at least one condition. Multiple conditions are combined together with a logical AND.API name:
conditions
Adds a value to
conditions
using a builder lambda. -
scope
A scope of series where the rule applies. A rule must either have a non-empty scope or at least one condition. By default, the scope includes all series. Scoping is allowed for any of the fields that are also specified inby_field_name
,over_field_name
, orpartition_field_name
.API name:
scope
Adds all entries of
map
toscope
. -
scope
A scope of series where the rule applies. A rule must either have a non-empty scope or at least one condition. By default, the scope includes all series. Scoping is allowed for any of the fields that are also specified inby_field_name
,over_field_name
, orpartition_field_name
.API name:
scope
Adds an entry to
scope
. -
scope
public final DetectionRule.Builder scope(String key, Function<FilterRef.Builder, ObjectBuilder<FilterRef>> fn) A scope of series where the rule applies. A rule must either have a non-empty scope or at least one condition. By default, the scope includes all series. Scoping is allowed for any of the fields that are also specified inby_field_name
,over_field_name
, orpartition_field_name
.API name:
scope
Adds an entry to
scope
using a builder lambda. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<DetectionRule.Builder>
-
build
Builds aDetectionRule
.- Specified by:
build
in interfaceObjectBuilder<DetectionRule>
- Throws:
NullPointerException
- if some of the required fields are null.
-