A Batch contains a collection of requests that are to be batched into a single API call.
A Batch contains a singleUnaryCallableobject, which will be used to make the API
call, and a list ofBatchedRequestIssuerobjects, which represent the individual requests
in the batch.
Additional batches can be merged into an existing batch using the#merge(Batch)method. Request objects are combined using aRequestBuilderinto a single request.
This is public only for technical reasons, for advanced usage.
[[["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."],[[["\u003cp\u003eThis webpage provides documentation for various versions of the \u003ccode\u003ecom.google.api.gax.rpc.Batch\u003c/code\u003e class, with the latest being version 2.63.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatch\u003c/code\u003e class allows for the aggregation of multiple requests into a single API call, which contains a \u003ccode\u003eUnaryCallable\u003c/code\u003e object to execute this call and a list of \u003ccode\u003eBatchedRequestIssuer\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eBatch\u003c/code\u003e can be merged with other \u003ccode\u003eBatch\u003c/code\u003e objects using the \u003ccode\u003emerge\u003c/code\u003e method, combining request objects via a \u003ccode\u003eRequestBuilder\u003c/code\u003e into a unified request.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatch\u003c/code\u003e class includes methods such as \u003ccode\u003egetByteCount\u003c/code\u003e, \u003ccode\u003egetCallable\u003c/code\u003e, \u003ccode\u003egetRequest\u003c/code\u003e, and \u003ccode\u003egetRequestIssuerList\u003c/code\u003e, providing insights and access to the batch's details.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains a public constructor that accepts a \u003ccode\u003eBatchingDescriptor\u003c/code\u003e, \u003ccode\u003eRequestT\u003c/code\u003e object, a \u003ccode\u003eUnaryCallable\u003c/code\u003e, and \u003ccode\u003eBatchedFuture\u003c/code\u003e as parameters.\u003c/p\u003e\n"]]],[],null,[]]