Class IntegrationTraitIndex

  • All Implemented Interfaces:
    KnowledgeIndex

    public final class IntegrationTraitIndex
    extends java.lang.Object
    implements KnowledgeIndex
    Computes the API Gateway integration for each operation, resource, and service shape in a model.
    • Constructor Detail

      • IntegrationTraitIndex

        public IntegrationTraitIndex​(Model model)
    • Method Detail

      • getIntegrationTrait

        public java.util.Optional<Trait> getIntegrationTrait​(ToShapeId service,
                                                             ToShapeId shape)
        Get the integration trait for a particular operation, resource, or service bound within a service.
        Parameters:
        service - Service shape or ShapeId thereof.
        shape - Operation, service, or resource shape in the service. When the service shape ID is provided, the integration trait of the service is returned if present.
        Returns:
        The integration trait or an empty optional if none set
      • getIntegrationTrait

        public <T extends Trait> java.util.Optional<T> getIntegrationTrait​(ToShapeId service,
                                                                           ToShapeId shape,
                                                                           java.lang.Class<T> type)
        Get the integration trait for a particular operation, resource, or service bound within a service of a specific type.
        Type Parameters:
        T - Type of trait to retrieve.
        Parameters:
        service - Service shape or ShapeId thereof.
        shape - Operation, service, or resource shape in the service. When the service shape ID is provided, the integration trait of the service is returned if present.
        type - Integration trait type.
        Returns:
        The integration trait or an empty optional if none set or if not of the expected type.