Reference documentation and code samples for the Google API Core Client class FixedSizeCollection.
A collection of elements retrieved using one or more API calls. The
collection will attempt to retrieve a fixed number of elements, and
will make API calls until that fixed number is reached, or there
are no more elements to retrieve.
Returns the number of elements in the collection. This will be
equal to the collectionSize parameter used at construction
unless there are no elements remaining to be retrieved.
Returns
Type
Description
int
hasNextCollection
Returns true if there are more elements that can be retrieved
from the API.
Returns
Type
Description
bool
getNextPageToken
Returns a page token that can be passed into the API list
method to retrieve additional elements.
Returns
Type
Description
string
getNextCollection
Retrieves the next FixedSizeCollection using one or more API calls.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google API Core Client - Class FixedSizeCollection (1.36.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.36.1 (latest)](/php/docs/reference/gax/latest/FixedSizeCollection)\n- [1.36.0](/php/docs/reference/gax/1.36.0/FixedSizeCollection)\n- [1.35.1](/php/docs/reference/gax/1.35.1/FixedSizeCollection) \nReference documentation and code samples for the Google API Core Client class FixedSizeCollection.\n\nA collection of elements retrieved using one or more API calls. The\ncollection will attempt to retrieve a fixed number of elements, and\nwill make API calls until that fixed number is reached, or there\nare no more elements to retrieve.\n\nNamespace\n---------\n\nGoogle \\\\ ApiCore\n\nMethods\n-------\n\n### __construct\n\nFixedSizeCollection constructor.\n\n### getCollectionSize\n\nReturns the number of elements in the collection. This will be\nequal to the collectionSize parameter used at construction\nunless there are no elements remaining to be retrieved.\n\n### hasNextCollection\n\nReturns true if there are more elements that can be retrieved\nfrom the API.\n\n### getNextPageToken\n\nReturns a page token that can be passed into the API list\nmethod to retrieve additional elements.\n\n### getNextCollection\n\nRetrieves the next FixedSizeCollection using one or more API calls.\n\n### getIterator\n\nReturns an iterator over the elements of the collection.\n\n### iterateCollections\n\nReturns an iterator over FixedSizeCollections, starting with this\nand making API calls as required until all of the elements have\nbeen retrieved."]]