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 Details

    • Builder

      public Builder()
  • Method Details

    • actions

      public final DetectionRule.Builder actions​(java.util.List<RuleAction> list)
      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 to actions.

    • actions

      public final DetectionRule.Builder actions​(RuleAction value, RuleAction... values)
      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

      public final DetectionRule.Builder conditions​(java.util.List<RuleCondition> list)
      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 to conditions.

    • conditions

      public final DetectionRule.Builder conditions​(RuleCondition value, RuleCondition... values)
      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

      public final DetectionRule.Builder scope​(java.util.Map<java.lang.String,​FilterRef> map)
      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 in by_field_name, over_field_name, or partition_field_name.

      API name: scope

      Adds all entries of map to scope.

    • scope

      public final DetectionRule.Builder scope​(java.lang.String key, FilterRef value)
      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 in by_field_name, over_field_name, or partition_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 in by_field_name, over_field_name, or partition_field_name.

      API name: scope

      Adds an entry to scope using a builder lambda.

    • build

      public DetectionRule build()
      Builds a DetectionRule.
      Specified by:
      build in interface ObjectBuilder<DetectionRule>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.