public interface PagedListResponse<ResourceT>
This class is used to access the results of a paged list API method. The management of page tokens can be handled automatically, or by the caller. Results can be accessed on a per-element or per-page basis.
| Modifier and Type | Method and Description |
|---|---|
FixedSizeCollection<ResourceT> |
expandToFixedSizeCollection(int collectionSize)
Returns a collection of elements with a fixed size set by the collectionSize parameter.
|
String |
getNextPageToken()
Returns the token for the next page or an empty string if no more results.
|
Page<ResourceT> |
getPage()
Returns the current page of results.
|
Iterable<ResourceT> |
iterateAll()
Returns an iterable that traverses all of the elements of the underlying data source.
|
Iterable<? extends FixedSizeCollection<ResourceT>> |
iterateFixedSizeCollections(int collectionSize)
Returns an iterable over fixed size collections of results.
|
Iterable<? extends Page<ResourceT>> |
iteratePages()
Return an iterable over all Page objects.
|
Iterable<ResourceT> iterateAll()
Page<ResourceT> getPage()
Iterable<? extends Page<ResourceT>> iteratePages()
String getNextPageToken()
FixedSizeCollection<ResourceT> expandToFixedSizeCollection(int collectionSize)
NOTE: it is an error to call this method if the optional parameter 'page_size' has not been set in the original API call. It is also an error if the collectionSize parameter is less than the page_size.
Iterable<? extends FixedSizeCollection<ResourceT>> iterateFixedSizeCollections(int collectionSize)
Each collection will have collectionSize elements, with the exception of the final collection which may contain fewer elements.
NOTE: it is an error to call this method if the optional parameter 'page_size' has not been set in the original API call. It is also an error if the collectionSize parameter is less than the page_size.