public sealed class Document.Types.Content : IMessage<Document.Types.Content>, IEquatable<Document.Types.Content>, IDeepCloneable<Document.Types.Content>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class Document.Types.Content.
The content represented as a stream of bytes. The maximum length is
1,000,000 bytes (1 MB / ~0.95 MiB).
Note: As with all bytes fields, this field is represented as pure
binary in Protocol Buffers and base64-encoded string in JSON. For
example, abc123!?$*&()'-=@~ should be represented as
YWJjMTIzIT8kKiYoKSctPUB+ in JSON. See
https://developers.google.com/protocol-buffers/docs/proto3#json.
The URI of the content. Only Cloud Storage URIs (e.g.
gs://bucket-name/path/to/file) are supported. The maximum file size
is 2.5 MB for text-based formats, 200 MB for other formats.
[[["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\u003eDocument.Types.Content\u003c/code\u003e class in the Google Cloud Discovery Engine v1 API represents unstructured data associated with a document.\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, providing functionality for message handling, equality checks, deep cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eThe content can be specified as either raw bytes via the \u003ccode\u003eRawBytes\u003c/code\u003e property or a URI to a file in Cloud Storage through the \u003ccode\u003eUri\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMimeType\u003c/code\u003e property indicates the type of content, supporting various formats like PDF, HTML, DOCX, PPTX, and TXT, with size limitations depending on type, such as a 1MB limit for raw bytes.\u003c/p\u003e\n"],["\u003cp\u003eThere are several versions of this class, ranging from 1.0.0-beta06 up to the latest version 1.6.0.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class Document.Types.Content (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.Document.Types.Content)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content) \n\n public sealed class Document.Types.Content : IMessage\u003cDocument.Types.Content\u003e, IEquatable\u003cDocument.Types.Content\u003e, IDeepCloneable\u003cDocument.Types.Content\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class Document.Types.Content.\n\nUnstructured data linked to this document. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Document.Types.Content \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.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Document)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Document.Types)[Content](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Document](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Document)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Document.Types)[Content](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Document](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Document)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Document.Types)[Content](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Document.Types.Content), [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### Content()\n\n public Content()\n\n### Content(Content)\n\n public Content(Document.Types.Content other)\n\nProperties\n----------\n\n### ContentCase\n\n public Document.Types.Content.ContentOneofCase ContentCase { get; }\n\n### HasRawBytes\n\n public bool HasRawBytes { get; }\n\nGets whether the \"raw_bytes\" field is set\n\n### HasUri\n\n public bool HasUri { get; }\n\nGets whether the \"uri\" field is set\n\n### MimeType\n\n public string MimeType { get; set; }\n\nThe MIME type of the content. Supported types:\n\n- `application/pdf` (PDF, only native PDFs are supported for now)\n- `text/html` (HTML)\n- `text/plain` (TXT)\n- `application/xml` or `text/xml` (XML)\n- `application/json` (JSON)\n- `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)\n- `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)\n- `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` (XLSX)\n- `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM)\n\nThe following types are supported only if layout parser is enabled in the\ndata store:\n\n- `image/bmp` (BMP)\n- `image/gif` (GIF)\n- `image/jpeg` (JPEG)\n- `image/png` (PNG)\n- `image/tiff` (TIFF)\n\nSee \u003chttps://www.iana.org/assignments/media-types/media-types.xhtml\u003e.\n\n### RawBytes\n\n public ByteString RawBytes { get; set; }\n\nThe content represented as a stream of bytes. The maximum length is\n1,000,000 bytes (1 MB / \\~0.95 MiB).\n\nNote: As with all `bytes` fields, this field is represented as pure\nbinary in Protocol Buffers and base64-encoded string in JSON. For\nexample, `abc123!?$*&()'-=@~` should be represented as\n`YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See\n\u003chttps://developers.google.com/protocol-buffers/docs/proto3#json\u003e.\n\n### Uri\n\n public string Uri { get; set; }\n\nThe URI of the content. Only Cloud Storage URIs (e.g.\n`gs://bucket-name/path/to/file`) are supported. The maximum file size\nis 2.5 MB for text-based formats, 200 MB for other formats."]]