The raw content of the document. This field is only permitted for
EXTRACTIVE_QA and FAQ knowledge types.
Note: This field is in the process of being deprecated, please use
raw_content instead.
For documents stored in Google Cloud Storage, these URIs must have
the form gs://<bucket-name>/<object-name>.
NOTE: External URLs must correspond to public webpages, i.e., they must
be indexed by Google Search. In particular, URLs for showing documents in
Google Cloud Storage (i.e. the URL in your browser) are not supported.
Instead use the gs:// format URI described above.
Optional. If true, we try to automatically reload the document every day
(at a time picked by the system). If false or unspecified, we don't try
to automatically reload the document.
Currently you can only enable automatic reload for documents sourced from
a public url, see source field for the source types.
Reload status can be tracked in latest_reload_status. If a reload
fails, we will keep the document unchanged.
If a reload fails with internal errors, the system will try to reload the
document on the next day.
If a reload fails with non-retriable errors (e.g. PERMISSION_DENIED), the
system will not try to reload the document anymore. You need to manually
reload the document successfully by calling ReloadDocument and clear the
errors.
Optional. Metadata for the document. The metadata supports arbitrary
key-value pairs. Suggested use cases include storing a document's title,
an external URL distinct from the document's content_uri, etc.
The max size of a key or a value of the metadata is 1024 bytes.
Optional. The document resource name.
The name must be empty when creating a document.
Format: projects/<Project ID>/locations/<Location
ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.
[[["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-09-03 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDocument\u003c/code\u003e class in the Google Cloud Dialogflow v2beta1 API represents a knowledge document within a KnowledgeBase.\u003c/p\u003e\n"],["\u003cp\u003eDocuments can be loaded from a URI (\u003ccode\u003eContentUri\u003c/code\u003e) or directly provided as raw content (\u003ccode\u003eRawContent\u003c/code\u003e), and the deprecated \u003ccode\u003eContent\u003c/code\u003e property is to be avoided.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEnableAutoReload\u003c/code\u003e property allows for automatic daily reloading of documents, with reload status tracked in \u003ccode\u003eLatestReloadStatus\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eKnowledgeTypes\u003c/code\u003e defines the type of content within the document, and metadata can be stored as key-value pairs using the \u003ccode\u003eMetadata\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eprojects.agent.knowledgeBases.documents\u003c/code\u003e resource is deprecated; instead, \u003ccode\u003eprojects.knowledgeBases.documents\u003c/code\u003e should be used.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Dialogflow v2beta1 API - Class Document (1.0.0-beta23)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta23 (latest)](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Document)\n- [1.0.0-beta22](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/1.0.0-beta22/Google.Cloud.Dialogflow.V2Beta1.Document) \n\n public sealed class Document : IMessage\u003cDocument\u003e, IEquatable\u003cDocument\u003e, IDeepCloneable\u003cDocument\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Dialogflow v2beta1 API class Document.\n\nA knowledge document to be used by a\n\\[KnowledgeBase\\]\\[google.cloud.dialogflow.v2beta1.KnowledgeBase\\].\n\nFor more information, see the [knowledge base\nguide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated;\nonly use `projects.knowledgeBases.documents`. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Document \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Document](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Document), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Document](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Document), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Document](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Document), [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.Dialogflow.V2Beta1](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.Dialogflow.V2Beta1.dll\n\nConstructors\n------------\n\n### Document()\n\n public Document()\n\n### Document(Document)\n\n public Document(Document other)\n\nProperties\n----------\n\n### Content\n\n [Obsolete]\n public string Content { get; set; }\n\nThe raw content of the document. This field is only permitted for\nEXTRACTIVE_QA and FAQ knowledge types.\nNote: This field is in the process of being deprecated, please use\nraw_content instead.\n\n### ContentUri\n\n public string ContentUri { get; set; }\n\nThe URI where the file content is located.\n\nFor documents stored in Google Cloud Storage, these URIs must have\nthe form `gs://\u003cbucket-name\u003e/\u003cobject-name\u003e`.\n\nNOTE: External URLs must correspond to public webpages, i.e., they must\nbe indexed by Google Search. In particular, URLs for showing documents in\nGoogle Cloud Storage (i.e. the URL in your browser) are not supported.\nInstead use the `gs://` format URI described above.\n\n### DisplayName\n\n public string DisplayName { get; set; }\n\nRequired. The display name of the document. The name must be 1024 bytes or\nless; otherwise, the creation request fails.\n\n### DocumentName\n\n public DocumentName DocumentName { get; set; }\n\n[DocumentName](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.DocumentName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Document#Google_Cloud_Dialogflow_V2Beta1_Document_Name) resource name property.\n\n### EnableAutoReload\n\n public bool EnableAutoReload { get; set; }\n\nOptional. If true, we try to automatically reload the document every day\n(at a time picked by the system). If false or unspecified, we don't try\nto automatically reload the document.\n\nCurrently you can only enable automatic reload for documents sourced from\na public url, see `source` field for the source types.\n\nReload status can be tracked in `latest_reload_status`. If a reload\nfails, we will keep the document unchanged.\n\nIf a reload fails with internal errors, the system will try to reload the\ndocument on the next day.\nIf a reload fails with non-retriable errors (e.g. PERMISSION_DENIED), the\nsystem will not try to reload the document anymore. You need to manually\nreload the document successfully by calling `ReloadDocument` and clear the\nerrors.\n\n### HasContent\n\n [Obsolete]\n public bool HasContent { get; }\n\nGets whether the \"content\" field is set\n\n### HasContentUri\n\n public bool HasContentUri { get; }\n\nGets whether the \"content_uri\" field is set\n\n### HasRawContent\n\n public bool HasRawContent { get; }\n\nGets whether the \"raw_content\" field is set\n\n### KnowledgeTypes\n\n public RepeatedField\u003cDocument.Types.KnowledgeType\u003e KnowledgeTypes { get; }\n\nRequired. The knowledge type of document content.\n\n### LatestReloadStatus\n\n public Document.Types.ReloadStatus LatestReloadStatus { get; set; }\n\nOutput only. The time and status of the latest reload.\nThis reload may have been triggered automatically or manually\nand may not have succeeded.\n\n### Metadata\n\n public MapField\u003cstring, string\u003e Metadata { get; }\n\nOptional. Metadata for the document. The metadata supports arbitrary\nkey-value pairs. Suggested use cases include storing a document's title,\nan external URL distinct from the document's content_uri, etc.\nThe max size of a `key` or a `value` of the metadata is 1024 bytes.\n\n### MimeType\n\n public string MimeType { get; set; }\n\nRequired. The MIME type of this document.\n\n### Name\n\n public string Name { get; set; }\n\nOptional. The document resource name.\nThe name must be empty when creating a document.\nFormat: `projects/\u003cProject ID\u003e/locations/\u003cLocation\nID\u003e/knowledgeBases/\u003cKnowledge Base ID\u003e/documents/\u003cDocument ID\u003e`.\n\n### RawContent\n\n public ByteString RawContent { get; set; }\n\nThe raw content of the document. This field is only permitted for\nEXTRACTIVE_QA and FAQ knowledge types.\n\n### SourceCase\n\n public Document.SourceOneofCase SourceCase { get; }\n\n### State\n\n public Document.Types.State State { get; set; }\n\nOutput only. The current state of the document."]]