@@ -269,6 +269,60 @@ message ImportDocumentsRequest {
269269 // be imported. Defaults to
270270 // [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
271271 ReconciliationMode reconciliation_mode = 6 ;
272+
273+ // Whether to automatically generate IDs for the documents if absent.
274+ //
275+ // If set to `true`,
276+ // [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are
277+ // automatically generated based on the hash of the payload, where IDs may not
278+ // be consistent during multiple imports. In which case
279+ // [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL]
280+ // is highly recommended to avoid duplicate contents. If unset or set to
281+ // `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s
282+ // have to be specified using
283+ // [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field],
284+ // otherwises, documents without IDs will fail to be imported.
285+ //
286+ // Only set this field when using
287+ // [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or
288+ // [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and
289+ // when
290+ // [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
291+ // or
292+ // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
293+ // is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.
294+ bool auto_generate_ids = 8 ;
295+
296+ // The field in the Cloud Storage and BigQuery sources that indicates the
297+ // unique IDs of the documents.
298+ //
299+ // For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the
300+ // key of the JSON field. For instance, `my_id` for JSON `{"my_id":
301+ // "some_uuid"}`. For
302+ // [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is
303+ // the column name of the BigQuery table where the unique ids are stored.
304+ //
305+ // The values of the JSON field or the BigQuery column will be used as the
306+ // [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON
307+ // field or the BigQuery column must be of string type, and the values must be
308+ // set as valid strings conform to
309+ // [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
310+ // Otherwise, documents without valid IDs will fail to be imported.
311+ //
312+ // Only set this field when using
313+ // [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or
314+ // [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and
315+ // when
316+ // [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
317+ // or
318+ // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
319+ // is `custom`. And only set this field when
320+ // [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids]
321+ // is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
322+ //
323+ // If it is unset, a default value `_id` is used when importing from the
324+ // allowed data sources.
325+ string id_field = 9 ;
272326}
273327
274328// Response of the
0 commit comments