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

public final class Endpoint extends Object implements FromSourceLocation, ToNode, ToSmithyBuilder<Endpoint>, TypeCheck
An EndpointType as returned by EndpointRules.
  • Method Details

    • fromNode

      public static Endpoint fromNode(Node node)
      Constructs an Endpoint from a Node. Node must be an ObjectNode.
      Parameters:
      node - the object node.
      Returns:
      the node as an Endpoint.
    • builder

      public static Endpoint.Builder builder()
      Create a new EndpointType builder.
      Returns:
      EndpointType builder
    • 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.
    • getUrl

      public Expression getUrl()
      Returns the EndpointType URL as an expression.
      Returns:
      the endpoint URL expression.
    • getHeaders

      public Map<String,List<Expression>> getHeaders()
      Get the endpoint headers as a map of String to list of Expression values.
      Returns:
      the endpoint headers.
    • getProperties

      public Map<Identifier,Literal> getProperties()
      Get the endpoint properties as a map of Identifier to Literal values.
      Returns:
      the endpoint properties.
    • toBuilder

      public Endpoint.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<Endpoint>
      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
    • 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.