Class: Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb

Overview

Request message for Import methods.

Defined Under Namespace

Modules: ReconciliationMode Classes: InlineSource

Instance Attribute Summary collapse

Instance Attribute Details

#auto_generate_ids::Boolean

Returns Whether to automatically generate IDs for the documents if absent.

If set to true, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to false, Document.ids have to be specified using id_field, otherwises, documents without IDs will fail to be imported.

Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is custom. Otherwise, an INVALID_ARGUMENT error is thrown.

Returns:

  • (::Boolean)

    Whether to automatically generate IDs for the documents if absent.

    If set to true, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to false, Document.ids have to be specified using id_field, otherwises, documents without IDs will fail to be imported.

    Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is custom. Otherwise, an INVALID_ARGUMENT error is thrown.



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb', line 293

class ImportDocumentsRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The inline source for the input config for ImportDocuments method.
  # @!attribute [rw] documents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
  #     Required. A list of documents to update/create. Each document must have a
  #     valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
  #     Recommended max of 100 items.
  class InlineSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Indicates how imported documents are reconciled with the existing documents
  # created or imported before.
  module ReconciliationMode
    # Defaults to INCREMENTAL.
    RECONCILIATION_MODE_UNSPECIFIED = 0

    # Inserts new documents or updates existing documents.
    INCREMENTAL = 1

    # Calculates diff and replaces the entire document dataset. Existing
    # documents may be deleted if they are not present in the source location.
    FULL = 2
  end
end

#bigquery_source::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource

Returns BigQuery input source.

Returns:



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb', line 293

class ImportDocumentsRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The inline source for the input config for ImportDocuments method.
  # @!attribute [rw] documents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
  #     Required. A list of documents to update/create. Each document must have a
  #     valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
  #     Recommended max of 100 items.
  class InlineSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Indicates how imported documents are reconciled with the existing documents
  # created or imported before.
  module ReconciliationMode
    # Defaults to INCREMENTAL.
    RECONCILIATION_MODE_UNSPECIFIED = 0

    # Inserts new documents or updates existing documents.
    INCREMENTAL = 1

    # Calculates diff and replaces the entire document dataset. Existing
    # documents may be deleted if they are not present in the source location.
    FULL = 2
  end
end

#error_config::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig

Returns The desired location of errors incurred during the Import.

Returns:



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb', line 293

class ImportDocumentsRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The inline source for the input config for ImportDocuments method.
  # @!attribute [rw] documents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
  #     Required. A list of documents to update/create. Each document must have a
  #     valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
  #     Recommended max of 100 items.
  class InlineSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Indicates how imported documents are reconciled with the existing documents
  # created or imported before.
  module ReconciliationMode
    # Defaults to INCREMENTAL.
    RECONCILIATION_MODE_UNSPECIFIED = 0

    # Inserts new documents or updates existing documents.
    INCREMENTAL = 1

    # Calculates diff and replaces the entire document dataset. Existing
    # documents may be deleted if they are not present in the source location.
    FULL = 2
  end
end

#gcs_source::Google::Cloud::DiscoveryEngine::V1beta::GcsSource

Returns Cloud Storage location for the input content.

Returns:



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb', line 293

class ImportDocumentsRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The inline source for the input config for ImportDocuments method.
  # @!attribute [rw] documents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
  #     Required. A list of documents to update/create. Each document must have a
  #     valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
  #     Recommended max of 100 items.
  class InlineSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Indicates how imported documents are reconciled with the existing documents
  # created or imported before.
  module ReconciliationMode
    # Defaults to INCREMENTAL.
    RECONCILIATION_MODE_UNSPECIFIED = 0

    # Inserts new documents or updates existing documents.
    INCREMENTAL = 1

    # Calculates diff and replaces the entire document dataset. Existing
    # documents may be deleted if they are not present in the source location.
    FULL = 2
  end
end

#id_field::String

Returns The field in the Cloud Storage and BigQuery sources that indicates the unique IDs of the documents.

For GcsSource it is the key of the JSON field. For instance, my_id for JSON {"my_id": "some_uuid"}. For BigQuerySource it is the column name of the BigQuery table where the unique ids are stored.

The values of the JSON field or the BigQuery column will be used as the Document.ids. The JSON field or the BigQuery column must be of string type, and the values must be set as valid strings conform to RFC-1034 with 1-63 characters. Otherwise, documents without valid IDs will fail to be imported.

Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is custom. And only set this field when auto_generate_ids is unset or set as false. Otherwise, an INVALID_ARGUMENT error is thrown.

If it is unset, a default value _id is used when importing from the allowed data sources.

Returns:

  • (::String)

    The field in the Cloud Storage and BigQuery sources that indicates the unique IDs of the documents.

    For GcsSource it is the key of the JSON field. For instance, my_id for JSON {"my_id": "some_uuid"}. For BigQuerySource it is the column name of the BigQuery table where the unique ids are stored.

    The values of the JSON field or the BigQuery column will be used as the Document.ids. The JSON field or the BigQuery column must be of string type, and the values must be set as valid strings conform to RFC-1034 with 1-63 characters. Otherwise, documents without valid IDs will fail to be imported.

    Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is custom. And only set this field when auto_generate_ids is unset or set as false. Otherwise, an INVALID_ARGUMENT error is thrown.

    If it is unset, a default value _id is used when importing from the allowed data sources.



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb', line 293

class ImportDocumentsRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The inline source for the input config for ImportDocuments method.
  # @!attribute [rw] documents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
  #     Required. A list of documents to update/create. Each document must have a
  #     valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
  #     Recommended max of 100 items.
  class InlineSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Indicates how imported documents are reconciled with the existing documents
  # created or imported before.
  module ReconciliationMode
    # Defaults to INCREMENTAL.
    RECONCILIATION_MODE_UNSPECIFIED = 0

    # Inserts new documents or updates existing documents.
    INCREMENTAL = 1

    # Calculates diff and replaces the entire document dataset. Existing
    # documents may be deleted if they are not present in the source location.
    FULL = 2
  end
end

#inline_source::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::InlineSource

Returns The Inline source for the input content for documents.

Returns:



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb', line 293

class ImportDocumentsRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The inline source for the input config for ImportDocuments method.
  # @!attribute [rw] documents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
  #     Required. A list of documents to update/create. Each document must have a
  #     valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
  #     Recommended max of 100 items.
  class InlineSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Indicates how imported documents are reconciled with the existing documents
  # created or imported before.
  module ReconciliationMode
    # Defaults to INCREMENTAL.
    RECONCILIATION_MODE_UNSPECIFIED = 0

    # Inserts new documents or updates existing documents.
    INCREMENTAL = 1

    # Calculates diff and replaces the entire document dataset. Existing
    # documents may be deleted if they are not present in the source location.
    FULL = 2
  end
end

#parent::String

Returns Required. The parent branch resource name, such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}. Requires create/update permission.

Returns:

  • (::String)

    Required. The parent branch resource name, such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}. Requires create/update permission.



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb', line 293

class ImportDocumentsRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The inline source for the input config for ImportDocuments method.
  # @!attribute [rw] documents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
  #     Required. A list of documents to update/create. Each document must have a
  #     valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
  #     Recommended max of 100 items.
  class InlineSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Indicates how imported documents are reconciled with the existing documents
  # created or imported before.
  module ReconciliationMode
    # Defaults to INCREMENTAL.
    RECONCILIATION_MODE_UNSPECIFIED = 0

    # Inserts new documents or updates existing documents.
    INCREMENTAL = 1

    # Calculates diff and replaces the entire document dataset. Existing
    # documents may be deleted if they are not present in the source location.
    FULL = 2
  end
end

#reconciliation_mode::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::ReconciliationMode

Returns The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL.

Returns:



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb', line 293

class ImportDocumentsRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The inline source for the input config for ImportDocuments method.
  # @!attribute [rw] documents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
  #     Required. A list of documents to update/create. Each document must have a
  #     valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
  #     Recommended max of 100 items.
  class InlineSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Indicates how imported documents are reconciled with the existing documents
  # created or imported before.
  module ReconciliationMode
    # Defaults to INCREMENTAL.
    RECONCILIATION_MODE_UNSPECIFIED = 0

    # Inserts new documents or updates existing documents.
    INCREMENTAL = 1

    # Calculates diff and replaces the entire document dataset. Existing
    # documents may be deleted if they are not present in the source location.
    FULL = 2
  end
end