public sealed class CreateDocumentRequest : IMessage<CreateDocumentRequest>, IEquatable<CreateDocumentRequest>, IDeepCloneable<CreateDocumentRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class CreateDocumentRequest.
Request message for
[DocumentService.CreateDocument][google.cloud.discoveryengine.v1.DocumentService.CreateDocument]
method.
Required. The ID to use for the
[Document][google.cloud.discoveryengine.v1.Document], which becomes the
final component of the
[Document.name][google.cloud.discoveryengine.v1.Document.name].
If the caller does not have permission to create the
[Document][google.cloud.discoveryengine.v1.Document], regardless of whether
or not it exists, a PERMISSION_DENIED error is returned.
This field must be unique among all
[Document][google.cloud.discoveryengine.v1.Document]s with the same
[parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent].
Otherwise, an ALREADY_EXISTS error is returned.
This field must conform to RFC-1034
standard with a length limit of 128 characters. Otherwise, an
INVALID_ARGUMENT error is returned.
Required. The parent resource name, such as
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCreateDocumentRequest\u003c/code\u003e class is used to create a request for the \u003ccode\u003eDocumentService.CreateDocument\u003c/code\u003e method within the Discovery Engine v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from \u003ccode\u003eobject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class has properties for \u003ccode\u003eDocument\u003c/code\u003e, \u003ccode\u003eDocumentId\u003c/code\u003e, \u003ccode\u003eParent\u003c/code\u003e, and \u003ccode\u003eParentAsBranchName\u003c/code\u003e, each serving specific purposes for defining the document to be created.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the API, version 1.6.0, is available alongside previous versions like 1.5.0, 1.4.0, and others.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDocumentId\u003c/code\u003e property must be unique among all documents with the same parent, conform to the RFC-1034 standard, and has a length limit of 63 characters.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class CreateDocumentRequest (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest) \n\n public sealed class CreateDocumentRequest : IMessage\u003cCreateDocumentRequest\u003e, IEquatable\u003cCreateDocumentRequest\u003e, IDeepCloneable\u003cCreateDocumentRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class CreateDocumentRequest.\n\nRequest message for\n\\[DocumentService.CreateDocument\\]\\[google.cloud.discoveryengine.v1.DocumentService.CreateDocument\\]\nmethod. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CreateDocumentRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CreateDocumentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CreateDocumentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CreateDocumentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest), [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.DiscoveryEngine.V1](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1.dll\n\nConstructors\n------------\n\n### CreateDocumentRequest()\n\n public CreateDocumentRequest()\n\n### CreateDocumentRequest(CreateDocumentRequest)\n\n public CreateDocumentRequest(CreateDocumentRequest other)\n\nProperties\n----------\n\n### Document\n\n public Document Document { get; set; }\n\nRequired. The \\[Document\\]\\[google.cloud.discoveryengine.v1.Document\\] to\ncreate.\n\n### DocumentId\n\n public string DocumentId { get; set; }\n\nRequired. The ID to use for the\n\\[Document\\]\\[google.cloud.discoveryengine.v1.Document\\], which becomes the\nfinal component of the\n\\[Document.name\\]\\[google.cloud.discoveryengine.v1.Document.name\\].\n\nIf the caller does not have permission to create the\n\\[Document\\]\\[google.cloud.discoveryengine.v1.Document\\], regardless of whether\nor not it exists, a `PERMISSION_DENIED` error is returned.\n\nThis field must be unique among all\n\\[Document\\]\\[google.cloud.discoveryengine.v1.Document\\]s with the same\n\\[parent\\]\\[google.cloud.discoveryengine.v1.CreateDocumentRequest.parent\\].\nOtherwise, an `ALREADY_EXISTS` error is returned.\n\nThis field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)\nstandard with a length limit of 128 characters. Otherwise, an\n`INVALID_ARGUMENT` error is returned.\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The parent resource name, such as\n`projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.\n\n### ParentAsBranchName\n\n public BranchName ParentAsBranchName { get; set; }\n\n[BranchName](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.BranchName)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CreateDocumentRequest#Google_Cloud_DiscoveryEngine_V1_CreateDocumentRequest_Parent) resource name property."]]