Class EndpointRuleSet.Builder
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.RulesComponentBuilder<EndpointRuleSet.Builder,EndpointRuleSet>
-
- software.amazon.smithy.rulesengine.language.EndpointRuleSet.Builder
-
- All Implemented Interfaces:
FromSourceLocation,SmithyBuilder<EndpointRuleSet>
- Enclosing class:
- EndpointRuleSet
public static class EndpointRuleSet.Builder extends RulesComponentBuilder<EndpointRuleSet.Builder,EndpointRuleSet>
A builder used to create aEndpointRuleSetclass.
-
-
Constructor Summary
Constructors Constructor Description Builder(FromSourceLocation sourceLocation)Construct a builder from aSourceLocation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EndpointRuleSet.BuilderaddRule(int index, Rule rule)Inserts a rule into the ruleset.EndpointRuleSet.BuilderaddRule(Rule rule)Adds a rule to this ruleset.EndpointRuleSetbuild()Creates an immutable object that is created from the properties that have been set on the builder.EndpointRuleSet.Builderparameters(Parameters parameters)Set the parameters for thisEndpointRuleSet.EndpointRuleSet.Builderrules(java.util.Collection<Rule> rules)Add rules to this ruleset.EndpointRuleSet.Builderversion(java.lang.String version)Sets the version for theEndpointRuleSet.-
Methods inherited from class software.amazon.smithy.rulesengine.language.RulesComponentBuilder
getSourceLocation, javaLocation, sourceLocation
-
-
-
-
Constructor Detail
-
Builder
public Builder(FromSourceLocation sourceLocation)
Construct a builder from aSourceLocation.- Parameters:
sourceLocation- The source location
-
-
Method Detail
-
version
public EndpointRuleSet.Builder version(java.lang.String version)
Sets the version for theEndpointRuleSet. If not set, the version will default to the latest version.- Parameters:
version- The version to set- Returns:
- the
EndpointRuleSet.Builder
-
addRule
public EndpointRuleSet.Builder addRule(Rule rule)
Adds a rule to this ruleset. The rule be evaluated if all previous rules do not match.- Parameters:
rule- TheRuleto add- Returns:
- the
EndpointRuleSet.Builder
-
addRule
public EndpointRuleSet.Builder addRule(int index, Rule rule)
Inserts a rule into the ruleset.- Parameters:
index- the position to add the rule at.rule- TheRuleto add- Returns:
- the
EndpointRuleSet.Builder
-
rules
public EndpointRuleSet.Builder rules(java.util.Collection<Rule> rules)
Add rules to this ruleset. The rules be evaluated if all previous rules do not match.- Parameters:
rules- The Collection ofRuleto add- Returns:
- the
EndpointRuleSet.Builder
-
parameters
public EndpointRuleSet.Builder parameters(Parameters parameters)
Set the parameters for thisEndpointRuleSet.- Parameters:
parameters-Parametersto set- Returns:
- the
EndpointRuleSet.Builder
-
build
public EndpointRuleSet build()
Description copied from interface:SmithyBuilderCreates an immutable object that is created from the properties that have been set on the builder.- Returns:
- an instance of T
-
-