public sealed class CreateDocumentRequest : IMessage<CreateDocumentRequest>, IEquatable<CreateDocumentRequest>, IDeepCloneable<CreateDocumentRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Firestore v1 API class CreateDocumentRequest.
The request for
[Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].
Required. The parent resource. For example:
projects/{project_id}/databases/{database_id}/documents or
projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}
[[["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 latest version available for the Firestore v1 API class \u003ccode\u003eCreateDocumentRequest\u003c/code\u003e is 3.10.0, with version 3.9.0 being the current version detailed on this page, and several prior versions are also available for reference.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateDocumentRequest\u003c/code\u003e class is used to request the creation of a document within Firestore, as part of the \u003ccode\u003eGoogle.Cloud.Firestore.V1\u003c/code\u003e namespace, and requires that the \u003ccode\u003ename\u003c/code\u003e property of the document not be set.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from the \u003ccode\u003eobject\u003c/code\u003e class and implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable<CreateDocumentRequest>\u003c/code\u003e, \u003ccode\u003eIDeepCloneable<CreateDocumentRequest>\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, offering functionality for message handling, equality comparison, deep cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eCreateDocumentRequest\u003c/code\u003e class include \u003ccode\u003eCollectionId\u003c/code\u003e, \u003ccode\u003eDocument\u003c/code\u003e, \u003ccode\u003eDocumentId\u003c/code\u003e, \u003ccode\u003eMask\u003c/code\u003e, and \u003ccode\u003eParent\u003c/code\u003e, which are essential for defining the document's location, content, and the specifics of the request such as the fields to be returned, and whether a client-assigned ID should be used.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateDocumentRequest\u003c/code\u003e class offers two constructors: a default parameterless constructor and another that accepts another instance of \u003ccode\u003eCreateDocumentRequest\u003c/code\u003e to create a copy of it.\u003c/p\u003e\n"]]],[],null,[]]