google-cloud-discovery_engine-v1 2.3.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +4 -4
  4. data/lib/google/cloud/discovery_engine/v1/assistant_service/client.rb +509 -0
  5. data/lib/google/cloud/discovery_engine/v1/assistant_service/credentials.rb +47 -0
  6. data/lib/google/cloud/discovery_engine/v1/assistant_service/paths.rb +169 -0
  7. data/lib/google/cloud/discovery_engine/v1/assistant_service/rest/client.rb +478 -0
  8. data/lib/google/cloud/discovery_engine/v1/assistant_service/rest/service_stub.rb +137 -0
  9. data/lib/google/cloud/discovery_engine/v1/assistant_service/rest.rb +52 -0
  10. data/lib/google/cloud/discovery_engine/v1/assistant_service.rb +55 -0
  11. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +16 -4
  12. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +16 -4
  13. data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -2
  14. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +16 -28
  15. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +16 -28
  16. data/lib/google/cloud/discovery_engine/v1/session_service/client.rb +920 -0
  17. data/lib/google/cloud/discovery_engine/v1/session_service/credentials.rb +47 -0
  18. data/lib/google/cloud/discovery_engine/v1/session_service/paths.rb +330 -0
  19. data/lib/google/cloud/discovery_engine/v1/session_service/rest/client.rb +859 -0
  20. data/lib/google/cloud/discovery_engine/v1/session_service/rest/service_stub.rb +462 -0
  21. data/lib/google/cloud/discovery_engine/v1/session_service/rest.rb +52 -0
  22. data/lib/google/cloud/discovery_engine/v1/session_service.rb +55 -0
  23. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  24. data/lib/google/cloud/discovery_engine/v1.rb +5 -3
  25. data/lib/google/cloud/discoveryengine/v1/assist_answer_pb.rb +59 -0
  26. data/lib/google/cloud/discoveryengine/v1/assistant_pb.rb +45 -0
  27. data/lib/google/cloud/discoveryengine/v1/assistant_service_pb.rb +62 -0
  28. data/lib/google/cloud/discoveryengine/v1/assistant_service_services_pb.rb +45 -0
  29. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +1 -1
  30. data/lib/google/cloud/discoveryengine/v1/session_service_pb.rb +49 -0
  31. data/lib/google/cloud/discoveryengine/v1/session_service_services_pb.rb +64 -0
  32. data/proto_docs/google/cloud/discoveryengine/v1/assist_answer.rb +278 -0
  33. data/proto_docs/google/cloud/discoveryengine/v1/assistant.rb +39 -0
  34. data/proto_docs/google/cloud/discoveryengine/v1/assistant_service.rb +207 -0
  35. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +15 -3
  36. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +8 -14
  37. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +20 -4
  38. metadata +24 -1
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module DiscoveryEngine
24
+ module V1
25
+ module SessionService
26
+ # Credentials for the SessionService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "GOOGLE_CLOUD_CREDENTIALS",
33
+ "GOOGLE_CLOUD_KEYFILE",
34
+ "GCLOUD_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
36
+ "GOOGLE_CLOUD_KEYFILE_JSON",
37
+ "GCLOUD_KEYFILE_JSON"
38
+ ]
39
+ self.paths = [
40
+ "~/.config/google_cloud/application_default_credentials.json"
41
+ ]
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,330 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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
+ module SessionService
25
+ # Path helper methods for the SessionService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Answer resource string.
29
+ #
30
+ # @overload answer_path(project:, location:, data_store:, session:, answer:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}`
34
+ #
35
+ # @param project [String]
36
+ # @param location [String]
37
+ # @param data_store [String]
38
+ # @param session [String]
39
+ # @param answer [String]
40
+ #
41
+ # @overload answer_path(project:, location:, collection:, data_store:, session:, answer:)
42
+ # The resource will be in the following format:
43
+ #
44
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}`
45
+ #
46
+ # @param project [String]
47
+ # @param location [String]
48
+ # @param collection [String]
49
+ # @param data_store [String]
50
+ # @param session [String]
51
+ # @param answer [String]
52
+ #
53
+ # @overload answer_path(project:, location:, collection:, engine:, session:, answer:)
54
+ # The resource will be in the following format:
55
+ #
56
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}`
57
+ #
58
+ # @param project [String]
59
+ # @param location [String]
60
+ # @param collection [String]
61
+ # @param engine [String]
62
+ # @param session [String]
63
+ # @param answer [String]
64
+ #
65
+ # @return [::String]
66
+ def answer_path **args
67
+ resources = {
68
+ "answer:data_store:location:project:session" => (proc do |project:, location:, data_store:, session:, answer:|
69
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
70
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
71
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
72
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
73
+
74
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}"
75
+ end),
76
+ "answer:collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:, answer:|
77
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
78
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
79
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
80
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
81
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
82
+
83
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}"
84
+ end),
85
+ "answer:collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:, answer:|
86
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
87
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
88
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
89
+ raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/"
90
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
91
+
92
+ "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}/answers/#{answer}"
93
+ end)
94
+ }
95
+
96
+ resource = resources[args.keys.sort.join(":")]
97
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
98
+ resource.call(**args)
99
+ end
100
+
101
+ ##
102
+ # Create a fully-qualified Chunk resource string.
103
+ #
104
+ # @overload chunk_path(project:, location:, data_store:, branch:, document:, chunk:)
105
+ # The resource will be in the following format:
106
+ #
107
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`
108
+ #
109
+ # @param project [String]
110
+ # @param location [String]
111
+ # @param data_store [String]
112
+ # @param branch [String]
113
+ # @param document [String]
114
+ # @param chunk [String]
115
+ #
116
+ # @overload chunk_path(project:, location:, collection:, data_store:, branch:, document:, chunk:)
117
+ # The resource will be in the following format:
118
+ #
119
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`
120
+ #
121
+ # @param project [String]
122
+ # @param location [String]
123
+ # @param collection [String]
124
+ # @param data_store [String]
125
+ # @param branch [String]
126
+ # @param document [String]
127
+ # @param chunk [String]
128
+ #
129
+ # @return [::String]
130
+ def chunk_path **args
131
+ resources = {
132
+ "branch:chunk:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:, chunk:|
133
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
134
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
135
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
136
+ raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/"
137
+ raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/"
138
+
139
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}"
140
+ end),
141
+ "branch:chunk:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:, chunk:|
142
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
143
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
144
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
145
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
146
+ raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/"
147
+ raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/"
148
+
149
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}"
150
+ end)
151
+ }
152
+
153
+ resource = resources[args.keys.sort.join(":")]
154
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
155
+ resource.call(**args)
156
+ end
157
+
158
+ ##
159
+ # Create a fully-qualified DataStore resource string.
160
+ #
161
+ # @overload data_store_path(project:, location:, data_store:)
162
+ # The resource will be in the following format:
163
+ #
164
+ # `projects/{project}/locations/{location}/dataStores/{data_store}`
165
+ #
166
+ # @param project [String]
167
+ # @param location [String]
168
+ # @param data_store [String]
169
+ #
170
+ # @overload data_store_path(project:, location:, collection:, data_store:)
171
+ # The resource will be in the following format:
172
+ #
173
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
174
+ #
175
+ # @param project [String]
176
+ # @param location [String]
177
+ # @param collection [String]
178
+ # @param data_store [String]
179
+ #
180
+ # @return [::String]
181
+ def data_store_path **args
182
+ resources = {
183
+ "data_store:location:project" => (proc do |project:, location:, data_store:|
184
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
185
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
186
+
187
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}"
188
+ end),
189
+ "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:|
190
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
191
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
192
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
193
+
194
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}"
195
+ end)
196
+ }
197
+
198
+ resource = resources[args.keys.sort.join(":")]
199
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
200
+ resource.call(**args)
201
+ end
202
+
203
+ ##
204
+ # Create a fully-qualified Document resource string.
205
+ #
206
+ # @overload document_path(project:, location:, data_store:, branch:, document:)
207
+ # The resource will be in the following format:
208
+ #
209
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`
210
+ #
211
+ # @param project [String]
212
+ # @param location [String]
213
+ # @param data_store [String]
214
+ # @param branch [String]
215
+ # @param document [String]
216
+ #
217
+ # @overload document_path(project:, location:, collection:, data_store:, branch:, document:)
218
+ # The resource will be in the following format:
219
+ #
220
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`
221
+ #
222
+ # @param project [String]
223
+ # @param location [String]
224
+ # @param collection [String]
225
+ # @param data_store [String]
226
+ # @param branch [String]
227
+ # @param document [String]
228
+ #
229
+ # @return [::String]
230
+ def document_path **args
231
+ resources = {
232
+ "branch:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:|
233
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
234
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
235
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
236
+ raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/"
237
+
238
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}"
239
+ end),
240
+ "branch:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:|
241
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
242
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
243
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
244
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
245
+ raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/"
246
+
247
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}"
248
+ end)
249
+ }
250
+
251
+ resource = resources[args.keys.sort.join(":")]
252
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
253
+ resource.call(**args)
254
+ end
255
+
256
+ ##
257
+ # Create a fully-qualified Session resource string.
258
+ #
259
+ # @overload session_path(project:, location:, data_store:, session:)
260
+ # The resource will be in the following format:
261
+ #
262
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}`
263
+ #
264
+ # @param project [String]
265
+ # @param location [String]
266
+ # @param data_store [String]
267
+ # @param session [String]
268
+ #
269
+ # @overload session_path(project:, location:, collection:, data_store:, session:)
270
+ # The resource will be in the following format:
271
+ #
272
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}`
273
+ #
274
+ # @param project [String]
275
+ # @param location [String]
276
+ # @param collection [String]
277
+ # @param data_store [String]
278
+ # @param session [String]
279
+ #
280
+ # @overload session_path(project:, location:, collection:, engine:, session:)
281
+ # The resource will be in the following format:
282
+ #
283
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
284
+ #
285
+ # @param project [String]
286
+ # @param location [String]
287
+ # @param collection [String]
288
+ # @param engine [String]
289
+ # @param session [String]
290
+ #
291
+ # @return [::String]
292
+ def session_path **args
293
+ resources = {
294
+ "data_store:location:project:session" => (proc do |project:, location:, data_store:, session:|
295
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
296
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
297
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
298
+
299
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}"
300
+ end),
301
+ "collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:|
302
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
303
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
304
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
305
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
306
+
307
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}"
308
+ end),
309
+ "collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:|
310
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
311
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
312
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
313
+ raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/"
314
+
315
+ "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}"
316
+ end)
317
+ }
318
+
319
+ resource = resources[args.keys.sort.join(":")]
320
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
321
+ resource.call(**args)
322
+ end
323
+
324
+ extend self
325
+ end
326
+ end
327
+ end
328
+ end
329
+ end
330
+ end