Class Rule.Builder
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.syntax.rule.Rule.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Builder
condition(ToCondition condition)
Rule.Builder
conditions(java.util.List<ToCondition> conditions)
Rule.Builder
conditions(ToCondition... conditions)
Rule.Builder
description(java.lang.String description)
Rule
endpoint(Endpoint endpoint)
Rule
error(java.lang.String error)
Rule
error(Node error)
Rule.Builder
errorOrElse(java.lang.String error, ToCondition... condition)
If `condition` IS met, return an error.Rule
treeRule(java.util.List<Rule>... rules)
Rule
treeRule(Rule... rules)
Rule.Builder
validateOrElse(java.lang.String error, ToCondition... condition)
If `condition` IS NOT met, return an error.
-
-
-
Method Detail
-
conditions
public Rule.Builder conditions(ToCondition... conditions)
-
conditions
public Rule.Builder conditions(java.util.List<ToCondition> conditions)
-
condition
public Rule.Builder condition(ToCondition condition)
-
error
public Rule error(java.lang.String error)
-
description
public Rule.Builder description(java.lang.String description)
-
errorOrElse
public Rule.Builder errorOrElse(java.lang.String error, ToCondition... condition)
If `condition` IS met, return an error. Otherwise, proceed with the rules generated by the returned builder.This method returns a new builder that must be used!
- Parameters:
condition
- a coercibleCondition
error
- an error description if the condition is not matched- Returns:
- new builder to attach subsequent rules to
-
validateOrElse
public Rule.Builder validateOrElse(java.lang.String error, ToCondition... condition)
If `condition` IS NOT met, return an error. Otherwise, proceed with the rules generated by the returned builder.This method returns a new builder that must be used!
- Parameters:
condition
- a coercibleCondition
error
- an error description if the condition is not matched- Returns:
- new builder to attach subsequent rules to
-
-