google-cloud-discovery_engine-v1beta 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +7 -3
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +7 -3
  4. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +925 -0
  5. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/credentials.rb +47 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +176 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +763 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +450 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest.rb +52 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service.rb +55 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +5 -4
  12. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +5 -4
  13. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +42 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +2 -1
  15. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +42 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +14 -12
  17. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +14 -12
  18. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +2 -2
  19. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +2 -2
  20. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +42 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  22. data/lib/google/cloud/discovery_engine/v1beta.rb +2 -1
  23. data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +1 -1
  24. data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +53 -0
  25. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +61 -0
  26. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +67 -0
  27. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +3 -1
  28. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  29. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +1 -1
  30. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +1 -2
  31. data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +13 -2
  32. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +134 -0
  33. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +175 -0
  34. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +2 -4
  35. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +2 -1
  36. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +17 -17
  37. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +161 -60
  38. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +37 -29
  39. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +1 -1
  40. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  41. metadata +15 -2
@@ -0,0 +1,925 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/discoveryengine/v1beta/conversational_search_service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module DiscoveryEngine
25
+ module V1beta
26
+ module ConversationalSearchService
27
+ ##
28
+ # Client for the ConversationalSearchService service.
29
+ #
30
+ # Service for conversational search.
31
+ #
32
+ class Client
33
+ include Paths
34
+
35
+ # @private
36
+ attr_reader :conversational_search_service_stub
37
+
38
+ ##
39
+ # Configure the ConversationalSearchService Client class.
40
+ #
41
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all ConversationalSearchService clients
47
+ # ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
50
+ #
51
+ # @yield [config] Configure the Client client.
52
+ # @yieldparam config [Client::Configuration]
53
+ #
54
+ # @return [Client::Configuration]
55
+ #
56
+ def self.configure
57
+ @configure ||= begin
58
+ namespace = ["Google", "Cloud", "DiscoveryEngine", "V1beta"]
59
+ parent_config = while namespace.any?
60
+ parent_name = namespace.join "::"
61
+ parent_const = const_get parent_name
62
+ break parent_const.configure if parent_const.respond_to? :configure
63
+ namespace.pop
64
+ end
65
+ default_config = Client::Configuration.new parent_config
66
+
67
+ default_config.timeout = 30.0
68
+ default_config.retry_policy = {
69
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
70
+ }
71
+
72
+ default_config
73
+ end
74
+ yield @configure if block_given?
75
+ @configure
76
+ end
77
+
78
+ ##
79
+ # Configure the ConversationalSearchService Client instance.
80
+ #
81
+ # The configuration is set to the derived mode, meaning that values can be changed,
82
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
83
+ # should be made on {Client.configure}.
84
+ #
85
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client::Configuration}
86
+ # for a description of the configuration fields.
87
+ #
88
+ # @yield [config] Configure the Client client.
89
+ # @yieldparam config [Client::Configuration]
90
+ #
91
+ # @return [Client::Configuration]
92
+ #
93
+ def configure
94
+ yield @config if block_given?
95
+ @config
96
+ end
97
+
98
+ ##
99
+ # Create a new ConversationalSearchService client object.
100
+ #
101
+ # @example
102
+ #
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.new
105
+ #
106
+ # # Create a client using a custom configuration
107
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.new do |config|
108
+ # config.timeout = 10.0
109
+ # end
110
+ #
111
+ # @yield [config] Configure the ConversationalSearchService client.
112
+ # @yieldparam config [Client::Configuration]
113
+ #
114
+ def initialize
115
+ # These require statements are intentionally placed here to initialize
116
+ # the gRPC module only when it's required.
117
+ # See https://github.com/googleapis/toolkit/issues/446
118
+ require "gapic/grpc"
119
+ require "google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb"
120
+
121
+ # Create the configuration object
122
+ @config = Configuration.new Client.configure
123
+
124
+ # Yield the configuration if needed
125
+ yield @config if block_given?
126
+
127
+ # Create credentials
128
+ credentials = @config.credentials
129
+ # Use self-signed JWT if the endpoint is unchanged from default,
130
+ # but only if the default endpoint does not have a region prefix.
131
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
132
+ !@config.endpoint.split(".").first.include?("-")
133
+ credentials ||= Credentials.default scope: @config.scope,
134
+ enable_self_signed_jwt: enable_self_signed_jwt
135
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
136
+ credentials = Credentials.new credentials, scope: @config.scope
137
+ end
138
+ @quota_project_id = @config.quota_project
139
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
140
+
141
+ @conversational_search_service_stub = ::Gapic::ServiceStub.new(
142
+ ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Stub,
143
+ credentials: credentials,
144
+ endpoint: @config.endpoint,
145
+ channel_args: @config.channel_args,
146
+ interceptors: @config.interceptors
147
+ )
148
+ end
149
+
150
+ # Service calls
151
+
152
+ ##
153
+ # Converses a conversation.
154
+ #
155
+ # @overload converse_conversation(request, options = nil)
156
+ # Pass arguments to `converse_conversation` via a request object, either of type
157
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationRequest} or an equivalent Hash.
158
+ #
159
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationRequest, ::Hash]
160
+ # A request object representing the call parameters. Required. To specify no
161
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
162
+ # @param options [::Gapic::CallOptions, ::Hash]
163
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
164
+ #
165
+ # @overload converse_conversation(name: nil, query: nil, serving_config: nil, conversation: nil, safe_search: nil)
166
+ # Pass arguments to `converse_conversation` via keyword arguments. Note that at
167
+ # least one keyword argument is required. To specify no parameters, or to keep all
168
+ # the default parameter values, pass an empty Hash as a request object (see above).
169
+ #
170
+ # @param name [::String]
171
+ # Required. The resource name of the Conversation to get. Format:
172
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
173
+ # Use
174
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
175
+ # to activate auto session mode, which automatically creates a new
176
+ # conversation inside a ConverseConversation session.
177
+ # @param query [::Google::Cloud::DiscoveryEngine::V1beta::TextInput, ::Hash]
178
+ # Required. Current user input.
179
+ # @param serving_config [::String]
180
+ # The resource name of the Serving Config to use. Format:
181
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
182
+ # If this is not set, the default serving config will be used.
183
+ # @param conversation [::Google::Cloud::DiscoveryEngine::V1beta::Conversation, ::Hash]
184
+ # The conversation to be used by auto session only. The name field will be
185
+ # ignored as we automatically assign new name for the conversation in auto
186
+ # session.
187
+ # @param safe_search [::Boolean]
188
+ # Whether to turn on safe search.
189
+ #
190
+ # @yield [response, operation] Access the result along with the RPC operation
191
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse]
192
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
193
+ #
194
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse]
195
+ #
196
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
197
+ #
198
+ # @example Basic example
199
+ # require "google/cloud/discovery_engine/v1beta"
200
+ #
201
+ # # Create a client object. The client can be reused for multiple calls.
202
+ # client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.new
203
+ #
204
+ # # Create a request. To set request fields, pass in keyword arguments.
205
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationRequest.new
206
+ #
207
+ # # Call the converse_conversation method.
208
+ # result = client.converse_conversation request
209
+ #
210
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse.
211
+ # p result
212
+ #
213
+ def converse_conversation request, options = nil
214
+ raise ::ArgumentError, "request must be provided" if request.nil?
215
+
216
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationRequest
217
+
218
+ # Converts hash and nil to an options object
219
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
220
+
221
+ # Customize the options with defaults
222
+ metadata = @config.rpcs.converse_conversation.metadata.to_h
223
+
224
+ # Set x-goog-api-client and x-goog-user-project headers
225
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
226
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
227
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
228
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
229
+
230
+ header_params = {}
231
+ if request.name
232
+ header_params["name"] = request.name
233
+ end
234
+
235
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
236
+ metadata[:"x-goog-request-params"] ||= request_params_header
237
+
238
+ options.apply_defaults timeout: @config.rpcs.converse_conversation.timeout,
239
+ metadata: metadata,
240
+ retry_policy: @config.rpcs.converse_conversation.retry_policy
241
+
242
+ options.apply_defaults timeout: @config.timeout,
243
+ metadata: @config.metadata,
244
+ retry_policy: @config.retry_policy
245
+
246
+ @conversational_search_service_stub.call_rpc :converse_conversation, request, options: options do |response, operation|
247
+ yield response, operation if block_given?
248
+ return response
249
+ end
250
+ rescue ::GRPC::BadStatus => e
251
+ raise ::Google::Cloud::Error.from_error(e)
252
+ end
253
+
254
+ ##
255
+ # Creates a Conversation.
256
+ #
257
+ # If the {::Google::Cloud::DiscoveryEngine::V1beta::Conversation Conversation} to
258
+ # create already exists, an ALREADY_EXISTS error is returned.
259
+ #
260
+ # @overload create_conversation(request, options = nil)
261
+ # Pass arguments to `create_conversation` via a request object, either of type
262
+ # {::Google::Cloud::DiscoveryEngine::V1beta::CreateConversationRequest} or an equivalent Hash.
263
+ #
264
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::CreateConversationRequest, ::Hash]
265
+ # A request object representing the call parameters. Required. To specify no
266
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
267
+ # @param options [::Gapic::CallOptions, ::Hash]
268
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
269
+ #
270
+ # @overload create_conversation(parent: nil, conversation: nil)
271
+ # Pass arguments to `create_conversation` via keyword arguments. Note that at
272
+ # least one keyword argument is required. To specify no parameters, or to keep all
273
+ # the default parameter values, pass an empty Hash as a request object (see above).
274
+ #
275
+ # @param parent [::String]
276
+ # Required. Full resource name of parent data store. Format:
277
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
278
+ # @param conversation [::Google::Cloud::DiscoveryEngine::V1beta::Conversation, ::Hash]
279
+ # Required. The conversation to create.
280
+ #
281
+ # @yield [response, operation] Access the result along with the RPC operation
282
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
283
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
284
+ #
285
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
286
+ #
287
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
288
+ #
289
+ # @example Basic example
290
+ # require "google/cloud/discovery_engine/v1beta"
291
+ #
292
+ # # Create a client object. The client can be reused for multiple calls.
293
+ # client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.new
294
+ #
295
+ # # Create a request. To set request fields, pass in keyword arguments.
296
+ # request = Google::Cloud::DiscoveryEngine::V1beta::CreateConversationRequest.new
297
+ #
298
+ # # Call the create_conversation method.
299
+ # result = client.create_conversation request
300
+ #
301
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Conversation.
302
+ # p result
303
+ #
304
+ def create_conversation request, options = nil
305
+ raise ::ArgumentError, "request must be provided" if request.nil?
306
+
307
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::CreateConversationRequest
308
+
309
+ # Converts hash and nil to an options object
310
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
311
+
312
+ # Customize the options with defaults
313
+ metadata = @config.rpcs.create_conversation.metadata.to_h
314
+
315
+ # Set x-goog-api-client and x-goog-user-project headers
316
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
317
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
318
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
319
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
320
+
321
+ header_params = {}
322
+ if request.parent
323
+ header_params["parent"] = request.parent
324
+ end
325
+
326
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
327
+ metadata[:"x-goog-request-params"] ||= request_params_header
328
+
329
+ options.apply_defaults timeout: @config.rpcs.create_conversation.timeout,
330
+ metadata: metadata,
331
+ retry_policy: @config.rpcs.create_conversation.retry_policy
332
+
333
+ options.apply_defaults timeout: @config.timeout,
334
+ metadata: @config.metadata,
335
+ retry_policy: @config.retry_policy
336
+
337
+ @conversational_search_service_stub.call_rpc :create_conversation, request, options: options do |response, operation|
338
+ yield response, operation if block_given?
339
+ return response
340
+ end
341
+ rescue ::GRPC::BadStatus => e
342
+ raise ::Google::Cloud::Error.from_error(e)
343
+ end
344
+
345
+ ##
346
+ # Deletes a Conversation.
347
+ #
348
+ # If the {::Google::Cloud::DiscoveryEngine::V1beta::Conversation Conversation} to
349
+ # delete does not exist, a NOT_FOUND error is returned.
350
+ #
351
+ # @overload delete_conversation(request, options = nil)
352
+ # Pass arguments to `delete_conversation` via a request object, either of type
353
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DeleteConversationRequest} or an equivalent Hash.
354
+ #
355
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::DeleteConversationRequest, ::Hash]
356
+ # A request object representing the call parameters. Required. To specify no
357
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
358
+ # @param options [::Gapic::CallOptions, ::Hash]
359
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
360
+ #
361
+ # @overload delete_conversation(name: nil)
362
+ # Pass arguments to `delete_conversation` via keyword arguments. Note that at
363
+ # least one keyword argument is required. To specify no parameters, or to keep all
364
+ # the default parameter values, pass an empty Hash as a request object (see above).
365
+ #
366
+ # @param name [::String]
367
+ # Required. The resource name of the Conversation to delete. Format:
368
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
369
+ #
370
+ # @yield [response, operation] Access the result along with the RPC operation
371
+ # @yieldparam response [::Google::Protobuf::Empty]
372
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
373
+ #
374
+ # @return [::Google::Protobuf::Empty]
375
+ #
376
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
377
+ #
378
+ # @example Basic example
379
+ # require "google/cloud/discovery_engine/v1beta"
380
+ #
381
+ # # Create a client object. The client can be reused for multiple calls.
382
+ # client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.new
383
+ #
384
+ # # Create a request. To set request fields, pass in keyword arguments.
385
+ # request = Google::Cloud::DiscoveryEngine::V1beta::DeleteConversationRequest.new
386
+ #
387
+ # # Call the delete_conversation method.
388
+ # result = client.delete_conversation request
389
+ #
390
+ # # The returned object is of type Google::Protobuf::Empty.
391
+ # p result
392
+ #
393
+ def delete_conversation request, options = nil
394
+ raise ::ArgumentError, "request must be provided" if request.nil?
395
+
396
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DeleteConversationRequest
397
+
398
+ # Converts hash and nil to an options object
399
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
400
+
401
+ # Customize the options with defaults
402
+ metadata = @config.rpcs.delete_conversation.metadata.to_h
403
+
404
+ # Set x-goog-api-client and x-goog-user-project headers
405
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
406
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
407
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
408
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
409
+
410
+ header_params = {}
411
+ if request.name
412
+ header_params["name"] = request.name
413
+ end
414
+
415
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
416
+ metadata[:"x-goog-request-params"] ||= request_params_header
417
+
418
+ options.apply_defaults timeout: @config.rpcs.delete_conversation.timeout,
419
+ metadata: metadata,
420
+ retry_policy: @config.rpcs.delete_conversation.retry_policy
421
+
422
+ options.apply_defaults timeout: @config.timeout,
423
+ metadata: @config.metadata,
424
+ retry_policy: @config.retry_policy
425
+
426
+ @conversational_search_service_stub.call_rpc :delete_conversation, request, options: options do |response, operation|
427
+ yield response, operation if block_given?
428
+ return response
429
+ end
430
+ rescue ::GRPC::BadStatus => e
431
+ raise ::Google::Cloud::Error.from_error(e)
432
+ end
433
+
434
+ ##
435
+ # Updates a Conversation.
436
+ #
437
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Conversation Conversation} action
438
+ # type cannot be changed. If the
439
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Conversation Conversation} to update
440
+ # does not exist, a NOT_FOUND error is returned.
441
+ #
442
+ # @overload update_conversation(request, options = nil)
443
+ # Pass arguments to `update_conversation` via a request object, either of type
444
+ # {::Google::Cloud::DiscoveryEngine::V1beta::UpdateConversationRequest} or an equivalent Hash.
445
+ #
446
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::UpdateConversationRequest, ::Hash]
447
+ # A request object representing the call parameters. Required. To specify no
448
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
449
+ # @param options [::Gapic::CallOptions, ::Hash]
450
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
451
+ #
452
+ # @overload update_conversation(conversation: nil, update_mask: nil)
453
+ # Pass arguments to `update_conversation` via keyword arguments. Note that at
454
+ # least one keyword argument is required. To specify no parameters, or to keep all
455
+ # the default parameter values, pass an empty Hash as a request object (see above).
456
+ #
457
+ # @param conversation [::Google::Cloud::DiscoveryEngine::V1beta::Conversation, ::Hash]
458
+ # Required. The Conversation to update.
459
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
460
+ # Indicates which fields in the provided
461
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Conversation Conversation} to update.
462
+ # The following are NOT supported:
463
+ #
464
+ # * [conversation.name][]
465
+ #
466
+ # If not set or empty, all supported fields are updated.
467
+ #
468
+ # @yield [response, operation] Access the result along with the RPC operation
469
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
470
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
471
+ #
472
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
473
+ #
474
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
475
+ #
476
+ # @example Basic example
477
+ # require "google/cloud/discovery_engine/v1beta"
478
+ #
479
+ # # Create a client object. The client can be reused for multiple calls.
480
+ # client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.new
481
+ #
482
+ # # Create a request. To set request fields, pass in keyword arguments.
483
+ # request = Google::Cloud::DiscoveryEngine::V1beta::UpdateConversationRequest.new
484
+ #
485
+ # # Call the update_conversation method.
486
+ # result = client.update_conversation request
487
+ #
488
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Conversation.
489
+ # p result
490
+ #
491
+ def update_conversation request, options = nil
492
+ raise ::ArgumentError, "request must be provided" if request.nil?
493
+
494
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::UpdateConversationRequest
495
+
496
+ # Converts hash and nil to an options object
497
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
498
+
499
+ # Customize the options with defaults
500
+ metadata = @config.rpcs.update_conversation.metadata.to_h
501
+
502
+ # Set x-goog-api-client and x-goog-user-project headers
503
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
504
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
505
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
506
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
507
+
508
+ header_params = {}
509
+ if request.conversation&.name
510
+ header_params["conversation.name"] = request.conversation.name
511
+ end
512
+
513
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
514
+ metadata[:"x-goog-request-params"] ||= request_params_header
515
+
516
+ options.apply_defaults timeout: @config.rpcs.update_conversation.timeout,
517
+ metadata: metadata,
518
+ retry_policy: @config.rpcs.update_conversation.retry_policy
519
+
520
+ options.apply_defaults timeout: @config.timeout,
521
+ metadata: @config.metadata,
522
+ retry_policy: @config.retry_policy
523
+
524
+ @conversational_search_service_stub.call_rpc :update_conversation, request, options: options do |response, operation|
525
+ yield response, operation if block_given?
526
+ return response
527
+ end
528
+ rescue ::GRPC::BadStatus => e
529
+ raise ::Google::Cloud::Error.from_error(e)
530
+ end
531
+
532
+ ##
533
+ # Gets a Conversation.
534
+ #
535
+ # @overload get_conversation(request, options = nil)
536
+ # Pass arguments to `get_conversation` via a request object, either of type
537
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GetConversationRequest} or an equivalent Hash.
538
+ #
539
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::GetConversationRequest, ::Hash]
540
+ # A request object representing the call parameters. Required. To specify no
541
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
542
+ # @param options [::Gapic::CallOptions, ::Hash]
543
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
544
+ #
545
+ # @overload get_conversation(name: nil)
546
+ # Pass arguments to `get_conversation` via keyword arguments. Note that at
547
+ # least one keyword argument is required. To specify no parameters, or to keep all
548
+ # the default parameter values, pass an empty Hash as a request object (see above).
549
+ #
550
+ # @param name [::String]
551
+ # Required. The resource name of the Conversation to get. Format:
552
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
553
+ #
554
+ # @yield [response, operation] Access the result along with the RPC operation
555
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
556
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
557
+ #
558
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
559
+ #
560
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
561
+ #
562
+ # @example Basic example
563
+ # require "google/cloud/discovery_engine/v1beta"
564
+ #
565
+ # # Create a client object. The client can be reused for multiple calls.
566
+ # client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.new
567
+ #
568
+ # # Create a request. To set request fields, pass in keyword arguments.
569
+ # request = Google::Cloud::DiscoveryEngine::V1beta::GetConversationRequest.new
570
+ #
571
+ # # Call the get_conversation method.
572
+ # result = client.get_conversation request
573
+ #
574
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Conversation.
575
+ # p result
576
+ #
577
+ def get_conversation request, options = nil
578
+ raise ::ArgumentError, "request must be provided" if request.nil?
579
+
580
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::GetConversationRequest
581
+
582
+ # Converts hash and nil to an options object
583
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
584
+
585
+ # Customize the options with defaults
586
+ metadata = @config.rpcs.get_conversation.metadata.to_h
587
+
588
+ # Set x-goog-api-client and x-goog-user-project headers
589
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
590
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
591
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
592
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
593
+
594
+ header_params = {}
595
+ if request.name
596
+ header_params["name"] = request.name
597
+ end
598
+
599
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
600
+ metadata[:"x-goog-request-params"] ||= request_params_header
601
+
602
+ options.apply_defaults timeout: @config.rpcs.get_conversation.timeout,
603
+ metadata: metadata,
604
+ retry_policy: @config.rpcs.get_conversation.retry_policy
605
+
606
+ options.apply_defaults timeout: @config.timeout,
607
+ metadata: @config.metadata,
608
+ retry_policy: @config.retry_policy
609
+
610
+ @conversational_search_service_stub.call_rpc :get_conversation, request, options: options do |response, operation|
611
+ yield response, operation if block_given?
612
+ return response
613
+ end
614
+ rescue ::GRPC::BadStatus => e
615
+ raise ::Google::Cloud::Error.from_error(e)
616
+ end
617
+
618
+ ##
619
+ # Lists all Conversations by their parent
620
+ # [DataStore][google.cloud.discoveryengine.v1beta.DataStore].
621
+ #
622
+ # @overload list_conversations(request, options = nil)
623
+ # Pass arguments to `list_conversations` via a request object, either of type
624
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListConversationsRequest} or an equivalent Hash.
625
+ #
626
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::ListConversationsRequest, ::Hash]
627
+ # A request object representing the call parameters. Required. To specify no
628
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
629
+ # @param options [::Gapic::CallOptions, ::Hash]
630
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
631
+ #
632
+ # @overload list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
633
+ # Pass arguments to `list_conversations` via keyword arguments. Note that at
634
+ # least one keyword argument is required. To specify no parameters, or to keep all
635
+ # the default parameter values, pass an empty Hash as a request object (see above).
636
+ #
637
+ # @param parent [::String]
638
+ # Required. The data store resource name. Format:
639
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
640
+ # @param page_size [::Integer]
641
+ # Maximum number of results to return. If unspecified, defaults
642
+ # to 50. Max allowed value is 1000.
643
+ # @param page_token [::String]
644
+ # A page token, received from a previous `ListConversations` call.
645
+ # Provide this to retrieve the subsequent page.
646
+ # @param filter [::String]
647
+ # A filter to apply on the list results. The supported features are:
648
+ # user_pseudo_id, state.
649
+ #
650
+ # Example:
651
+ # "user_pseudo_id = some_id"
652
+ # @param order_by [::String]
653
+ # A comma-separated list of fields to order by, sorted in ascending order.
654
+ # Use "desc" after a field name for descending.
655
+ # Supported fields:
656
+ # * `update_time`
657
+ # * `create_time`
658
+ # * `conversation_name`
659
+ #
660
+ # Example:
661
+ # "update_time desc"
662
+ # "create_time"
663
+ #
664
+ # @yield [response, operation] Access the result along with the RPC operation
665
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>]
666
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
667
+ #
668
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>]
669
+ #
670
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
671
+ #
672
+ # @example Basic example
673
+ # require "google/cloud/discovery_engine/v1beta"
674
+ #
675
+ # # Create a client object. The client can be reused for multiple calls.
676
+ # client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.new
677
+ #
678
+ # # Create a request. To set request fields, pass in keyword arguments.
679
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ListConversationsRequest.new
680
+ #
681
+ # # Call the list_conversations method.
682
+ # result = client.list_conversations request
683
+ #
684
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
685
+ # # over elements, and API calls will be issued to fetch pages as needed.
686
+ # result.each do |item|
687
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::Conversation.
688
+ # p item
689
+ # end
690
+ #
691
+ def list_conversations request, options = nil
692
+ raise ::ArgumentError, "request must be provided" if request.nil?
693
+
694
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ListConversationsRequest
695
+
696
+ # Converts hash and nil to an options object
697
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
698
+
699
+ # Customize the options with defaults
700
+ metadata = @config.rpcs.list_conversations.metadata.to_h
701
+
702
+ # Set x-goog-api-client and x-goog-user-project headers
703
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
704
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
705
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
706
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
707
+
708
+ header_params = {}
709
+ if request.parent
710
+ header_params["parent"] = request.parent
711
+ end
712
+
713
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
714
+ metadata[:"x-goog-request-params"] ||= request_params_header
715
+
716
+ options.apply_defaults timeout: @config.rpcs.list_conversations.timeout,
717
+ metadata: metadata,
718
+ retry_policy: @config.rpcs.list_conversations.retry_policy
719
+
720
+ options.apply_defaults timeout: @config.timeout,
721
+ metadata: @config.metadata,
722
+ retry_policy: @config.retry_policy
723
+
724
+ @conversational_search_service_stub.call_rpc :list_conversations, request, options: options do |response, operation|
725
+ response = ::Gapic::PagedEnumerable.new @conversational_search_service_stub, :list_conversations, request, response, operation, options
726
+ yield response, operation if block_given?
727
+ return response
728
+ end
729
+ rescue ::GRPC::BadStatus => e
730
+ raise ::Google::Cloud::Error.from_error(e)
731
+ end
732
+
733
+ ##
734
+ # Configuration class for the ConversationalSearchService API.
735
+ #
736
+ # This class represents the configuration for ConversationalSearchService,
737
+ # providing control over timeouts, retry behavior, logging, transport
738
+ # parameters, and other low-level controls. Certain parameters can also be
739
+ # applied individually to specific RPCs. See
740
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client::Configuration::Rpcs}
741
+ # for a list of RPCs that can be configured independently.
742
+ #
743
+ # Configuration can be applied globally to all clients, or to a single client
744
+ # on construction.
745
+ #
746
+ # @example
747
+ #
748
+ # # Modify the global config, setting the timeout for
749
+ # # converse_conversation to 20 seconds,
750
+ # # and all remaining timeouts to 10 seconds.
751
+ # ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.configure do |config|
752
+ # config.timeout = 10.0
753
+ # config.rpcs.converse_conversation.timeout = 20.0
754
+ # end
755
+ #
756
+ # # Apply the above configuration only to a new client.
757
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client.new do |config|
758
+ # config.timeout = 10.0
759
+ # config.rpcs.converse_conversation.timeout = 20.0
760
+ # end
761
+ #
762
+ # @!attribute [rw] endpoint
763
+ # The hostname or hostname:port of the service endpoint.
764
+ # Defaults to `"discoveryengine.googleapis.com"`.
765
+ # @return [::String]
766
+ # @!attribute [rw] credentials
767
+ # Credentials to send with calls. You may provide any of the following types:
768
+ # * (`String`) The path to a service account key file in JSON format
769
+ # * (`Hash`) A service account key as a Hash
770
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
771
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
772
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
773
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
774
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
775
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
776
+ # * (`nil`) indicating no credentials
777
+ # @return [::Object]
778
+ # @!attribute [rw] scope
779
+ # The OAuth scopes
780
+ # @return [::Array<::String>]
781
+ # @!attribute [rw] lib_name
782
+ # The library name as recorded in instrumentation and logging
783
+ # @return [::String]
784
+ # @!attribute [rw] lib_version
785
+ # The library version as recorded in instrumentation and logging
786
+ # @return [::String]
787
+ # @!attribute [rw] channel_args
788
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
789
+ # `GRPC::Core::Channel` object is provided as the credential.
790
+ # @return [::Hash]
791
+ # @!attribute [rw] interceptors
792
+ # An array of interceptors that are run before calls are executed.
793
+ # @return [::Array<::GRPC::ClientInterceptor>]
794
+ # @!attribute [rw] timeout
795
+ # The call timeout in seconds.
796
+ # @return [::Numeric]
797
+ # @!attribute [rw] metadata
798
+ # Additional gRPC headers to be sent with the call.
799
+ # @return [::Hash{::Symbol=>::String}]
800
+ # @!attribute [rw] retry_policy
801
+ # The retry policy. The value is a hash with the following keys:
802
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
803
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
804
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
805
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
806
+ # trigger a retry.
807
+ # @return [::Hash]
808
+ # @!attribute [rw] quota_project
809
+ # A separate project against which to charge quota.
810
+ # @return [::String]
811
+ #
812
+ class Configuration
813
+ extend ::Gapic::Config
814
+
815
+ DEFAULT_ENDPOINT = "discoveryengine.googleapis.com"
816
+
817
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
818
+ config_attr :credentials, nil do |value|
819
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
820
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
821
+ allowed.any? { |klass| klass === value }
822
+ end
823
+ config_attr :scope, nil, ::String, ::Array, nil
824
+ config_attr :lib_name, nil, ::String, nil
825
+ config_attr :lib_version, nil, ::String, nil
826
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
827
+ config_attr :interceptors, nil, ::Array, nil
828
+ config_attr :timeout, nil, ::Numeric, nil
829
+ config_attr :metadata, nil, ::Hash, nil
830
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
831
+ config_attr :quota_project, nil, ::String, nil
832
+
833
+ # @private
834
+ def initialize parent_config = nil
835
+ @parent_config = parent_config unless parent_config.nil?
836
+
837
+ yield self if block_given?
838
+ end
839
+
840
+ ##
841
+ # Configurations for individual RPCs
842
+ # @return [Rpcs]
843
+ #
844
+ def rpcs
845
+ @rpcs ||= begin
846
+ parent_rpcs = nil
847
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
848
+ Rpcs.new parent_rpcs
849
+ end
850
+ end
851
+
852
+ ##
853
+ # Configuration RPC class for the ConversationalSearchService API.
854
+ #
855
+ # Includes fields providing the configuration for each RPC in this service.
856
+ # Each configuration object is of type `Gapic::Config::Method` and includes
857
+ # the following configuration fields:
858
+ #
859
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
860
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
861
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
862
+ # include the following keys:
863
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
864
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
865
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
866
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
867
+ # trigger a retry.
868
+ #
869
+ class Rpcs
870
+ ##
871
+ # RPC-specific configuration for `converse_conversation`
872
+ # @return [::Gapic::Config::Method]
873
+ #
874
+ attr_reader :converse_conversation
875
+ ##
876
+ # RPC-specific configuration for `create_conversation`
877
+ # @return [::Gapic::Config::Method]
878
+ #
879
+ attr_reader :create_conversation
880
+ ##
881
+ # RPC-specific configuration for `delete_conversation`
882
+ # @return [::Gapic::Config::Method]
883
+ #
884
+ attr_reader :delete_conversation
885
+ ##
886
+ # RPC-specific configuration for `update_conversation`
887
+ # @return [::Gapic::Config::Method]
888
+ #
889
+ attr_reader :update_conversation
890
+ ##
891
+ # RPC-specific configuration for `get_conversation`
892
+ # @return [::Gapic::Config::Method]
893
+ #
894
+ attr_reader :get_conversation
895
+ ##
896
+ # RPC-specific configuration for `list_conversations`
897
+ # @return [::Gapic::Config::Method]
898
+ #
899
+ attr_reader :list_conversations
900
+
901
+ # @private
902
+ def initialize parent_rpcs = nil
903
+ converse_conversation_config = parent_rpcs.converse_conversation if parent_rpcs.respond_to? :converse_conversation
904
+ @converse_conversation = ::Gapic::Config::Method.new converse_conversation_config
905
+ create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation
906
+ @create_conversation = ::Gapic::Config::Method.new create_conversation_config
907
+ delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation
908
+ @delete_conversation = ::Gapic::Config::Method.new delete_conversation_config
909
+ update_conversation_config = parent_rpcs.update_conversation if parent_rpcs.respond_to? :update_conversation
910
+ @update_conversation = ::Gapic::Config::Method.new update_conversation_config
911
+ get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation
912
+ @get_conversation = ::Gapic::Config::Method.new get_conversation_config
913
+ list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations
914
+ @list_conversations = ::Gapic::Config::Method.new list_conversations_config
915
+
916
+ yield self if block_given?
917
+ end
918
+ end
919
+ end
920
+ end
921
+ end
922
+ end
923
+ end
924
+ end
925
+ end