Package com.google.genai
Class Pager
-
- All Implemented Interfaces:
-
java.lang.Iterable
public class Pager<T extends JsonSerializable> extends BasePager<T> implements Iterable<T>
Pager class for iterating through paginated results.
-
-
Method Summary
Modifier and Type Method Description ImmutableList<T>nextPage()Fetches the next page of items. Iterator<T>iterator()Returns an iterator for the Pager. Stringname()Returns the name of the item for this pager. intpageSize()Returns the page size for this pager. intsize()Returns the size of the current page. ImmutableList<T>page()Returns the current page of items as a list. Optional<HttpResponse>sdkHttpResponse()Returns an Optional of the HttpResponse for the current page, which can be used to get the http headers. -
-
Method Detail
-
pageSize
int pageSize()
Returns the page size for this pager.
-
size
int size()
Returns the size of the current page.
-
sdkHttpResponse
Optional<HttpResponse> sdkHttpResponse()
Returns an Optional of the HttpResponse for the current page, which can be used to get the http headers.
-
-
-
-