Class EndpointRuleSet
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.EndpointRuleSet
-
- All Implemented Interfaces:
FromSourceLocation,ToNode,TypeCheck,ToSmithyBuilder<EndpointRuleSet>
public final class EndpointRuleSet extends java.lang.Object implements FromSourceLocation, ToNode, ToSmithyBuilder<EndpointRuleSet>, TypeCheck
A set of EndpointRules. EndpointType Rules describe the endpoint resolution behavior for a service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEndpointRuleSet.BuilderA builder used to create aEndpointRuleSetclass.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EndpointRuleSet.Builderbuilder()Builder to create aEndpointRuleSetinstance.static java.util.function.Function<FunctionNode,java.util.Optional<LibraryFunction>>createFunctionFactory()Creates aLibraryFunctionfactory function using the loaded function definitions.booleanequals(java.lang.Object o)static EndpointRuleSetfromNode(Node node)Creates anEndpointRuleSetof a specific type from the given Node information.static java.util.List<AuthSchemeValidator>getAuthSchemeValidators()Gets loaded authentication scheme validators.static java.lang.StringgetKeyString()Gets the built-in names as a joined string.ParametersgetParameters()Gets theParametersdefined in this rule-set.java.util.List<Rule>getRules()Gets the list ofRules defined in this rule-set.SourceLocationgetSourceLocation()Gets the source location of a value.java.lang.StringgetVersion()Gets the version of this rule-set.static booleanhasBuiltIn(java.lang.String name)Returns true if a built-in of the provided name has been registered.inthashCode()EndpointRuleSet.BuildertoBuilder()Take this object and create a builder that contains all of the current property values of this object.NodetoNode()Converts a value to aNode.java.lang.StringtoString()TypetypeCheck()TypetypeCheck(Scope<Type> scope)Checks whether the given types within a scope satisfy the constraints.
-
-
-
Method Detail
-
builder
public static EndpointRuleSet.Builder builder()
Builder to create aEndpointRuleSetinstance.- Returns:
- returns a new Builder.
-
fromNode
public static EndpointRuleSet fromNode(Node node) throws RuleError
Creates anEndpointRuleSetof a specific type from the given Node information.- Parameters:
node- the node to deserialize.- Returns:
- the created EndpointRuleSet.
- Throws:
RuleError
-
getSourceLocation
public SourceLocation getSourceLocation()
Description copied from interface:FromSourceLocationGets the source location of a value.- Specified by:
getSourceLocationin interfaceFromSourceLocation- Returns:
- Returns the source location of the value.
-
getParameters
public Parameters getParameters()
Gets theParametersdefined in this rule-set.- Returns:
- the parameters defined in the rule-set.
-
getRules
public java.util.List<Rule> getRules()
Gets the list ofRules defined in this rule-set.- Returns:
- the rules defined in this rule-set.
-
getVersion
public java.lang.String getVersion()
Gets the version of this rule-set.- Returns:
- the rule-set version.
-
typeCheck
public Type typeCheck()
-
typeCheck
public Type typeCheck(Scope<Type> scope)
Description copied from interface:TypeCheckChecks whether the given types within a scope satisfy the constraints.
-
toBuilder
public EndpointRuleSet.Builder toBuilder()
Description copied from interface:ToSmithyBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToSmithyBuilder<EndpointRuleSet>- Returns:
- a builder for type T
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hasBuiltIn
public static boolean hasBuiltIn(java.lang.String name)
Returns true if a built-in of the provided name has been registered.- Parameters:
name- the name of the built-in to check for.- Returns:
- true if the built-in is present, false otherwise.
-
getKeyString
public static java.lang.String getKeyString()
Gets the built-in names as a joined string.- Returns:
- a string of the built-in names.
-
createFunctionFactory
public static java.util.function.Function<FunctionNode,java.util.Optional<LibraryFunction>> createFunctionFactory()
Creates aLibraryFunctionfactory function using the loaded function definitions.- Returns:
- the created factory.
-
getAuthSchemeValidators
public static java.util.List<AuthSchemeValidator> getAuthSchemeValidators()
Gets loaded authentication scheme validators.- Returns:
- a list of
AuthSchemeValidators.
-
-