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 v1beta 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\u003eThis document outlines the \u003ccode\u003eDocument.Types.Content\u003c/code\u003e class within the Google Cloud Discovery Engine v1beta API, which is used to handle unstructured data linked to a document.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDocument.Types.Content\u003c/code\u003e class inherits from the base \u003ccode\u003eobject\u003c/code\u003e class and implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e to manage different data formats and operations.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers constructors to initialize content, either blank or by cloning existing \u003ccode\u003eDocument.Types.Content\u003c/code\u003e instances.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains properties such as \u003ccode\u003eContentCase\u003c/code\u003e, \u003ccode\u003eHasRawBytes\u003c/code\u003e, \u003ccode\u003eHasUri\u003c/code\u003e, \u003ccode\u003eMimeType\u003c/code\u003e, \u003ccode\u003eRawBytes\u003c/code\u003e, and \u003ccode\u003eUri\u003c/code\u003e to define different attributes of the content, such as its type, source location, and data itself.\u003c/p\u003e\n"],["\u003cp\u003eSupported MIME types for content include PDF, HTML, DOCX, PPTX, and TXT, and the content can be provided either as raw bytes (up to 1 MB) or via a Cloud Storage URI (up to 2.5 MB for text and 200 MB for other formats).\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class Document.Types.Content (1.0.0-beta19)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta19 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Document.Types.Content)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.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 v1beta 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.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Document)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Document.Types)[Content](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Document.Types.Content), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Document](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Document)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Document.Types)[Content](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.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.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Document)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Document.Types)[Content](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.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.V1Beta](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1Beta.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- `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)\n- `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)\n- `text/plain` (TXT)\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."]]