public sealed class UpdateDocumentRequest : IMessage<UpdateDocumentRequest>, IEquatable<UpdateDocumentRequest>, IDeepCloneable<UpdateDocumentRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class UpdateDocumentRequest.
Request message for
[DocumentService.UpdateDocument][google.cloud.discoveryengine.v1.DocumentService.UpdateDocument]
method.
If set to true and the
[Document][google.cloud.discoveryengine.v1.Document] is not found, a new
[Document][google.cloud.discoveryengine.v1.Document] is be created.
If the caller does not have permission to update the
[Document][google.cloud.discoveryengine.v1.Document], regardless of whether
or not it exists, a PERMISSION_DENIED error is returned.
If the [Document][google.cloud.discoveryengine.v1.Document] to update does
not exist and
[allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing]
is not set, a NOT_FOUND error is returned.
[[["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\u003eThis webpage provides reference documentation for the \u003ccode\u003eUpdateDocumentRequest\u003c/code\u003e class within the Google Cloud Discovery Engine v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eUpdateDocumentRequest\u003c/code\u003e class is 1.6.0, with previous versions from 1.5.0 down to 1.0.0-beta06 available for reference.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eUpdateDocumentRequest\u003c/code\u003e class is used to send requests to the \u003ccode\u003eDocumentService.UpdateDocument\u003c/code\u003e method for updating or creating a document.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements interfaces like \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\u003eKey properties of the \u003ccode\u003eUpdateDocumentRequest\u003c/code\u003e class include \u003ccode\u003eAllowMissing\u003c/code\u003e, \u003ccode\u003eDocument\u003c/code\u003e, and \u003ccode\u003eUpdateMask\u003c/code\u003e, allowing for control over document updates and creation.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class UpdateDocumentRequest (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.UpdateDocumentRequest)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest) \n\n public sealed class UpdateDocumentRequest : IMessage\u003cUpdateDocumentRequest\u003e, IEquatable\u003cUpdateDocumentRequest\u003e, IDeepCloneable\u003cUpdateDocumentRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class UpdateDocumentRequest.\n\nRequest message for\n\\[DocumentService.UpdateDocument\\]\\[google.cloud.discoveryengine.v1.DocumentService.UpdateDocument\\]\nmethod. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e UpdateDocumentRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[UpdateDocumentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UpdateDocumentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[UpdateDocumentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateDocumentRequest), [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### UpdateDocumentRequest()\n\n public UpdateDocumentRequest()\n\n### UpdateDocumentRequest(UpdateDocumentRequest)\n\n public UpdateDocumentRequest(UpdateDocumentRequest other)\n\nProperties\n----------\n\n### AllowMissing\n\n public bool AllowMissing { get; set; }\n\nIf set to `true` and the\n\\[Document\\]\\[google.cloud.discoveryengine.v1.Document\\] is not found, a new\n\\[Document\\]\\[google.cloud.discoveryengine.v1.Document\\] is be created.\n\n### Document\n\n public Document Document { get; set; }\n\nRequired. The document to update/create.\n\nIf the caller does not have permission to update the\n\\[Document\\]\\[google.cloud.discoveryengine.v1.Document\\], regardless of whether\nor not it exists, a `PERMISSION_DENIED` error is returned.\n\nIf the \\[Document\\]\\[google.cloud.discoveryengine.v1.Document\\] to update does\nnot exist and\n\\[allow_missing\\]\\[google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing\\]\nis not set, a `NOT_FOUND` error is returned.\n\n### UpdateMask\n\n public FieldMask UpdateMask { get; set; }\n\nIndicates which fields in the provided imported 'document' to update. If\nnot set, by default updates all fields."]]