Class SameTokenAsyncResponseClassSpec
- java.lang.Object
-
- software.amazon.awssdk.codegen.poet.paginators.PaginatorsClassSpec
-
- software.amazon.awssdk.codegen.poet.paginators.AsyncResponseClassSpec
-
- software.amazon.awssdk.codegen.poet.paginators.customizations.SameTokenAsyncResponseClassSpec
-
- All Implemented Interfaces:
ClassSpec
public class SameTokenAsyncResponseClassSpec extends AsyncResponseClassSpec
Customized response class spec for async paginated operations that indicate the last page by returning the same token passed in the request object. See Cloudwatch logs GetLogEvents API for example, https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html
-
-
Field Summary
-
Fields inherited from class software.amazon.awssdk.codegen.poet.paginators.AsyncResponseClassSpec
LAST_PAGE_FIELD
-
Fields inherited from class software.amazon.awssdk.codegen.poet.paginators.PaginatorsClassSpec
c2jOperationName, CLIENT_MEMBER, HAS_NEXT_PAGE_METHOD, LAST_SUCCESSFUL_PAGE_LITERAL, model, NEXT_PAGE_FETCHER_MEMBER, NEXT_PAGE_METHOD, operationModel, paginationDocs, paginatorDefinition, poetExtensions, PREVIOUS_PAGE_METHOD_ARGUMENT, REQUEST_MEMBER, RESPONSE_LITERAL, RESUME_METHOD, typeProvider
-
-
Constructor Summary
Constructors Constructor Description SameTokenAsyncResponseClassSpec(IntermediateModel model, String c2jOperationName, PaginatorDefinition paginatorDefinition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stream<com.squareup.javapoet.FieldSpec>
fields()
protected com.squareup.javapoet.CodeBlock
hasNextPageMethodBody()
protected String
nextPageFetcherArgument()
protected com.squareup.javapoet.TypeSpec.Builder
nextPageFetcherClass()
aW Generates a inner class that implementsAsyncPageFetcher
.protected com.squareup.javapoet.CodeBlock
nextPageMethodBody()
protected com.squareup.javapoet.MethodSpec
privateConstructor()
-
Methods inherited from class software.amazon.awssdk.codegen.poet.paginators.AsyncResponseClassSpec
asyncClientInterfaceField, className, getAsyncClientInterfaceName, lastPageField, poetSpec, publicConstructor
-
Methods inherited from class software.amazon.awssdk.codegen.poet.paginators.PaginatorsClassSpec
codeToGetNextPageIfOldResponseIsNotNull, constructRequestFromLastPage, fluentGetterMethodForResponseMember, fluentGetterMethodsForOutputToken, getIteratorLambdaBlock, getTypeForResultKey, memberModelForResponseMember, nextPageFetcherClassName, requestClassField, requestType, responseType, resumeMethodBuilder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.codegen.poet.ClassSpec
staticImports
-
-
-
-
Constructor Detail
-
SameTokenAsyncResponseClassSpec
public SameTokenAsyncResponseClassSpec(IntermediateModel model, String c2jOperationName, PaginatorDefinition paginatorDefinition)
-
-
Method Detail
-
fields
protected Stream<com.squareup.javapoet.FieldSpec> fields()
- Overrides:
fields
in classAsyncResponseClassSpec
-
privateConstructor
protected com.squareup.javapoet.MethodSpec privateConstructor()
- Overrides:
privateConstructor
in classAsyncResponseClassSpec
-
nextPageFetcherArgument
protected String nextPageFetcherArgument()
- Overrides:
nextPageFetcherArgument
in classAsyncResponseClassSpec
-
nextPageFetcherClass
protected com.squareup.javapoet.TypeSpec.Builder nextPageFetcherClass()
Description copied from class:AsyncResponseClassSpec
aW Generates a inner class that implementsAsyncPageFetcher
. This is a helper class that can be used to find if there are more pages in the response and to get the next page if exists.- Overrides:
nextPageFetcherClass
in classAsyncResponseClassSpec
-
hasNextPageMethodBody
protected com.squareup.javapoet.CodeBlock hasNextPageMethodBody()
- Overrides:
hasNextPageMethodBody
in classPaginatorsClassSpec
-
nextPageMethodBody
protected com.squareup.javapoet.CodeBlock nextPageMethodBody()
- Overrides:
nextPageMethodBody
in classPaginatorsClassSpec
-
-