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.Builderactions(QueryRuleActions value) Required - The actions to take when the rule is matched.final PutRuleRequest.BuilderRequired - The actions to take when the rule is matched.build()Builds aPutRuleRequest.final PutRuleRequest.Buildercriteria(QueryRuleCriteria value, QueryRuleCriteria... values) Required - The criteria that must be met for the rule to be applied.final PutRuleRequest.BuilderRequired - The criteria that must be met for the rule to be applied.final PutRuleRequest.Buildercriteria(List<QueryRuleCriteria> list) Required - The criteria that must be met for the rule to be applied.final PutRuleRequest.BuilderAPI name:priorityfinal PutRuleRequest.BuilderRequired - The unique identifier of the query rule within the specified ruleset to be created or updated.final PutRuleRequest.BuilderRequired - The unique identifier of the query ruleset containing the rule to be created or updated.protected PutRuleRequest.Builderself()final PutRuleRequest.Buildertype(QueryRuleType value) Required - The type of rule.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
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:
criteriaAdds all elements of
listtocriteria. -
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:
criteriaAdds 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:
criteriaAdds a value to
criteriausing 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:
selfin classRequestBase.AbstractBuilder<PutRuleRequest.Builder>
-
build
Builds aPutRuleRequest.- Specified by:
buildin interfaceObjectBuilder<PutRuleRequest>- Throws:
NullPointerException- if some of the required fields are null.
-