feat(firestore): add support for request tags - #14024
Conversation
No region tags are edited in this PR.This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Code Review
This pull request introduces several updates across multiple Google Cloud Java client libraries. In the AI Platform library, it adds support for the ExaAiSearch tool to enable grounding via the Exa.ai search engine. In the Google Chat library, it introduces the SearchMessages API along with its associated request/response types, stubs, tests, and samples, while also updating SearchSpacesResponse to use a new results field. In the Commerce Producer library, it adds AdditionalContractValue to PrivateOffer to track out-of-band spend obligations. Finally, in the Compute Engine library, it introduces new HostsClient and ReliabilityRisksClient services, and adds a no_graceful_shutdown option to instance deletion and stop requests. There are no review comments to address, and I have no additional feedback to provide.
This PR introduces sending request tags for different firestore requests. The tags can be passed using 2 mechanisms:
RequestOptionsis the proto (com.google.firestore.v1.RequestOptions) and model (com.google.cloud.firestore.models.RequestOptions) that holds all the instance- and request-level tags and is a part of all request protos.FirestoreOptionsallows the ability to set the instance level tags usingsetRequestTags. Any operation executed via this Firestore client automatically includes these global request tags in the outbound RPC request payload.RequestOptionsHelperis an internal utility that combines instance-level tags fromFirestoreOptionswith any request-levelRequestOptionsmessage before building the wire request.FirestoreExecutionOptionsis a holder object for different execution options likeExplainOptionsandRequestOptions.FirestoreExecutionOptionsfor each of the following operations:get(DocumentReference)getAll(Firestore, Transaction)create(DocumentReference, Transaction)set(DocumentReference, Transaction)update(DocumentReference, Transaction)delete(DocumentReference, Transaction)listCollections(Firestore, DocumentReference)listDocuments(CollectionReference)getPartitions(CollectionGroup)runTransaction/runAsyncTransaction(Firestore)beginTransaction(Transaction)commit(Transaction, WriteBatch, UpdateBuilder)rollback(Transaction)runQuery(get,explain,streamonQuery,StreamableQuery,VectorQuery)runAggregationQuery(get,explainonAggregateQuery)executePipeline(Pipeline, Transaction)batchWrite(BulkWriter / BulkCommitBatch)