Class Rule.Builder
java.lang.Object
software.amazon.smithy.rulesengine.language.syntax.rule.Rule.Builder
- Enclosing class:
- Rule
A builder used to create a
Rule
class.-
Method Summary
Modifier and TypeMethodDescriptioncondition
(ToCondition condition) conditions
(List<ToCondition> conditions) conditions
(ToCondition... conditions) description
(String description) errorOrElse
(String error, ToCondition... condition) If `condition` IS met, return an error.final Rule
validateOrElse
(String error, ToCondition... condition) If `condition` IS NOT met, return an error.
-
Method Details
-
conditions
-
conditions
-
condition
-
endpoint
-
error
-
error
-
treeRule
-
treeRule
-
description
-
errorOrElse
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
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
-