Class PutRuleRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutRuleRequest.Builder>
co.elastic.clients.elasticsearch.query_rules.PutRuleRequest.Builder
- All Implemented Interfaces:
WithJson<PutRuleRequest.Builder>
,ObjectBuilder<PutRuleRequest>
- Enclosing class:
- PutRuleRequest
public static class PutRuleRequest.Builder
extends RequestBase.AbstractBuilder<PutRuleRequest.Builder>
implements ObjectBuilder<PutRuleRequest>
Builder for
PutRuleRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal PutRuleRequest.Builder
actions
(QueryRuleActions value) Required - The actions to take when the rule is matched.final PutRuleRequest.Builder
Required - The actions to take when the rule is matched.build()
Builds aPutRuleRequest
.final PutRuleRequest.Builder
criteria
(QueryRuleCriteria value, QueryRuleCriteria... values) Required - The criteria that must be met for the rule to be applied.final PutRuleRequest.Builder
Required - The criteria that must be met for the rule to be applied.final PutRuleRequest.Builder
criteria
(List<QueryRuleCriteria> list) Required - The criteria that must be met for the rule to be applied.final PutRuleRequest.Builder
API name:priority
final PutRuleRequest.Builder
Required - The unique identifier of the query rule within the specified ruleset to be created or updated.final PutRuleRequest.Builder
Required - The unique identifier of the query ruleset containing the rule to be created or updated.protected PutRuleRequest.Builder
self()
final PutRuleRequest.Builder
type
(QueryRuleType value) Required - The type of rule.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
actions
Required - The actions to take when the rule is matched. The format of this action depends on the rule type.API name:
actions
-
actions
public final PutRuleRequest.Builder actions(Function<QueryRuleActions.Builder, ObjectBuilder<QueryRuleActions>> fn) Required - The actions to take when the rule is matched. The format of this action depends on the rule type.API name:
actions
-
criteria
Required - The criteria that must be met for the rule to be applied. If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.API name:
criteria
Adds all elements of
list
tocriteria
. -
criteria
Required - The criteria that must be met for the rule to be applied. If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.API name:
criteria
Adds one or more values to
criteria
. -
criteria
public final PutRuleRequest.Builder criteria(Function<QueryRuleCriteria.Builder, ObjectBuilder<QueryRuleCriteria>> fn) Required - The criteria that must be met for the rule to be applied. If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.API name:
criteria
Adds a value to
criteria
using a builder lambda. -
priority
API name:priority
-
ruleId
Required - The unique identifier of the query rule within the specified ruleset to be created or updated.API name:
rule_id
-
rulesetId
Required - The unique identifier of the query ruleset containing the rule to be created or updated.API name:
ruleset_id
-
type
Required - The type of rule.API name:
type
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutRuleRequest.Builder>
-
build
Builds aPutRuleRequest
.- Specified by:
build
in interfaceObjectBuilder<PutRuleRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-