google-cloud-discovery_engine-v1 0.6.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +769 -7
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +720 -7
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +94 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +71 -33
- data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
- 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 +71 -33
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
- data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +558 -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 +220 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +525 -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 +5 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +26 -13
- 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 +26 -13
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +5 -0
- data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +5 -1
- data/lib/google/cloud/discoveryengine/v1/document_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
- data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
- data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
- 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/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +25 -1
- data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +490 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +19 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +7 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +8 -4
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
- data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +313 -24
- data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
- data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
- data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
- data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +229 -0
- data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +150 -37
- data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +40 -14
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
- metadata +66 -2
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -181,12 +184,13 @@ module Google
|
|
181
184
|
# Customize the options with defaults
|
182
185
|
call_metadata = @config.rpcs.list_operations.metadata.to_h
|
183
186
|
|
184
|
-
# Set x-goog-api-client
|
187
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
185
188
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
186
189
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
187
190
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
188
191
|
transports_version_send: [:rest]
|
189
192
|
|
193
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
190
194
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
191
195
|
|
192
196
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
@@ -269,12 +273,13 @@ module Google
|
|
269
273
|
# Customize the options with defaults
|
270
274
|
call_metadata = @config.rpcs.get_operation.metadata.to_h
|
271
275
|
|
272
|
-
# Set x-goog-api-client
|
276
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
273
277
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
274
278
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
275
279
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
276
280
|
transports_version_send: [:rest]
|
277
281
|
|
282
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
278
283
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
279
284
|
|
280
285
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
@@ -351,12 +356,13 @@ module Google
|
|
351
356
|
# Customize the options with defaults
|
352
357
|
call_metadata = @config.rpcs.delete_operation.metadata.to_h
|
353
358
|
|
354
|
-
# Set x-goog-api-client
|
359
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
355
360
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
356
361
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
357
362
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
358
363
|
transports_version_send: [:rest]
|
359
364
|
|
365
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
360
366
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
361
367
|
|
362
368
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
@@ -438,12 +444,13 @@ module Google
|
|
438
444
|
# Customize the options with defaults
|
439
445
|
call_metadata = @config.rpcs.cancel_operation.metadata.to_h
|
440
446
|
|
441
|
-
# Set x-goog-api-client
|
447
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
442
448
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
443
449
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
444
450
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
445
451
|
transports_version_send: [:rest]
|
446
452
|
|
453
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
447
454
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
448
455
|
|
449
456
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
@@ -1077,7 +1084,23 @@ module Google
|
|
1077
1084
|
uri_template: "/v1/{name}:cancel",
|
1078
1085
|
body: "*",
|
1079
1086
|
matches: [
|
1080
|
-
["name", %r{^operations
|
1087
|
+
["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false]
|
1088
|
+
]
|
1089
|
+
)
|
1090
|
+
.with_bindings(
|
1091
|
+
uri_method: :post,
|
1092
|
+
uri_template: "/v1/{name}:cancel",
|
1093
|
+
body: "*",
|
1094
|
+
matches: [
|
1095
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
|
1096
|
+
]
|
1097
|
+
)
|
1098
|
+
.with_bindings(
|
1099
|
+
uri_method: :post,
|
1100
|
+
uri_template: "/v1/{name}:cancel",
|
1101
|
+
body: "*",
|
1102
|
+
matches: [
|
1103
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
|
1081
1104
|
]
|
1082
1105
|
)
|
1083
1106
|
transcoder.transcode request_pb
|
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# Service for ingesting end user actions on a website to Discovery Engine API.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
API_VERSION = ""
|
36
|
+
|
34
37
|
# @private
|
35
38
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
36
39
|
|
@@ -212,16 +215,27 @@ module Google
|
|
212
215
|
# @param options [::Gapic::CallOptions, ::Hash]
|
213
216
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
214
217
|
#
|
215
|
-
# @overload write_user_event(parent: nil, user_event: nil)
|
218
|
+
# @overload write_user_event(parent: nil, user_event: nil, write_async: nil)
|
216
219
|
# Pass arguments to `write_user_event` via keyword arguments. Note that at
|
217
220
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
218
221
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
219
222
|
#
|
220
223
|
# @param parent [::String]
|
221
|
-
# Required. The parent
|
224
|
+
# Required. The parent resource name.
|
225
|
+
# If the write user event action is applied in
|
226
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} level, the format
|
227
|
+
# is:
|
222
228
|
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
229
|
+
# If the write user event action is applied in [Location][] level, for
|
230
|
+
# example, the event with
|
231
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple
|
232
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is:
|
233
|
+
# `projects/{project}/locations/{location}`.
|
223
234
|
# @param user_event [::Google::Cloud::DiscoveryEngine::V1::UserEvent, ::Hash]
|
224
235
|
# Required. User event to write.
|
236
|
+
# @param write_async [::Boolean]
|
237
|
+
# If set to true, the user event is written asynchronously after
|
238
|
+
# validation, and the API responds without waiting for the write.
|
225
239
|
#
|
226
240
|
# @yield [response, operation] Access the result along with the RPC operation
|
227
241
|
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::UserEvent]
|
@@ -257,10 +271,11 @@ module Google
|
|
257
271
|
# Customize the options with defaults
|
258
272
|
metadata = @config.rpcs.write_user_event.metadata.to_h
|
259
273
|
|
260
|
-
# Set x-goog-api-client
|
274
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
261
275
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
262
276
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
263
277
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
278
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
264
279
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
265
280
|
|
266
281
|
header_params = {}
|
@@ -359,10 +374,11 @@ module Google
|
|
359
374
|
# Customize the options with defaults
|
360
375
|
metadata = @config.rpcs.collect_user_event.metadata.to_h
|
361
376
|
|
362
|
-
# Set x-goog-api-client
|
377
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
363
378
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
364
379
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
365
380
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
381
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
366
382
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
367
383
|
|
368
384
|
header_params = {}
|
@@ -390,7 +406,7 @@ module Google
|
|
390
406
|
end
|
391
407
|
|
392
408
|
##
|
393
|
-
# Bulk import of
|
409
|
+
# Bulk import of user events. Request processing might be
|
394
410
|
# synchronous. Events that already exist are skipped.
|
395
411
|
# Use this method for backfilling historical user events.
|
396
412
|
#
|
@@ -467,10 +483,11 @@ module Google
|
|
467
483
|
# Customize the options with defaults
|
468
484
|
metadata = @config.rpcs.import_user_events.metadata.to_h
|
469
485
|
|
470
|
-
# Set x-goog-api-client
|
486
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
471
487
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
472
488
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
473
489
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
490
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
474
491
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
475
492
|
|
476
493
|
header_params = {}
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module UserEventService
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -191,10 +194,11 @@ module Google
|
|
191
194
|
# Customize the options with defaults
|
192
195
|
metadata = @config.rpcs.list_operations.metadata.to_h
|
193
196
|
|
194
|
-
# Set x-goog-api-client
|
197
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
195
198
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
196
199
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
197
200
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
201
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
198
202
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
199
203
|
|
200
204
|
header_params = {}
|
@@ -287,10 +291,11 @@ module Google
|
|
287
291
|
# Customize the options with defaults
|
288
292
|
metadata = @config.rpcs.get_operation.metadata.to_h
|
289
293
|
|
290
|
-
# Set x-goog-api-client
|
294
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
291
295
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
292
296
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
293
297
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
298
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
294
299
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
295
300
|
|
296
301
|
header_params = {}
|
@@ -376,10 +381,11 @@ module Google
|
|
376
381
|
# Customize the options with defaults
|
377
382
|
metadata = @config.rpcs.delete_operation.metadata.to_h
|
378
383
|
|
379
|
-
# Set x-goog-api-client
|
384
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
380
385
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
381
386
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
382
387
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
388
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
383
389
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
384
390
|
|
385
391
|
header_params = {}
|
@@ -470,10 +476,11 @@ module Google
|
|
470
476
|
# Customize the options with defaults
|
471
477
|
metadata = @config.rpcs.cancel_operation.metadata.to_h
|
472
478
|
|
473
|
-
# Set x-goog-api-client
|
479
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
474
480
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
475
481
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
476
482
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
483
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
477
484
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
478
485
|
|
479
486
|
header_params = {}
|
@@ -574,10 +581,11 @@ module Google
|
|
574
581
|
# Customize the options with defaults
|
575
582
|
metadata = @config.rpcs.wait_operation.metadata.to_h
|
576
583
|
|
577
|
-
# Set x-goog-api-client
|
584
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
578
585
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
579
586
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
580
587
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
588
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
581
589
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
582
590
|
|
583
591
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
@@ -122,6 +122,27 @@ module Google
|
|
122
122
|
resource.call(**args)
|
123
123
|
end
|
124
124
|
|
125
|
+
##
|
126
|
+
# Create a fully-qualified Engine resource string.
|
127
|
+
#
|
128
|
+
# The resource will be in the following format:
|
129
|
+
#
|
130
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
|
131
|
+
#
|
132
|
+
# @param project [String]
|
133
|
+
# @param location [String]
|
134
|
+
# @param collection [String]
|
135
|
+
# @param engine [String]
|
136
|
+
#
|
137
|
+
# @return [::String]
|
138
|
+
def engine_path project:, location:, collection:, engine:
|
139
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
140
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
141
|
+
raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
|
142
|
+
|
143
|
+
"projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}"
|
144
|
+
end
|
145
|
+
|
125
146
|
extend self
|
126
147
|
end
|
127
148
|
end
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# Service for ingesting end user actions on a website to Discovery Engine API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
API_VERSION = ""
|
38
|
+
|
36
39
|
# @private
|
37
40
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
38
41
|
|
@@ -205,16 +208,27 @@ module Google
|
|
205
208
|
# @param options [::Gapic::CallOptions, ::Hash]
|
206
209
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
207
210
|
#
|
208
|
-
# @overload write_user_event(parent: nil, user_event: nil)
|
211
|
+
# @overload write_user_event(parent: nil, user_event: nil, write_async: nil)
|
209
212
|
# Pass arguments to `write_user_event` via keyword arguments. Note that at
|
210
213
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
211
214
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
212
215
|
#
|
213
216
|
# @param parent [::String]
|
214
|
-
# Required. The parent
|
217
|
+
# Required. The parent resource name.
|
218
|
+
# If the write user event action is applied in
|
219
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} level, the format
|
220
|
+
# is:
|
215
221
|
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
222
|
+
# If the write user event action is applied in [Location][] level, for
|
223
|
+
# example, the event with
|
224
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple
|
225
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is:
|
226
|
+
# `projects/{project}/locations/{location}`.
|
216
227
|
# @param user_event [::Google::Cloud::DiscoveryEngine::V1::UserEvent, ::Hash]
|
217
228
|
# Required. User event to write.
|
229
|
+
# @param write_async [::Boolean]
|
230
|
+
# If set to true, the user event is written asynchronously after
|
231
|
+
# validation, and the API responds without waiting for the write.
|
218
232
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
219
233
|
# @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::UserEvent]
|
220
234
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -249,12 +263,13 @@ module Google
|
|
249
263
|
# Customize the options with defaults
|
250
264
|
call_metadata = @config.rpcs.write_user_event.metadata.to_h
|
251
265
|
|
252
|
-
# Set x-goog-api-client
|
266
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
253
267
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
254
268
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
255
269
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
256
270
|
transports_version_send: [:rest]
|
257
271
|
|
272
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
258
273
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
259
274
|
|
260
275
|
options.apply_defaults timeout: @config.rpcs.write_user_event.timeout,
|
@@ -344,12 +359,13 @@ module Google
|
|
344
359
|
# Customize the options with defaults
|
345
360
|
call_metadata = @config.rpcs.collect_user_event.metadata.to_h
|
346
361
|
|
347
|
-
# Set x-goog-api-client
|
362
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
348
363
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
349
364
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
350
365
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
351
366
|
transports_version_send: [:rest]
|
352
367
|
|
368
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
353
369
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
354
370
|
|
355
371
|
options.apply_defaults timeout: @config.rpcs.collect_user_event.timeout,
|
@@ -369,7 +385,7 @@ module Google
|
|
369
385
|
end
|
370
386
|
|
371
387
|
##
|
372
|
-
# Bulk import of
|
388
|
+
# Bulk import of user events. Request processing might be
|
373
389
|
# synchronous. Events that already exist are skipped.
|
374
390
|
# Use this method for backfilling historical user events.
|
375
391
|
#
|
@@ -445,12 +461,13 @@ module Google
|
|
445
461
|
# Customize the options with defaults
|
446
462
|
call_metadata = @config.rpcs.import_user_events.metadata.to_h
|
447
463
|
|
448
|
-
# Set x-goog-api-client
|
464
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
449
465
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
450
466
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
451
467
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
452
468
|
transports_version_send: [:rest]
|
453
469
|
|
470
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
454
471
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
455
472
|
|
456
473
|
options.apply_defaults timeout: @config.rpcs.import_user_events.timeout,
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -181,12 +184,13 @@ module Google
|
|
181
184
|
# Customize the options with defaults
|
182
185
|
call_metadata = @config.rpcs.list_operations.metadata.to_h
|
183
186
|
|
184
|
-
# Set x-goog-api-client
|
187
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
185
188
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
186
189
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
187
190
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
188
191
|
transports_version_send: [:rest]
|
189
192
|
|
193
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
190
194
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
191
195
|
|
192
196
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
@@ -269,12 +273,13 @@ module Google
|
|
269
273
|
# Customize the options with defaults
|
270
274
|
call_metadata = @config.rpcs.get_operation.metadata.to_h
|
271
275
|
|
272
|
-
# Set x-goog-api-client
|
276
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
273
277
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
274
278
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
275
279
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
276
280
|
transports_version_send: [:rest]
|
277
281
|
|
282
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
278
283
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
279
284
|
|
280
285
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
@@ -351,12 +356,13 @@ module Google
|
|
351
356
|
# Customize the options with defaults
|
352
357
|
call_metadata = @config.rpcs.delete_operation.metadata.to_h
|
353
358
|
|
354
|
-
# Set x-goog-api-client
|
359
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
355
360
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
356
361
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
357
362
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
358
363
|
transports_version_send: [:rest]
|
359
364
|
|
365
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
360
366
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
361
367
|
|
362
368
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
@@ -438,12 +444,13 @@ module Google
|
|
438
444
|
# Customize the options with defaults
|
439
445
|
call_metadata = @config.rpcs.cancel_operation.metadata.to_h
|
440
446
|
|
441
|
-
# Set x-goog-api-client
|
447
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
442
448
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
443
449
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
444
450
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
445
451
|
transports_version_send: [:rest]
|
446
452
|
|
453
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
447
454
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
448
455
|
|
449
456
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
@@ -1077,7 +1084,23 @@ module Google
|
|
1077
1084
|
uri_template: "/v1/{name}:cancel",
|
1078
1085
|
body: "*",
|
1079
1086
|
matches: [
|
1080
|
-
["name", %r{^operations
|
1087
|
+
["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false]
|
1088
|
+
]
|
1089
|
+
)
|
1090
|
+
.with_bindings(
|
1091
|
+
uri_method: :post,
|
1092
|
+
uri_template: "/v1/{name}:cancel",
|
1093
|
+
body: "*",
|
1094
|
+
matches: [
|
1095
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
|
1096
|
+
]
|
1097
|
+
)
|
1098
|
+
.with_bindings(
|
1099
|
+
uri_method: :post,
|
1100
|
+
uri_template: "/v1/{name}:cancel",
|
1101
|
+
body: "*",
|
1102
|
+
matches: [
|
1103
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
|
1081
1104
|
]
|
1082
1105
|
)
|
1083
1106
|
transcoder.transcode request_pb
|
@@ -202,6 +202,14 @@ module Google
|
|
202
202
|
["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false]
|
203
203
|
]
|
204
204
|
)
|
205
|
+
.with_bindings(
|
206
|
+
uri_method: :post,
|
207
|
+
uri_template: "/v1/{parent}/userEvents:write",
|
208
|
+
body: "user_event",
|
209
|
+
matches: [
|
210
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
211
|
+
]
|
212
|
+
)
|
205
213
|
transcoder.transcode request_pb
|
206
214
|
end
|
207
215
|
|
@@ -17,11 +17,16 @@
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
19
|
require "google/cloud/discovery_engine/v1/completion_service"
|
20
|
+
require "google/cloud/discovery_engine/v1/control_service"
|
20
21
|
require "google/cloud/discovery_engine/v1/search_service"
|
21
22
|
require "google/cloud/discovery_engine/v1/conversational_search_service"
|
22
23
|
require "google/cloud/discovery_engine/v1/data_store_service"
|
23
24
|
require "google/cloud/discovery_engine/v1/document_service"
|
24
25
|
require "google/cloud/discovery_engine/v1/engine_service"
|
26
|
+
require "google/cloud/discovery_engine/v1/grounded_generation_service"
|
27
|
+
require "google/cloud/discovery_engine/v1/project_service"
|
28
|
+
require "google/cloud/discovery_engine/v1/rank_service"
|
29
|
+
require "google/cloud/discovery_engine/v1/recommendation_service"
|
25
30
|
require "google/cloud/discovery_engine/v1/schema_service"
|
26
31
|
require "google/cloud/discovery_engine/v1/site_search_engine_service"
|
27
32
|
require "google/cloud/discovery_engine/v1/user_event_service"
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/discoveryengine/v1/answer.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/field_behavior_pb'
|
8
|
+
require 'google/api/resource_pb'
|
9
|
+
require 'google/protobuf/struct_pb'
|
10
|
+
require 'google/protobuf/timestamp_pb'
|
11
|
+
|
12
|
+
|
13
|
+
descriptor_data = "\n,google/cloud/discoveryengine/v1/answer.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xac\x1e\n\x06\x41nswer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.discoveryengine.v1.Answer.State\x12\x13\n\x0b\x61nswer_text\x18\x03 \x01(\t\x12\x43\n\tcitations\x18\x04 \x03(\x0b\x32\x30.google.cloud.discoveryengine.v1.Answer.Citation\x12\x45\n\nreferences\x18\x05 \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1.Answer.Reference\x12\x19\n\x11related_questions\x18\x06 \x03(\t\x12;\n\x05steps\x18\x07 \x03(\x0b\x32,.google.cloud.discoveryengine.v1.Answer.Step\x12`\n\x18query_understanding_info\x18\n \x01(\x0b\x32>.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo\x12[\n\x16\x61nswer_skipped_reasons\x18\x0b \x03(\x0e\x32;.google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a{\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12G\n\x07sources\x18\x03 \x03(\x0b\x32\x36.google.cloud.discoveryengine.v1.Answer.CitationSource\x1a&\n\x0e\x43itationSource\x12\x14\n\x0creference_id\x18\x01 \x01(\t\x1a\xd9\x07\n\tReference\x12p\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32J.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfoH\x00\x12Q\n\nchunk_info\x18\x02 \x01(\x0b\x32;.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfoH\x00\x1a\xcf\x02\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12o\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32W.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo.ChunkContent\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\x38\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x1a\xa9\x03\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12g\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo.DocumentMetadata\x1a\xb5\x01\n\x10\x44ocumentMetadata\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x04 \x01(\t\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x12\n\x10_relevance_scoreB\t\n\x07\x63ontent\x1a\x8e\x08\n\x04Step\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.discoveryengine.v1.Answer.Step.State\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07thought\x18\x03 \x01(\t\x12\x44\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x33.google.cloud.discoveryengine.v1.Answer.Step.Action\x1a\x8a\x06\n\x06\x41\x63tion\x12Y\n\rsearch_action\x18\x02 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.Answer.Step.Action.SearchActionH\x00\x12T\n\x0bobservation\x18\x03 \x01(\x0b\x32?.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation\x1a\x1d\n\x0cSearchAction\x12\r\n\x05query\x18\x01 \x01(\t\x1a\xa5\x04\n\x0bObservation\x12\x64\n\x0esearch_results\x18\x02 \x03(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult\x1a\xaf\x03\n\x0cSearchResult\x12\x10\n\x08\x64ocument\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12n\n\x0csnippet_info\x18\x04 \x03(\x0b\x32X.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.SnippetInfo\x12j\n\nchunk_info\x18\x05 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo\x1a\x36\n\x0bSnippetInfo\x12\x0f\n\x07snippet\x18\x01 \x01(\t\x12\x16\n\x0esnippet_status\x18\x02 \x01(\t\x1a]\n\tChunkInfo\x12\r\n\x05\x63hunk\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_scoreB\x08\n\x06\x61\x63tion\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x1a\xff\x02\n\x16QueryUnderstandingInfo\x12y\n\x19query_classification_info\x18\x01 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo\x1a\xe9\x01\n\x17QueryClassificationInfo\x12i\n\x04type\x18\x01 \x01(\x0e\x32[.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type\x12\x10\n\x08positive\x18\x02 \x01(\x08\"Q\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\"\xc2\x01\n\x13\x41nswerSkippedReason\x12%\n!ANSWER_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12$\n NON_ANSWER_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04:\x85\x03\xea\x41\x81\x03\n%discoveryengine.googleapis.com/Answer\x12\x63projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12|projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12uprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}B\xfe\x01\n#com.google.cloud.discoveryengine.v1B\x0b\x41nswerProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3"
|
14
|
+
|
15
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
16
|
+
|
17
|
+
begin
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
19
|
+
rescue TypeError
|
20
|
+
# Compatibility code: will be removed in the next major version.
|
21
|
+
require 'google/protobuf/descriptor_pb'
|
22
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
23
|
+
parsed.clear_dependency
|
24
|
+
serialized = parsed.class.encode(parsed)
|
25
|
+
file = pool.add_serialized_file(serialized)
|
26
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
27
|
+
imports = [
|
28
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
29
|
+
["google.protobuf.Struct", "google/protobuf/struct.proto"],
|
30
|
+
]
|
31
|
+
imports.each do |type_name, expected_filename|
|
32
|
+
import_file = pool.lookup(type_name).file_descriptor
|
33
|
+
if import_file.name != expected_filename
|
34
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
38
|
+
warn "This will become an error in the next major version."
|
39
|
+
end
|
40
|
+
|
41
|
+
module Google
|
42
|
+
module Cloud
|
43
|
+
module DiscoveryEngine
|
44
|
+
module V1
|
45
|
+
Answer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer").msgclass
|
46
|
+
Answer::Citation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Citation").msgclass
|
47
|
+
Answer::CitationSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.CitationSource").msgclass
|
48
|
+
Answer::Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Reference").msgclass
|
49
|
+
Answer::Reference::UnstructuredDocumentInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo").msgclass
|
50
|
+
Answer::Reference::UnstructuredDocumentInfo::ChunkContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo.ChunkContent").msgclass
|
51
|
+
Answer::Reference::ChunkInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo").msgclass
|
52
|
+
Answer::Reference::ChunkInfo::DocumentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo.DocumentMetadata").msgclass
|
53
|
+
Answer::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Step").msgclass
|
54
|
+
Answer::Step::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Step.Action").msgclass
|
55
|
+
Answer::Step::Action::SearchAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Step.Action.SearchAction").msgclass
|
56
|
+
Answer::Step::Action::Observation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Step.Action.Observation").msgclass
|
57
|
+
Answer::Step::Action::Observation::SearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult").msgclass
|
58
|
+
Answer::Step::Action::Observation::SearchResult::SnippetInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.SnippetInfo").msgclass
|
59
|
+
Answer::Step::Action::Observation::SearchResult::ChunkInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo").msgclass
|
60
|
+
Answer::Step::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.Step.State").enummodule
|
61
|
+
Answer::QueryUnderstandingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo").msgclass
|
62
|
+
Answer::QueryUnderstandingInfo::QueryClassificationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo").msgclass
|
63
|
+
Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type").enummodule
|
64
|
+
Answer::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.State").enummodule
|
65
|
+
Answer::AnswerSkippedReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason").enummodule
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -7,7 +7,7 @@ require 'google/protobuf'
|
|
7
7
|
require 'google/api/resource_pb'
|
8
8
|
|
9
9
|
|
10
|
-
descriptor_data = "\n,google/cloud/discoveryengine/v1/common.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x19google/api/resource.proto\"x\n\x08Interval\x12\x11\n\x07minimum\x18\x01 \x01(\x01H\x00\x12\x1b\n\x11\x65xclusive_minimum\x18\x02 \x01(\x01H\x00\x12\x11\n\x07maximum\x18\x03 \x01(\x01H\x01\x12\x1b\n\x11\x65xclusive_maximum\x18\x04 \x01(\x01H\x01\x42\x05\n\x03minB\x05\n\x03max\"0\n\x0f\x43ustomAttribute\x12\x0c\n\x04text\x18\x01 \x03(\t\x12\x0f\n\x07numbers\x18\x02 \x03(\x01\"/\n\x08UserInfo\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x12\n\nuser_agent\x18\x02 \x01(\t*
|
10
|
+
descriptor_data = "\n,google/cloud/discoveryengine/v1/common.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x19google/api/resource.proto\"x\n\x08Interval\x12\x11\n\x07minimum\x18\x01 \x01(\x01H\x00\x12\x1b\n\x11\x65xclusive_minimum\x18\x02 \x01(\x01H\x00\x12\x11\n\x07maximum\x18\x03 \x01(\x01H\x01\x12\x1b\n\x11\x65xclusive_maximum\x18\x04 \x01(\x01H\x01\x42\x05\n\x03minB\x05\n\x03max\"0\n\x0f\x43ustomAttribute\x12\x0c\n\x04text\x18\x01 \x03(\t\x12\x0f\n\x07numbers\x18\x02 \x03(\x01\"/\n\x08UserInfo\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x12\n\nuser_agent\x18\x02 \x01(\t*b\n\x10IndustryVertical\x12!\n\x1dINDUSTRY_VERTICAL_UNSPECIFIED\x10\x00\x12\x0b\n\x07GENERIC\x10\x01\x12\t\n\x05MEDIA\x10\x02\x12\x13\n\x0fHEALTHCARE_FHIR\x10\x07*\xa4\x01\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cSOLUTION_TYPE_RECOMMENDATION\x10\x01\x12\x18\n\x14SOLUTION_TYPE_SEARCH\x10\x02\x12\x16\n\x12SOLUTION_TYPE_CHAT\x10\x03\x12!\n\x1dSOLUTION_TYPE_GENERATIVE_CHAT\x10\x04*h\n\rSearchUseCase\x12\x1f\n\x1bSEARCH_USE_CASE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEARCH_USE_CASE_SEARCH\x10\x01\x12\x1a\n\x16SEARCH_USE_CASE_BROWSE\x10\x02*_\n\nSearchTier\x12\x1b\n\x17SEARCH_TIER_UNSPECIFIED\x10\x00\x12\x18\n\x14SEARCH_TIER_STANDARD\x10\x01\x12\x1a\n\x16SEARCH_TIER_ENTERPRISE\x10\x02*C\n\x0bSearchAddOn\x12\x1d\n\x19SEARCH_ADD_ON_UNSPECIFIED\x10\x00\x12\x15\n\x11SEARCH_ADD_ON_LLM\x10\x01\x42\xd5\r\n#com.google.cloud.discoveryengine.v1B\x0b\x43ommonProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1\xea\x41\xe6\x01\n%discoveryengine.googleapis.com/Branch\x12Qprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}\x12jprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}\xea\x41m\n)discoveryengine.googleapis.com/Collection\x12@projects/{project}/locations/{location}/collections/{collection}\xea\x41R\n\'discoveryengine.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41\xfc\x02\n,discoveryengine.googleapis.com/ServingConfig\x12_projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}\x12xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}\x12qprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}\xea\x41}\n.discoveryengine.googleapis.com/GroundingConfig\x12Kprojects/{project}/locations/{location}/groundingConfigs/{grounding_config}\xea\x41w\n,discoveryengine.googleapis.com/RankingConfig\x12Gprojects/{project}/locations/{location}/rankingConfigs/{ranking_config}\xea\x41y\n#healthcare.googleapis.com/FhirStore\x12Rprojects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}\xea\x41\xae\x02\n$discoveryengine.googleapis.com/Chunk\x12uprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}\x12\x8e\x01projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}b\x06proto3"
|
11
11
|
|
12
12
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
13
|
|
@@ -42,6 +42,7 @@ module Google
|
|
42
42
|
UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.UserInfo").msgclass
|
43
43
|
IndustryVertical = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.IndustryVertical").enummodule
|
44
44
|
SolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SolutionType").enummodule
|
45
|
+
SearchUseCase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchUseCase").enummodule
|
45
46
|
SearchTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchTier").enummodule
|
46
47
|
SearchAddOn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchAddOn").enummodule
|
47
48
|
end
|