google-cloud-discovery_engine-v1beta 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +21 -6
  6. data/lib/google/cloud/discovery_engine/v1beta/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +764 -6
  14. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +715 -6
  16. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +15 -7
  20. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +21 -6
  21. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +71 -37
  22. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +13 -5
  23. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +71 -37
  25. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +21 -6
  26. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +312 -5
  27. data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +291 -5
  29. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +21 -6
  30. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1beta/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1beta/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +1092 -0
  44. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1beta/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +24 -19
  55. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +66 -0
  56. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +24 -19
  57. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +4 -0
  58. data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +18 -10
  59. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +13 -5
  60. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +18 -10
  61. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +21 -6
  62. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +26 -14
  63. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +26 -14
  64. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +104 -2
  65. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +13 -5
  66. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +97 -2
  67. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +21 -6
  68. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +59 -0
  69. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +9 -3
  70. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +9 -3
  71. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +27 -12
  72. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +13 -5
  73. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +27 -12
  74. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +21 -6
  75. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +23 -6
  76. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +13 -5
  77. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +21 -0
  78. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +23 -6
  79. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +21 -6
  80. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +8 -0
  81. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  82. data/lib/google/cloud/discovery_engine/v1beta.rb +4 -0
  83. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +69 -0
  84. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -1
  85. data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +55 -0
  86. data/lib/google/cloud/discoveryengine/v1beta/control_service_pb.rb +57 -0
  87. data/lib/google/cloud/discoveryengine/v1beta/control_service_services_pb.rb +69 -0
  88. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
  89. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
  90. data/lib/google/cloud/discoveryengine/v1beta/custom_tuning_model_pb.rb +48 -0
  91. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +1 -1
  92. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
  93. data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +1 -1
  94. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +1 -1
  95. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
  96. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
  97. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
  98. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
  99. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
  100. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
  101. data/lib/google/cloud/discoveryengine/v1beta/project_pb.rb +49 -0
  102. data/lib/google/cloud/discoveryengine/v1beta/project_service_pb.rb +50 -0
  103. data/lib/google/cloud/discoveryengine/v1beta/project_service_services_pb.rb +51 -0
  104. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
  105. data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
  106. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +7 -1
  107. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +5 -1
  108. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb.rb +2 -0
  109. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
  110. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +1 -1
  111. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  112. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
  113. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +1 -1
  114. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +362 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +25 -1
  116. data/proto_docs/google/cloud/discoveryengine/v1beta/control.rb +209 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1beta/control_service.rb +126 -0
  118. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +2 -2
  119. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +491 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1beta/custom_tuning_model.rb +75 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +2 -2
  122. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +4 -5
  123. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +9 -6
  124. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +5 -5
  125. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +144 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +79 -0
  128. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +312 -26
  129. data/proto_docs/google/cloud/discoveryengine/v1beta/project.rb +106 -0
  130. data/proto_docs/google/cloud/discoveryengine/v1beta/project_service.rb +57 -0
  131. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +127 -0
  132. data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +20 -19
  133. data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +5 -5
  134. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +181 -43
  135. data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +47 -1
  136. data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +88 -0
  137. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +3 -0
  138. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +25 -4
  139. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +13 -1
  140. metadata +56 -2
@@ -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 V1beta
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::V1beta::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::V1beta::Answer::Citation>]
37
+ # Citations.
38
+ # @!attribute [rw] references
39
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::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::V1beta::Answer::Step>]
46
+ # Answer generation steps.
47
+ # @!attribute [rw] query_understanding_info
48
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo]
49
+ # Query understanding information.
50
+ # @!attribute [rw] answer_skipped_reasons
51
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::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::V1beta::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::V1beta::Answer::Reference::UnstructuredDocumentInfo]
92
+ # Unstructured document information.
93
+ # @!attribute [rw] chunk_info
94
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::Answer::Step::Action::SearchAction]
195
+ # Search action.
196
+ # @!attribute [rw] observation
197
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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
@@ -131,6 +131,9 @@ module Google
131
131
 
132
132
  # The media industry vertical.
133
133
  MEDIA = 2
134
+
135
+ # The healthcare FHIR vertical.
136
+ HEALTHCARE_FHIR = 7
134
137
  end
135
138
 
136
139
  # The type of solution.
@@ -146,10 +149,31 @@ module Google
146
149
 
147
150
  # Used for use cases related to the Generative AI agent.
148
151
  SOLUTION_TYPE_CHAT = 3
152
+
153
+ # Used for use cases related to the Generative Chat agent.
154
+ # It's used for Generative chat engine only, the associated data stores
155
+ # must enrolled with `SOLUTION_TYPE_CHAT` solution.
156
+ SOLUTION_TYPE_GENERATIVE_CHAT = 4
157
+ end
158
+
159
+ # Defines a further subdivision of `SolutionType`.
160
+ # Specifically applies to
161
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH}.
162
+ module SearchUseCase
163
+ # Value used when unset. Will not occur in CSS.
164
+ SEARCH_USE_CASE_UNSPECIFIED = 0
165
+
166
+ # Search use case. Expects the traffic has a non-empty
167
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#query query}.
168
+ SEARCH_USE_CASE_SEARCH = 1
169
+
170
+ # Browse use case. Expects the traffic has an empty
171
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#query query}.
172
+ SEARCH_USE_CASE_BROWSE = 2
149
173
  end
150
174
 
151
175
  # Tiers of search features. Different tiers might have different
152
- # pricing. To learn more, please check the pricing documentation.
176
+ # pricing. To learn more, check the pricing documentation.
153
177
  module SearchTier
154
178
  # Default value when the enum is unspecified. This is invalid to use.
155
179
  SEARCH_TIER_UNSPECIFIED = 0
@@ -0,0 +1,209 @@
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 V1beta
24
+ # Defines circumstances to be checked before allowing a behavior
25
+ # @!attribute [rw] query_terms
26
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::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::V1beta::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
77
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig ServingConfig} to be
78
+ # considered at serving time. Permitted actions dependent on `SolutionType`.
79
+ # @!attribute [rw] boost_action
80
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Control::BoostAction]
81
+ # Defines a boost-type control
82
+ # @!attribute [rw] filter_action
83
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Control::FilterAction]
84
+ # Defines a filter-type control
85
+ # Currently not supported by Recommendation
86
+ # @!attribute [rw] redirect_action
87
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Control::RedirectAction]
88
+ # Defines a redirect-type control.
89
+ # @!attribute [rw] synonyms_action
90
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Control::SynonymsAction]
91
+ # Treats a group of terms as synonyms of one another.
92
+ # @!attribute [rw] name
93
+ # @return [::String]
94
+ # Immutable. Fully qualified name
95
+ # `projects/*/locations/global/dataStore/*/controls/*`
96
+ # @!attribute [rw] display_name
97
+ # @return [::String]
98
+ # Required. Human readable name. The identifier used in UI views.
99
+ #
100
+ # Must be UTF-8 encoded string. Length limit is 128 characters.
101
+ # Otherwise an INVALID ARGUMENT error is thrown.
102
+ # @!attribute [r] associated_serving_config_ids
103
+ # @return [::Array<::String>]
104
+ # Output only. List of all
105
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig ServingConfig} ids this
106
+ # control is attached to. May take up to 10 minutes to update after changes.
107
+ # @!attribute [rw] solution_type
108
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SolutionType]
109
+ # Required. Immutable. What solution the control belongs to.
110
+ #
111
+ # Must be compatible with vertical of resource.
112
+ # Otherwise an INVALID ARGUMENT error is thrown.
113
+ # @!attribute [rw] use_cases
114
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchUseCase>]
115
+ # Specifies the use case for the control.
116
+ # Affects what condition fields can be set.
117
+ # Only applies to
118
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH}.
119
+ # Currently only allow one use case per control.
120
+ # Must be set when solution_type is
121
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SolutionType::SOLUTION_TYPE_SEARCH SolutionType.SOLUTION_TYPE_SEARCH}.
122
+ # @!attribute [rw] conditions
123
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Condition>]
124
+ # Determines when the associated action will trigger.
125
+ #
126
+ # Omit to always apply the action.
127
+ # Currently only a single condition may be specified.
128
+ # Otherwise an INVALID ARGUMENT error is thrown.
129
+ class Control
130
+ include ::Google::Protobuf::MessageExts
131
+ extend ::Google::Protobuf::MessageExts::ClassMethods
132
+
133
+ # Adjusts order of products in returned list.
134
+ # @!attribute [rw] boost
135
+ # @return [::Float]
136
+ # Required. Strength of the boost, which should be in [-1, 1]. Negative
137
+ # boost means demotion. Default is 0.0 (No-op).
138
+ # @!attribute [rw] filter
139
+ # @return [::String]
140
+ # Required. Specifies which products to apply the boost to.
141
+ #
142
+ # If no filter is provided all products will be boosted (No-op).
143
+ # Syntax documentation:
144
+ # https://cloud.google.com/retail/docs/filter-and-order
145
+ # Maximum length is 5000 characters.
146
+ # Otherwise an INVALID ARGUMENT error is thrown.
147
+ # @!attribute [rw] data_store
148
+ # @return [::String]
149
+ # Required. Specifies which data store's documents can be boosted by this
150
+ # control. Full data store name e.g.
151
+ # projects/123/locations/global/collections/default_collection/dataStores/default_data_store
152
+ class BoostAction
153
+ include ::Google::Protobuf::MessageExts
154
+ extend ::Google::Protobuf::MessageExts::ClassMethods
155
+ end
156
+
157
+ # Specified which products may be included in results.
158
+ # Uses same filter as boost.
159
+ # @!attribute [rw] filter
160
+ # @return [::String]
161
+ # Required. A filter to apply on the matching condition results.
162
+ #
163
+ # Required
164
+ # Syntax documentation:
165
+ # https://cloud.google.com/retail/docs/filter-and-order
166
+ # Maximum length is 5000 characters. Otherwise an INVALID
167
+ # ARGUMENT error is thrown.
168
+ # @!attribute [rw] data_store
169
+ # @return [::String]
170
+ # Required. Specifies which data store's documents can be filtered by this
171
+ # control. Full data store name e.g.
172
+ # projects/123/locations/global/collections/default_collection/dataStores/default_data_store
173
+ class FilterAction
174
+ include ::Google::Protobuf::MessageExts
175
+ extend ::Google::Protobuf::MessageExts::ClassMethods
176
+ end
177
+
178
+ # Redirects a shopper to the provided URI.
179
+ # @!attribute [rw] redirect_uri
180
+ # @return [::String]
181
+ # Required. The URI to which the shopper will be redirected.
182
+ #
183
+ # Required.
184
+ # URI must have length equal or less than 2000 characters.
185
+ # Otherwise an INVALID ARGUMENT error is thrown.
186
+ class RedirectAction
187
+ include ::Google::Protobuf::MessageExts
188
+ extend ::Google::Protobuf::MessageExts::ClassMethods
189
+ end
190
+
191
+ # Creates a set of terms that will act as synonyms of one another.
192
+ #
193
+ # Example: "happy" will also be considered as "glad", "glad" will also be
194
+ # considered as "happy".
195
+ # @!attribute [rw] synonyms
196
+ # @return [::Array<::String>]
197
+ # Defines a set of synonyms.
198
+ # Can specify up to 100 synonyms.
199
+ # Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
200
+ # thrown.
201
+ class SynonymsAction
202
+ include ::Google::Protobuf::MessageExts
203
+ extend ::Google::Protobuf::MessageExts::ClassMethods
204
+ end
205
+ end
206
+ end
207
+ end
208
+ end
209
+ end