Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class GcsSource.
Cloud Storage location for input content.
Generated from protobuf message google.cloud.discoveryengine.v1.GcsSource
Namespace
Google \ Cloud \ DiscoveryEngine \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ input_uris
array
Required. Cloud Storage URIs to input files. Each URI can be up to 2000 characters long. URIs can match the full object path (for example, gs://bucket/directory/object.json) or a pattern matching one or more files, such as gs://bucket/directory/*.json. A request can contain at most 100 files (or 100,000 files if data_schema is content). Each file can be up to 2 GB (or 100 MB if data_schema is content).
↳ data_schema
string
The schema to use when parsing the data from the source. Supported values for document imports: * * document (default): One JSON Document per line. Each document must have a valid Document.id. * * content: Unstructured data (e.g. PDF, HTML). Each file matched by input_uris becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * * custom: One custom data JSON per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical. * * csv: A CSV file with header conforming to the defined Schema of the data store. Each entry after the header is imported as a Document. This can only be used by the GENERIC Data Store vertical. Supported values for user event imports: * * user_event (default): One JSON UserEvent per line.
getInputUris
Required. Cloud Storage URIs to input files. Each URI can be up to
2000 characters long. URIs can match the full object path (for example,
gs://bucket/directory/object.json) or a pattern matching one or more
files, such as gs://bucket/directory/*.json.
A request can contain at most 100 files (or 100,000 files if data_schema
is content). Each file can be up to 2 GB (or 100 MB if data_schema is
content).
Required. Cloud Storage URIs to input files. Each URI can be up to
2000 characters long. URIs can match the full object path (for example,
gs://bucket/directory/object.json) or a pattern matching one or more
files, such as gs://bucket/directory/*.json.
A request can contain at most 100 files (or 100,000 files if data_schema
is content). Each file can be up to 2 GB (or 100 MB if data_schema is
content).
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getDataSchema
The schema to use when parsing the data from the source.
Supported values for document imports:
document (default): One JSON
Document per line. Each
document must
have a valid Document.id.
content: Unstructured data (e.g. PDF, HTML). Each file matched by
input_uris becomes a document, with the ID set to the first 128
bits of SHA256(URI) encoded as a hex string.
custom: One custom data JSON per row in arbitrary format that conforms
to the defined Schema of the
data store. This can only be used by the GENERIC Data Store vertical.
csv: A CSV file with header conforming to the defined
Schema of the
data store. Each entry after the header is imported as a Document.
This can only be used by the GENERIC Data Store vertical.
Supported values for user event imports:
user_event (default): One JSON
UserEvent per line.
Returns
Type
Description
string
setDataSchema
The schema to use when parsing the data from the source.
Supported values for document imports:
document (default): One JSON
Document per line. Each
document must
have a valid Document.id.
content: Unstructured data (e.g. PDF, HTML). Each file matched by
input_uris becomes a document, with the ID set to the first 128
bits of SHA256(URI) encoded as a hex string.
custom: One custom data JSON per row in arbitrary format that conforms
to the defined Schema of the
data store. This can only be used by the GENERIC Data Store vertical.
csv: A CSV file with header conforming to the defined
Schema of the
data store. Each entry after the header is imported as a Document.
This can only be used by the GENERIC Data Store vertical.
Supported values for user event imports:
user_event (default): One JSON
UserEvent per line.
[[["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 GcsSource (1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/php/docs/reference/cloud-discoveryengine/latest/V1.GcsSource)\n- [1.6.1](/php/docs/reference/cloud-discoveryengine/1.6.1/V1.GcsSource)\n- [1.5.1](/php/docs/reference/cloud-discoveryengine/1.5.1/V1.GcsSource)\n- [1.4.0](/php/docs/reference/cloud-discoveryengine/1.4.0/V1.GcsSource)\n- [1.3.3](/php/docs/reference/cloud-discoveryengine/1.3.3/V1.GcsSource)\n- [1.2.0](/php/docs/reference/cloud-discoveryengine/1.2.0/V1.GcsSource)\n- [1.1.0](/php/docs/reference/cloud-discoveryengine/1.1.0/V1.GcsSource)\n- [1.0.0](/php/docs/reference/cloud-discoveryengine/1.0.0/V1.GcsSource)\n- [0.11.3](/php/docs/reference/cloud-discoveryengine/0.11.3/V1.GcsSource)\n- [0.8.0](/php/docs/reference/cloud-discoveryengine/0.8.0/V1.GcsSource)\n- [0.7.1](/php/docs/reference/cloud-discoveryengine/0.7.1/V1.GcsSource)\n- [0.6.0](/php/docs/reference/cloud-discoveryengine/0.6.0/V1.GcsSource)\n- [0.5.0](/php/docs/reference/cloud-discoveryengine/0.5.0/V1.GcsSource)\n- [0.4.0](/php/docs/reference/cloud-discoveryengine/0.4.0/V1.GcsSource)\n- [0.3.0](/php/docs/reference/cloud-discoveryengine/0.3.0/V1.GcsSource)\n- [0.2.0](/php/docs/reference/cloud-discoveryengine/0.2.0/V1.GcsSource)\n- [0.1.1](/php/docs/reference/cloud-discoveryengine/0.1.1/V1.GcsSource) \nReference documentation and code samples for the Google Cloud Discovery Engine V1 Client class GcsSource.\n\nCloud Storage location for input content.\n\nGenerated from protobuf message `google.cloud.discoveryengine.v1.GcsSource`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DiscoveryEngine \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getInputUris\n\nRequired. Cloud Storage URIs to input files. Each URI can be up to\n2000 characters long. URIs can match the full object path (for example,\n`gs://bucket/directory/object.json`) or a pattern matching one or more\nfiles, such as `gs://bucket/directory/*.json`.\n\nA request can contain at most 100 files (or 100,000 files if `data_schema`\nis `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is\n`content`).\n\n### setInputUris\n\nRequired. Cloud Storage URIs to input files. Each URI can be up to\n2000 characters long. URIs can match the full object path (for example,\n`gs://bucket/directory/object.json`) or a pattern matching one or more\nfiles, such as `gs://bucket/directory/*.json`.\n\nA request can contain at most 100 files (or 100,000 files if `data_schema`\nis `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is\n`content`).\n\n### getDataSchema\n\nThe schema to use when parsing the data from the source.\n\nSupported values for document imports:\n\n- `document` (default): One JSON [Document](/php/docs/reference/cloud-discoveryengine/latest/V1.Document) per line. Each document must have a valid [Document.id](/php/docs/reference/cloud-discoveryengine/latest/V1.Document#_Google_Cloud_DiscoveryEngine_V1_Document__getId__).\n- `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string.\n- `custom`: One custom data JSON per row in arbitrary format that conforms to the defined [Schema](/php/docs/reference/cloud-discoveryengine/latest/V1.Schema) of the data store. This can only be used by the GENERIC Data Store vertical.\n- `csv`: A CSV file with header conforming to the defined [Schema](/php/docs/reference/cloud-discoveryengine/latest/V1.Schema) of the data store. Each entry after the header is imported as a Document. This can only be used by the GENERIC Data Store vertical. Supported values for user event imports:\n- `user_event` (default): One JSON [UserEvent](/php/docs/reference/cloud-discoveryengine/latest/V1.UserEvent) per line.\n\n### setDataSchema\n\nThe schema to use when parsing the data from the source.\n\nSupported values for document imports:\n\n- `document` (default): One JSON [Document](/php/docs/reference/cloud-discoveryengine/latest/V1.Document) per line. Each document must have a valid [Document.id](/php/docs/reference/cloud-discoveryengine/latest/V1.Document#_Google_Cloud_DiscoveryEngine_V1_Document__getId__).\n- `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string.\n- `custom`: One custom data JSON per row in arbitrary format that conforms to the defined [Schema](/php/docs/reference/cloud-discoveryengine/latest/V1.Schema) of the data store. This can only be used by the GENERIC Data Store vertical.\n- `csv`: A CSV file with header conforming to the defined [Schema](/php/docs/reference/cloud-discoveryengine/latest/V1.Schema) of the data store. Each entry after the header is imported as a Document. This can only be used by the GENERIC Data Store vertical. Supported values for user event imports:\n- `user_event` (default): One JSON [UserEvent](/php/docs/reference/cloud-discoveryengine/latest/V1.UserEvent) per line."]]