Class ClientEndpointDiscoveryTrait

java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.aws.traits.clientendpointdiscovery.ClientEndpointDiscoveryTrait
All Implemented Interfaces:
software.amazon.smithy.model.FromSourceLocation, software.amazon.smithy.model.node.ToNode, software.amazon.smithy.model.shapes.ToShapeId, software.amazon.smithy.model.traits.Trait, software.amazon.smithy.utils.ToSmithyBuilder<ClientEndpointDiscoveryTrait>

public final class ClientEndpointDiscoveryTrait extends software.amazon.smithy.model.traits.AbstractTrait implements software.amazon.smithy.utils.ToSmithyBuilder<ClientEndpointDiscoveryTrait>
Configures endpoint discovery for the targeted service.
  • Field Details

    • ID

      public static final software.amazon.smithy.model.shapes.ShapeId ID
  • Constructor Details

  • Method Details

    • builder

      public static ClientEndpointDiscoveryTrait.Builder builder()
      Returns:
      Returns a builder used to create ClientEndpointDiscoveryTrait
    • getOperation

      public software.amazon.smithy.model.shapes.ShapeId getOperation()
      The operation used to discover endpoints for the service.

      The operation MUST be bound to the service.

      Returns:
      The ShapeId of the operation used to discover endpoints.
    • getOptionalError

      public Optional<software.amazon.smithy.model.shapes.ShapeId> getOptionalError()
      The error shape which indicates to a client that an endpoint they are using is no longer valid.

      This error MUST be bound to every operation bound to the service which is marked with an ClientDiscoveredEndpointTrait.

      Returns:
      The ShapeId of the invalid endpoint error.
    • getError

      @Deprecated public software.amazon.smithy.model.shapes.ShapeId getError()
      Deprecated.
      Deprecated in favor of getOptionalError().
    • createNode

      protected software.amazon.smithy.model.node.Node createNode()
      Specified by:
      createNode in class software.amazon.smithy.model.traits.AbstractTrait
    • toBuilder

      Specified by:
      toBuilder in interface software.amazon.smithy.utils.ToSmithyBuilder<ClientEndpointDiscoveryTrait>