google-cloud-discovery_engine-v1 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +764 -6
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +715 -6
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +23 -13
- data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -13
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
- data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +15 -8
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +15 -8
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +4 -0
- data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
- data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
- data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
- data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +485 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
- data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
- data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +4 -4
- data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
- data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
- data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
- data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
- data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +23 -18
- data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
- metadata +56 -2
@@ -14,7 +14,7 @@ require 'google/cloud/discoveryengine/v1/user_event_pb'
|
|
14
14
|
require 'google/longrunning/operations_pb'
|
15
15
|
|
16
16
|
|
17
|
-
descriptor_data = "\n8google/cloud/discoveryengine/v1/user_event_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/discoveryengine/v1/import_config.proto\x1a\x30google/cloud/discoveryengine/v1/user_event.proto\x1a#google/longrunning/operations.proto\"\
|
17
|
+
descriptor_data = "\n8google/cloud/discoveryengine/v1/user_event_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/discoveryengine/v1/import_config.proto\x1a\x30google/cloud/discoveryengine/v1/user_event.proto\x1a#google/longrunning/operations.proto\"\xc7\x01\n\x15WriteUserEventRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12H\n\nuser_event\x18\x02 \x01(\x0b\x32*.google.cloud.discoveryengine.v1.UserEventB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x13\n\x0bwrite_async\x18\x03 \x01(\x08\x42\r\n\x0b_user_event\"\xa8\x01\n\x17\x43ollectUserEventRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x17\n\nuser_event\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03\x65ts\x18\x04 \x01(\x03H\x01\x88\x01\x01\x42\x06\n\x04_uriB\x06\n\x04_ets2\xef\x08\n\x10UserEventService\x12\xf0\x02\n\x0eWriteUserEvent\x12\x36.google.cloud.discoveryengine.v1.WriteUserEventRequest\x1a*.google.cloud.discoveryengine.v1.UserEvent\"\xf9\x01\x82\xd3\xe4\x93\x02\xf2\x01\"A/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:write:\nuser_eventZ]\"O/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write:\nuser_eventZB\"4/v1/{parent=projects/*/locations/*}/userEvents:write:\nuser_event\x12\x86\x02\n\x10\x43ollectUserEvent\x12\x38.google.cloud.discoveryengine.v1.CollectUserEventRequest\x1a\x14.google.api.HttpBody\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\x12\x43/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:collectZS\x12Q/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect\x12\x8a\x03\n\x10ImportUserEvents\x12\x38.google.cloud.discoveryengine.v1.ImportUserEventsRequest\x1a\x1d.google.longrunning.Operation\"\x9c\x02\xca\x41t\n8google.cloud.discoveryengine.v1.ImportUserEventsResponse\x12\x38google.cloud.discoveryengine.v1.ImportUserEventsMetadata\x82\xd3\xe4\x93\x02\x9e\x01\"B/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:import:\x01*ZU\"P/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x88\x02\n#com.google.cloud.discoveryengine.v1B\x15UserEventServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3"
|
18
18
|
|
19
19
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
20
20
|
|
@@ -41,7 +41,7 @@ module Google
|
|
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.
|
43
43
|
rpc :CollectUserEvent, ::Google::Cloud::DiscoveryEngine::V1::CollectUserEventRequest, ::Google::Api::HttpBody
|
44
|
-
# Bulk import of
|
44
|
+
# Bulk import of user events. Request processing might be
|
45
45
|
# synchronous. Events that already exist are skipped.
|
46
46
|
# Use this method for backfilling historical user events.
|
47
47
|
#
|
@@ -0,0 +1,362 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1
|
24
|
+
# Defines an answer.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Immutable. Fully qualified name
|
28
|
+
# `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
|
29
|
+
# @!attribute [rw] state
|
30
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer::State]
|
31
|
+
# The state of the answer generation.
|
32
|
+
# @!attribute [rw] answer_text
|
33
|
+
# @return [::String]
|
34
|
+
# The textual answer.
|
35
|
+
# @!attribute [rw] citations
|
36
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::Citation>]
|
37
|
+
# Citations.
|
38
|
+
# @!attribute [rw] references
|
39
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::Reference>]
|
40
|
+
# References.
|
41
|
+
# @!attribute [rw] related_questions
|
42
|
+
# @return [::Array<::String>]
|
43
|
+
# Suggested related questions.
|
44
|
+
# @!attribute [rw] steps
|
45
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::Step>]
|
46
|
+
# Answer generation steps.
|
47
|
+
# @!attribute [rw] query_understanding_info
|
48
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer::QueryUnderstandingInfo]
|
49
|
+
# Query understanding information.
|
50
|
+
# @!attribute [rw] answer_skipped_reasons
|
51
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::AnswerSkippedReason>]
|
52
|
+
# Additional answer-skipped reasons. This provides the reason for ignored
|
53
|
+
# cases. If nothing is skipped, this field is not set.
|
54
|
+
# @!attribute [r] create_time
|
55
|
+
# @return [::Google::Protobuf::Timestamp]
|
56
|
+
# Output only. Answer creation timestamp.
|
57
|
+
# @!attribute [r] complete_time
|
58
|
+
# @return [::Google::Protobuf::Timestamp]
|
59
|
+
# Output only. Answer completed timestamp.
|
60
|
+
class Answer
|
61
|
+
include ::Google::Protobuf::MessageExts
|
62
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
63
|
+
|
64
|
+
# Citation info for a segment.
|
65
|
+
# @!attribute [rw] start_index
|
66
|
+
# @return [::Integer]
|
67
|
+
# Index indicates the start of the segment, measured in bytes (UTF-8
|
68
|
+
# unicode).
|
69
|
+
# @!attribute [rw] end_index
|
70
|
+
# @return [::Integer]
|
71
|
+
# End of the attributed segment, exclusive.
|
72
|
+
# @!attribute [rw] sources
|
73
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::CitationSource>]
|
74
|
+
# Citation sources for the attributed segment.
|
75
|
+
class Citation
|
76
|
+
include ::Google::Protobuf::MessageExts
|
77
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
78
|
+
end
|
79
|
+
|
80
|
+
# Citation source.
|
81
|
+
# @!attribute [rw] reference_id
|
82
|
+
# @return [::String]
|
83
|
+
# ID of the citation source.
|
84
|
+
class CitationSource
|
85
|
+
include ::Google::Protobuf::MessageExts
|
86
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
87
|
+
end
|
88
|
+
|
89
|
+
# Reference.
|
90
|
+
# @!attribute [rw] unstructured_document_info
|
91
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer::Reference::UnstructuredDocumentInfo]
|
92
|
+
# Unstructured document information.
|
93
|
+
# @!attribute [rw] chunk_info
|
94
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer::Reference::ChunkInfo]
|
95
|
+
# Chunk information.
|
96
|
+
class Reference
|
97
|
+
include ::Google::Protobuf::MessageExts
|
98
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
99
|
+
|
100
|
+
# Unstructured document information.
|
101
|
+
# @!attribute [rw] document
|
102
|
+
# @return [::String]
|
103
|
+
# Document resource name.
|
104
|
+
# @!attribute [rw] uri
|
105
|
+
# @return [::String]
|
106
|
+
# URI for the document.
|
107
|
+
# @!attribute [rw] title
|
108
|
+
# @return [::String]
|
109
|
+
# Title.
|
110
|
+
# @!attribute [rw] chunk_contents
|
111
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
|
112
|
+
# List of cited chunk contents derived from document content.
|
113
|
+
# @!attribute [rw] struct_data
|
114
|
+
# @return [::Google::Protobuf::Struct]
|
115
|
+
# The structured JSON metadata for the document.
|
116
|
+
# It is populated from the struct data from the Chunk in search result.
|
117
|
+
class UnstructuredDocumentInfo
|
118
|
+
include ::Google::Protobuf::MessageExts
|
119
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
120
|
+
|
121
|
+
# Chunk content.
|
122
|
+
# @!attribute [rw] content
|
123
|
+
# @return [::String]
|
124
|
+
# Chunk textual content.
|
125
|
+
# @!attribute [rw] page_identifier
|
126
|
+
# @return [::String]
|
127
|
+
# Page identifier.
|
128
|
+
class ChunkContent
|
129
|
+
include ::Google::Protobuf::MessageExts
|
130
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Chunk information.
|
135
|
+
# @!attribute [rw] chunk
|
136
|
+
# @return [::String]
|
137
|
+
# Chunk resource name.
|
138
|
+
# @!attribute [rw] content
|
139
|
+
# @return [::String]
|
140
|
+
# Chunk textual content.
|
141
|
+
# @!attribute [rw] relevance_score
|
142
|
+
# @return [::Float]
|
143
|
+
# Relevance score.
|
144
|
+
# @!attribute [rw] document_metadata
|
145
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer::Reference::ChunkInfo::DocumentMetadata]
|
146
|
+
# Document metadata.
|
147
|
+
class ChunkInfo
|
148
|
+
include ::Google::Protobuf::MessageExts
|
149
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
150
|
+
|
151
|
+
# Document metadata.
|
152
|
+
# @!attribute [rw] document
|
153
|
+
# @return [::String]
|
154
|
+
# Document resource name.
|
155
|
+
# @!attribute [rw] uri
|
156
|
+
# @return [::String]
|
157
|
+
# URI for the document.
|
158
|
+
# @!attribute [rw] title
|
159
|
+
# @return [::String]
|
160
|
+
# Title.
|
161
|
+
# @!attribute [rw] page_identifier
|
162
|
+
# @return [::String]
|
163
|
+
# Page identifier.
|
164
|
+
# @!attribute [rw] struct_data
|
165
|
+
# @return [::Google::Protobuf::Struct]
|
166
|
+
# The structured JSON metadata for the document.
|
167
|
+
# It is populated from the struct data from the Chunk in search result.
|
168
|
+
class DocumentMetadata
|
169
|
+
include ::Google::Protobuf::MessageExts
|
170
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Step information.
|
176
|
+
# @!attribute [rw] state
|
177
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer::Step::State]
|
178
|
+
# The state of the step.
|
179
|
+
# @!attribute [rw] description
|
180
|
+
# @return [::String]
|
181
|
+
# The description of the step.
|
182
|
+
# @!attribute [rw] thought
|
183
|
+
# @return [::String]
|
184
|
+
# The thought of the step.
|
185
|
+
# @!attribute [rw] actions
|
186
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::Step::Action>]
|
187
|
+
# Actions.
|
188
|
+
class Step
|
189
|
+
include ::Google::Protobuf::MessageExts
|
190
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
191
|
+
|
192
|
+
# Action.
|
193
|
+
# @!attribute [rw] search_action
|
194
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer::Step::Action::SearchAction]
|
195
|
+
# Search action.
|
196
|
+
# @!attribute [rw] observation
|
197
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer::Step::Action::Observation]
|
198
|
+
# Observation.
|
199
|
+
class Action
|
200
|
+
include ::Google::Protobuf::MessageExts
|
201
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
202
|
+
|
203
|
+
# Search action.
|
204
|
+
# @!attribute [rw] query
|
205
|
+
# @return [::String]
|
206
|
+
# The query to search.
|
207
|
+
class SearchAction
|
208
|
+
include ::Google::Protobuf::MessageExts
|
209
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
210
|
+
end
|
211
|
+
|
212
|
+
# Observation.
|
213
|
+
# @!attribute [rw] search_results
|
214
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::Step::Action::Observation::SearchResult>]
|
215
|
+
# Search results observed by the search action, it can be snippets info
|
216
|
+
# or chunk info, depending on the citation type set by the user.
|
217
|
+
class Observation
|
218
|
+
include ::Google::Protobuf::MessageExts
|
219
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
220
|
+
|
221
|
+
# @!attribute [rw] document
|
222
|
+
# @return [::String]
|
223
|
+
# Document resource name.
|
224
|
+
# @!attribute [rw] uri
|
225
|
+
# @return [::String]
|
226
|
+
# URI for the document.
|
227
|
+
# @!attribute [rw] title
|
228
|
+
# @return [::String]
|
229
|
+
# Title.
|
230
|
+
# @!attribute [rw] snippet_info
|
231
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
|
232
|
+
# If citation_type is DOCUMENT_LEVEL_CITATION, populate document
|
233
|
+
# level snippets.
|
234
|
+
# @!attribute [rw] chunk_info
|
235
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
|
236
|
+
# If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
|
237
|
+
# populate chunk info.
|
238
|
+
class SearchResult
|
239
|
+
include ::Google::Protobuf::MessageExts
|
240
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
241
|
+
|
242
|
+
# Snippet information.
|
243
|
+
# @!attribute [rw] snippet
|
244
|
+
# @return [::String]
|
245
|
+
# Snippet content.
|
246
|
+
# @!attribute [rw] snippet_status
|
247
|
+
# @return [::String]
|
248
|
+
# Status of the snippet defined by the search team.
|
249
|
+
class SnippetInfo
|
250
|
+
include ::Google::Protobuf::MessageExts
|
251
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
252
|
+
end
|
253
|
+
|
254
|
+
# Chunk information.
|
255
|
+
# @!attribute [rw] chunk
|
256
|
+
# @return [::String]
|
257
|
+
# Chunk resource name.
|
258
|
+
# @!attribute [rw] content
|
259
|
+
# @return [::String]
|
260
|
+
# Chunk textual content.
|
261
|
+
# @!attribute [rw] relevance_score
|
262
|
+
# @return [::Float]
|
263
|
+
# Relevance score.
|
264
|
+
class ChunkInfo
|
265
|
+
include ::Google::Protobuf::MessageExts
|
266
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# Enumeration of the state of the step.
|
273
|
+
module State
|
274
|
+
# Unknown.
|
275
|
+
STATE_UNSPECIFIED = 0
|
276
|
+
|
277
|
+
# Step is currently in progress.
|
278
|
+
IN_PROGRESS = 1
|
279
|
+
|
280
|
+
# Step currently failed.
|
281
|
+
FAILED = 2
|
282
|
+
|
283
|
+
# Step has succeeded.
|
284
|
+
SUCCEEDED = 3
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
# Query understanding information.
|
289
|
+
# @!attribute [rw] query_classification_info
|
290
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
|
291
|
+
# Query classification information.
|
292
|
+
class QueryUnderstandingInfo
|
293
|
+
include ::Google::Protobuf::MessageExts
|
294
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
295
|
+
|
296
|
+
# Query classification information.
|
297
|
+
# @!attribute [rw] type
|
298
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
|
299
|
+
# Query classification type.
|
300
|
+
# @!attribute [rw] positive
|
301
|
+
# @return [::Boolean]
|
302
|
+
# Classification output.
|
303
|
+
class QueryClassificationInfo
|
304
|
+
include ::Google::Protobuf::MessageExts
|
305
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
306
|
+
|
307
|
+
# Query classification types.
|
308
|
+
module Type
|
309
|
+
# Unspecified query classification type.
|
310
|
+
TYPE_UNSPECIFIED = 0
|
311
|
+
|
312
|
+
# Adversarial query classification type.
|
313
|
+
ADVERSARIAL_QUERY = 1
|
314
|
+
|
315
|
+
# Non-answer-seeking query classification type.
|
316
|
+
NON_ANSWER_SEEKING_QUERY = 2
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
# Enumeration of the state of the answer generation.
|
322
|
+
module State
|
323
|
+
# Unknown.
|
324
|
+
STATE_UNSPECIFIED = 0
|
325
|
+
|
326
|
+
# Answer generation is currently in progress.
|
327
|
+
IN_PROGRESS = 1
|
328
|
+
|
329
|
+
# Answer generation currently failed.
|
330
|
+
FAILED = 2
|
331
|
+
|
332
|
+
# Answer generation has succeeded.
|
333
|
+
SUCCEEDED = 3
|
334
|
+
end
|
335
|
+
|
336
|
+
# An enum for answer skipped reasons.
|
337
|
+
module AnswerSkippedReason
|
338
|
+
# Default value. The answer skipped reason is not specified.
|
339
|
+
ANSWER_SKIPPED_REASON_UNSPECIFIED = 0
|
340
|
+
|
341
|
+
# The adversarial query ignored case.
|
342
|
+
ADVERSARIAL_QUERY_IGNORED = 1
|
343
|
+
|
344
|
+
# The non-answer seeking query ignored case.
|
345
|
+
NON_ANSWER_SEEKING_QUERY_IGNORED = 2
|
346
|
+
|
347
|
+
# The out-of-domain query ignored case.
|
348
|
+
#
|
349
|
+
# Google skips the answer if there are no high-relevance search results.
|
350
|
+
OUT_OF_DOMAIN_QUERY_IGNORED = 3
|
351
|
+
|
352
|
+
# The potential policy violation case.
|
353
|
+
#
|
354
|
+
# Google skips the answer if there is a potential policy violation
|
355
|
+
# detected. This includes content that may be violent or toxic.
|
356
|
+
POTENTIAL_POLICY_VIOLATION = 4
|
357
|
+
end
|
358
|
+
end
|
359
|
+
end
|
360
|
+
end
|
361
|
+
end
|
362
|
+
end
|
@@ -138,6 +138,22 @@ module Google
|
|
138
138
|
SOLUTION_TYPE_GENERATIVE_CHAT = 4
|
139
139
|
end
|
140
140
|
|
141
|
+
# Defines a further subdivision of `SolutionType`.
|
142
|
+
# Specifically applies to
|
143
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH}.
|
144
|
+
module SearchUseCase
|
145
|
+
# Value used when unset. Will not occur in CSS.
|
146
|
+
SEARCH_USE_CASE_UNSPECIFIED = 0
|
147
|
+
|
148
|
+
# Search use case. Expects the traffic has a non-empty
|
149
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#query query}.
|
150
|
+
SEARCH_USE_CASE_SEARCH = 1
|
151
|
+
|
152
|
+
# Browse use case. Expects the traffic has an empty
|
153
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#query query}.
|
154
|
+
SEARCH_USE_CASE_BROWSE = 2
|
155
|
+
end
|
156
|
+
|
141
157
|
# Tiers of search features. Different tiers might have different
|
142
158
|
# pricing. To learn more, check the pricing documentation.
|
143
159
|
module SearchTier
|
@@ -0,0 +1,207 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1
|
24
|
+
# Defines circumstances to be checked before allowing a behavior
|
25
|
+
# @!attribute [rw] query_terms
|
26
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Condition::QueryTerm>]
|
27
|
+
# Search only
|
28
|
+
# A list of terms to match the query on.
|
29
|
+
#
|
30
|
+
# Maximum of 10 query terms.
|
31
|
+
# @!attribute [rw] active_time_range
|
32
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Condition::TimeRange>]
|
33
|
+
# Range of time(s) specifying when condition is active.
|
34
|
+
#
|
35
|
+
# Maximum of 10 time ranges.
|
36
|
+
class Condition
|
37
|
+
include ::Google::Protobuf::MessageExts
|
38
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
39
|
+
|
40
|
+
# Matcher for search request query
|
41
|
+
# @!attribute [rw] value
|
42
|
+
# @return [::String]
|
43
|
+
# The specific query value to match against
|
44
|
+
#
|
45
|
+
# Must be lowercase, must be UTF-8.
|
46
|
+
# Can have at most 3 space separated terms if full_match is true.
|
47
|
+
# Cannot be an empty string.
|
48
|
+
# Maximum length of 5000 characters.
|
49
|
+
# @!attribute [rw] full_match
|
50
|
+
# @return [::Boolean]
|
51
|
+
# Whether the search query needs to exactly match the query term.
|
52
|
+
class QueryTerm
|
53
|
+
include ::Google::Protobuf::MessageExts
|
54
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
55
|
+
end
|
56
|
+
|
57
|
+
# Used for time-dependent conditions.
|
58
|
+
# @!attribute [rw] start_time
|
59
|
+
# @return [::Google::Protobuf::Timestamp]
|
60
|
+
# Start of time range.
|
61
|
+
#
|
62
|
+
# Range is inclusive.
|
63
|
+
# @!attribute [rw] end_time
|
64
|
+
# @return [::Google::Protobuf::Timestamp]
|
65
|
+
# End of time range.
|
66
|
+
#
|
67
|
+
# Range is inclusive.
|
68
|
+
# Must be in the future.
|
69
|
+
class TimeRange
|
70
|
+
include ::Google::Protobuf::MessageExts
|
71
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Defines a conditioned behavior to employ during serving.
|
76
|
+
# Must be attached to a [ServingConfig][] to be considered at serving time.
|
77
|
+
# Permitted actions dependent on `SolutionType`.
|
78
|
+
# @!attribute [rw] boost_action
|
79
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Control::BoostAction]
|
80
|
+
# Defines a boost-type control
|
81
|
+
# @!attribute [rw] filter_action
|
82
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Control::FilterAction]
|
83
|
+
# Defines a filter-type control
|
84
|
+
# Currently not supported by Recommendation
|
85
|
+
# @!attribute [rw] redirect_action
|
86
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Control::RedirectAction]
|
87
|
+
# Defines a redirect-type control.
|
88
|
+
# @!attribute [rw] synonyms_action
|
89
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Control::SynonymsAction]
|
90
|
+
# Treats a group of terms as synonyms of one another.
|
91
|
+
# @!attribute [rw] name
|
92
|
+
# @return [::String]
|
93
|
+
# Immutable. Fully qualified name
|
94
|
+
# `projects/*/locations/global/dataStore/*/controls/*`
|
95
|
+
# @!attribute [rw] display_name
|
96
|
+
# @return [::String]
|
97
|
+
# Required. Human readable name. The identifier used in UI views.
|
98
|
+
#
|
99
|
+
# Must be UTF-8 encoded string. Length limit is 128 characters.
|
100
|
+
# Otherwise an INVALID ARGUMENT error is thrown.
|
101
|
+
# @!attribute [r] associated_serving_config_ids
|
102
|
+
# @return [::Array<::String>]
|
103
|
+
# Output only. List of all [ServingConfig][] ids this control is attached to.
|
104
|
+
# May take up to 10 minutes to update after changes.
|
105
|
+
# @!attribute [rw] solution_type
|
106
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SolutionType]
|
107
|
+
# Required. Immutable. What solution the control belongs to.
|
108
|
+
#
|
109
|
+
# Must be compatible with vertical of resource.
|
110
|
+
# Otherwise an INVALID ARGUMENT error is thrown.
|
111
|
+
# @!attribute [rw] use_cases
|
112
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchUseCase>]
|
113
|
+
# Specifies the use case for the control.
|
114
|
+
# Affects what condition fields can be set.
|
115
|
+
# Only applies to
|
116
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH}.
|
117
|
+
# Currently only allow one use case per control.
|
118
|
+
# Must be set when solution_type is
|
119
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH SolutionType.SOLUTION_TYPE_SEARCH}.
|
120
|
+
# @!attribute [rw] conditions
|
121
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Condition>]
|
122
|
+
# Determines when the associated action will trigger.
|
123
|
+
#
|
124
|
+
# Omit to always apply the action.
|
125
|
+
# Currently only a single condition may be specified.
|
126
|
+
# Otherwise an INVALID ARGUMENT error is thrown.
|
127
|
+
class Control
|
128
|
+
include ::Google::Protobuf::MessageExts
|
129
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
130
|
+
|
131
|
+
# Adjusts order of products in returned list.
|
132
|
+
# @!attribute [rw] boost
|
133
|
+
# @return [::Float]
|
134
|
+
# Required. Strength of the boost, which should be in [-1, 1]. Negative
|
135
|
+
# boost means demotion. Default is 0.0 (No-op).
|
136
|
+
# @!attribute [rw] filter
|
137
|
+
# @return [::String]
|
138
|
+
# Required. Specifies which products to apply the boost to.
|
139
|
+
#
|
140
|
+
# If no filter is provided all products will be boosted (No-op).
|
141
|
+
# Syntax documentation:
|
142
|
+
# https://cloud.google.com/retail/docs/filter-and-order
|
143
|
+
# Maximum length is 5000 characters.
|
144
|
+
# Otherwise an INVALID ARGUMENT error is thrown.
|
145
|
+
# @!attribute [rw] data_store
|
146
|
+
# @return [::String]
|
147
|
+
# Required. Specifies which data store's documents can be boosted by this
|
148
|
+
# control. Full data store name e.g.
|
149
|
+
# projects/123/locations/global/collections/default_collection/dataStores/default_data_store
|
150
|
+
class BoostAction
|
151
|
+
include ::Google::Protobuf::MessageExts
|
152
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
153
|
+
end
|
154
|
+
|
155
|
+
# Specified which products may be included in results.
|
156
|
+
# Uses same filter as boost.
|
157
|
+
# @!attribute [rw] filter
|
158
|
+
# @return [::String]
|
159
|
+
# Required. A filter to apply on the matching condition results.
|
160
|
+
#
|
161
|
+
# Required
|
162
|
+
# Syntax documentation:
|
163
|
+
# https://cloud.google.com/retail/docs/filter-and-order
|
164
|
+
# Maximum length is 5000 characters. Otherwise an INVALID
|
165
|
+
# ARGUMENT error is thrown.
|
166
|
+
# @!attribute [rw] data_store
|
167
|
+
# @return [::String]
|
168
|
+
# Required. Specifies which data store's documents can be filtered by this
|
169
|
+
# control. Full data store name e.g.
|
170
|
+
# projects/123/locations/global/collections/default_collection/dataStores/default_data_store
|
171
|
+
class FilterAction
|
172
|
+
include ::Google::Protobuf::MessageExts
|
173
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
174
|
+
end
|
175
|
+
|
176
|
+
# Redirects a shopper to the provided URI.
|
177
|
+
# @!attribute [rw] redirect_uri
|
178
|
+
# @return [::String]
|
179
|
+
# Required. The URI to which the shopper will be redirected.
|
180
|
+
#
|
181
|
+
# Required.
|
182
|
+
# URI must have length equal or less than 2000 characters.
|
183
|
+
# Otherwise an INVALID ARGUMENT error is thrown.
|
184
|
+
class RedirectAction
|
185
|
+
include ::Google::Protobuf::MessageExts
|
186
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
187
|
+
end
|
188
|
+
|
189
|
+
# Creates a set of terms that will act as synonyms of one another.
|
190
|
+
#
|
191
|
+
# Example: "happy" will also be considered as "glad", "glad" will also be
|
192
|
+
# considered as "happy".
|
193
|
+
# @!attribute [rw] synonyms
|
194
|
+
# @return [::Array<::String>]
|
195
|
+
# Defines a set of synonyms.
|
196
|
+
# Can specify up to 100 synonyms.
|
197
|
+
# Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
|
198
|
+
# thrown.
|
199
|
+
class SynonymsAction
|
200
|
+
include ::Google::Protobuf::MessageExts
|
201
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|