public sealed class BatchWriteRequest : IMessage<BatchWriteRequest>, IEquatable<BatchWriteRequest>, IDeepCloneable<BatchWriteRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Firestore v1 API class BatchWriteRequest.
The request for
[Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].
Method does not apply writes atomically and does not guarantee ordering.
Each write succeeds or fails independently. You cannot write to the same
document more than once per request.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eBatchWriteRequest\u003c/code\u003e class is part of the Google Cloud Firestore v1 API and is used for making batch write requests to Firestore databases.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, offering a wide range of functionalities for handling data and requests.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatchWriteRequest\u003c/code\u003e class includes properties such as \u003ccode\u003eDatabase\u003c/code\u003e, \u003ccode\u003eLabels\u003c/code\u003e, and \u003ccode\u003eWrites\u003c/code\u003e, to define which database to perform actions on, labels associated with the batch write, and the specific writes to be applied, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe provided documentation covers versions from 2.3.0 up to the latest, 3.10.0 of the .NET Firestore client library, all of which include the \u003ccode\u003eBatchWriteRequest\u003c/code\u003e class, indicating its central role in the API.\u003c/p\u003e\n"]]],[],null,["# Firestore v1 API - Class BatchWriteRequest (3.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.10.0 (latest)](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.9.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.8.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.7.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.6.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.5.1](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.5.1/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.4.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.3.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.2.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.1.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.0.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.5.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.4.0/Google.Cloud.Firestore.V1.BatchWriteRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.3.0/Google.Cloud.Firestore.V1.BatchWriteRequest) \n\n public sealed class BatchWriteRequest : IMessage\u003cBatchWriteRequest\u003e, IEquatable\u003cBatchWriteRequest\u003e, IDeepCloneable\u003cBatchWriteRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Firestore v1 API class BatchWriteRequest.\n\nThe request for\n\\[Firestore.BatchWrite\\]\\[google.firestore.v1.Firestore.BatchWrite\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e BatchWriteRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[BatchWriteRequest](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.BatchWriteRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[BatchWriteRequest](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.BatchWriteRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[BatchWriteRequest](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.BatchWriteRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Firestore.V1](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Firestore.V1.dll\n\nConstructors\n------------\n\n### BatchWriteRequest()\n\n public BatchWriteRequest()\n\n### BatchWriteRequest(BatchWriteRequest)\n\n public BatchWriteRequest(BatchWriteRequest other)\n\nProperties\n----------\n\n### Database\n\n public string Database { get; set; }\n\nRequired. The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nLabels associated with this batch write.\n\n### Writes\n\n public RepeatedField\u003cWrite\u003e Writes { get; }\n\nThe writes to apply.\n\nMethod does not apply writes atomically and does not guarantee ordering.\nEach write succeeds or fails independently. You cannot write to the same\ndocument more than once per request."]]