google-cloud-discovery_engine-v1beta 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +925 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +176 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +763 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +450 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +6 -5
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +6 -5
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1beta/rest.rb +2 -1
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +14 -12
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +14 -12
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +5 -5
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +5 -5
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1beta.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +53 -0
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +61 -0
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +67 -0
- data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +1 -2
- data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +15 -2
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +134 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +175 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +6 -5
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +2 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +22 -18
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +194 -44
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +37 -29
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +15 -2
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/discoveryengine/v1beta/conversational_search_service.proto for package 'Google.Cloud.DiscoveryEngine.V1beta'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2022 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/discoveryengine/v1beta/conversational_search_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module DiscoveryEngine
|
25
|
+
module V1beta
|
26
|
+
module ConversationalSearchService
|
27
|
+
# Service for conversational search.
|
28
|
+
class Service
|
29
|
+
|
30
|
+
include ::GRPC::GenericService
|
31
|
+
|
32
|
+
self.marshal_class_method = :encode
|
33
|
+
self.unmarshal_class_method = :decode
|
34
|
+
self.service_name = 'google.cloud.discoveryengine.v1beta.ConversationalSearchService'
|
35
|
+
|
36
|
+
# Converses a conversation.
|
37
|
+
rpc :ConverseConversation, ::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationRequest, ::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse
|
38
|
+
# Creates a Conversation.
|
39
|
+
#
|
40
|
+
# If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to
|
41
|
+
# create already exists, an ALREADY_EXISTS error is returned.
|
42
|
+
rpc :CreateConversation, ::Google::Cloud::DiscoveryEngine::V1beta::CreateConversationRequest, ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
|
43
|
+
# Deletes a Conversation.
|
44
|
+
#
|
45
|
+
# If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to
|
46
|
+
# delete does not exist, a NOT_FOUND error is returned.
|
47
|
+
rpc :DeleteConversation, ::Google::Cloud::DiscoveryEngine::V1beta::DeleteConversationRequest, ::Google::Protobuf::Empty
|
48
|
+
# Updates a Conversation.
|
49
|
+
#
|
50
|
+
# [Conversation][google.cloud.discoveryengine.v1beta.Conversation] action
|
51
|
+
# type cannot be changed. If the
|
52
|
+
# [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update
|
53
|
+
# does not exist, a NOT_FOUND error is returned.
|
54
|
+
rpc :UpdateConversation, ::Google::Cloud::DiscoveryEngine::V1beta::UpdateConversationRequest, ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
|
55
|
+
# Gets a Conversation.
|
56
|
+
rpc :GetConversation, ::Google::Cloud::DiscoveryEngine::V1beta::GetConversationRequest, ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
|
57
|
+
# Lists all Conversations by their parent
|
58
|
+
# [DataStore][google.cloud.discoveryengine.v1beta.DataStore].
|
59
|
+
rpc :ListConversations, ::Google::Cloud::DiscoveryEngine::V1beta::ListConversationsRequest, ::Google::Cloud::DiscoveryEngine::V1beta::ListConversationsResponse
|
60
|
+
end
|
61
|
+
|
62
|
+
Stub = Service.rpc_stub_class
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -13,7 +13,7 @@ require 'google/rpc/status_pb'
|
|
13
13
|
require 'google/type/date_pb'
|
14
14
|
|
15
15
|
|
16
|
-
descriptor_data = "\n7google/cloud/discoveryengine/v1beta/import_config.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/discoveryengine/v1beta/document.proto\x1a\x34google/cloud/discoveryengine/v1beta/user_event.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\"9\n\tGcsSource\x12\x17\n\ninput_uris\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x61ta_schema\x18\x02 \x01(\t\"\xbc\x01\n\x0e\x42igQuerySource\x12+\n\x0epartition_date\x18\x05 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x17\n\ndataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08table_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0fgcs_staging_dir\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x61ta_schema\x18\x06 \x01(\tB\x0b\n\tpartition\"8\n\x11ImportErrorConfig\x12\x14\n\ngcs_prefix\x18\x01 \x01(\tH\x00\x42\r\n\x0b\x64\x65stination\"\
|
16
|
+
descriptor_data = "\n7google/cloud/discoveryengine/v1beta/import_config.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/discoveryengine/v1beta/document.proto\x1a\x34google/cloud/discoveryengine/v1beta/user_event.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\"9\n\tGcsSource\x12\x17\n\ninput_uris\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x61ta_schema\x18\x02 \x01(\t\"\xbc\x01\n\x0e\x42igQuerySource\x12+\n\x0epartition_date\x18\x05 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x17\n\ndataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08table_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0fgcs_staging_dir\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x61ta_schema\x18\x06 \x01(\tB\x0b\n\tpartition\"8\n\x11ImportErrorConfig\x12\x14\n\ngcs_prefix\x18\x01 \x01(\tH\x00\x42\r\n\x0b\x64\x65stination\"\x87\x04\n\x17ImportUserEventsRequest\x12\x62\n\rinline_source\x18\x02 \x01(\x0b\x32I.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSourceH\x00\x12\x44\n\ngcs_source\x18\x03 \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.GcsSourceH\x00\x12N\n\x0f\x62igquery_source\x18\x04 \x01(\x0b\x32\x33.google.cloud.discoveryengine.v1beta.BigQuerySourceH\x00\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12L\n\x0c\x65rror_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.discoveryengine.v1beta.ImportErrorConfig\x1aX\n\x0cInlineSource\x12H\n\x0buser_events\x18\x01 \x03(\x0b\x32..google.cloud.discoveryengine.v1beta.UserEventB\x03\xe0\x41\x02\x42\x08\n\x06source\"\xcf\x01\n\x18ImportUserEventsResponse\x12)\n\rerror_samples\x18\x01 \x03(\x0b\x32\x12.google.rpc.Status\x12L\n\x0c\x65rror_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.discoveryengine.v1beta.ImportErrorConfig\x12\x1b\n\x13joined_events_count\x18\x03 \x01(\x03\x12\x1d\n\x15unjoined_events_count\x18\x04 \x01(\x03\"\xaa\x01\n\x18ImportUserEventsMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rsuccess_count\x18\x03 \x01(\x03\x12\x15\n\rfailure_count\x18\x04 \x01(\x03\"\xa9\x01\n\x17ImportDocumentsMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rsuccess_count\x18\x03 \x01(\x03\x12\x15\n\rfailure_count\x18\x04 \x01(\x03\"\xef\x05\n\x16ImportDocumentsRequest\x12\x61\n\rinline_source\x18\x02 \x01(\x0b\x32H.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSourceH\x00\x12\x44\n\ngcs_source\x18\x03 \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.GcsSourceH\x00\x12N\n\x0f\x62igquery_source\x18\x04 \x01(\x0b\x32\x33.google.cloud.discoveryengine.v1beta.BigQuerySourceH\x00\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%discoveryengine.googleapis.com/Branch\x12L\n\x0c\x65rror_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.discoveryengine.v1beta.ImportErrorConfig\x12k\n\x13reconciliation_mode\x18\x06 \x01(\x0e\x32N.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode\x12\x19\n\x11\x61uto_generate_ids\x18\x08 \x01(\x08\x12\x10\n\x08id_field\x18\t \x01(\t\x1aU\n\x0cInlineSource\x12\x45\n\tdocuments\x18\x01 \x03(\x0b\x32-.google.cloud.discoveryengine.v1beta.DocumentB\x03\xe0\x41\x02\"T\n\x12ReconciliationMode\x12#\n\x1fRECONCILIATION_MODE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINCREMENTAL\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\x08\n\x06source\"\x92\x01\n\x17ImportDocumentsResponse\x12)\n\rerror_samples\x18\x01 \x03(\x0b\x32\x12.google.rpc.Status\x12L\n\x0c\x65rror_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.discoveryengine.v1beta.ImportErrorConfigB\x98\x02\n\'com.google.cloud.discoveryengine.v1betaB\x11ImportConfigProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3"
|
17
17
|
|
18
18
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
19
|
|
@@ -13,7 +13,7 @@ require 'google/cloud/discoveryengine/v1beta/document_pb'
|
|
13
13
|
require 'google/protobuf/struct_pb'
|
14
14
|
|
15
15
|
|
16
|
-
descriptor_data = "\n8google/cloud/discoveryengine/v1beta/search_service.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/discoveryengine/v1beta/common.proto\x1a\x32google/cloud/discoveryengine/v1beta/document.proto\x1a\x1cgoogle/protobuf/struct.proto\"\
|
16
|
+
descriptor_data = "\n8google/cloud/discoveryengine/v1beta/search_service.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/discoveryengine/v1beta/common.proto\x1a\x32google/cloud/discoveryengine/v1beta/document.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xcf\x16\n\rSearchRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12:\n\x06\x62ranch\x18\x02 \x01(\tB*\xfa\x41\'\n%discoveryengine.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12R\n\x0bimage_query\x18\x13 \x01(\x0b\x32=.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12\x0e\n\x06\x66ilter\x18\x07 \x01(\t\x12\x10\n\x08order_by\x18\x08 \x01(\t\x12@\n\tuser_info\x18\x15 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.UserInfo\x12Q\n\x0b\x66\x61\x63\x65t_specs\x18\t \x03(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec\x12P\n\nboost_spec\x18\n \x01(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec\x12N\n\x06params\x18\x0b \x03(\x0b\x32>.google.cloud.discoveryengine.v1beta.SearchRequest.ParamsEntry\x12\x63\n\x14query_expansion_spec\x18\r \x01(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec\x12\x65\n\x15spell_correction_spec\x18\x0e \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec\x12\x16\n\x0euser_pseudo_id\x18\x0f \x01(\t\x12\x61\n\x13\x63ontent_search_spec\x18\x18 \x01(\x0b\x32\x44.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec\x12\x13\n\x0bsafe_search\x18\x14 \x01(\x08\x12W\n\x0buser_labels\x18\x16 \x03(\x0b\x32\x42.google.cloud.discoveryengine.v1beta.SearchRequest.UserLabelsEntry\x1a,\n\nImageQuery\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\tH\x00\x42\x07\n\x05image\x1a\x84\x03\n\tFacetSpec\x12]\n\tfacet_key\x18\x01 \x01(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xc9\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12@\n\tintervals\x18\x02 \x03(\x0b\x32-.google.cloud.discoveryengine.v1beta.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x04 \x03(\t\x12\x10\n\x08\x63ontains\x18\x05 \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\x06 \x01(\x08\x12\x10\n\x08order_by\x18\x07 \x01(\t\x1a\xb3\x01\n\tBoostSpec\x12n\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32O.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec\x1a\x36\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x1a\xb8\x01\n\x12QueryExpansionSpec\x12\x62\n\tcondition\x18\x01 \x01(\x0e\x32O.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xad\x01\n\x13SpellCorrectionSpec\x12Y\n\x04mode\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xbb\x05\n\x11\x43ontentSearchSpec\x12\x66\n\x0csnippet_spec\x18\x01 \x01(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec\x12\x66\n\x0csummary_spec\x18\x02 \x01(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec\x12{\n\x17\x65xtractive_content_spec\x18\x03 \x01(\x0b\x32Z.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec\x1a`\n\x0bSnippetSpec\x12\x1d\n\x11max_snippet_count\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x1a\n\x0ereference_only\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0ereturn_snippet\x18\x03 \x01(\x08\x1a\x92\x01\n\x0bSummarySpec\x12\x1c\n\x14summary_result_count\x18\x01 \x01(\x05\x12\x19\n\x11include_citations\x18\x02 \x01(\x08\x12 \n\x18ignore_adversarial_query\x18\x03 \x01(\x08\x12(\n ignore_non_summary_seeking_query\x18\x04 \x01(\x08\x1a\x62\n\x15\x45xtractiveContentSpec\x12#\n\x1bmax_extractive_answer_count\x18\x01 \x01(\x05\x12$\n\x1cmax_extractive_segment_count\x18\x02 \x01(\x05\x1a\x45\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x0b\n\x0eSearchResponse\x12Q\n\x07results\x18\x01 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\x12I\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x39.google.cloud.discoveryengine.v1beta.SearchResponse.Facet\x12\x64\n\x14guided_search_result\x18\x08 \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x19\n\x11\x61ttribution_token\x18\x04 \x01(\t\x12\x14\n\x0credirect_uri\x18\x0c \x01(\t\x12\x17\n\x0fnext_page_token\x18\x05 \x01(\t\x12\x17\n\x0f\x63orrected_query\x18\x07 \x01(\t\x12L\n\x07summary\x18\t \x01(\x0b\x32;.google.cloud.discoveryengine.v1beta.SearchResponse.Summary\x12\x18\n\x10\x61pplied_controls\x18\n \x03(\t\x1a[\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12?\n\x08\x64ocument\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.Document\x1a\x81\x02\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12T\n\x06values\x18\x02 \x03(\x0b\x32\x44.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1a~\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12\x41\n\x08interval\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x42\r\n\x0b\x66\x61\x63\x65t_value\x1a\xf3\x01\n\x12GuidedSearchResult\x12y\n\x15refinement_attributes\x18\x01 \x03(\x0b\x32Z.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute\x12\x1b\n\x13\x66ollow_up_questions\x18\x02 \x03(\t\x1a\x45\n\x13RefinementAttribute\x12\x15\n\rattribute_key\x18\x01 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x02 \x01(\t\x1a\xba\x02\n\x07Summary\x12\x14\n\x0csummary_text\x18\x01 \x01(\t\x12q\n\x17summary_skipped_reasons\x18\x02 \x03(\x0e\x32P.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason\"\xa5\x01\n\x14SummarySkippedReason\x12&\n\"SUMMARY_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12%\n!NON_SUMMARY_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x32\xa3\x03\n\rSearchService\x12\xbd\x02\n\x06Search\x12\x32.google.cloud.discoveryengine.v1beta.SearchRequest\x1a\x33.google.cloud.discoveryengine.v1beta.SearchResponse\"\xc9\x01\x82\xd3\xe4\x93\x02\xc2\x01\"T/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search:\x01*Zg\"b/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x02\n\'com.google.cloud.discoveryengine.v1betaB\x12SearchServiceProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3"
|
17
17
|
|
18
18
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
19
|
|
@@ -47,6 +47,7 @@ module Google
|
|
47
47
|
module DiscoveryEngine
|
48
48
|
module V1beta
|
49
49
|
SearchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest").msgclass
|
50
|
+
SearchRequest::ImageQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery").msgclass
|
50
51
|
SearchRequest::FacetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec").msgclass
|
51
52
|
SearchRequest::FacetSpec::FacetKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey").msgclass
|
52
53
|
SearchRequest::BoostSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec").msgclass
|
@@ -58,6 +59,7 @@ module Google
|
|
58
59
|
SearchRequest::ContentSearchSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec").msgclass
|
59
60
|
SearchRequest::ContentSearchSpec::SnippetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec").msgclass
|
60
61
|
SearchRequest::ContentSearchSpec::SummarySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec").msgclass
|
62
|
+
SearchRequest::ContentSearchSpec::ExtractiveContentSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec").msgclass
|
61
63
|
SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse").msgclass
|
62
64
|
SearchResponse::SearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult").msgclass
|
63
65
|
SearchResponse::Facet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.Facet").msgclass
|
@@ -65,6 +67,7 @@ module Google
|
|
65
67
|
SearchResponse::GuidedSearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult").msgclass
|
66
68
|
SearchResponse::GuidedSearchResult::RefinementAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute").msgclass
|
67
69
|
SearchResponse::Summary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.Summary").msgclass
|
70
|
+
SearchResponse::Summary::SummarySkippedReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason").enummodule
|
68
71
|
end
|
69
72
|
end
|
70
73
|
end
|
@@ -11,7 +11,7 @@ require 'google/protobuf/duration_pb'
|
|
11
11
|
require 'google/protobuf/timestamp_pb'
|
12
12
|
|
13
13
|
|
14
|
-
descriptor_data = "\n4google/cloud/discoveryengine/v1beta/user_event.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/discoveryengine/v1beta/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe3\x07\n\tUserEvent\x12\x17\n\nevent_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0euser_pseudo_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12.\n\nevent_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\tuser_info\x18\x04 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.UserInfo\x12\x1b\n\x13\x64irect_user_request\x18\x05 \x01(\x08\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12@\n\tpage_info\x18\x07 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.PageInfo\x12\x19\n\x11\x61ttribution_token\x18\x08 \x01(\t\x12\x0e\n\x06\x66ilter\x18\t \x01(\t\x12\x44\n\tdocuments\x18\n \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.DocumentInfo\x12=\n\x05panel\x18\x0b \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.PanelInfo\x12\x44\n\x0bsearch_info\x18\x0c \x01(\x0b\x32/.google.cloud.discoveryengine.v1beta.SearchInfo\x12L\n\x0f\x63ompletion_info\x18\r \x01(\x0b\x32\x33.google.cloud.discoveryengine.v1beta.CompletionInfo\x12N\n\x10transaction_info\x18\x0e \x01(\x0b\x32\x34.google.cloud.discoveryengine.v1beta.TransactionInfo\x12\x0f\n\x07tag_ids\x18\x0f \x03(\t\x12\x15\n\rpromotion_ids\x18\x10 \x03(\t\x12R\n\nattributes\x18\x11 \x03(\x0b\x32>.google.cloud.discoveryengine.v1beta.UserEvent.AttributesEntry\x12\x42\n\nmedia_info\x18\x12 \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.MediaInfo\x1ag\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.discoveryengine.v1beta.CustomAttribute:\x02\x38\x01\"Y\n\x08PageInfo\x12\x13\n\x0bpageview_id\x18\x01 \x01(\t\x12\x15\n\rpage_category\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x14\n\x0creferrer_uri\x18\x04 \x01(\t\"T\n\nSearchInfo\x12\x14\n\x0csearch_query\x18\x01 \x01(\t\x12\x10\n\x08order_by\x18\x02 \x01(\t\x12\x13\n\x06offset\x18\x03 \x01(\x05H\x00\x88\x01\x01\x42\t\n\x07_offset\"H\n\x0e\x43ompletionInfo\x12\x1b\n\x13selected_suggestion\x18\x01 \x01(\t\x12\x19\n\x11selected_position\x18\x02 \x01(\x05\"\xc9\x01\n\x0fTransactionInfo\x12\x17\n\x05value\x18\x01 \x01(\x02\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x15\n\x08\x63urrency\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0etransaction_id\x18\x03 \x01(\t\x12\x10\n\x03tax\x18\x04 \x01(\x02H\x01\x88\x01\x01\x12\x11\n\x04\x63ost\x18\x05 \x01(\x02H\x02\x88\x01\x01\x12\x1b\n\x0e\x64iscount_value\x18\x06 \x01(\x02H\x03\x88\x01\x01\x42\x08\n\x06_valueB\x06\n\x04_taxB\x07\n\x05_costB\x11\n\x0f_discount_value\"\
|
14
|
+
descriptor_data = "\n4google/cloud/discoveryengine/v1beta/user_event.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/discoveryengine/v1beta/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe3\x07\n\tUserEvent\x12\x17\n\nevent_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0euser_pseudo_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12.\n\nevent_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\tuser_info\x18\x04 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.UserInfo\x12\x1b\n\x13\x64irect_user_request\x18\x05 \x01(\x08\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12@\n\tpage_info\x18\x07 \x01(\x0b\x32-.google.cloud.discoveryengine.v1beta.PageInfo\x12\x19\n\x11\x61ttribution_token\x18\x08 \x01(\t\x12\x0e\n\x06\x66ilter\x18\t \x01(\t\x12\x44\n\tdocuments\x18\n \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.DocumentInfo\x12=\n\x05panel\x18\x0b \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.PanelInfo\x12\x44\n\x0bsearch_info\x18\x0c \x01(\x0b\x32/.google.cloud.discoveryengine.v1beta.SearchInfo\x12L\n\x0f\x63ompletion_info\x18\r \x01(\x0b\x32\x33.google.cloud.discoveryengine.v1beta.CompletionInfo\x12N\n\x10transaction_info\x18\x0e \x01(\x0b\x32\x34.google.cloud.discoveryengine.v1beta.TransactionInfo\x12\x0f\n\x07tag_ids\x18\x0f \x03(\t\x12\x15\n\rpromotion_ids\x18\x10 \x03(\t\x12R\n\nattributes\x18\x11 \x03(\x0b\x32>.google.cloud.discoveryengine.v1beta.UserEvent.AttributesEntry\x12\x42\n\nmedia_info\x18\x12 \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.MediaInfo\x1ag\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.discoveryengine.v1beta.CustomAttribute:\x02\x38\x01\"Y\n\x08PageInfo\x12\x13\n\x0bpageview_id\x18\x01 \x01(\t\x12\x15\n\rpage_category\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x14\n\x0creferrer_uri\x18\x04 \x01(\t\"T\n\nSearchInfo\x12\x14\n\x0csearch_query\x18\x01 \x01(\t\x12\x10\n\x08order_by\x18\x02 \x01(\t\x12\x13\n\x06offset\x18\x03 \x01(\x05H\x00\x88\x01\x01\x42\t\n\x07_offset\"H\n\x0e\x43ompletionInfo\x12\x1b\n\x13selected_suggestion\x18\x01 \x01(\t\x12\x19\n\x11selected_position\x18\x02 \x01(\x05\"\xc9\x01\n\x0fTransactionInfo\x12\x17\n\x05value\x18\x01 \x01(\x02\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x15\n\x08\x63urrency\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0etransaction_id\x18\x03 \x01(\t\x12\x10\n\x03tax\x18\x04 \x01(\x02H\x01\x88\x01\x01\x12\x11\n\x04\x63ost\x18\x05 \x01(\x02H\x02\x88\x01\x01\x12\x1b\n\x0e\x64iscount_value\x18\x06 \x01(\x02H\x03\x88\x01\x01\x42\x08\n\x06_valueB\x06\n\x04_taxB\x07\n\x05_costB\x11\n\x0f_discount_value\"\xac\x01\n\x0c\x44ocumentInfo\x12\x0c\n\x02id\x18\x01 \x01(\tH\x00\x12<\n\x04name\x18\x02 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/DocumentH\x00\x12\x15\n\x08quantity\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x15\n\rpromotion_ids\x18\x04 \x03(\tB\x15\n\x13\x64ocument_descriptorB\x0b\n\t_quantity\"\x94\x01\n\tPanelInfo\x12\x15\n\x08panel_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x1b\n\x0epanel_position\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x19\n\x0ctotal_panels\x18\x05 \x01(\x05H\x01\x88\x01\x01\x42\x11\n\x0f_panel_positionB\x0f\n\r_total_panels\"\x8d\x01\n\tMediaInfo\x12:\n\x17media_progress_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12&\n\x19media_progress_percentage\x18\x02 \x01(\x02H\x00\x88\x01\x01\x42\x1c\n\x1a_media_progress_percentageB\x95\x02\n\'com.google.cloud.discoveryengine.v1betaB\x0eUserEventProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3"
|
15
15
|
|
16
16
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
17
|
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# Writes a single user event.
|
37
37
|
rpc :WriteUserEvent, ::Google::Cloud::DiscoveryEngine::V1beta::WriteUserEventRequest, ::Google::Cloud::DiscoveryEngine::V1beta::UserEvent
|
38
38
|
# Writes a single user event from the browser. This uses a GET request to
|
39
|
-
# due to browser restriction of POST-ing to a
|
39
|
+
# due to browser restriction of POST-ing to a third-party domain.
|
40
40
|
#
|
41
41
|
# This method is used only by the Discovery Engine API JavaScript pixel and
|
42
42
|
# Google Tag Manager. Users should not call this method directly.
|
@@ -85,8 +85,7 @@ module Google
|
|
85
85
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
86
86
|
# @!attribute [rw] user_agent
|
87
87
|
# @return [::String]
|
88
|
-
# User agent as included in the HTTP header.
|
89
|
-
# [SearchResponse.sponsored_results][].
|
88
|
+
# User agent as included in the HTTP header.
|
90
89
|
#
|
91
90
|
# The field must be a UTF-8 encoded string with a length limit of 1,000
|
92
91
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
@@ -44,13 +44,14 @@ module Google
|
|
44
44
|
# API calls. Do not use it when there is no traffic for Search API.
|
45
45
|
# * `user-event` - Using suggestions generated from user-imported search
|
46
46
|
# events.
|
47
|
+
# * `document-completable` - Using suggestions taken directly from
|
48
|
+
# user-imported document fields marked as completable.
|
47
49
|
#
|
48
50
|
# Default values:
|
49
51
|
#
|
50
52
|
# * `document` is the default model for regular dataStores.
|
51
53
|
# * `search-history` is the default model for
|
52
|
-
# [IndustryVertical.SITE_SEARCH][
|
53
|
-
# dataStores.
|
54
|
+
# [IndustryVertical.SITE_SEARCH][] dataStores.
|
54
55
|
# @!attribute [rw] user_pseudo_id
|
55
56
|
# @return [::String]
|
56
57
|
# A unique identifier for tracking visitors. For example, this could be
|
@@ -67,6 +68,12 @@ module Google
|
|
67
68
|
#
|
68
69
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
69
70
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
71
|
+
# @!attribute [rw] include_tail_suggestions
|
72
|
+
# @return [::Boolean]
|
73
|
+
# Indicates if tail suggestions should be returned if there are no
|
74
|
+
# suggestions that match the full query. Even if set to true, if there are
|
75
|
+
# suggestions that match the full query, those are returned and no
|
76
|
+
# tail suggestions are returned.
|
70
77
|
class CompleteQueryRequest
|
71
78
|
include ::Google::Protobuf::MessageExts
|
72
79
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -79,6 +86,12 @@ module Google
|
|
79
86
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::CompleteQueryResponse::QuerySuggestion>]
|
80
87
|
# Results of the matched query suggestions. The result list is ordered and
|
81
88
|
# the first result is a top suggestion.
|
89
|
+
# @!attribute [rw] tail_match_triggered
|
90
|
+
# @return [::Boolean]
|
91
|
+
# True if the returned suggestions are all tail suggestions.
|
92
|
+
#
|
93
|
+
# For tail matching to be triggered, include_tail_suggestions in the request
|
94
|
+
# must be true and there must be no suggestions that match the full query.
|
82
95
|
class CompleteQueryResponse
|
83
96
|
include ::Google::Protobuf::MessageExts
|
84
97
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1beta
|
24
|
+
# External conversation proto definition.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Immutable. Fully qualified name
|
28
|
+
# `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
|
29
|
+
# @!attribute [rw] state
|
30
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation::State]
|
31
|
+
# The state of the Conversation.
|
32
|
+
# @!attribute [rw] user_pseudo_id
|
33
|
+
# @return [::String]
|
34
|
+
# A unique identifier for tracking users.
|
35
|
+
# @!attribute [rw] messages
|
36
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::ConversationMessage>]
|
37
|
+
# Conversation messages.
|
38
|
+
# @!attribute [r] start_time
|
39
|
+
# @return [::Google::Protobuf::Timestamp]
|
40
|
+
# Output only. The time the conversation started.
|
41
|
+
# @!attribute [r] end_time
|
42
|
+
# @return [::Google::Protobuf::Timestamp]
|
43
|
+
# Output only. The time the conversation finished.
|
44
|
+
class Conversation
|
45
|
+
include ::Google::Protobuf::MessageExts
|
46
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
47
|
+
|
48
|
+
# Enumeration of the state of the conversation.
|
49
|
+
module State
|
50
|
+
# Unknown.
|
51
|
+
STATE_UNSPECIFIED = 0
|
52
|
+
|
53
|
+
# Conversation is currently open.
|
54
|
+
IN_PROGRESS = 1
|
55
|
+
|
56
|
+
# Conversation has been completed.
|
57
|
+
COMPLETED = 2
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Defines a reply message to user.
|
62
|
+
# @!attribute [rw] reply
|
63
|
+
# @return [::String]
|
64
|
+
# Text reply.
|
65
|
+
# @!attribute [rw] references
|
66
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Reply::Reference>]
|
67
|
+
# References in the reply.
|
68
|
+
class Reply
|
69
|
+
include ::Google::Protobuf::MessageExts
|
70
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
71
|
+
|
72
|
+
# Defines reference in reply.
|
73
|
+
# @!attribute [rw] uri
|
74
|
+
# @return [::String]
|
75
|
+
# URI link reference.
|
76
|
+
# @!attribute [rw] anchor_text
|
77
|
+
# @return [::String]
|
78
|
+
# Anchor text.
|
79
|
+
# @!attribute [rw] start
|
80
|
+
# @return [::Integer]
|
81
|
+
# Anchor text start index.
|
82
|
+
# @!attribute [rw] end
|
83
|
+
# @return [::Integer]
|
84
|
+
# Anchor text end index.
|
85
|
+
class Reference
|
86
|
+
include ::Google::Protobuf::MessageExts
|
87
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# Defines context of the conversation
|
92
|
+
# @!attribute [rw] context_documents
|
93
|
+
# @return [::Array<::String>]
|
94
|
+
# The current list of documents the user is seeing.
|
95
|
+
# It contains the document resource references.
|
96
|
+
# @!attribute [rw] active_document
|
97
|
+
# @return [::String]
|
98
|
+
# The current active document the user opened.
|
99
|
+
# It contains the document resource reference.
|
100
|
+
class ConversationContext
|
101
|
+
include ::Google::Protobuf::MessageExts
|
102
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
103
|
+
end
|
104
|
+
|
105
|
+
# Defines text input.
|
106
|
+
# @!attribute [rw] input
|
107
|
+
# @return [::String]
|
108
|
+
# Text input.
|
109
|
+
# @!attribute [rw] context
|
110
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::ConversationContext]
|
111
|
+
# Conversation context of the input.
|
112
|
+
class TextInput
|
113
|
+
include ::Google::Protobuf::MessageExts
|
114
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
115
|
+
end
|
116
|
+
|
117
|
+
# Defines a conversation message.
|
118
|
+
# @!attribute [rw] user_input
|
119
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::TextInput]
|
120
|
+
# User text input.
|
121
|
+
# @!attribute [rw] reply
|
122
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Reply]
|
123
|
+
# Search reply.
|
124
|
+
# @!attribute [r] create_time
|
125
|
+
# @return [::Google::Protobuf::Timestamp]
|
126
|
+
# Output only. Message creation timestamp.
|
127
|
+
class ConversationMessage
|
128
|
+
include ::Google::Protobuf::MessageExts
|
129
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
@@ -0,0 +1,175 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1beta
|
24
|
+
# Request message for
|
25
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client#converse_conversation ConversationalSearchService.ConverseConversation}
|
26
|
+
# method.
|
27
|
+
# @!attribute [rw] name
|
28
|
+
# @return [::String]
|
29
|
+
# Required. The resource name of the Conversation to get. Format:
|
30
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
|
31
|
+
# Use
|
32
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
|
33
|
+
# to activate auto session mode, which automatically creates a new
|
34
|
+
# conversation inside a ConverseConversation session.
|
35
|
+
# @!attribute [rw] query
|
36
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::TextInput]
|
37
|
+
# Required. Current user input.
|
38
|
+
# @!attribute [rw] serving_config
|
39
|
+
# @return [::String]
|
40
|
+
# The resource name of the Serving Config to use. Format:
|
41
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
|
42
|
+
# If this is not set, the default serving config will be used.
|
43
|
+
# @!attribute [rw] conversation
|
44
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
|
45
|
+
# The conversation to be used by auto session only. The name field will be
|
46
|
+
# ignored as we automatically assign new name for the conversation in auto
|
47
|
+
# session.
|
48
|
+
# @!attribute [rw] safe_search
|
49
|
+
# @return [::Boolean]
|
50
|
+
# Whether to turn on safe search.
|
51
|
+
class ConverseConversationRequest
|
52
|
+
include ::Google::Protobuf::MessageExts
|
53
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
54
|
+
end
|
55
|
+
|
56
|
+
# Response message for
|
57
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client#converse_conversation ConversationalSearchService.ConverseConversation}
|
58
|
+
# method.
|
59
|
+
# @!attribute [rw] reply
|
60
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Reply]
|
61
|
+
# Answer to the current query.
|
62
|
+
# @!attribute [rw] conversation
|
63
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
|
64
|
+
# Updated conversation including the answer.
|
65
|
+
# @!attribute [rw] search_results
|
66
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
|
67
|
+
# Search Results.
|
68
|
+
class ConverseConversationResponse
|
69
|
+
include ::Google::Protobuf::MessageExts
|
70
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
71
|
+
end
|
72
|
+
|
73
|
+
# Request for CreateConversation method.
|
74
|
+
# @!attribute [rw] parent
|
75
|
+
# @return [::String]
|
76
|
+
# Required. Full resource name of parent data store. Format:
|
77
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
|
78
|
+
# @!attribute [rw] conversation
|
79
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
|
80
|
+
# Required. The conversation to create.
|
81
|
+
class CreateConversationRequest
|
82
|
+
include ::Google::Protobuf::MessageExts
|
83
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
+
end
|
85
|
+
|
86
|
+
# Request for UpdateConversation method.
|
87
|
+
# @!attribute [rw] conversation
|
88
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
|
89
|
+
# Required. The Conversation to update.
|
90
|
+
# @!attribute [rw] update_mask
|
91
|
+
# @return [::Google::Protobuf::FieldMask]
|
92
|
+
# Indicates which fields in the provided
|
93
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Conversation Conversation} to update.
|
94
|
+
# The following are NOT supported:
|
95
|
+
#
|
96
|
+
# * [conversation.name][]
|
97
|
+
#
|
98
|
+
# If not set or empty, all supported fields are updated.
|
99
|
+
class UpdateConversationRequest
|
100
|
+
include ::Google::Protobuf::MessageExts
|
101
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
102
|
+
end
|
103
|
+
|
104
|
+
# Request for DeleteConversation method.
|
105
|
+
# @!attribute [rw] name
|
106
|
+
# @return [::String]
|
107
|
+
# Required. The resource name of the Conversation to delete. Format:
|
108
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
|
109
|
+
class DeleteConversationRequest
|
110
|
+
include ::Google::Protobuf::MessageExts
|
111
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
112
|
+
end
|
113
|
+
|
114
|
+
# Request for GetConversation method.
|
115
|
+
# @!attribute [rw] name
|
116
|
+
# @return [::String]
|
117
|
+
# Required. The resource name of the Conversation to get. Format:
|
118
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
|
119
|
+
class GetConversationRequest
|
120
|
+
include ::Google::Protobuf::MessageExts
|
121
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
122
|
+
end
|
123
|
+
|
124
|
+
# Request for ListConversations method.
|
125
|
+
# @!attribute [rw] parent
|
126
|
+
# @return [::String]
|
127
|
+
# Required. The data store resource name. Format:
|
128
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
|
129
|
+
# @!attribute [rw] page_size
|
130
|
+
# @return [::Integer]
|
131
|
+
# Maximum number of results to return. If unspecified, defaults
|
132
|
+
# to 50. Max allowed value is 1000.
|
133
|
+
# @!attribute [rw] page_token
|
134
|
+
# @return [::String]
|
135
|
+
# A page token, received from a previous `ListConversations` call.
|
136
|
+
# Provide this to retrieve the subsequent page.
|
137
|
+
# @!attribute [rw] filter
|
138
|
+
# @return [::String]
|
139
|
+
# A filter to apply on the list results. The supported features are:
|
140
|
+
# user_pseudo_id, state.
|
141
|
+
#
|
142
|
+
# Example:
|
143
|
+
# "user_pseudo_id = some_id"
|
144
|
+
# @!attribute [rw] order_by
|
145
|
+
# @return [::String]
|
146
|
+
# A comma-separated list of fields to order by, sorted in ascending order.
|
147
|
+
# Use "desc" after a field name for descending.
|
148
|
+
# Supported fields:
|
149
|
+
# * `update_time`
|
150
|
+
# * `create_time`
|
151
|
+
# * `conversation_name`
|
152
|
+
#
|
153
|
+
# Example:
|
154
|
+
# "update_time desc"
|
155
|
+
# "create_time"
|
156
|
+
class ListConversationsRequest
|
157
|
+
include ::Google::Protobuf::MessageExts
|
158
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
159
|
+
end
|
160
|
+
|
161
|
+
# Response for ListConversations method.
|
162
|
+
# @!attribute [rw] conversations
|
163
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>]
|
164
|
+
# All the Conversations for a given data store.
|
165
|
+
# @!attribute [rw] next_page_token
|
166
|
+
# @return [::String]
|
167
|
+
# Pagination token, if not returned indicates the last page.
|
168
|
+
class ListConversationsResponse
|
169
|
+
include ::Google::Protobuf::MessageExts
|
170
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
@@ -26,14 +26,12 @@ module Google
|
|
26
26
|
# @!attribute [rw] struct_data
|
27
27
|
# @return [::Google::Protobuf::Struct]
|
28
28
|
# The structured JSON data for the document. It should conform to the
|
29
|
-
# registered
|
30
|
-
# [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an
|
29
|
+
# registered {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} or an
|
31
30
|
# `INVALID_ARGUMENT` error is thrown.
|
32
31
|
# @!attribute [rw] json_data
|
33
32
|
# @return [::String]
|
34
33
|
# The JSON string representation of the document. It should conform to the
|
35
|
-
# registered
|
36
|
-
# [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an
|
34
|
+
# registered {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} or an
|
37
35
|
# `INVALID_ARGUMENT` error is thrown.
|
38
36
|
# @!attribute [rw] name
|
39
37
|
# @return [::String]
|
@@ -92,8 +90,11 @@ module Google
|
|
92
90
|
# @return [::String]
|
93
91
|
# The MIME type of the content. Supported types:
|
94
92
|
#
|
95
|
-
# * `application/pdf` (PDF)
|
93
|
+
# * `application/pdf` (PDF, only native PDFs are supported for now)
|
96
94
|
# * `text/html` (HTML)
|
95
|
+
# * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
|
96
|
+
# * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
|
97
|
+
# * `text/plain` (TXT)
|
97
98
|
#
|
98
99
|
# See https://www.iana.org/assignments/media-types/media-types.xhtml.
|
99
100
|
class Content
|
@@ -51,7 +51,8 @@ module Google
|
|
51
51
|
# Use `default_branch` as the branch ID, to list documents under the default
|
52
52
|
# branch.
|
53
53
|
#
|
54
|
-
# If the caller does not have permission to list
|
54
|
+
# If the caller does not have permission to list
|
55
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s under this
|
55
56
|
# branch, regardless of whether or not this branch exists, a
|
56
57
|
# `PERMISSION_DENIED` error is returned.
|
57
58
|
# @!attribute [rw] page_size
|