google-cloud-discovery_engine-v1 0.7.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +228 -3
  3. data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +214 -3
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
  6. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/service_stub.rb +136 -0
  7. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
  8. data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
  9. data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
  10. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
  11. data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
  12. data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
  13. data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
  14. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +911 -135
  15. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
  16. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +733 -6
  17. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
  22. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
  23. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +26 -14
  24. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +26 -14
  26. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  30. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
  56. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
  57. data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
  58. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  59. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  60. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  61. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  62. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +57 -9
  63. data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +68 -0
  64. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +57 -9
  65. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  66. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  67. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  68. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  69. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  70. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  71. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  72. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  73. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  74. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +15 -0
  75. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  76. data/lib/google/cloud/discovery_engine/v1.rb +4 -0
  77. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  78. data/lib/google/cloud/discoveryengine/v1/chunk_pb.rb +50 -0
  79. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  80. data/lib/google/cloud/discoveryengine/v1/completion_pb.rb +2 -1
  81. data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +1 -1
  82. data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +8 -0
  83. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  84. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  85. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  86. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  87. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  88. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
  89. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +51 -0
  90. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  91. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  92. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  93. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  94. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  95. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +6 -1
  96. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  97. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  98. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  99. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +4 -1
  100. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  101. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  102. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +9 -1
  103. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  104. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  105. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  106. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  107. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  108. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +375 -0
  109. data/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +119 -0
  110. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
  111. data/proto_docs/google/cloud/discoveryengine/v1/completion.rb +31 -0
  112. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  113. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  115. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +529 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  118. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +1 -1
  119. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +143 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
  121. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
  122. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  123. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  124. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +118 -4
  125. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +42 -0
  128. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  129. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
  130. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  131. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +230 -20
  132. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  133. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  134. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
  135. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  136. metadata +58 -2
@@ -0,0 +1,375 @@
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
+ # @!attribute [rw] struct_data
239
+ # @return [::Google::Protobuf::Struct]
240
+ # Data representation.
241
+ # The structured JSON data for the document.
242
+ # It's populated from the struct data from the Document (code
243
+ # pointer: http://shortn/_objzAfIiHq), or the Chunk in search result
244
+ # (code pointer: http://shortn/_Ipo6KFFGBL).
245
+ class SearchResult
246
+ include ::Google::Protobuf::MessageExts
247
+ extend ::Google::Protobuf::MessageExts::ClassMethods
248
+
249
+ # Snippet information.
250
+ # @!attribute [rw] snippet
251
+ # @return [::String]
252
+ # Snippet content.
253
+ # @!attribute [rw] snippet_status
254
+ # @return [::String]
255
+ # Status of the snippet defined by the search team.
256
+ class SnippetInfo
257
+ include ::Google::Protobuf::MessageExts
258
+ extend ::Google::Protobuf::MessageExts::ClassMethods
259
+ end
260
+
261
+ # Chunk information.
262
+ # @!attribute [rw] chunk
263
+ # @return [::String]
264
+ # Chunk resource name.
265
+ # @!attribute [rw] content
266
+ # @return [::String]
267
+ # Chunk textual content.
268
+ # @!attribute [rw] relevance_score
269
+ # @return [::Float]
270
+ # Relevance score.
271
+ class ChunkInfo
272
+ include ::Google::Protobuf::MessageExts
273
+ extend ::Google::Protobuf::MessageExts::ClassMethods
274
+ end
275
+ end
276
+ end
277
+ end
278
+
279
+ # Enumeration of the state of the step.
280
+ module State
281
+ # Unknown.
282
+ STATE_UNSPECIFIED = 0
283
+
284
+ # Step is currently in progress.
285
+ IN_PROGRESS = 1
286
+
287
+ # Step currently failed.
288
+ FAILED = 2
289
+
290
+ # Step has succeeded.
291
+ SUCCEEDED = 3
292
+ end
293
+ end
294
+
295
+ # Query understanding information.
296
+ # @!attribute [rw] query_classification_info
297
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
298
+ # Query classification information.
299
+ class QueryUnderstandingInfo
300
+ include ::Google::Protobuf::MessageExts
301
+ extend ::Google::Protobuf::MessageExts::ClassMethods
302
+
303
+ # Query classification information.
304
+ # @!attribute [rw] type
305
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
306
+ # Query classification type.
307
+ # @!attribute [rw] positive
308
+ # @return [::Boolean]
309
+ # Classification output.
310
+ class QueryClassificationInfo
311
+ include ::Google::Protobuf::MessageExts
312
+ extend ::Google::Protobuf::MessageExts::ClassMethods
313
+
314
+ # Query classification types.
315
+ module Type
316
+ # Unspecified query classification type.
317
+ TYPE_UNSPECIFIED = 0
318
+
319
+ # Adversarial query classification type.
320
+ ADVERSARIAL_QUERY = 1
321
+
322
+ # Non-answer-seeking query classification type.
323
+ NON_ANSWER_SEEKING_QUERY = 2
324
+ end
325
+ end
326
+ end
327
+
328
+ # Enumeration of the state of the answer generation.
329
+ module State
330
+ # Unknown.
331
+ STATE_UNSPECIFIED = 0
332
+
333
+ # Answer generation is currently in progress.
334
+ IN_PROGRESS = 1
335
+
336
+ # Answer generation currently failed.
337
+ FAILED = 2
338
+
339
+ # Answer generation has succeeded.
340
+ SUCCEEDED = 3
341
+ end
342
+
343
+ # An enum for answer skipped reasons.
344
+ module AnswerSkippedReason
345
+ # Default value. The answer skipped reason is not specified.
346
+ ANSWER_SKIPPED_REASON_UNSPECIFIED = 0
347
+
348
+ # The adversarial query ignored case.
349
+ ADVERSARIAL_QUERY_IGNORED = 1
350
+
351
+ # The non-answer seeking query ignored case.
352
+ NON_ANSWER_SEEKING_QUERY_IGNORED = 2
353
+
354
+ # The out-of-domain query ignored case.
355
+ #
356
+ # Google skips the answer if there are no high-relevance search results.
357
+ OUT_OF_DOMAIN_QUERY_IGNORED = 3
358
+
359
+ # The potential policy violation case.
360
+ #
361
+ # Google skips the answer if there is a potential policy violation
362
+ # detected. This includes content that may be violent or toxic.
363
+ POTENTIAL_POLICY_VIOLATION = 4
364
+
365
+ # The no relevant content case.
366
+ #
367
+ # Google skips the answer if there is no relevant content in the
368
+ # retrieved search results.
369
+ NO_RELEVANT_CONTENT = 5
370
+ end
371
+ end
372
+ end
373
+ end
374
+ end
375
+ end
@@ -0,0 +1,119 @@
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
+ # Chunk captures all raw metadata information of items to be recommended or
25
+ # searched in the chunk mode.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # The full resource name of the chunk.
29
+ # Format:
30
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
31
+ #
32
+ # This field must be a UTF-8 encoded string with a length limit of 1024
33
+ # characters.
34
+ # @!attribute [rw] id
35
+ # @return [::String]
36
+ # Unique chunk ID of the current chunk.
37
+ # @!attribute [rw] content
38
+ # @return [::String]
39
+ # Content is a string from a document (parsed content).
40
+ # @!attribute [r] relevance_score
41
+ # @return [::Float]
42
+ # Output only. Represents the relevance score based on similarity.
43
+ # Higher score indicates higher chunk relevance.
44
+ # The score is in range [-1.0, 1.0].
45
+ # Only populated on [SearchService.SearchResponse][].
46
+ # @!attribute [rw] document_metadata
47
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk::DocumentMetadata]
48
+ # Metadata of the document from the current chunk.
49
+ # @!attribute [r] derived_struct_data
50
+ # @return [::Google::Protobuf::Struct]
51
+ # Output only. This field is OUTPUT_ONLY.
52
+ # It contains derived data that are not in the original input document.
53
+ # @!attribute [rw] page_span
54
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk::PageSpan]
55
+ # Page span of the chunk.
56
+ # @!attribute [r] chunk_metadata
57
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk::ChunkMetadata]
58
+ # Output only. Metadata of the current chunk.
59
+ class Chunk
60
+ include ::Google::Protobuf::MessageExts
61
+ extend ::Google::Protobuf::MessageExts::ClassMethods
62
+
63
+ # Document metadata contains the information of the document of the current
64
+ # chunk.
65
+ # @!attribute [rw] uri
66
+ # @return [::String]
67
+ # Uri of the document.
68
+ # @!attribute [rw] title
69
+ # @return [::String]
70
+ # Title of the document.
71
+ # @!attribute [rw] struct_data
72
+ # @return [::Google::Protobuf::Struct]
73
+ # Data representation.
74
+ # The structured JSON data for the document. It should conform to the
75
+ # registered {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} or an
76
+ # `INVALID_ARGUMENT` error is thrown.
77
+ class DocumentMetadata
78
+ include ::Google::Protobuf::MessageExts
79
+ extend ::Google::Protobuf::MessageExts::ClassMethods
80
+ end
81
+
82
+ # Page span of the chunk.
83
+ # @!attribute [rw] page_start
84
+ # @return [::Integer]
85
+ # The start page of the chunk.
86
+ # @!attribute [rw] page_end
87
+ # @return [::Integer]
88
+ # The end page of the chunk.
89
+ class PageSpan
90
+ include ::Google::Protobuf::MessageExts
91
+ extend ::Google::Protobuf::MessageExts::ClassMethods
92
+ end
93
+
94
+ # Metadata of the current chunk. This field is only populated on
95
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search SearchService.Search}
96
+ # API.
97
+ # @!attribute [rw] previous_chunks
98
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Chunk>]
99
+ # The previous chunks of the current chunk. The number is controlled by
100
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::ChunkSpec#num_previous_chunks SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks}.
101
+ # This field is only populated on
102
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search SearchService.Search}
103
+ # API.
104
+ # @!attribute [rw] next_chunks
105
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Chunk>]
106
+ # The next chunks of the current chunk. The number is controlled by
107
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::ChunkSpec#num_next_chunks SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks}.
108
+ # This field is only populated on
109
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search SearchService.Search}
110
+ # API.
111
+ class ChunkMetadata
112
+ include ::Google::Protobuf::MessageExts
113
+ extend ::Google::Protobuf::MessageExts::ClassMethods
114
+ end
115
+ end
116
+ end
117
+ end
118
+ end
119
+ 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
@@ -47,6 +47,37 @@ module Google
47
47
  CONTAINS = 2
48
48
  end
49
49
  end
50
+
51
+ # Autocomplete suggestions that are imported from Customer.
52
+ # @!attribute [rw] global_score
53
+ # @return [::Float]
54
+ # Global score of this suggestion. Control how this suggestion would be
55
+ # scored / ranked.
56
+ # @!attribute [rw] frequency
57
+ # @return [::Integer]
58
+ # Frequency of this suggestion. Will be used to rank suggestions when score
59
+ # is not available.
60
+ # @!attribute [rw] suggestion
61
+ # @return [::String]
62
+ # Required. The suggestion text.
63
+ # @!attribute [rw] language_code
64
+ # @return [::String]
65
+ # BCP-47 language code of this suggestion.
66
+ # @!attribute [rw] group_id
67
+ # @return [::String]
68
+ # If two suggestions have the same groupId, they will not be
69
+ # returned together. Instead the one ranked higher will be returned. This can
70
+ # be used to deduplicate semantically identical suggestions.
71
+ # @!attribute [rw] group_score
72
+ # @return [::Float]
73
+ # The score of this suggestion within its group.
74
+ # @!attribute [rw] alternative_phrases
75
+ # @return [::Array<::String>]
76
+ # Alternative matching phrases for this suggestion.
77
+ class CompletionSuggestion
78
+ include ::Google::Protobuf::MessageExts
79
+ extend ::Google::Protobuf::MessageExts::ClassMethods
80
+ end
50
81
  end
51
82
  end
52
83
  end