Class PoetExtension
- java.lang.Object
-
- software.amazon.awssdk.codegen.poet.PoetExtension
-
public class PoetExtension extends Object
Extension and convenience methods to Poet that use the intermediate model.
-
-
Constructor Summary
Constructors Constructor Description PoetExtension(IntermediateModel model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.squareup.javapoet.ClassNameeventStreamResponseHandlerBuilderType(OperationModel operation)com.squareup.javapoet.ClassNameeventStreamResponseHandlerType(OperationModel operation)com.squareup.javapoet.ClassNameeventStreamResponseHandlerVisitorBuilderType(OperationModel operation)com.squareup.javapoet.ClassNameeventStreamResponseHandlerVisitorType(OperationModel operation)StringgetApiName(OperationModel operation)com.squareup.javapoet.ClassNamegetAsyncWaiterClass()com.squareup.javapoet.ClassNamegetAsyncWaiterInterface()com.squareup.javapoet.ClassNamegetBatchManagerAsyncInterface()com.squareup.javapoet.ClassNamegetClientClass(String className)com.squareup.javapoet.ClassNamegetEnvironmentTokenSystemSettingsClass()com.squareup.javapoet.ClassNamegetModelClass(String className)com.squareup.javapoet.ClassNamegetModelClassFromShape(ShapeModel shapeModel)com.squareup.javapoet.ClassNamegetRequestTransformClass(String className)com.squareup.javapoet.ClassNamegetResponseClassForPaginatedAsyncOperation(String operationName)com.squareup.javapoet.ClassNamegetResponseClassForPaginatedSyncOperation(String operationName)com.squareup.javapoet.ClassNamegetResponseMetadataClass()com.squareup.javapoet.ClassNamegetServiceConfigClass()com.squareup.javapoet.ClassNamegetServiceVersionInfoClass()com.squareup.javapoet.ClassNamegetSyncWaiterClass()com.squareup.javapoet.ClassNamegetSyncWaiterInterface()com.squareup.javapoet.ClassNamegetTransformClass(String className)com.squareup.javapoet.ClassNamegetUserAgentClass()booleanisRequest(ShapeModel shapeModel)booleanisResponse(ShapeModel shapeModel)com.squareup.javapoet.ClassNamejmesPathRuntimeClass()com.squareup.javapoet.ClassNameresponsePojoType(OperationModel operation)com.squareup.javapoet.ClassNamewaitersRuntimeClass()
-
-
-
Constructor Detail
-
PoetExtension
public PoetExtension(IntermediateModel model)
-
-
Method Detail
-
getModelClass
public com.squareup.javapoet.ClassName getModelClass(String className)
- Parameters:
className- Simple name of class in model package.- Returns:
- A Poet
ClassNamefor 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
ClassNamefor 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
ClassNamefor 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
ClassNamefor the given class in the base service package.
-
getServiceConfigClass
public com.squareup.javapoet.ClassName getServiceConfigClass()
- Returns:
- A Poet
ClassNamefor the generated service client configuration.
-
getUserAgentClass
public com.squareup.javapoet.ClassName getUserAgentClass()
-
getServiceVersionInfoClass
public com.squareup.javapoet.ClassName getServiceVersionInfoClass()
-
getEnvironmentTokenSystemSettingsClass
public com.squareup.javapoet.ClassName getEnvironmentTokenSystemSettingsClass()
-
getResponseClassForPaginatedSyncOperation
public com.squareup.javapoet.ClassName getResponseClassForPaginatedSyncOperation(String operationName)
- Parameters:
operationName- Name of the operation- Returns:
- A Poet
ClassNamefor 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()
-
waitersRuntimeClass
public com.squareup.javapoet.ClassName waitersRuntimeClass()
-
jmesPathRuntimeClass
public com.squareup.javapoet.ClassName jmesPathRuntimeClass()
-
getResponseClassForPaginatedAsyncOperation
public com.squareup.javapoet.ClassName getResponseClassForPaginatedAsyncOperation(String operationName)
- Parameters:
operationName- Name of the operation- Returns:
- A Poet
ClassNamefor 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
ClassNamefor the response pojo.
-
eventStreamResponseHandlerType
public com.squareup.javapoet.ClassName eventStreamResponseHandlerType(OperationModel operation)
- Returns:
ClassNamefor generated event stream response handler interface.
-
eventStreamResponseHandlerBuilderType
public com.squareup.javapoet.ClassName eventStreamResponseHandlerBuilderType(OperationModel operation)
- Returns:
ClassNamefor the builder interface for the response handler interface
-
eventStreamResponseHandlerVisitorType
public com.squareup.javapoet.ClassName eventStreamResponseHandlerVisitorType(OperationModel operation)
- Returns:
ClassNamefor the event stream visitor interface.
-
eventStreamResponseHandlerVisitorBuilderType
public com.squareup.javapoet.ClassName eventStreamResponseHandlerVisitorBuilderType(OperationModel operation)
- Returns:
ClassNamefor 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:
ClassNamefor the shape represented by the givenShapeModel.
-
isResponse
public boolean isResponse(ShapeModel shapeModel)
-
isRequest
public boolean isRequest(ShapeModel shapeModel)
-
getBatchManagerAsyncInterface
public com.squareup.javapoet.ClassName getBatchManagerAsyncInterface()
-
-