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 class
EndpointRuleSet.Builder
A builder used to create aEndpointRuleSet
class.static class
EndpointRuleSet.EndpointPathCollector
EndpointRuleSet
visitor that collects a map of JSON pointer paths toEndpoint
s.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EndpointRuleSet.Builder
builder()
Builder to create aEndpointRuleSet
instance.static java.util.function.Function<FunctionNode,java.util.Optional<LibraryFunction>>
createFunctionFactory()
Creates aLibraryFunction
factory function using the loaded function definitions.boolean
equals(java.lang.Object o)
static EndpointRuleSet
fromNode(Node node)
Creates anEndpointRuleSet
of a specific type from the given Node information.static java.util.List<AuthSchemeValidator>
getAuthSchemeValidators()
Gets loaded authentication scheme validators.static java.lang.String
getKeyString()
Gets the built-in names as a joined string.Parameters
getParameters()
Gets theParameters
defined in this rule-set.java.util.List<Rule>
getRules()
Gets the list ofRule
s defined in this rule-set.SourceLocation
getSourceLocation()
Gets the source location of a value.java.lang.String
getVersion()
Gets the version of this rule-set.static boolean
hasBuiltIn(java.lang.String name)
Returns true if a built-in of the provided name has been registered.int
hashCode()
EndpointRuleSet.Builder
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.Node
toNode()
Converts a value to aNode
.java.lang.String
toString()
Type
typeCheck()
Type
typeCheck(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 aEndpointRuleSet
instance.- Returns:
- returns a new Builder.
-
fromNode
public static EndpointRuleSet fromNode(Node node) throws RuleError
Creates anEndpointRuleSet
of 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:FromSourceLocation
Gets the source location of a value.- Specified by:
getSourceLocation
in interfaceFromSourceLocation
- Returns:
- Returns the source location of the value.
-
getParameters
public Parameters getParameters()
Gets theParameters
defined in this rule-set.- Returns:
- the parameters defined in the rule-set.
-
getRules
public java.util.List<Rule> getRules()
Gets the list ofRule
s 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:TypeCheck
Checks whether the given types within a scope satisfy the constraints.
-
toBuilder
public EndpointRuleSet.Builder toBuilder()
Description copied from interface:ToSmithyBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToSmithyBuilder<EndpointRuleSet>
- Returns:
- a builder for type T
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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 aLibraryFunction
factory 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
AuthSchemeValidator
s.
-
-