google-cloud-discovery_engine-v1 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +5 -1
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +5 -1
- data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +49 -0
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +49 -21
- data/lib/google/cloud/discovery_engine/v1/document_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +49 -21
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +553 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +154 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +520 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/service_stub.rb +145 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/rest.rb +1 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +12 -6
- data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +45 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +12 -6
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +1 -0
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/document_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/recommendation_service_pb.rb +55 -0
- data/lib/google/cloud/discoveryengine/v1/recommendation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +4 -1
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +9 -1
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +5 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +16 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +7 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +4 -0
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +311 -22
- data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +228 -0
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +129 -21
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +16 -11
- metadata +12 -2
@@ -47,11 +47,11 @@ module Google
|
|
47
47
|
# bits of SHA256(URI) encoded as a hex string.
|
48
48
|
# * `custom`: One custom data JSON per row in arbitrary format that conforms
|
49
49
|
# to the defined {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} of the
|
50
|
-
# data store. This can only be used by
|
50
|
+
# data store. This can only be used by the GENERIC Data Store vertical.
|
51
51
|
# * `csv`: A CSV file with header conforming to the defined
|
52
52
|
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} of the
|
53
53
|
# data store. Each entry after the header is imported as a Document.
|
54
|
-
# This can only be used by
|
54
|
+
# This can only be used by the GENERIC Data Store vertical.
|
55
55
|
#
|
56
56
|
# Supported values for user even imports:
|
57
57
|
#
|
@@ -104,12 +104,267 @@ module Google
|
|
104
104
|
# {::Google::Cloud::DiscoveryEngine::V1::Document#struct_data Document.struct_data}.
|
105
105
|
# * `custom`: One custom data per row in arbitrary format that conforms to
|
106
106
|
# the defined {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} of the data
|
107
|
-
# store. This can only be used by
|
107
|
+
# store. This can only be used by the GENERIC Data Store vertical.
|
108
108
|
class BigQuerySource
|
109
109
|
include ::Google::Protobuf::MessageExts
|
110
110
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
111
111
|
end
|
112
112
|
|
113
|
+
# The Spanner source for importing data
|
114
|
+
# @!attribute [rw] project_id
|
115
|
+
# @return [::String]
|
116
|
+
# The project ID that the Spanner source is in with a length limit of 128
|
117
|
+
# characters. If not specified, inherits the project ID from the parent
|
118
|
+
# request.
|
119
|
+
# @!attribute [rw] instance_id
|
120
|
+
# @return [::String]
|
121
|
+
# Required. The instance ID of the source Spanner table.
|
122
|
+
# @!attribute [rw] database_id
|
123
|
+
# @return [::String]
|
124
|
+
# Required. The database ID of the source Spanner table.
|
125
|
+
# @!attribute [rw] table_id
|
126
|
+
# @return [::String]
|
127
|
+
# Required. The table name of the Spanner database that needs to be imported.
|
128
|
+
# @!attribute [rw] enable_data_boost
|
129
|
+
# @return [::Boolean]
|
130
|
+
# Whether to apply data boost on Spanner export. Enabling this option will
|
131
|
+
# incur additional cost. More info can be found
|
132
|
+
# [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).
|
133
|
+
class SpannerSource
|
134
|
+
include ::Google::Protobuf::MessageExts
|
135
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
136
|
+
end
|
137
|
+
|
138
|
+
# The Bigtable Options object that contains information to support
|
139
|
+
# the import.
|
140
|
+
# @!attribute [rw] key_field_name
|
141
|
+
# @return [::String]
|
142
|
+
# The field name used for saving row key value in the document. The name has
|
143
|
+
# to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
|
144
|
+
# @!attribute [rw] families
|
145
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::BigtableOptions::BigtableColumnFamily}]
|
146
|
+
# The mapping from family names to an object that contains column families
|
147
|
+
# level information for the given column family. If a family is not present
|
148
|
+
# in this map it will be ignored.
|
149
|
+
class BigtableOptions
|
150
|
+
include ::Google::Protobuf::MessageExts
|
151
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
152
|
+
|
153
|
+
# The column family of the Bigtable.
|
154
|
+
# @!attribute [rw] field_name
|
155
|
+
# @return [::String]
|
156
|
+
# The field name to use for this column family in the document. The
|
157
|
+
# name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
|
158
|
+
# it is parsed from the family name with best effort. However, due to
|
159
|
+
# different naming patterns, field name collisions could happen, where
|
160
|
+
# parsing behavior is undefined.
|
161
|
+
# @!attribute [rw] encoding
|
162
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::BigtableOptions::Encoding]
|
163
|
+
# The encoding mode of the values when the type is not STRING.
|
164
|
+
# Acceptable encoding values are:
|
165
|
+
#
|
166
|
+
# * `TEXT`: indicates values are alphanumeric text strings.
|
167
|
+
# * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
|
168
|
+
# family of functions. This can be overridden for a specific column
|
169
|
+
# by listing that column in `columns` and specifying an encoding for it.
|
170
|
+
# @!attribute [rw] type
|
171
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::BigtableOptions::Type]
|
172
|
+
# The type of values in this column family.
|
173
|
+
# The values are expected to be encoded using `HBase Bytes.toBytes`
|
174
|
+
# function when the encoding value is set to `BINARY`.
|
175
|
+
# @!attribute [rw] columns
|
176
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::BigtableOptions::BigtableColumn>]
|
177
|
+
# The list of objects that contains column level information for each
|
178
|
+
# column. If a column is not present in this list it will be ignored.
|
179
|
+
class BigtableColumnFamily
|
180
|
+
include ::Google::Protobuf::MessageExts
|
181
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
182
|
+
end
|
183
|
+
|
184
|
+
# The column of the Bigtable.
|
185
|
+
# @!attribute [rw] qualifier
|
186
|
+
# @return [::String]
|
187
|
+
# Required. Qualifier of the column. If it cannot be decoded with utf-8,
|
188
|
+
# use a base-64 encoded string instead.
|
189
|
+
# @!attribute [rw] field_name
|
190
|
+
# @return [::String]
|
191
|
+
# The field name to use for this column in the document. The name has to
|
192
|
+
# match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
|
193
|
+
# If not set, it is parsed from the qualifier bytes with best effort.
|
194
|
+
# However, due to different naming patterns, field name collisions could
|
195
|
+
# happen, where parsing behavior is undefined.
|
196
|
+
# @!attribute [rw] encoding
|
197
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::BigtableOptions::Encoding]
|
198
|
+
# The encoding mode of the values when the type is not `STRING`.
|
199
|
+
# Acceptable encoding values are:
|
200
|
+
#
|
201
|
+
# * `TEXT`: indicates values are alphanumeric text strings.
|
202
|
+
# * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
|
203
|
+
# family of functions. This can be overridden for a specific column
|
204
|
+
# by listing that column in `columns` and specifying an encoding for it.
|
205
|
+
# @!attribute [rw] type
|
206
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::BigtableOptions::Type]
|
207
|
+
# The type of values in this column family.
|
208
|
+
# The values are expected to be encoded using `HBase Bytes.toBytes`
|
209
|
+
# function when the encoding value is set to `BINARY`.
|
210
|
+
class BigtableColumn
|
211
|
+
include ::Google::Protobuf::MessageExts
|
212
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
213
|
+
end
|
214
|
+
|
215
|
+
# @!attribute [rw] key
|
216
|
+
# @return [::String]
|
217
|
+
# @!attribute [rw] value
|
218
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::BigtableOptions::BigtableColumnFamily]
|
219
|
+
class FamiliesEntry
|
220
|
+
include ::Google::Protobuf::MessageExts
|
221
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
222
|
+
end
|
223
|
+
|
224
|
+
# The type of values in a Bigtable column or column family.
|
225
|
+
# The values are expected to be encoded using
|
226
|
+
# [HBase
|
227
|
+
# Bytes.toBytes](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html)
|
228
|
+
# function when the encoding value is set to `BINARY`.
|
229
|
+
module Type
|
230
|
+
# The type is unspecified.
|
231
|
+
TYPE_UNSPECIFIED = 0
|
232
|
+
|
233
|
+
# String type.
|
234
|
+
STRING = 1
|
235
|
+
|
236
|
+
# Numerical type.
|
237
|
+
NUMBER = 2
|
238
|
+
|
239
|
+
# Integer type.
|
240
|
+
INTEGER = 3
|
241
|
+
|
242
|
+
# Variable length integer type.
|
243
|
+
VAR_INTEGER = 4
|
244
|
+
|
245
|
+
# BigDecimal type.
|
246
|
+
BIG_NUMERIC = 5
|
247
|
+
|
248
|
+
# Boolean type.
|
249
|
+
BOOLEAN = 6
|
250
|
+
|
251
|
+
# JSON type.
|
252
|
+
JSON = 7
|
253
|
+
end
|
254
|
+
|
255
|
+
# The encoding mode of a Bigtable column or column family.
|
256
|
+
module Encoding
|
257
|
+
# The encoding is unspecified.
|
258
|
+
ENCODING_UNSPECIFIED = 0
|
259
|
+
|
260
|
+
# Text encoding.
|
261
|
+
TEXT = 1
|
262
|
+
|
263
|
+
# Binary encoding.
|
264
|
+
BINARY = 2
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
# The Cloud Bigtable source for importing data.
|
269
|
+
# @!attribute [rw] project_id
|
270
|
+
# @return [::String]
|
271
|
+
# The project ID that the Bigtable source is in with a length limit of 128
|
272
|
+
# characters. If not specified, inherits the project ID from the parent
|
273
|
+
# request.
|
274
|
+
# @!attribute [rw] instance_id
|
275
|
+
# @return [::String]
|
276
|
+
# Required. The instance ID of the Cloud Bigtable that needs to be imported.
|
277
|
+
# @!attribute [rw] table_id
|
278
|
+
# @return [::String]
|
279
|
+
# Required. The table ID of the Cloud Bigtable that needs to be imported.
|
280
|
+
# @!attribute [rw] bigtable_options
|
281
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::BigtableOptions]
|
282
|
+
# Required. Bigtable options that contains information needed when parsing
|
283
|
+
# data into typed structures. For example, column type annotations.
|
284
|
+
class BigtableSource
|
285
|
+
include ::Google::Protobuf::MessageExts
|
286
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
287
|
+
end
|
288
|
+
|
289
|
+
# Cloud FhirStore source import data from.
|
290
|
+
# @!attribute [rw] fhir_store
|
291
|
+
# @return [::String]
|
292
|
+
# Required. The full resource name of the FHIR store to import data from, in
|
293
|
+
# the format of
|
294
|
+
# `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
|
295
|
+
# @!attribute [rw] gcs_staging_dir
|
296
|
+
# @return [::String]
|
297
|
+
# Intermediate Cloud Storage directory used for the import with a length
|
298
|
+
# limit of 2,000 characters. Can be specified if one wants to have the
|
299
|
+
# FhirStore export to a specific Cloud Storage directory.
|
300
|
+
class FhirStoreSource
|
301
|
+
include ::Google::Protobuf::MessageExts
|
302
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
303
|
+
end
|
304
|
+
|
305
|
+
# Cloud SQL source import data from.
|
306
|
+
# @!attribute [rw] project_id
|
307
|
+
# @return [::String]
|
308
|
+
# The project ID that the Cloud SQL source is in with a length limit of 128
|
309
|
+
# characters. If not specified, inherits the project ID from the parent
|
310
|
+
# request.
|
311
|
+
# @!attribute [rw] instance_id
|
312
|
+
# @return [::String]
|
313
|
+
# Required. The Cloud SQL instance to copy the data from with a length limit
|
314
|
+
# of 256 characters.
|
315
|
+
# @!attribute [rw] database_id
|
316
|
+
# @return [::String]
|
317
|
+
# Required. The Cloud SQL database to copy the data from with a length limit
|
318
|
+
# of 256 characters.
|
319
|
+
# @!attribute [rw] table_id
|
320
|
+
# @return [::String]
|
321
|
+
# Required. The Cloud SQL table to copy the data from with a length limit of
|
322
|
+
# 256 characters.
|
323
|
+
# @!attribute [rw] gcs_staging_dir
|
324
|
+
# @return [::String]
|
325
|
+
# Intermediate Cloud Storage directory used for the import with a length
|
326
|
+
# limit of 2,000 characters. Can be specified if one wants to have the
|
327
|
+
# Cloud SQL export to a specific Cloud Storage directory.
|
328
|
+
#
|
329
|
+
# Ensure that the Cloud SQL service account has the necessary Cloud
|
330
|
+
# Storage Admin permissions to access the specified Cloud Storage directory.
|
331
|
+
# @!attribute [rw] offload
|
332
|
+
# @return [::Boolean]
|
333
|
+
# Option for serverless export. Enabling this option will incur additional
|
334
|
+
# cost. More info can be found
|
335
|
+
# [here](https://cloud.google.com/sql/pricing#serverless).
|
336
|
+
class CloudSqlSource
|
337
|
+
include ::Google::Protobuf::MessageExts
|
338
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
339
|
+
end
|
340
|
+
|
341
|
+
# Firestore source import data from.
|
342
|
+
# @!attribute [rw] project_id
|
343
|
+
# @return [::String]
|
344
|
+
# The project ID that the Cloud SQL source is in with a length limit of 128
|
345
|
+
# characters. If not specified, inherits the project ID from the parent
|
346
|
+
# request.
|
347
|
+
# @!attribute [rw] database_id
|
348
|
+
# @return [::String]
|
349
|
+
# Required. The Firestore database to copy the data from with a length limit
|
350
|
+
# of 256 characters.
|
351
|
+
# @!attribute [rw] collection_id
|
352
|
+
# @return [::String]
|
353
|
+
# Required. The Firestore collection to copy the data from with a length
|
354
|
+
# limit of 1,500 characters.
|
355
|
+
# @!attribute [rw] gcs_staging_dir
|
356
|
+
# @return [::String]
|
357
|
+
# Intermediate Cloud Storage directory used for the import with a length
|
358
|
+
# limit of 2,000 characters. Can be specified if one wants to have the
|
359
|
+
# Firestore export to a specific Cloud Storage directory.
|
360
|
+
#
|
361
|
+
# Ensure that the Firestore service account has the necessary Cloud
|
362
|
+
# Storage Admin permissions to access the specified Cloud Storage directory.
|
363
|
+
class FirestoreSource
|
364
|
+
include ::Google::Protobuf::MessageExts
|
365
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
366
|
+
end
|
367
|
+
|
113
368
|
# Configuration of destination for Import related errors.
|
114
369
|
# @!attribute [rw] gcs_prefix
|
115
370
|
# @return [::String]
|
@@ -211,6 +466,9 @@ module Google
|
|
211
466
|
# @!attribute [rw] failure_count
|
212
467
|
# @return [::Integer]
|
213
468
|
# Count of entries that encountered errors while processing.
|
469
|
+
# @!attribute [rw] total_count
|
470
|
+
# @return [::Integer]
|
471
|
+
# Total count of entries that were processed.
|
214
472
|
class ImportDocumentsMetadata
|
215
473
|
include ::Google::Protobuf::MessageExts
|
216
474
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -226,6 +484,21 @@ module Google
|
|
226
484
|
# @!attribute [rw] bigquery_source
|
227
485
|
# @return [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource]
|
228
486
|
# BigQuery input source.
|
487
|
+
# @!attribute [rw] fhir_store_source
|
488
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::FhirStoreSource]
|
489
|
+
# FhirStore input source.
|
490
|
+
# @!attribute [rw] spanner_source
|
491
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SpannerSource]
|
492
|
+
# Spanner input source.
|
493
|
+
# @!attribute [rw] cloud_sql_source
|
494
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::CloudSqlSource]
|
495
|
+
# Cloud SQL input source.
|
496
|
+
# @!attribute [rw] firestore_source
|
497
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::FirestoreSource]
|
498
|
+
# Firestore input source.
|
499
|
+
# @!attribute [rw] bigtable_source
|
500
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::BigtableSource]
|
501
|
+
# Cloud Bigtable input source.
|
229
502
|
# @!attribute [rw] parent
|
230
503
|
# @return [::String]
|
231
504
|
# Required. The parent branch resource name, such as
|
@@ -239,6 +512,10 @@ module Google
|
|
239
512
|
# The mode of reconciliation between existing documents and the documents to
|
240
513
|
# be imported. Defaults to
|
241
514
|
# {::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
|
515
|
+
# @!attribute [rw] update_mask
|
516
|
+
# @return [::Google::Protobuf::FieldMask]
|
517
|
+
# Indicates which fields in the provided imported documents to update. If
|
518
|
+
# not set, the default is to update all fields.
|
242
519
|
# @!attribute [rw] auto_generate_ids
|
243
520
|
# @return [::Boolean]
|
244
521
|
# Whether to automatically generate IDs for the documents if absent.
|
@@ -254,42 +531,54 @@ module Google
|
|
254
531
|
# {::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest#id_field id_field},
|
255
532
|
# otherwise, documents without IDs fail to be imported.
|
256
533
|
#
|
257
|
-
#
|
258
|
-
#
|
259
|
-
# {::Google::Cloud::DiscoveryEngine::V1::
|
534
|
+
# Supported data sources:
|
535
|
+
#
|
536
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource}.
|
260
537
|
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource#data_schema GcsSource.data_schema}
|
261
|
-
# or
|
538
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
539
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource}.
|
262
540
|
# {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource#data_schema BigQuerySource.data_schema}
|
263
|
-
#
|
541
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
542
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::SpannerSource SpannerSource}.
|
543
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::CloudSqlSource CloudSqlSource}.
|
544
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::FirestoreSource FirestoreSource}.
|
545
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::BigtableSource BigtableSource}.
|
264
546
|
# @!attribute [rw] id_field
|
265
547
|
# @return [::String]
|
266
|
-
# The field
|
267
|
-
#
|
548
|
+
# The field indicates the ID field or column to be used as unique IDs of
|
549
|
+
# the documents.
|
268
550
|
#
|
269
551
|
# For {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource} it is the key of
|
270
552
|
# the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`.
|
271
|
-
# For
|
272
|
-
#
|
553
|
+
# For others, it may be the column name of the table where the unique ids are
|
554
|
+
# stored.
|
273
555
|
#
|
274
|
-
# The values of the JSON field or the
|
556
|
+
# The values of the JSON field or the table column are used as the
|
275
557
|
# {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id}s. The JSON field
|
276
|
-
# or the
|
277
|
-
#
|
558
|
+
# or the table column must be of string type, and the values must be set as
|
559
|
+
# valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
278
560
|
# with 1-63 characters. Otherwise, documents without valid IDs fail to be
|
279
561
|
# imported.
|
280
562
|
#
|
281
|
-
# Only set this field when
|
282
|
-
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource} or
|
283
|
-
# {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource}, and when
|
284
|
-
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource#data_schema GcsSource.data_schema}
|
285
|
-
# or
|
286
|
-
# {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource#data_schema BigQuerySource.data_schema}
|
287
|
-
# is `custom`. And only set this field when
|
563
|
+
# Only set this field when
|
288
564
|
# {::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest#auto_generate_ids auto_generate_ids}
|
289
565
|
# is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
290
566
|
#
|
291
567
|
# If it is unset, a default value `_id` is used when importing from the
|
292
568
|
# allowed data sources.
|
569
|
+
#
|
570
|
+
# Supported data sources:
|
571
|
+
#
|
572
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource}.
|
573
|
+
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource#data_schema GcsSource.data_schema}
|
574
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
575
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource}.
|
576
|
+
# {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource#data_schema BigQuerySource.data_schema}
|
577
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
578
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::SpannerSource SpannerSource}.
|
579
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::CloudSqlSource CloudSqlSource}.
|
580
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::FirestoreSource FirestoreSource}.
|
581
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::BigtableSource BigtableSource}.
|
293
582
|
class ImportDocumentsRequest
|
294
583
|
include ::Google::Protobuf::MessageExts
|
295
584
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -74,6 +74,9 @@ module Google
|
|
74
74
|
# @!attribute [rw] failure_count
|
75
75
|
# @return [::Integer]
|
76
76
|
# Count of entries that encountered errors while processing.
|
77
|
+
# @!attribute [rw] ignored_count
|
78
|
+
# @return [::Integer]
|
79
|
+
# Count of entries that were ignored as entries were not found.
|
77
80
|
class PurgeDocumentsMetadata
|
78
81
|
include ::Google::Protobuf::MessageExts
|
79
82
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,228 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1
|
24
|
+
# Request message for Recommend method.
|
25
|
+
# @!attribute [rw] serving_config
|
26
|
+
# @return [::String]
|
27
|
+
# Required. Full resource name of a [ServingConfig][]:
|
28
|
+
# `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or
|
29
|
+
# `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
|
30
|
+
#
|
31
|
+
# One default serving config is created along with your recommendation engine
|
32
|
+
# creation. The engine ID will be used as the ID of the default serving
|
33
|
+
# config. For example, for Engine
|
34
|
+
# `projects/*/locations/global/collections/*/engines/my-engine`, you can use
|
35
|
+
# `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
|
36
|
+
# for your
|
37
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RecommendationService::Client#recommend RecommendationService.Recommend}
|
38
|
+
# requests.
|
39
|
+
# @!attribute [rw] user_event
|
40
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::UserEvent]
|
41
|
+
# Required. Context about the user, what they are looking at and what action
|
42
|
+
# they took to trigger the Recommend request. Note that this user event
|
43
|
+
# detail won't be ingested to userEvent logs. Thus, a separate userEvent
|
44
|
+
# write request is required for event logging.
|
45
|
+
#
|
46
|
+
# Don't set
|
47
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
|
48
|
+
# or
|
49
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UserInfo#user_id UserEvent.user_info.user_id}
|
50
|
+
# to the same fixed ID for different users. If you are trying to receive
|
51
|
+
# non-personalized recommendations (not recommended; this can negatively
|
52
|
+
# impact model performance), instead set
|
53
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
|
54
|
+
# to a random unique ID and leave
|
55
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UserInfo#user_id UserEvent.user_info.user_id}
|
56
|
+
# unset.
|
57
|
+
# @!attribute [rw] page_size
|
58
|
+
# @return [::Integer]
|
59
|
+
# Maximum number of results to return. Set this property
|
60
|
+
# to the number of recommendation results needed. If zero, the service will
|
61
|
+
# choose a reasonable default. The maximum allowed value is 100. Values
|
62
|
+
# above 100 will be coerced to 100.
|
63
|
+
# @!attribute [rw] filter
|
64
|
+
# @return [::String]
|
65
|
+
# Filter for restricting recommendation results with a length limit of 5,000
|
66
|
+
# characters. Currently, only filter expressions on the `filter_tags`
|
67
|
+
# attribute is supported.
|
68
|
+
#
|
69
|
+
#
|
70
|
+
# Examples:
|
71
|
+
#
|
72
|
+
# * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
|
73
|
+
# * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
|
74
|
+
#
|
75
|
+
# If `attributeFilteringSyntax` is set to true under the `params` field, then
|
76
|
+
# attribute-based expressions are expected instead of the above described
|
77
|
+
# tag-based syntax. Examples:
|
78
|
+
#
|
79
|
+
# * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
|
80
|
+
# * (available: true) AND
|
81
|
+
# (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
|
82
|
+
#
|
83
|
+
# If your filter blocks all results, the API will return generic
|
84
|
+
# (unfiltered) popular Documents. If you only want results strictly matching
|
85
|
+
# the filters, set `strictFiltering` to True in
|
86
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}
|
87
|
+
# to receive empty results instead.
|
88
|
+
#
|
89
|
+
# Note that the API will never return
|
90
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Document Document}s with `storageStatus`
|
91
|
+
# of `EXPIRED` or `DELETED` regardless of filter choices.
|
92
|
+
# @!attribute [rw] validate_only
|
93
|
+
# @return [::Boolean]
|
94
|
+
# Use validate only mode for this recommendation query. If set to true, a
|
95
|
+
# fake model will be used that returns arbitrary Document IDs.
|
96
|
+
# Note that the validate only mode should only be used for testing the API,
|
97
|
+
# or if the model is not ready.
|
98
|
+
# @!attribute [rw] params
|
99
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
|
100
|
+
# Additional domain specific parameters for the recommendations.
|
101
|
+
#
|
102
|
+
# Allowed values:
|
103
|
+
#
|
104
|
+
# * `returnDocument`: Boolean. If set to true, the associated Document
|
105
|
+
# object will be returned in
|
106
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#document RecommendResponse.RecommendationResult.document}.
|
107
|
+
# * `returnScore`: Boolean. If set to true, the recommendation 'score'
|
108
|
+
# corresponding to each returned Document will be set in
|
109
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#metadata RecommendResponse.RecommendationResult.metadata}.
|
110
|
+
# The given 'score' indicates the probability of a Document conversion
|
111
|
+
# given the user's context and history.
|
112
|
+
# * `strictFiltering`: Boolean. True by default. If set to false, the service
|
113
|
+
# will return generic (unfiltered) popular Documents instead of empty if
|
114
|
+
# your filter blocks all recommendation results.
|
115
|
+
# * `diversityLevel`: String. Default empty. If set to be non-empty, then
|
116
|
+
# it needs to be one of:
|
117
|
+
# * `no-diversity`
|
118
|
+
# * `low-diversity`
|
119
|
+
# * `medium-diversity`
|
120
|
+
# * `high-diversity`
|
121
|
+
# * `auto-diversity`
|
122
|
+
# This gives request-level control and adjusts recommendation results
|
123
|
+
# based on Document category.
|
124
|
+
# * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
|
125
|
+
# the `filter` field is interpreted according to the new,
|
126
|
+
# attribute-based syntax.
|
127
|
+
# @!attribute [rw] user_labels
|
128
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
129
|
+
# The user labels applied to a resource must meet the following requirements:
|
130
|
+
#
|
131
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
132
|
+
# * Each label must be a key-value pair.
|
133
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
134
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
135
|
+
# length of 63 characters.
|
136
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
137
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
138
|
+
# international characters are allowed.
|
139
|
+
# * The key portion of a label must be unique. However, you can use the same
|
140
|
+
# key with multiple resources.
|
141
|
+
# * Keys must start with a lowercase letter or international character.
|
142
|
+
#
|
143
|
+
# See [Requirements for
|
144
|
+
# labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
145
|
+
# for more details.
|
146
|
+
class RecommendRequest
|
147
|
+
include ::Google::Protobuf::MessageExts
|
148
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
149
|
+
|
150
|
+
# @!attribute [rw] key
|
151
|
+
# @return [::String]
|
152
|
+
# @!attribute [rw] value
|
153
|
+
# @return [::Google::Protobuf::Value]
|
154
|
+
class ParamsEntry
|
155
|
+
include ::Google::Protobuf::MessageExts
|
156
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
157
|
+
end
|
158
|
+
|
159
|
+
# @!attribute [rw] key
|
160
|
+
# @return [::String]
|
161
|
+
# @!attribute [rw] value
|
162
|
+
# @return [::String]
|
163
|
+
class UserLabelsEntry
|
164
|
+
include ::Google::Protobuf::MessageExts
|
165
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# Response message for Recommend method.
|
170
|
+
# @!attribute [rw] results
|
171
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult>]
|
172
|
+
# A list of recommended Documents. The order represents the ranking (from the
|
173
|
+
# most relevant Document to the least).
|
174
|
+
# @!attribute [rw] attribution_token
|
175
|
+
# @return [::String]
|
176
|
+
# A unique attribution token. This should be included in the
|
177
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UserEvent UserEvent} logs resulting from
|
178
|
+
# this recommendation, which enables accurate attribution of recommendation
|
179
|
+
# model performance.
|
180
|
+
# @!attribute [rw] missing_ids
|
181
|
+
# @return [::Array<::String>]
|
182
|
+
# IDs of documents in the request that were missing from the default Branch
|
183
|
+
# associated with the requested ServingConfig.
|
184
|
+
# @!attribute [rw] validate_only
|
185
|
+
# @return [::Boolean]
|
186
|
+
# True if
|
187
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#validate_only RecommendRequest.validate_only}
|
188
|
+
# was set.
|
189
|
+
class RecommendResponse
|
190
|
+
include ::Google::Protobuf::MessageExts
|
191
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
192
|
+
|
193
|
+
# RecommendationResult represents a generic recommendation result with
|
194
|
+
# associated metadata.
|
195
|
+
# @!attribute [rw] id
|
196
|
+
# @return [::String]
|
197
|
+
# Resource ID of the recommended Document.
|
198
|
+
# @!attribute [rw] document
|
199
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Document]
|
200
|
+
# Set if `returnDocument` is set to true in
|
201
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}.
|
202
|
+
# @!attribute [rw] metadata
|
203
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
|
204
|
+
# Additional Document metadata / annotations.
|
205
|
+
#
|
206
|
+
# Possible values:
|
207
|
+
#
|
208
|
+
# * `score`: Recommendation score in double value. Is set if
|
209
|
+
# `returnScore` is set to true in
|
210
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}.
|
211
|
+
class RecommendationResult
|
212
|
+
include ::Google::Protobuf::MessageExts
|
213
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
214
|
+
|
215
|
+
# @!attribute [rw] key
|
216
|
+
# @return [::String]
|
217
|
+
# @!attribute [rw] value
|
218
|
+
# @return [::Google::Protobuf::Value]
|
219
|
+
class MetadataEntry
|
220
|
+
include ::Google::Protobuf::MessageExts
|
221
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|