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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal DetectionRule.Builderactions(RuleAction value, RuleAction... values) The set of actions to be triggered when the rule applies.final DetectionRule.Builderactions(List<RuleAction> list) The set of actions to be triggered when the rule applies.build()Builds aDetectionRule.final DetectionRule.Builderconditions(RuleCondition value, RuleCondition... values) An array of numeric conditions when the rule applies.final DetectionRule.BuilderAn array of numeric conditions when the rule applies.final DetectionRule.Builderconditions(List<RuleCondition> list) An array of numeric conditions when the rule applies.final DetectionRule.BuilderA scope of series where the rule applies.final DetectionRule.Builderscope(String key, Function<FilterRef.Builder, ObjectBuilder<FilterRef>> fn) A scope of series where the rule applies.final DetectionRule.BuilderA scope of series where the rule applies.protected DetectionRule.Builderself()Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods 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:
actionsAdds all elements of
listtoactions. -
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:
actionsAdds 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:
conditionsAdds all elements of
listtoconditions. -
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:
conditionsAdds 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:
conditionsAdds a value to
conditionsusing 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:
scopeAdds all entries of
maptoscope. -
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:
scopeAdds 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:
scopeAdds an entry to
scopeusing a builder lambda. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<DetectionRule.Builder>
-
build
Builds aDetectionRule.- Specified by:
buildin interfaceObjectBuilder<DetectionRule>- Throws:
NullPointerException- if some of the required fields are null.
-