Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Content.
Unstructured data linked to this document.
Generated from protobuf message google.cloud.discoveryengine.v1.Document.Content
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ Document
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ raw_bytes
string
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.
↳ uri
string
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.
↳ mime_type
string
The MIME type of the content. Supported types: * * application/pdf (PDF, only native PDFs are supported for now) * * text/html (HTML) * * text/plain (TXT) * * application/xml or text/xml (XML) * * application/json (JSON) * * application/vnd.openxmlformats-officedocument.wordprocessingml.document (DOCX) * * application/vnd.openxmlformats-officedocument.presentationml.presentation (PPTX) * * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (XLSX) * * application/vnd.ms-excel.sheet.macroenabled.12 (XLSM) The following types are supported only if layout parser is enabled in the data store: * * image/bmp (BMP) * * image/gif (GIF) * * image/jpeg (JPEG) * * image/png (PNG) * * image/tiff (TIFF) See https://www.iana.org/assignments/media-types/media-types.xhtml.
getRawBytes
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.
Returns
Type
Description
string
hasRawBytes
setRawBytes
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.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUri
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.
Returns
Type
Description
string
hasUri
setUri
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.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getMimeType
The MIME type of the content. Supported types:
application/pdf (PDF, only native PDFs are supported for now)
[[["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-04 UTC."],[],[],null,["# Google Cloud Discovery Engine V1 Client - Class Content (1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/php/docs/reference/cloud-discoveryengine/latest/V1.Document.Content)\n- [1.6.1](/php/docs/reference/cloud-discoveryengine/1.6.1/V1.Document.Content)\n- [1.5.1](/php/docs/reference/cloud-discoveryengine/1.5.1/V1.Document.Content)\n- [1.4.0](/php/docs/reference/cloud-discoveryengine/1.4.0/V1.Document.Content)\n- [1.3.3](/php/docs/reference/cloud-discoveryengine/1.3.3/V1.Document.Content)\n- [1.2.0](/php/docs/reference/cloud-discoveryengine/1.2.0/V1.Document.Content)\n- [1.1.0](/php/docs/reference/cloud-discoveryengine/1.1.0/V1.Document.Content)\n- [1.0.0](/php/docs/reference/cloud-discoveryengine/1.0.0/V1.Document.Content)\n- [0.11.3](/php/docs/reference/cloud-discoveryengine/0.11.3/V1.Document.Content)\n- [0.8.0](/php/docs/reference/cloud-discoveryengine/0.8.0/V1.Document.Content)\n- [0.7.1](/php/docs/reference/cloud-discoveryengine/0.7.1/V1.Document.Content)\n- [0.6.0](/php/docs/reference/cloud-discoveryengine/0.6.0/V1.Document.Content)\n- [0.5.0](/php/docs/reference/cloud-discoveryengine/0.5.0/V1.Document.Content)\n- [0.4.0](/php/docs/reference/cloud-discoveryengine/0.4.0/V1.Document.Content)\n- [0.3.0](/php/docs/reference/cloud-discoveryengine/0.3.0/V1.Document.Content)\n- [0.2.0](/php/docs/reference/cloud-discoveryengine/0.2.0/V1.Document.Content)\n- [0.1.1](/php/docs/reference/cloud-discoveryengine/0.1.1/V1.Document.Content) \nReference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Content.\n\nUnstructured data linked to this document.\n\nGenerated from protobuf message `google.cloud.discoveryengine.v1.Document.Content`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DiscoveryEngine \\\\ V1 \\\\ Document\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getRawBytes\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### hasRawBytes\n\n### setRawBytes\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### getUri\n\nThe URI of the content. Only Cloud Storage URIs (e.g.\n\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.\n\n### hasUri\n\n### setUri\n\nThe URI of the content. Only Cloud Storage URIs (e.g.\n\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.\n\n### getMimeType\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) The following types are supported only if layout parser is enabled in the data store:\n- `image/bmp` (BMP)\n- `image/gif` (GIF)\n- `image/jpeg` (JPEG)\n- `image/png` (PNG)\n- `image/tiff` (TIFF) See \u003chttps://www.iana.org/assignments/media-types/media-types.xhtml\u003e.\n\n### setMimeType\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) The following types are supported only if layout parser is enabled in the data store:\n- `image/bmp` (BMP)\n- `image/gif` (GIF)\n- `image/jpeg` (JPEG)\n- `image/png` (PNG)\n- `image/tiff` (TIFF) See \u003chttps://www.iana.org/assignments/media-types/media-types.xhtml\u003e.\n\n### getContent"]]