Class EndpointRuleSetTrait

java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait
All Implemented Interfaces:
FromSourceLocation, ToNode, ToShapeId, Trait, ToSmithyBuilder<EndpointRuleSetTrait>

public final class EndpointRuleSetTrait extends AbstractTrait implements ToSmithyBuilder<EndpointRuleSetTrait>
Defines an endpoint rule-set used to resolve the client's transport endpoint.
  • Field Details

    • ID

      public static final ShapeId ID
  • Method Details

    • builder

      public static EndpointRuleSetTrait.Builder builder()
    • getRuleSet

      public Node getRuleSet()
    • getComponentFactory

      public EndpointComponentFactory getComponentFactory()
      Gets the EndpointComponentFactory used to resolve this rule-set's functions, built-ins, and auth-scheme validators.

      Built lazily from the classloader captured when this trait was created (the classloader used to assemble the model) and cached, so endpoint extensions are discovered once and reused across deserialization and validation. Extensions living only in a caller-supplied closure classloader (for example smithy-aws-endpoints, which registers aws.partition) are found because that closure classloader is used here.

      Returns:
      the factory used to resolve endpoint components.
    • getEndpointRuleSet

      public EndpointRuleSet getEndpointRuleSet()
    • createNode

      protected Node createNode()
      Description copied from class: AbstractTrait
      The result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.
      Specified by:
      createNode in class AbstractTrait
      Returns:
      Returns the trait as a node.
    • toBuilder

      public EndpointRuleSetTrait.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<EndpointRuleSetTrait>
      Returns:
      a builder for type T