Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1ImportDocumentsRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1/classes.rb,
lib/google/apis/discoveryengine_v1/representations.rb,
lib/google/apis/discoveryengine_v1/representations.rb

Overview

Request message for Import methods.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1ImportDocumentsRequest

Returns a new instance of GoogleCloudDiscoveryengineV1ImportDocumentsRequest.



4386
4387
4388
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4386

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#alloy_db_sourceGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AlloyDbSource

AlloyDB source import data from. Corresponds to the JSON property alloyDbSource



4293
4294
4295
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4293

def alloy_db_source
  @alloy_db_source
end

#auto_generate_idsBoolean Also known as: auto_generate_ids?

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, otherwise, documents without IDs fail to be imported. Supported data sources: * GcsSource. GcsSource.data_schema must be custom or csv. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be custom or csv. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource. Corresponds to the JSON property autoGenerateIds

Returns:

  • (Boolean)


4307
4308
4309
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4307

def auto_generate_ids
  @auto_generate_ids
end

#bigquery_sourceGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1BigQuerySource

BigQuery source import data from. Corresponds to the JSON property bigquerySource



4313
4314
4315
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4313

def bigquery_source
  @bigquery_source
end

#bigtable_sourceGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1BigtableSource

The Cloud Bigtable source for importing data. Corresponds to the JSON property bigtableSource



4318
4319
4320
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4318

def bigtable_source
  @bigtable_source
end

#cloud_sql_sourceGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1CloudSqlSource

Cloud SQL source import data from. Corresponds to the JSON property cloudSqlSource



4323
4324
4325
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4323

def cloud_sql_source
  @cloud_sql_source
end

#error_configGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1ImportErrorConfig

Configuration of destination for Import related errors. Corresponds to the JSON property errorConfig



4328
4329
4330
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4328

def error_config
  @error_config
end

#fhir_store_sourceGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1FhirStoreSource

Cloud FhirStore source import data from. Corresponds to the JSON property fhirStoreSource



4333
4334
4335
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4333

def fhir_store_source
  @fhir_store_source
end

#firestore_sourceGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1FirestoreSource

Firestore source import data from. Corresponds to the JSON property firestoreSource



4338
4339
4340
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4338

def firestore_source
  @firestore_source
end

#gcs_sourceGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1GcsSource

Cloud Storage location for input content. Corresponds to the JSON property gcsSource



4343
4344
4345
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4343

def gcs_source
  @gcs_source
end

#id_fieldString

The field indicates the ID field or column to be used as 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 others, it may be the column name of the table where the unique ids are stored. The values of the JSON field or the table column are used as the Document.ids. The JSON field or the table 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 fail to be imported. 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. Supported data sources: * GcsSource. GcsSource.data_schema must be custom or csv. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be custom or csv. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource. Corresponds to the JSON property idField

Returns:

  • (String)


4362
4363
4364
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4362

def id_field
  @id_field
end

#inline_sourceGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1ImportDocumentsRequestInlineSource

The inline source for the input config for ImportDocuments method. Corresponds to the JSON property inlineSource



4367
4368
4369
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4367

def inline_source
  @inline_source
end

#reconciliation_modeString

The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL. Corresponds to the JSON property reconciliationMode

Returns:

  • (String)


4373
4374
4375
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4373

def reconciliation_mode
  @reconciliation_mode
end

#spanner_sourceGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SpannerSource

The Spanner source for importing data Corresponds to the JSON property spannerSource



4378
4379
4380
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4378

def spanner_source
  @spanner_source
end

#update_maskString

Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields. Corresponds to the JSON property updateMask

Returns:

  • (String)


4384
4385
4386
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4384

def update_mask
  @update_mask
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 4391

def update!(**args)
  @alloy_db_source = args[:alloy_db_source] if args.key?(:alloy_db_source)
  @auto_generate_ids = args[:auto_generate_ids] if args.key?(:auto_generate_ids)
  @bigquery_source = args[:bigquery_source] if args.key?(:bigquery_source)
  @bigtable_source = args[:bigtable_source] if args.key?(:bigtable_source)
  @cloud_sql_source = args[:cloud_sql_source] if args.key?(:cloud_sql_source)
  @error_config = args[:error_config] if args.key?(:error_config)
  @fhir_store_source = args[:fhir_store_source] if args.key?(:fhir_store_source)
  @firestore_source = args[:firestore_source] if args.key?(:firestore_source)
  @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
  @id_field = args[:id_field] if args.key?(:id_field)
  @inline_source = args[:inline_source] if args.key?(:inline_source)
  @reconciliation_mode = args[:reconciliation_mode] if args.key?(:reconciliation_mode)
  @spanner_source = args[:spanner_source] if args.key?(:spanner_source)
  @update_mask = args[:update_mask] if args.key?(:update_mask)
end