Class EndpointRuleSet

java.lang.Object
software.amazon.smithy.rulesengine.language.EndpointRuleSet
All Implemented Interfaces:
FromSourceLocation, ToNode, TypeCheck, ToSmithyBuilder<EndpointRuleSet>

public final class EndpointRuleSet extends Object implements FromSourceLocation, ToNode, ToSmithyBuilder<EndpointRuleSet>, TypeCheck
A set of EndpointRules. EndpointType Rules describe the endpoint resolution behavior for a service.
  • Method Details

    • builder

      public static EndpointRuleSet.Builder builder()
      Builder to create a EndpointRuleSet instance.
      Returns:
      returns a new Builder.
    • fromNode

      public static EndpointRuleSet fromNode(Node node) throws RuleError
      Creates an EndpointRuleSet 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 interface FromSourceLocation
      Returns:
      Returns the source location of the value.
    • getParameters

      public Parameters getParameters()
      Gets the Parameters defined in this rule-set.
      Returns:
      the parameters defined in the rule-set.
    • getRules

      public List<Rule> getRules()
      Gets the list of Rules defined in this rule-set.
      Returns:
      the rules defined in this rule-set.
    • getVersion

      public 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.
      Specified by:
      typeCheck in interface TypeCheck
      Parameters:
      scope - the scope to evaluate.
      Returns:
      the type validated by the scope check.
    • 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 interface ToSmithyBuilder<EndpointRuleSet>
      Returns:
      a builder for type T
    • toNode

      public Node toNode()
      Description copied from interface: ToNode
      Converts a value to a Node.
      Specified by:
      toNode in interface ToNode
      Returns:
      Returns the creates Node.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hasBuiltIn

      public static boolean hasBuiltIn(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 String getKeyString()
      Gets the built-in names as a joined string.
      Returns:
      a string of the built-in names.
    • createFunctionFactory

      public static Function<FunctionNode,Optional<LibraryFunction>> createFunctionFactory()
      Creates a LibraryFunction factory function using the loaded function definitions.
      Returns:
      the created factory.
    • getAuthSchemeValidators

      public static List<AuthSchemeValidator> getAuthSchemeValidators()
      Gets loaded authentication scheme validators.
      Returns:
      a list of AuthSchemeValidators.