Class IntegrationTraitIndex
java.lang.Object
software.amazon.smithy.aws.apigateway.traits.IntegrationTraitIndex
- All Implemented Interfaces:
KnowledgeIndex
Computes the API Gateway integration for each operation,
resource, and service shape in a model.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetIntegrationTrait
(ToShapeId service, ToShapeId shape) Get the integration trait for a particular operation, resource, or service bound within a service.getIntegrationTrait
(ToShapeId service, ToShapeId shape, Class<T> type) Get the integration trait for a particular operation, resource, or service bound within a service of a specific type.static IntegrationTraitIndex
-
Constructor Details
-
IntegrationTraitIndex
-
-
Method Details
-
of
-
getIntegrationTrait
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> Optional<T> getIntegrationTrait(ToShapeId service, ToShapeId shape, 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.
-