Class DetectionRule.Builder
java.lang.Object
co.elastic.clients.elasticsearch.ml.DetectionRule.Builder
- All Implemented Interfaces:
ObjectBuilder<DetectionRule>
- Enclosing class:
- DetectionRule
public static class DetectionRule.Builder extends java.lang.Object implements ObjectBuilder<DetectionRule>
Builder for
DetectionRule
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description DetectionRule.Builder
actions(RuleAction... value)
The set of actions to be triggered when the rule applies.DetectionRule.Builder
actions(java.util.List<RuleAction> value)
The set of actions to be triggered when the rule applies.DetectionRule.Builder
addActions(RuleAction value)
Add a value toactions(List)
, creating the list if needed.DetectionRule.Builder
addConditions(RuleCondition value)
Add a value toconditions(List)
, creating the list if needed.DetectionRule.Builder
addConditions(java.util.function.Function<RuleCondition.Builder,ObjectBuilder<RuleCondition>> fn)
Add a value toconditions(List)
, creating the list if needed.DetectionRule
build()
Builds aDetectionRule
.DetectionRule.Builder
conditions(RuleCondition... value)
An array of numeric conditions when the rule applies.DetectionRule.Builder
conditions(java.util.function.Function<RuleCondition.Builder,ObjectBuilder<RuleCondition>> fn)
Setconditions(List)
to a singleton list.DetectionRule.Builder
conditions(java.util.List<RuleCondition> value)
An array of numeric conditions when the rule applies.DetectionRule.Builder
putScope(java.lang.String key, FilterRef value)
Add a key/value toscope(Map)
, creating the map if needed.DetectionRule.Builder
putScope(java.lang.String key, java.util.function.Function<FilterRef.Builder,ObjectBuilder<FilterRef>> fn)
Add a key/value toscope(Map)
, creating the map if needed.DetectionRule.Builder
scope(java.lang.String key, java.util.function.Function<FilterRef.Builder,ObjectBuilder<FilterRef>> fn)
Setscope(Map)
to a singleton map.DetectionRule.Builder
scope(java.util.Map<java.lang.String,FilterRef> value)
A scope of series where the rule applies.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
-
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
-
addActions
Add a value toactions(List)
, creating the list if needed. -
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
-
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
-
addConditions
Add a value toconditions(List)
, creating the list if needed. -
conditions
public DetectionRule.Builder conditions(java.util.function.Function<RuleCondition.Builder,ObjectBuilder<RuleCondition>> fn)Setconditions(List)
to a singleton list. -
addConditions
public DetectionRule.Builder addConditions(java.util.function.Function<RuleCondition.Builder,ObjectBuilder<RuleCondition>> fn)Add a value toconditions(List)
, creating the list if needed. -
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
-
putScope
Add a key/value toscope(Map)
, creating the map if needed. -
scope
public DetectionRule.Builder scope(java.lang.String key, java.util.function.Function<FilterRef.Builder,ObjectBuilder<FilterRef>> fn)Setscope(Map)
to a singleton map. -
putScope
public DetectionRule.Builder putScope(java.lang.String key, java.util.function.Function<FilterRef.Builder,ObjectBuilder<FilterRef>> fn)Add a key/value toscope(Map)
, creating the map if needed. -
build
Builds aDetectionRule
.- Specified by:
build
in interfaceObjectBuilder<DetectionRule>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-