Class EndpointRuleSet.Builder
java.lang.Object
software.amazon.smithy.rulesengine.language.util.SourceLocationTrackingBuilder<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 SourceLocationTrackingBuilder<EndpointRuleSet.Builder,EndpointRuleSet>
-
Field Summary
Fields inherited from class software.amazon.smithy.rulesengine.language.util.SourceLocationTrackingBuilder
sourceLocation
-
Constructor Summary
ConstructorDescriptionBuilder
(FromSourceLocation sourceLocation) Construct a builder from aSourceLocation
. -
Method Summary
Modifier and TypeMethodDescriptionInserts a rule into the ruleset.Adds a rule to this ruleset.build()
Creates an immutable object that is created from the properties that have been set on the builder.parameters
(Parameters parameters) Set the parameters for thisEndpointRuleSet
.rules
(Collection<Rule> rules) Add rules to this ruleset.Sets the version for theEndpointRuleSet
.Methods inherited from class software.amazon.smithy.rulesengine.language.util.SourceLocationTrackingBuilder
getSourceLocation, sourceLocation
-
Constructor Details
-
Builder
Construct a builder from aSourceLocation
.- Parameters:
sourceLocation
- The source location
-
-
Method Details
-
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
Adds a rule to this ruleset. The rule be evaluated if all previous rules do not match.- Parameters:
rule
- TheRule
to add- Returns:
- the
EndpointRuleSet.Builder
-
addRule
Inserts a rule into the ruleset.- Parameters:
index
- the position to add the rule at.rule
- TheRule
to add- Returns:
- the
EndpointRuleSet.Builder
-
rules
Add rules to this ruleset. The rules be evaluated if all previous rules do not match.- Parameters:
rules
- The Collection ofRule
to add- Returns:
- the
EndpointRuleSet.Builder
-
parameters
Set the parameters for thisEndpointRuleSet
.- Parameters:
parameters
-Parameters
to set- Returns:
- the
EndpointRuleSet.Builder
-
build
Description copied from interface:SmithyBuilder
Creates an immutable object that is created from the properties that have been set on the builder.- Returns:
- an instance of T
-