google-cloud-discovery_engine-v1 2.13.0 → 2.14.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/AUTHENTICATION.md +4 -4
- data/README.md +8 -10
- data/lib/google/cloud/discovery_engine/v1/acl_config_service/client.rb +591 -0
- data/lib/google/cloud/discovery_engine/v1/acl_config_service/credentials.rb +49 -0
- data/lib/google/cloud/discovery_engine/v1/acl_config_service/paths.rb +50 -0
- data/lib/google/cloud/discovery_engine/v1/acl_config_service/rest/client.rb +534 -0
- data/lib/google/cloud/discovery_engine/v1/acl_config_service/rest/service_stub.rb +204 -0
- data/lib/google/cloud/discovery_engine/v1/acl_config_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/acl_config_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service/client.rb +528 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service/credentials.rb +4 -1
- data/lib/google/cloud/discovery_engine/v1/assistant_service/paths.rb +104 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service/rest/client.rb +493 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service/rest/service_stub.rb +307 -0
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/collection_service/client.rb +732 -0
- data/lib/google/cloud/discovery_engine/v1/collection_service/credentials.rb +49 -0
- data/lib/google/cloud/discovery_engine/v1/collection_service/operations.rb +843 -0
- data/lib/google/cloud/discovery_engine/v1/collection_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/collection_service/rest/client.rb +668 -0
- data/lib/google/cloud/discovery_engine/v1/collection_service/rest/operations.rb +1168 -0
- data/lib/google/cloud/discovery_engine/v1/collection_service/rest/service_stub.rb +265 -0
- data/lib/google/cloud/discovery_engine/v1/collection_service/rest.rb +54 -0
- data/lib/google/cloud/discovery_engine/v1/collection_service.rb +57 -0
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +162 -4
- data/lib/google/cloud/discovery_engine/v1/completion_service/credentials.rb +5 -1
- data/lib/google/cloud/discovery_engine/v1/completion_service/paths.rb +62 -0
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +155 -4
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/service_stub.rb +78 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +37 -9
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +37 -9
- data/lib/google/cloud/discovery_engine/v1/data_connector_service/client.rb +779 -0
- data/lib/google/cloud/discovery_engine/v1/data_connector_service/credentials.rb +50 -0
- data/lib/google/cloud/discovery_engine/v1/data_connector_service/operations.rb +843 -0
- data/lib/google/cloud/discovery_engine/v1/data_connector_service/paths.rb +227 -0
- data/lib/google/cloud/discovery_engine/v1/data_connector_service/rest/client.rb +715 -0
- data/lib/google/cloud/discovery_engine/v1/data_connector_service/rest/operations.rb +1168 -0
- data/lib/google/cloud/discovery_engine/v1/data_connector_service/rest/service_stub.rb +274 -0
- data/lib/google/cloud/discovery_engine/v1/data_connector_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1/data_connector_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +215 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +62 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +201 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/service_stub.rb +138 -0
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +0 -1
- data/lib/google/cloud/discovery_engine/v1/document_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +0 -1
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +218 -3
- data/lib/google/cloud/discovery_engine/v1/engine_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/engine_service/paths.rb +104 -0
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +204 -3
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/service_stub.rb +123 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb +1 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb +1 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/license_config_service/client.rb +1044 -0
- data/lib/google/cloud/discovery_engine/v1/license_config_service/credentials.rb +49 -0
- data/lib/google/cloud/discovery_engine/v1/license_config_service/paths.rb +86 -0
- data/lib/google/cloud/discovery_engine/v1/license_config_service/rest/client.rb +959 -0
- data/lib/google/cloud/discovery_engine/v1/license_config_service/rest/service_stub.rb +451 -0
- data/lib/google/cloud/discovery_engine/v1/license_config_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/license_config_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/rest.rb +8 -2
- data/lib/google/cloud/discovery_engine/v1/schema_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +14 -2
- data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +14 -2
- data/lib/google/cloud/discovery_engine/v1/search_tuning_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/client.rb +408 -3
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/paths.rb +66 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/rest/client.rb +380 -3
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/rest/service_stub.rb +303 -0
- data/lib/google/cloud/discovery_engine/v1/session_service/client.rb +25 -9
- data/lib/google/cloud/discovery_engine/v1/session_service/credentials.rb +4 -1
- data/lib/google/cloud/discovery_engine/v1/session_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1/session_service/rest/client.rb +25 -9
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/credentials.rb +4 -1
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/client.rb +124 -7
- data/lib/google/cloud/discovery_engine/v1/user_license_service/credentials.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/user_license_service/rest/client.rb +117 -7
- data/lib/google/cloud/discovery_engine/v1/user_license_service/rest/operations.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/rest/service_stub.rb +61 -0
- data/lib/google/cloud/discovery_engine/v1/user_store_service/client.rb +590 -0
- data/lib/google/cloud/discovery_engine/v1/user_store_service/credentials.rb +49 -0
- data/lib/google/cloud/discovery_engine/v1/user_store_service/paths.rb +71 -0
- data/lib/google/cloud/discovery_engine/v1/user_store_service/rest/client.rb +533 -0
- data/lib/google/cloud/discovery_engine/v1/user_store_service/rest/service_stub.rb +204 -0
- data/lib/google/cloud/discovery_engine/v1/user_store_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/user_store_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1/widget_config_service/client.rb +624 -0
- data/lib/google/cloud/discovery_engine/v1/widget_config_service/credentials.rb +50 -0
- data/lib/google/cloud/discovery_engine/v1/widget_config_service/paths.rb +101 -0
- data/lib/google/cloud/discovery_engine/v1/widget_config_service/rest/client.rb +567 -0
- data/lib/google/cloud/discovery_engine/v1/widget_config_service/rest/service_stub.rb +234 -0
- data/lib/google/cloud/discovery_engine/v1/widget_config_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1/widget_config_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1.rb +9 -3
- data/lib/google/cloud/discoveryengine/v1/acl_config_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1/acl_config_service_pb.rb +28 -0
- data/lib/google/cloud/discoveryengine/v1/acl_config_service_services_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/agent_gateway_setting_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1/assist_answer_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1/assistant_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1/assistant_service_pb.rb +12 -1
- data/lib/google/cloud/discoveryengine/v1/assistant_service_services_pb.rb +12 -1
- data/lib/google/cloud/discoveryengine/v1/chunk_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/cmek_config_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/cmek_config_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/collection_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1/collection_service_pb.rb +32 -0
- data/lib/google/cloud/discoveryengine/v1/collection_service_services_pb.rb +65 -0
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +16 -1
- data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/data_connector_pb.rb +57 -0
- data/lib/google/cloud/discoveryengine/v1/data_connector_service_pb.rb +32 -0
- data/lib/google/cloud/discoveryengine/v1/data_connector_service_services_pb.rb +58 -0
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +10 -1
- data/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/data_store_service_services_pb.rb +20 -1
- data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +11 -1
- data/lib/google/cloud/discoveryengine/v1/engine_service_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/engine_service_services_pb.rb +23 -4
- data/lib/google/cloud/discoveryengine/v1/feedback_pb.rb +28 -0
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +7 -1
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/identity_mapping_store_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/license_config_pb.rb +28 -0
- data/lib/google/cloud/discoveryengine/v1/license_config_service_pb.rb +36 -0
- data/lib/google/cloud/discoveryengine/v1/license_config_service_services_pb.rb +63 -0
- data/lib/google/cloud/discoveryengine/v1/logging_pb.rb +24 -0
- data/lib/google/cloud/discoveryengine/v1/project_pb.rb +11 -1
- data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/recommendation_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/recommendation_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/schema_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/schema_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/search_tuning_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/search_tuning_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/serving_config_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/serving_config_service_pb.rb +7 -1
- data/lib/google/cloud/discoveryengine/v1/serving_config_service_services_pb.rb +21 -1
- data/lib/google/cloud/discoveryengine/v1/session_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/session_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/session_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +2 -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/lib/google/cloud/discoveryengine/v1/user_license_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/user_license_service_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/user_license_service_services_pb.rb +5 -1
- data/lib/google/cloud/discoveryengine/v1/user_store_pb.rb +24 -0
- data/lib/google/cloud/discoveryengine/v1/user_store_service_pb.rb +29 -0
- data/lib/google/cloud/discoveryengine/v1/user_store_service_services_pb.rb +47 -0
- data/lib/google/cloud/discoveryengine/v1/widget_config_pb.rb +63 -0
- data/lib/google/cloud/discoveryengine/v1/widget_config_service_pb.rb +30 -0
- data/lib/google/cloud/discoveryengine/v1/widget_config_service_services_pb.rb +48 -0
- data/proto_docs/google/cloud/discoveryengine/v1/acl_config.rb +43 -0
- data/proto_docs/google/cloud/discoveryengine/v1/acl_config_service.rb +49 -0
- data/proto_docs/google/cloud/discoveryengine/v1/agent_gateway_setting.rb +53 -0
- data/proto_docs/google/cloud/discoveryengine/v1/assist_answer.rb +164 -1
- data/proto_docs/google/cloud/discoveryengine/v1/assistant.rb +217 -0
- data/proto_docs/google/cloud/discoveryengine/v1/assistant_service.rb +179 -6
- data/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +4 -0
- data/proto_docs/google/cloud/discoveryengine/v1/cmek_config_service.rb +7 -2
- data/proto_docs/google/cloud/discoveryengine/v1/collection.rb +51 -0
- data/proto_docs/google/cloud/discoveryengine/v1/collection_service.rb +53 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +201 -0
- data/proto_docs/google/cloud/discoveryengine/v1/completion_service.rb +320 -4
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +31 -8
- data/proto_docs/google/cloud/discoveryengine/v1/data_connector.rb +875 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_connector_service.rb +142 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +179 -2
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +9 -4
- data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +7 -0
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +251 -1
- data/proto_docs/google/cloud/discoveryengine/v1/feedback.rb +165 -0
- data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +107 -0
- data/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store_service.rb +1 -0
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +6 -4
- data/proto_docs/google/cloud/discoveryengine/v1/license_config.rb +107 -0
- data/proto_docs/google/cloud/discoveryengine/v1/license_config_service.rb +220 -0
- data/proto_docs/google/cloud/discoveryengine/v1/logging.rb +40 -0
- data/proto_docs/google/cloud/discoveryengine/v1/project.rb +229 -0
- data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +18 -0
- data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +2 -1
- data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +3 -3
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +7 -1
- data/proto_docs/google/cloud/discoveryengine/v1/serving_config.rb +43 -0
- data/proto_docs/google/cloud/discoveryengine/v1/serving_config_service.rb +71 -0
- data/proto_docs/google/cloud/discoveryengine/v1/session.rb +9 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +16 -6
- data/proto_docs/google/cloud/discoveryengine/v1/user_license.rb +16 -1
- data/proto_docs/google/cloud/discoveryengine/v1/user_license_service.rb +53 -6
- data/proto_docs/google/cloud/discoveryengine/v1/user_store.rb +66 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_store_service.rb +54 -0
- data/proto_docs/google/cloud/discoveryengine/v1/widget_config.rb +1082 -0
- data/proto_docs/google/cloud/discoveryengine/v1/widget_config_service.rb +102 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
- data/proto_docs/google/iam/v1/options.rb +50 -0
- data/proto_docs/google/iam/v1/policy.rb +426 -0
- data/proto_docs/google/type/date.rb +1 -1
- data/proto_docs/google/type/datetime.rb +104 -0
- data/proto_docs/google/type/expr.rb +75 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- metadata +103 -1
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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
|
+
require "google/cloud/discoveryengine/v1/collection_service_pb"
|
|
20
|
+
|
|
21
|
+
module Google
|
|
22
|
+
module Cloud
|
|
23
|
+
module DiscoveryEngine
|
|
24
|
+
module V1
|
|
25
|
+
module CollectionService
|
|
26
|
+
module Rest
|
|
27
|
+
##
|
|
28
|
+
# REST service stub for the CollectionService service.
|
|
29
|
+
# Service stub contains baseline method implementations
|
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
|
31
|
+
#
|
|
32
|
+
class ServiceStub
|
|
33
|
+
# @private
|
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
|
35
|
+
# These require statements are intentionally placed here to initialize
|
|
36
|
+
# the REST modules only when it's required.
|
|
37
|
+
require "gapic/rest"
|
|
38
|
+
|
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
40
|
+
endpoint_template: endpoint_template,
|
|
41
|
+
universe_domain: universe_domain,
|
|
42
|
+
credentials: credentials,
|
|
43
|
+
numeric_enums: true,
|
|
44
|
+
service_name: self.class,
|
|
45
|
+
raise_faraday_errors: false,
|
|
46
|
+
logger: logger
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
##
|
|
50
|
+
# The effective universe domain
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
#
|
|
54
|
+
def universe_domain
|
|
55
|
+
@client_stub.universe_domain
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# The effective endpoint
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
#
|
|
63
|
+
def endpoint
|
|
64
|
+
@client_stub.endpoint
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
##
|
|
68
|
+
# The logger used for request/response debug logging.
|
|
69
|
+
#
|
|
70
|
+
# @return [Logger]
|
|
71
|
+
#
|
|
72
|
+
def logger stub: false
|
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
##
|
|
77
|
+
# Baseline implementation for the delete_collection REST call
|
|
78
|
+
#
|
|
79
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteCollectionRequest]
|
|
80
|
+
# A request object representing the call parameters. Required.
|
|
81
|
+
# @param options [::Gapic::CallOptions]
|
|
82
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
83
|
+
#
|
|
84
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
85
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
|
86
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
87
|
+
#
|
|
88
|
+
# @return [::Google::Longrunning::Operation]
|
|
89
|
+
# A result object deserialized from the server's reply
|
|
90
|
+
def delete_collection request_pb, options = nil
|
|
91
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
92
|
+
|
|
93
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_collection_request request_pb
|
|
94
|
+
query_string_params = if query_string_params.any?
|
|
95
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
96
|
+
else
|
|
97
|
+
{}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
response = @client_stub.make_http_request(
|
|
101
|
+
verb,
|
|
102
|
+
uri: uri,
|
|
103
|
+
body: body || "",
|
|
104
|
+
params: query_string_params,
|
|
105
|
+
method_name: "delete_collection",
|
|
106
|
+
options: options
|
|
107
|
+
)
|
|
108
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
109
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
|
110
|
+
catch :response do
|
|
111
|
+
yield result, operation if block_given?
|
|
112
|
+
result
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
##
|
|
117
|
+
# Baseline implementation for the get_iam_policy REST call
|
|
118
|
+
#
|
|
119
|
+
# @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
|
|
120
|
+
# A request object representing the call parameters. Required.
|
|
121
|
+
# @param options [::Gapic::CallOptions]
|
|
122
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
123
|
+
#
|
|
124
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
125
|
+
# @yieldparam result [::Google::Iam::V1::Policy]
|
|
126
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
127
|
+
#
|
|
128
|
+
# @return [::Google::Iam::V1::Policy]
|
|
129
|
+
# A result object deserialized from the server's reply
|
|
130
|
+
def get_iam_policy request_pb, options = nil
|
|
131
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
132
|
+
|
|
133
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
|
|
134
|
+
query_string_params = if query_string_params.any?
|
|
135
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
136
|
+
else
|
|
137
|
+
{}
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
response = @client_stub.make_http_request(
|
|
141
|
+
verb,
|
|
142
|
+
uri: uri,
|
|
143
|
+
body: body || "",
|
|
144
|
+
params: query_string_params,
|
|
145
|
+
method_name: "get_iam_policy",
|
|
146
|
+
options: options
|
|
147
|
+
)
|
|
148
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
149
|
+
result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
|
150
|
+
catch :response do
|
|
151
|
+
yield result, operation if block_given?
|
|
152
|
+
result
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
##
|
|
157
|
+
# Baseline implementation for the set_iam_policy REST call
|
|
158
|
+
#
|
|
159
|
+
# @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
|
|
160
|
+
# A request object representing the call parameters. Required.
|
|
161
|
+
# @param options [::Gapic::CallOptions]
|
|
162
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
163
|
+
#
|
|
164
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
165
|
+
# @yieldparam result [::Google::Iam::V1::Policy]
|
|
166
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
167
|
+
#
|
|
168
|
+
# @return [::Google::Iam::V1::Policy]
|
|
169
|
+
# A result object deserialized from the server's reply
|
|
170
|
+
def set_iam_policy request_pb, options = nil
|
|
171
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
172
|
+
|
|
173
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
|
|
174
|
+
query_string_params = if query_string_params.any?
|
|
175
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
176
|
+
else
|
|
177
|
+
{}
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
response = @client_stub.make_http_request(
|
|
181
|
+
verb,
|
|
182
|
+
uri: uri,
|
|
183
|
+
body: body || "",
|
|
184
|
+
params: query_string_params,
|
|
185
|
+
method_name: "set_iam_policy",
|
|
186
|
+
options: options
|
|
187
|
+
)
|
|
188
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
189
|
+
result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
|
190
|
+
catch :response do
|
|
191
|
+
yield result, operation if block_given?
|
|
192
|
+
result
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
##
|
|
197
|
+
# @private
|
|
198
|
+
#
|
|
199
|
+
# GRPC transcoding helper method for the delete_collection REST call
|
|
200
|
+
#
|
|
201
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteCollectionRequest]
|
|
202
|
+
# A request object representing the call parameters. Required.
|
|
203
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
204
|
+
# Uri, Body, Query string parameters
|
|
205
|
+
def self.transcode_delete_collection_request request_pb
|
|
206
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
207
|
+
.with_bindings(
|
|
208
|
+
uri_method: :delete,
|
|
209
|
+
uri_template: "/v1/{name}",
|
|
210
|
+
matches: [
|
|
211
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/?$}, false]
|
|
212
|
+
]
|
|
213
|
+
)
|
|
214
|
+
transcoder.transcode request_pb
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
##
|
|
218
|
+
# @private
|
|
219
|
+
#
|
|
220
|
+
# GRPC transcoding helper method for the get_iam_policy REST call
|
|
221
|
+
#
|
|
222
|
+
# @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
|
|
223
|
+
# A request object representing the call parameters. Required.
|
|
224
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
225
|
+
# Uri, Body, Query string parameters
|
|
226
|
+
def self.transcode_get_iam_policy_request request_pb
|
|
227
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
228
|
+
.with_bindings(
|
|
229
|
+
uri_method: :get,
|
|
230
|
+
uri_template: "/v1/{resource}:getIamPolicy",
|
|
231
|
+
matches: [
|
|
232
|
+
["resource", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/?$}, false]
|
|
233
|
+
]
|
|
234
|
+
)
|
|
235
|
+
transcoder.transcode request_pb
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
##
|
|
239
|
+
# @private
|
|
240
|
+
#
|
|
241
|
+
# GRPC transcoding helper method for the set_iam_policy REST call
|
|
242
|
+
#
|
|
243
|
+
# @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
|
|
244
|
+
# A request object representing the call parameters. Required.
|
|
245
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
246
|
+
# Uri, Body, Query string parameters
|
|
247
|
+
def self.transcode_set_iam_policy_request request_pb
|
|
248
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
249
|
+
.with_bindings(
|
|
250
|
+
uri_method: :post,
|
|
251
|
+
uri_template: "/v1/{resource}:setIamPolicy",
|
|
252
|
+
body: "*",
|
|
253
|
+
matches: [
|
|
254
|
+
["resource", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/?$}, false]
|
|
255
|
+
]
|
|
256
|
+
)
|
|
257
|
+
transcoder.transcode request_pb
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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
|
+
require "gapic/rest"
|
|
20
|
+
require "gapic/config"
|
|
21
|
+
require "gapic/config/method"
|
|
22
|
+
|
|
23
|
+
require "google/cloud/discovery_engine/v1/version"
|
|
24
|
+
|
|
25
|
+
require "google/cloud/discovery_engine/v1/collection_service/credentials"
|
|
26
|
+
require "google/cloud/discovery_engine/v1/collection_service/paths"
|
|
27
|
+
require "google/cloud/discovery_engine/v1/collection_service/rest/operations"
|
|
28
|
+
require "google/cloud/discovery_engine/v1/collection_service/rest/client"
|
|
29
|
+
|
|
30
|
+
module Google
|
|
31
|
+
module Cloud
|
|
32
|
+
module DiscoveryEngine
|
|
33
|
+
module V1
|
|
34
|
+
##
|
|
35
|
+
# Service for managing
|
|
36
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Collection Collection}s.
|
|
37
|
+
#
|
|
38
|
+
# To load this service and instantiate a REST client:
|
|
39
|
+
#
|
|
40
|
+
# require "google/cloud/discovery_engine/v1/collection_service/rest"
|
|
41
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1::CollectionService::Rest::Client.new
|
|
42
|
+
#
|
|
43
|
+
module CollectionService
|
|
44
|
+
# Client for the REST transport
|
|
45
|
+
module Rest
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
|
54
|
+
require "google/cloud/discovery_engine/v1/collection_service/rest/helpers" if ::File.file? helper_path
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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
|
+
require "gapic/common"
|
|
20
|
+
require "gapic/config"
|
|
21
|
+
require "gapic/config/method"
|
|
22
|
+
|
|
23
|
+
require "google/cloud/discovery_engine/v1/version"
|
|
24
|
+
|
|
25
|
+
require "google/cloud/discovery_engine/v1/collection_service/credentials"
|
|
26
|
+
require "google/cloud/discovery_engine/v1/collection_service/paths"
|
|
27
|
+
require "google/cloud/discovery_engine/v1/collection_service/operations"
|
|
28
|
+
require "google/cloud/discovery_engine/v1/collection_service/client"
|
|
29
|
+
require "google/cloud/discovery_engine/v1/collection_service/rest"
|
|
30
|
+
|
|
31
|
+
module Google
|
|
32
|
+
module Cloud
|
|
33
|
+
module DiscoveryEngine
|
|
34
|
+
module V1
|
|
35
|
+
##
|
|
36
|
+
# Service for managing
|
|
37
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Collection Collection}s.
|
|
38
|
+
#
|
|
39
|
+
# @example Load this service and instantiate a gRPC client
|
|
40
|
+
#
|
|
41
|
+
# require "google/cloud/discovery_engine/v1/collection_service"
|
|
42
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1::CollectionService::Client.new
|
|
43
|
+
#
|
|
44
|
+
# @example Load this service and instantiate a REST client
|
|
45
|
+
#
|
|
46
|
+
# require "google/cloud/discovery_engine/v1/collection_service/rest"
|
|
47
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1::CollectionService::Rest::Client.new
|
|
48
|
+
#
|
|
49
|
+
module CollectionService
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
helper_path = ::File.join __dir__, "collection_service", "helpers.rb"
|
|
57
|
+
require "google/cloud/discovery_engine/v1/collection_service/helpers" if ::File.file? helper_path
|
|
@@ -262,10 +262,10 @@ module Google
|
|
|
262
262
|
# * `document` is the default model for regular dataStores.
|
|
263
263
|
# * `search-history` is the default model for site search dataStores.
|
|
264
264
|
# @param user_pseudo_id [::String]
|
|
265
|
-
# A unique identifier for tracking visitors. For example, this
|
|
266
|
-
# implemented with an HTTP cookie, which should be able to uniquely
|
|
267
|
-
# a visitor on a single device. This unique identifier should not
|
|
268
|
-
# the visitor logs in or out of the website.
|
|
265
|
+
# Optional. A unique identifier for tracking visitors. For example, this
|
|
266
|
+
# could be implemented with an HTTP cookie, which should be able to uniquely
|
|
267
|
+
# identify a visitor on a single device. This unique identifier should not
|
|
268
|
+
# change if the visitor logs in or out of the website.
|
|
269
269
|
#
|
|
270
270
|
# This field should NOT have a fixed value such as `unknown_visitor`.
|
|
271
271
|
#
|
|
@@ -346,6 +346,157 @@ module Google
|
|
|
346
346
|
raise ::Google::Cloud::Error.from_error(e)
|
|
347
347
|
end
|
|
348
348
|
|
|
349
|
+
##
|
|
350
|
+
# Completes the user input with advanced keyword suggestions.
|
|
351
|
+
#
|
|
352
|
+
# @overload advanced_complete_query(request, options = nil)
|
|
353
|
+
# Pass arguments to `advanced_complete_query` via a request object, either of type
|
|
354
|
+
# {::Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryRequest} or an equivalent Hash.
|
|
355
|
+
#
|
|
356
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryRequest, ::Hash]
|
|
357
|
+
# A request object representing the call parameters. Required. To specify no
|
|
358
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
359
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
360
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
361
|
+
#
|
|
362
|
+
# @overload advanced_complete_query(completion_config: nil, query: nil, query_model: nil, user_pseudo_id: nil, user_info: nil, include_tail_suggestions: nil, boost_spec: nil, suggestion_types: nil, suggestion_type_specs: nil, experiment_ids: nil)
|
|
363
|
+
# Pass arguments to `advanced_complete_query` via keyword arguments. Note that at
|
|
364
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
365
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
366
|
+
#
|
|
367
|
+
# @param completion_config [::String]
|
|
368
|
+
# Required. The completion_config of the parent dataStore or engine resource
|
|
369
|
+
# name for which the completion is performed, such as
|
|
370
|
+
# `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
|
|
371
|
+
# `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
|
|
372
|
+
# @param query [::String]
|
|
373
|
+
# Required. The typeahead input used to fetch suggestions. Maximum length is
|
|
374
|
+
# 128 characters.
|
|
375
|
+
#
|
|
376
|
+
# The query can not be empty for most of the suggestion types. If it is
|
|
377
|
+
# empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
|
|
378
|
+
# suggestion_types contains only the type `RECENT_SEARCH`, the query can
|
|
379
|
+
# be an empty string. The is called "zero prefix" feature, which returns
|
|
380
|
+
# user's recently searched queries given the empty query.
|
|
381
|
+
# @param query_model [::String]
|
|
382
|
+
# Specifies the autocomplete query model, which only applies to the QUERY
|
|
383
|
+
# SuggestionType. This overrides any model specified in the Configuration >
|
|
384
|
+
# Autocomplete section of the Cloud console. Currently supported values:
|
|
385
|
+
#
|
|
386
|
+
# * `document` - Using suggestions generated from user-imported documents.
|
|
387
|
+
# * `search-history` - Using suggestions generated from the past history of
|
|
388
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search SearchService.Search}
|
|
389
|
+
# API calls. Do not use it when there is no traffic for Search API.
|
|
390
|
+
# * `user-event` - Using suggestions generated from user-imported search
|
|
391
|
+
# events.
|
|
392
|
+
# * `document-completable` - Using suggestions taken directly from
|
|
393
|
+
# user-imported document fields marked as completable.
|
|
394
|
+
#
|
|
395
|
+
# Default values:
|
|
396
|
+
#
|
|
397
|
+
# * `document` is the default model for regular dataStores.
|
|
398
|
+
# * `search-history` is the default model for site search dataStores.
|
|
399
|
+
# @param user_pseudo_id [::String]
|
|
400
|
+
# Optional. A unique identifier for tracking visitors. For example, this
|
|
401
|
+
# could be implemented with an HTTP cookie, which should be able to uniquely
|
|
402
|
+
# identify a visitor on a single device. This unique identifier should not
|
|
403
|
+
# change if the visitor logs in or out of the website.
|
|
404
|
+
#
|
|
405
|
+
# This field should NOT have a fixed value such as `unknown_visitor`.
|
|
406
|
+
#
|
|
407
|
+
# This should be the same identifier as
|
|
408
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
|
|
409
|
+
# and
|
|
410
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#user_pseudo_id SearchRequest.user_pseudo_id}.
|
|
411
|
+
#
|
|
412
|
+
# The field must be a UTF-8 encoded string with a length limit of 128
|
|
413
|
+
# @param user_info [::Google::Cloud::DiscoveryEngine::V1::UserInfo, ::Hash]
|
|
414
|
+
# Optional. Information about the end user.
|
|
415
|
+
#
|
|
416
|
+
# This should be the same identifier information as
|
|
417
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_info UserEvent.user_info}
|
|
418
|
+
# and
|
|
419
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#user_info SearchRequest.user_info}.
|
|
420
|
+
# @param include_tail_suggestions [::Boolean]
|
|
421
|
+
# Indicates if tail suggestions should be returned if there are no
|
|
422
|
+
# suggestions that match the full query. Even if set to true, if there are
|
|
423
|
+
# suggestions that match the full query, those are returned and no
|
|
424
|
+
# tail suggestions are returned.
|
|
425
|
+
# @param boost_spec [::Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryRequest::BoostSpec, ::Hash]
|
|
426
|
+
# Optional. Specification to boost suggestions matching the condition.
|
|
427
|
+
# @param suggestion_types [::Array<::Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryRequest::SuggestionType>]
|
|
428
|
+
# Optional. Suggestion types to return. If empty or unspecified, query
|
|
429
|
+
# suggestions are returned. Only one suggestion type is supported at the
|
|
430
|
+
# moment.
|
|
431
|
+
# @param suggestion_type_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryRequest::SuggestionTypeSpec, ::Hash>]
|
|
432
|
+
# Optional. Specification of each suggestion type.
|
|
433
|
+
# @param experiment_ids [::Array<::String>]
|
|
434
|
+
# Optional. Experiment ids for this request.
|
|
435
|
+
#
|
|
436
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
437
|
+
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryResponse]
|
|
438
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
439
|
+
#
|
|
440
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryResponse]
|
|
441
|
+
#
|
|
442
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
443
|
+
#
|
|
444
|
+
# @example Basic example
|
|
445
|
+
# require "google/cloud/discovery_engine/v1"
|
|
446
|
+
#
|
|
447
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
448
|
+
# client = Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.new
|
|
449
|
+
#
|
|
450
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
451
|
+
# request = Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryRequest.new
|
|
452
|
+
#
|
|
453
|
+
# # Call the advanced_complete_query method.
|
|
454
|
+
# result = client.advanced_complete_query request
|
|
455
|
+
#
|
|
456
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryResponse.
|
|
457
|
+
# p result
|
|
458
|
+
#
|
|
459
|
+
def advanced_complete_query request, options = nil
|
|
460
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
461
|
+
|
|
462
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::AdvancedCompleteQueryRequest
|
|
463
|
+
|
|
464
|
+
# Converts hash and nil to an options object
|
|
465
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
466
|
+
|
|
467
|
+
# Customize the options with defaults
|
|
468
|
+
metadata = @config.rpcs.advanced_complete_query.metadata.to_h
|
|
469
|
+
|
|
470
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
471
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
472
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
473
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
|
474
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
475
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
476
|
+
|
|
477
|
+
header_params = {}
|
|
478
|
+
if request.completion_config
|
|
479
|
+
header_params["completion_config"] = request.completion_config
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
483
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
484
|
+
|
|
485
|
+
options.apply_defaults timeout: @config.rpcs.advanced_complete_query.timeout,
|
|
486
|
+
metadata: metadata,
|
|
487
|
+
retry_policy: @config.rpcs.advanced_complete_query.retry_policy
|
|
488
|
+
|
|
489
|
+
options.apply_defaults timeout: @config.timeout,
|
|
490
|
+
metadata: @config.metadata,
|
|
491
|
+
retry_policy: @config.retry_policy
|
|
492
|
+
|
|
493
|
+
@completion_service_stub.call_rpc :advanced_complete_query, request, options: options do |response, operation|
|
|
494
|
+
yield response, operation if block_given?
|
|
495
|
+
end
|
|
496
|
+
rescue ::GRPC::BadStatus => e
|
|
497
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
498
|
+
end
|
|
499
|
+
|
|
349
500
|
##
|
|
350
501
|
# Imports all
|
|
351
502
|
# {::Google::Cloud::DiscoveryEngine::V1::SuggestionDenyListEntry SuggestionDenyListEntry}
|
|
@@ -957,6 +1108,11 @@ module Google
|
|
|
957
1108
|
#
|
|
958
1109
|
attr_reader :complete_query
|
|
959
1110
|
##
|
|
1111
|
+
# RPC-specific configuration for `advanced_complete_query`
|
|
1112
|
+
# @return [::Gapic::Config::Method]
|
|
1113
|
+
#
|
|
1114
|
+
attr_reader :advanced_complete_query
|
|
1115
|
+
##
|
|
960
1116
|
# RPC-specific configuration for `import_suggestion_deny_list_entries`
|
|
961
1117
|
# @return [::Gapic::Config::Method]
|
|
962
1118
|
#
|
|
@@ -981,6 +1137,8 @@ module Google
|
|
|
981
1137
|
def initialize parent_rpcs = nil
|
|
982
1138
|
complete_query_config = parent_rpcs.complete_query if parent_rpcs.respond_to? :complete_query
|
|
983
1139
|
@complete_query = ::Gapic::Config::Method.new complete_query_config
|
|
1140
|
+
advanced_complete_query_config = parent_rpcs.advanced_complete_query if parent_rpcs.respond_to? :advanced_complete_query
|
|
1141
|
+
@advanced_complete_query = ::Gapic::Config::Method.new advanced_complete_query_config
|
|
984
1142
|
import_suggestion_deny_list_entries_config = parent_rpcs.import_suggestion_deny_list_entries if parent_rpcs.respond_to? :import_suggestion_deny_list_entries
|
|
985
1143
|
@import_suggestion_deny_list_entries = ::Gapic::Config::Method.new import_suggestion_deny_list_entries_config
|
|
986
1144
|
purge_suggestion_deny_list_entries_config = parent_rpcs.purge_suggestion_deny_list_entries if parent_rpcs.respond_to? :purge_suggestion_deny_list_entries
|
|
@@ -26,7 +26,11 @@ module Google
|
|
|
26
26
|
# Credentials for the CompletionService API.
|
|
27
27
|
class Credentials < ::Google::Auth::Credentials
|
|
28
28
|
self.scope = [
|
|
29
|
-
"https://www.googleapis.com/auth/cloud-platform"
|
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
|
30
|
+
"https://www.googleapis.com/auth/cloud_search.query",
|
|
31
|
+
"https://www.googleapis.com/auth/discoveryengine.assist.readwrite",
|
|
32
|
+
"https://www.googleapis.com/auth/discoveryengine.readwrite",
|
|
33
|
+
"https://www.googleapis.com/auth/discoveryengine.serving.readwrite"
|
|
30
34
|
]
|
|
31
35
|
self.env_vars = [
|
|
32
36
|
"GOOGLE_CLOUD_CREDENTIALS",
|
|
@@ -24,6 +24,68 @@ module Google
|
|
|
24
24
|
module CompletionService
|
|
25
25
|
# Path helper methods for the CompletionService API.
|
|
26
26
|
module Paths
|
|
27
|
+
##
|
|
28
|
+
# Create a fully-qualified CompletionConfig resource string.
|
|
29
|
+
#
|
|
30
|
+
# @overload completion_config_path(project:, location:, data_store:)
|
|
31
|
+
# The resource will be in the following format:
|
|
32
|
+
#
|
|
33
|
+
# `projects/{project}/locations/{location}/dataStores/{data_store}/completionConfig`
|
|
34
|
+
#
|
|
35
|
+
# @param project [String]
|
|
36
|
+
# @param location [String]
|
|
37
|
+
# @param data_store [String]
|
|
38
|
+
#
|
|
39
|
+
# @overload completion_config_path(project:, location:, collection:, data_store:)
|
|
40
|
+
# The resource will be in the following format:
|
|
41
|
+
#
|
|
42
|
+
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/completionConfig`
|
|
43
|
+
#
|
|
44
|
+
# @param project [String]
|
|
45
|
+
# @param location [String]
|
|
46
|
+
# @param collection [String]
|
|
47
|
+
# @param data_store [String]
|
|
48
|
+
#
|
|
49
|
+
# @overload completion_config_path(project:, location:, collection:, engine:)
|
|
50
|
+
# The resource will be in the following format:
|
|
51
|
+
#
|
|
52
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/completionConfig`
|
|
53
|
+
#
|
|
54
|
+
# @param project [String]
|
|
55
|
+
# @param location [String]
|
|
56
|
+
# @param collection [String]
|
|
57
|
+
# @param engine [String]
|
|
58
|
+
#
|
|
59
|
+
# @return [::String]
|
|
60
|
+
def completion_config_path **args
|
|
61
|
+
resources = {
|
|
62
|
+
"data_store:location:project" => (proc do |project:, location:, data_store:|
|
|
63
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
64
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
65
|
+
|
|
66
|
+
"projects/#{project}/locations/#{location}/dataStores/#{data_store}/completionConfig"
|
|
67
|
+
end),
|
|
68
|
+
"collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:|
|
|
69
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
70
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
71
|
+
raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
|
|
72
|
+
|
|
73
|
+
"projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/completionConfig"
|
|
74
|
+
end),
|
|
75
|
+
"collection:engine:location:project" => (proc do |project:, location:, collection:, engine:|
|
|
76
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
77
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
78
|
+
raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
|
|
79
|
+
|
|
80
|
+
"projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/completionConfig"
|
|
81
|
+
end)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
resource = resources[args.keys.sort.join(":")]
|
|
85
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
86
|
+
resource.call(**args)
|
|
87
|
+
end
|
|
88
|
+
|
|
27
89
|
##
|
|
28
90
|
# Create a fully-qualified DataStore resource string.
|
|
29
91
|
#
|