Class DetectionRule.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.ml.DetectionRule.Builder
- All Implemented Interfaces:
ObjectBuilder<DetectionRule>
- Enclosing class:
- DetectionRule
public static class DetectionRule.Builder extends ObjectBuilderBase implements ObjectBuilder<DetectionRule>
Builder for
DetectionRule
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description DetectionRule.Builder
actions(RuleAction value, RuleAction... values)
The set of actions to be triggered when the rule applies.DetectionRule.Builder
actions(java.util.List<RuleAction> list)
The set of actions to be triggered when the rule applies.DetectionRule
build()
Builds aDetectionRule
.DetectionRule.Builder
conditions(RuleCondition value, RuleCondition... values)
An array of numeric conditions when the rule applies.DetectionRule.Builder
conditions(java.util.function.Function<RuleCondition.Builder,ObjectBuilder<RuleCondition>> fn)
An array of numeric conditions when the rule applies.DetectionRule.Builder
conditions(java.util.List<RuleCondition> list)
An array of numeric conditions when the rule applies.DetectionRule.Builder
scope(java.lang.String key, FilterRef value)
A scope of series where the rule applies.DetectionRule.Builder
scope(java.lang.String key, java.util.function.Function<FilterRef.Builder,ObjectBuilder<FilterRef>> fn)
A scope of series where the rule applies.DetectionRule.Builder
scope(java.util.Map<java.lang.String,FilterRef> map)
A scope of series where the rule applies.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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(java.util.function.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(java.lang.String key, java.util.function.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. -
build
Builds aDetectionRule
.- Specified by:
build
in interfaceObjectBuilder<DetectionRule>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-