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.Builderactions(RuleAction... value)The set of actions to be triggered when the rule applies.DetectionRule.Builderactions(java.util.List<RuleAction> value)The set of actions to be triggered when the rule applies.DetectionRule.BuilderaddActions(RuleAction value)Add a value toactions(List), creating the list if needed.DetectionRule.BuilderaddConditions(RuleCondition value)Add a value toconditions(List), creating the list if needed.DetectionRule.BuilderaddConditions(java.util.function.Function<RuleCondition.Builder,ObjectBuilder<RuleCondition>> fn)Add a value toconditions(List), creating the list if needed.DetectionRulebuild()Builds aDetectionRule.DetectionRule.Builderconditions(RuleCondition... value)An array of numeric conditions when the rule applies.DetectionRule.Builderconditions(java.util.function.Function<RuleCondition.Builder,ObjectBuilder<RuleCondition>> fn)Setconditions(List)to a singleton list.DetectionRule.Builderconditions(java.util.List<RuleCondition> value)An array of numeric conditions when the rule applies.DetectionRule.BuilderputScope(java.lang.String key, FilterRef value)Add a key/value toscope(Map), creating the map if needed.DetectionRule.BuilderputScope(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.Builderscope(java.lang.String key, java.util.function.Function<FilterRef.Builder,ObjectBuilder<FilterRef>> fn)Setscope(Map)to a singleton map.DetectionRule.Builderscope(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. 4 -
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. 4 -
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. 5 -
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:
buildin interfaceObjectBuilder<DetectionRule>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-