Class PoetExtension


  • public class PoetExtension
    extends Object
    Extension and convenience methods to Poet that use the intermediate model.
    • Method Detail

      • getModelClass

        public com.squareup.javapoet.ClassName getModelClass​(String className)
        Parameters:
        className - Simple name of class in model package.
        Returns:
        A Poet ClassName for the given class in the model package.
      • getTransformClass

        public com.squareup.javapoet.ClassName getTransformClass​(String className)
        Parameters:
        className - Simple name of class in transform package.
        Returns:
        A Poet ClassName for the given class in the transform package.
      • getRequestTransformClass

        public com.squareup.javapoet.ClassName getRequestTransformClass​(String className)
        Parameters:
        className - Simple name of class in transform package.
        Returns:
        A Poet ClassName for the given class in the transform package.
      • getClientClass

        public com.squareup.javapoet.ClassName getClientClass​(String className)
        Parameters:
        className - Simple name of class in base service package (i.e. software.amazon.awssdk.services.dynamodb).
        Returns:
        A Poet ClassName for the given class in the base service package.
      • getServiceConfigClass

        public com.squareup.javapoet.ClassName getServiceConfigClass()
        Returns:
        A Poet ClassName for the generated service client configuration.
      • getUserAgentClass

        public com.squareup.javapoet.ClassName getUserAgentClass()
      • getResponseClassForPaginatedSyncOperation

        public com.squareup.javapoet.ClassName getResponseClassForPaginatedSyncOperation​(String operationName)
        Parameters:
        operationName - Name of the operation
        Returns:
        A Poet ClassName for the response type of a paginated operation in the base service package. Example: If operationName is "ListTables", then the response type of the paginated operation will be "ListTablesIterable" class.
      • getSyncWaiterInterface

        public com.squareup.javapoet.ClassName getSyncWaiterInterface()
      • getSyncWaiterClass

        public com.squareup.javapoet.ClassName getSyncWaiterClass()
      • getAsyncWaiterInterface

        public com.squareup.javapoet.ClassName getAsyncWaiterInterface()
      • getAsyncWaiterClass

        public com.squareup.javapoet.ClassName getAsyncWaiterClass()
      • getEndpointProviderInterfaceName

        public com.squareup.javapoet.ClassName getEndpointProviderInterfaceName()
      • getResponseClassForPaginatedAsyncOperation

        public com.squareup.javapoet.ClassName getResponseClassForPaginatedAsyncOperation​(String operationName)
        Parameters:
        operationName - Name of the operation
        Returns:
        A Poet ClassName for the response type of a async paginated operation in the base service package. Example: If operationName is "ListTables", then the async response type of the paginated operation will be "ListTablesPublisher" class.
      • getResponseMetadataClass

        public com.squareup.javapoet.ClassName getResponseMetadataClass()
        Returns:
        ResponseMetadata className. eg: "S3ResponseMetadata"
      • getApiName

        public String getApiName​(OperationModel operation)
        Returns:
        The correctly cased name of the API.
      • responsePojoType

        public com.squareup.javapoet.ClassName responsePojoType​(OperationModel operation)
        Returns:
        The ClassName for the response pojo.
      • eventStreamResponseHandlerType

        public com.squareup.javapoet.ClassName eventStreamResponseHandlerType​(OperationModel operation)
        Returns:
        ClassName for generated event stream response handler interface.
      • eventStreamResponseHandlerBuilderType

        public com.squareup.javapoet.ClassName eventStreamResponseHandlerBuilderType​(OperationModel operation)
        Returns:
        ClassName for the builder interface for the response handler interface
      • eventStreamResponseHandlerVisitorType

        public com.squareup.javapoet.ClassName eventStreamResponseHandlerVisitorType​(OperationModel operation)
        Returns:
        ClassName for the event stream visitor interface.
      • eventStreamResponseHandlerVisitorBuilderType

        public com.squareup.javapoet.ClassName eventStreamResponseHandlerVisitorBuilderType​(OperationModel operation)
        Returns:
        ClassName for the builder interface for the event stream visitor interface.
      • getModelClassFromShape

        public com.squareup.javapoet.ClassName getModelClassFromShape​(ShapeModel shapeModel)
        Parameters:
        shapeModel - shape model for the class in model package
        Returns:
        ClassName for the shape represented by the given ShapeModel.
      • isResponse

        public boolean isResponse​(ShapeModel shapeModel)
      • isRequest

        public boolean isRequest​(ShapeModel shapeModel)