public class AsyncResponseClassSpec extends PaginatorsClassSpec
ClassSpec to generate the response class for async paginated operations.| Modifier and Type | Field and Description |
|---|---|
protected static String |
LAST_PAGE_FIELD |
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 and Description |
|---|
AsyncResponseClassSpec(IntermediateModel model,
String c2jOperationName,
PaginatorDefinition paginatorDefinition) |
| Modifier and Type | Method and Description |
|---|---|
protected com.squareup.javapoet.FieldSpec |
asyncClientInterfaceField() |
com.squareup.javapoet.ClassName |
className() |
protected Stream<com.squareup.javapoet.FieldSpec> |
fields() |
protected com.squareup.javapoet.ClassName |
getAsyncClientInterfaceName() |
protected com.squareup.javapoet.FieldSpec |
lastPageField() |
protected String |
nextPageFetcherArgument() |
protected com.squareup.javapoet.TypeSpec.Builder |
nextPageFetcherClass()
aW
Generates a inner class that implements
AsyncPageFetcher. |
com.squareup.javapoet.TypeSpec |
poetSpec() |
protected com.squareup.javapoet.MethodSpec |
privateConstructor() |
protected com.squareup.javapoet.MethodSpec |
publicConstructor() |
codeToGetNextPageIfOldResponseIsNotNull, constructRequestFromLastPage, fluentGetterMethodForResponseMember, fluentGetterMethodsForOutputToken, getIteratorLambdaBlock, getTypeForResultKey, hasNextPageMethodBody, memberModelForResponseMember, nextPageFetcherClassName, nextPageMethodBody, requestClassField, requestType, responseType, resumeMethodBuilderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstaticImportsprotected static final String LAST_PAGE_FIELD
public AsyncResponseClassSpec(IntermediateModel model, String c2jOperationName, PaginatorDefinition paginatorDefinition)
public com.squareup.javapoet.TypeSpec poetSpec()
PoetSpec.builder()... implementationpublic com.squareup.javapoet.ClassName className()
protected com.squareup.javapoet.ClassName getAsyncClientInterfaceName()
ClassName for the async client interfaceprotected Stream<com.squareup.javapoet.FieldSpec> fields()
protected com.squareup.javapoet.FieldSpec asyncClientInterfaceField()
protected com.squareup.javapoet.FieldSpec lastPageField()
protected com.squareup.javapoet.MethodSpec publicConstructor()
protected com.squareup.javapoet.MethodSpec privateConstructor()
protected String nextPageFetcherArgument()
protected com.squareup.javapoet.TypeSpec.Builder nextPageFetcherClass()
AsyncPageFetcher. 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.Copyright © 2023. All rights reserved.