Class RuleValidationResultRulesItem.Builder
- java.lang.Object
-
- ai.extend.types.RuleValidationResultRulesItem.Builder
-
- All Implemented Interfaces:
RuleValidationResultRulesItem._FinalStage,RuleValidationResultRulesItem.NameStage,RuleValidationResultRulesItem.ValidStage
- Enclosing class:
- RuleValidationResultRulesItem
public static final class RuleValidationResultRulesItem.Builder extends java.lang.Object implements RuleValidationResultRulesItem.NameStage, RuleValidationResultRulesItem.ValidStage, RuleValidationResultRulesItem._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleValidationResultRulesItembuild()RuleValidationResultRulesItem._FinalStageerror(java.lang.String error)If thefailureReasonisPARSE_ERRORorVALUE_ERROR, then this field contains the error's details.RuleValidationResultRulesItem._FinalStageerror(java.util.Optional<java.lang.String> error)If thefailureReasonisPARSE_ERRORorVALUE_ERROR, then this field contains the error's details.RuleValidationResultRulesItem._FinalStagefailureReason(RuleValidationResultRulesItemFailureReason failureReason)If the validation rule is not valid, then this describes why the rule failed.RuleValidationResultRulesItem._FinalStagefailureReason(java.util.Optional<RuleValidationResultRulesItemFailureReason> failureReason)If the validation rule is not valid, then this describes why the rule failed.RuleValidationResultRulesItem.Builderfrom(RuleValidationResultRulesItem other)RuleValidationResultRulesItem.ValidStagename(java.lang.String name)The name of the validation rule.RuleValidationResultRulesItem._FinalStagevalid(boolean valid)Indicates whether this validation rule passed or not.RuleValidationResultRulesItem._FinalStagevalidArray(java.util.List<java.lang.Boolean> validArray)Present if the validation rule's formula is array valued.RuleValidationResultRulesItem._FinalStagevalidArray(java.util.Optional<java.util.List<java.lang.Boolean>> validArray)Present if the validation rule's formula is array valued.
-
-
-
Method Detail
-
from
public RuleValidationResultRulesItem.Builder from(RuleValidationResultRulesItem other)
- Specified by:
fromin interfaceRuleValidationResultRulesItem.NameStage
-
name
public RuleValidationResultRulesItem.ValidStage name(@NotNull java.lang.String name)
The name of the validation rule.
The name of the validation rule.
- Specified by:
namein interfaceRuleValidationResultRulesItem.NameStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
valid
public RuleValidationResultRulesItem._FinalStage valid(boolean valid)
Indicates whether this validation rule passed or not. This field will be
trueonly if the formula evaluates totrue. If the rule's formula is array valued, then this field will only betrueif the formula evaluates totruefor every item in the array.Indicates whether this validation rule passed or not. This field will be
trueonly if the formula evaluates totrue. If the rule's formula is array valued, then this field will only betrueif the formula evaluates totruefor every item in the array.- Specified by:
validin interfaceRuleValidationResultRulesItem.ValidStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
error
public RuleValidationResultRulesItem._FinalStage error(java.lang.String error)
If the
failureReasonisPARSE_ERRORorVALUE_ERROR, then this field contains the error's details.- Specified by:
errorin interfaceRuleValidationResultRulesItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
error
public RuleValidationResultRulesItem._FinalStage error(java.util.Optional<java.lang.String> error)
If the
failureReasonisPARSE_ERRORorVALUE_ERROR, then this field contains the error's details.- Specified by:
errorin interfaceRuleValidationResultRulesItem._FinalStage
-
failureReason
public RuleValidationResultRulesItem._FinalStage failureReason(RuleValidationResultRulesItemFailureReason failureReason)
If the validation rule is not valid, then this describes why the rule failed.
"RULE_FAILED"- The formula evaluated tofalseornull"PARSE_ERROR"- The formula could not be parsed"VALUE_ERROR"- An error occurred while evaluating the formula
- Specified by:
failureReasonin interfaceRuleValidationResultRulesItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public RuleValidationResultRulesItem._FinalStage failureReason(java.util.Optional<RuleValidationResultRulesItemFailureReason> failureReason)
If the validation rule is not valid, then this describes why the rule failed.
"RULE_FAILED"- The formula evaluated tofalseornull"PARSE_ERROR"- The formula could not be parsed"VALUE_ERROR"- An error occurred while evaluating the formula
- Specified by:
failureReasonin interfaceRuleValidationResultRulesItem._FinalStage
-
validArray
public RuleValidationResultRulesItem._FinalStage validArray(java.util.List<java.lang.Boolean> validArray)
Present if the validation rule's formula is array valued. This field contains the formula's evaluated result for every item in the array.
- Specified by:
validArrayin interfaceRuleValidationResultRulesItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
validArray
public RuleValidationResultRulesItem._FinalStage validArray(java.util.Optional<java.util.List<java.lang.Boolean>> validArray)
Present if the validation rule's formula is array valued. This field contains the formula's evaluated result for every item in the array.
- Specified by:
validArrayin interfaceRuleValidationResultRulesItem._FinalStage
-
build
public RuleValidationResultRulesItem build()
- Specified by:
buildin interfaceRuleValidationResultRulesItem._FinalStage
-
-