google-cloud-contact_center_insights-v1 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2978 @@
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/contactcenterinsights/v1/contact_center_insights_pb"
21
+ require "google/cloud/contact_center_insights/v1/contact_center_insights/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module ContactCenterInsights
26
+ module V1
27
+ module ContactCenterInsights
28
+ module Rest
29
+ ##
30
+ # REST client for the ContactCenterInsights service.
31
+ #
32
+ # An API that lets users analyze and explore their business conversation data.
33
+ #
34
+ class Client
35
+ include Paths
36
+
37
+ # @private
38
+ attr_reader :contact_center_insights_stub
39
+
40
+ ##
41
+ # Configure the ContactCenterInsights Client class.
42
+ #
43
+ # See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client::Configuration}
44
+ # for a description of the configuration fields.
45
+ #
46
+ # @example
47
+ #
48
+ # # Modify the configuration for all ContactCenterInsights clients
49
+ # ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "ContactCenterInsights", "V1"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config.timeout = 60.0
70
+ default_config.retry_policy = {
71
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
72
+ }
73
+
74
+ default_config
75
+ end
76
+ yield @configure if block_given?
77
+ @configure
78
+ end
79
+
80
+ ##
81
+ # Configure the ContactCenterInsights Client instance.
82
+ #
83
+ # The configuration is set to the derived mode, meaning that values can be changed,
84
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
85
+ # should be made on {Client.configure}.
86
+ #
87
+ # See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client::Configuration}
88
+ # for a description of the configuration fields.
89
+ #
90
+ # @yield [config] Configure the Client client.
91
+ # @yieldparam config [Client::Configuration]
92
+ #
93
+ # @return [Client::Configuration]
94
+ #
95
+ def configure
96
+ yield @config if block_given?
97
+ @config
98
+ end
99
+
100
+ ##
101
+ # Create a new ContactCenterInsights REST client object.
102
+ #
103
+ # @example
104
+ #
105
+ # # Create a client using the default configuration
106
+ # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
107
+ #
108
+ # # Create a client using a custom configuration
109
+ # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config|
110
+ # config.timeout = 10.0
111
+ # end
112
+ #
113
+ # @yield [config] Configure the ContactCenterInsights client.
114
+ # @yieldparam config [Client::Configuration]
115
+ #
116
+ def initialize
117
+ # Create the configuration object
118
+ @config = Configuration.new Client.configure
119
+
120
+ # Yield the configuration if needed
121
+ yield @config if block_given?
122
+
123
+ # Create credentials
124
+ credentials = @config.credentials
125
+ # Use self-signed JWT if the endpoint is unchanged from default,
126
+ # but only if the default endpoint does not have a region prefix.
127
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
128
+ !@config.endpoint.split(".").first.include?("-")
129
+ credentials ||= Credentials.default scope: @config.scope,
130
+ enable_self_signed_jwt: enable_self_signed_jwt
131
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
132
+ credentials = Credentials.new credentials, scope: @config.scope
133
+ end
134
+
135
+ @quota_project_id = @config.quota_project
136
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
137
+
138
+ @operations_client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Operations.new do |config|
139
+ config.credentials = credentials
140
+ config.quota_project = @quota_project_id
141
+ config.endpoint = @config.endpoint
142
+ end
143
+
144
+ @contact_center_insights_stub = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
145
+ end
146
+
147
+ ##
148
+ # Get the associated client for long-running operations.
149
+ #
150
+ # @return [::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Operations]
151
+ #
152
+ attr_reader :operations_client
153
+
154
+ # Service calls
155
+
156
+ ##
157
+ # Creates a conversation.
158
+ #
159
+ # @overload create_conversation(request, options = nil)
160
+ # Pass arguments to `create_conversation` via a request object, either of type
161
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest} or an equivalent Hash.
162
+ #
163
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest, ::Hash]
164
+ # A request object representing the call parameters. Required. To specify no
165
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
166
+ # @param options [::Gapic::CallOptions, ::Hash]
167
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
168
+ #
169
+ # @overload create_conversation(parent: nil, conversation: nil, conversation_id: nil)
170
+ # Pass arguments to `create_conversation` via keyword arguments. Note that at
171
+ # least one keyword argument is required. To specify no parameters, or to keep all
172
+ # the default parameter values, pass an empty Hash as a request object (see above).
173
+ #
174
+ # @param parent [::String]
175
+ # Required. The parent resource of the conversation.
176
+ # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash]
177
+ # Required. The conversation resource to create.
178
+ # @param conversation_id [::String]
179
+ # A unique ID for the new conversation. This ID will become the final
180
+ # component of the conversation's resource name. If no ID is specified, a
181
+ # server-generated ID will be used.
182
+ #
183
+ # This value should be 4-64 characters and must match the regular
184
+ # expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`
185
+ # @yield [result, operation] Access the result along with the TransportOperation object
186
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Conversation]
187
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
188
+ #
189
+ # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation]
190
+ #
191
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
192
+ def create_conversation request, options = nil
193
+ raise ::ArgumentError, "request must be provided" if request.nil?
194
+
195
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest
196
+
197
+ # Converts hash and nil to an options object
198
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
199
+
200
+ # Customize the options with defaults
201
+ call_metadata = @config.rpcs.create_conversation.metadata.to_h
202
+
203
+ # Set x-goog-api-client and x-goog-user-project headers
204
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
205
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
206
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
207
+ transports_version_send: [:rest]
208
+
209
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
210
+
211
+ options.apply_defaults timeout: @config.rpcs.create_conversation.timeout,
212
+ metadata: call_metadata,
213
+ retry_policy: @config.rpcs.create_conversation.retry_policy
214
+
215
+ options.apply_defaults timeout: @config.timeout,
216
+ metadata: @config.metadata,
217
+ retry_policy: @config.retry_policy
218
+
219
+ @contact_center_insights_stub.create_conversation request, options do |result, operation|
220
+ yield result, operation if block_given?
221
+ return result
222
+ end
223
+ rescue ::Gapic::Rest::Error => e
224
+ raise ::Google::Cloud::Error.from_error(e)
225
+ end
226
+
227
+ ##
228
+ # Updates a conversation.
229
+ #
230
+ # @overload update_conversation(request, options = nil)
231
+ # Pass arguments to `update_conversation` via a request object, either of type
232
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest} or an equivalent Hash.
233
+ #
234
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest, ::Hash]
235
+ # A request object representing the call parameters. Required. To specify no
236
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
237
+ # @param options [::Gapic::CallOptions, ::Hash]
238
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
239
+ #
240
+ # @overload update_conversation(conversation: nil, update_mask: nil)
241
+ # Pass arguments to `update_conversation` via keyword arguments. Note that at
242
+ # least one keyword argument is required. To specify no parameters, or to keep all
243
+ # the default parameter values, pass an empty Hash as a request object (see above).
244
+ #
245
+ # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash]
246
+ # Required. The new values for the conversation.
247
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
248
+ # The list of fields to be updated.
249
+ # @yield [result, operation] Access the result along with the TransportOperation object
250
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Conversation]
251
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
252
+ #
253
+ # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation]
254
+ #
255
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
256
+ def update_conversation request, options = nil
257
+ raise ::ArgumentError, "request must be provided" if request.nil?
258
+
259
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest
260
+
261
+ # Converts hash and nil to an options object
262
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
263
+
264
+ # Customize the options with defaults
265
+ call_metadata = @config.rpcs.update_conversation.metadata.to_h
266
+
267
+ # Set x-goog-api-client and x-goog-user-project headers
268
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
270
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
271
+ transports_version_send: [:rest]
272
+
273
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
+
275
+ options.apply_defaults timeout: @config.rpcs.update_conversation.timeout,
276
+ metadata: call_metadata,
277
+ retry_policy: @config.rpcs.update_conversation.retry_policy
278
+
279
+ options.apply_defaults timeout: @config.timeout,
280
+ metadata: @config.metadata,
281
+ retry_policy: @config.retry_policy
282
+
283
+ @contact_center_insights_stub.update_conversation request, options do |result, operation|
284
+ yield result, operation if block_given?
285
+ return result
286
+ end
287
+ rescue ::Gapic::Rest::Error => e
288
+ raise ::Google::Cloud::Error.from_error(e)
289
+ end
290
+
291
+ ##
292
+ # Gets a conversation.
293
+ #
294
+ # @overload get_conversation(request, options = nil)
295
+ # Pass arguments to `get_conversation` via a request object, either of type
296
+ # {::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest} or an equivalent Hash.
297
+ #
298
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest, ::Hash]
299
+ # A request object representing the call parameters. Required. To specify no
300
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
301
+ # @param options [::Gapic::CallOptions, ::Hash]
302
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
303
+ #
304
+ # @overload get_conversation(name: nil, view: nil)
305
+ # Pass arguments to `get_conversation` via keyword arguments. Note that at
306
+ # least one keyword argument is required. To specify no parameters, or to keep all
307
+ # the default parameter values, pass an empty Hash as a request object (see above).
308
+ #
309
+ # @param name [::String]
310
+ # Required. The name of the conversation to get.
311
+ # @param view [::Google::Cloud::ContactCenterInsights::V1::ConversationView]
312
+ # The level of details of the conversation. Default is `FULL`.
313
+ # @yield [result, operation] Access the result along with the TransportOperation object
314
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Conversation]
315
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
316
+ #
317
+ # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation]
318
+ #
319
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
320
+ def get_conversation request, options = nil
321
+ raise ::ArgumentError, "request must be provided" if request.nil?
322
+
323
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest
324
+
325
+ # Converts hash and nil to an options object
326
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
327
+
328
+ # Customize the options with defaults
329
+ call_metadata = @config.rpcs.get_conversation.metadata.to_h
330
+
331
+ # Set x-goog-api-client and x-goog-user-project headers
332
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
333
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
334
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
335
+ transports_version_send: [:rest]
336
+
337
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
338
+
339
+ options.apply_defaults timeout: @config.rpcs.get_conversation.timeout,
340
+ metadata: call_metadata,
341
+ retry_policy: @config.rpcs.get_conversation.retry_policy
342
+
343
+ options.apply_defaults timeout: @config.timeout,
344
+ metadata: @config.metadata,
345
+ retry_policy: @config.retry_policy
346
+
347
+ @contact_center_insights_stub.get_conversation request, options do |result, operation|
348
+ yield result, operation if block_given?
349
+ return result
350
+ end
351
+ rescue ::Gapic::Rest::Error => e
352
+ raise ::Google::Cloud::Error.from_error(e)
353
+ end
354
+
355
+ ##
356
+ # Lists conversations.
357
+ #
358
+ # @overload list_conversations(request, options = nil)
359
+ # Pass arguments to `list_conversations` via a request object, either of type
360
+ # {::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest} or an equivalent Hash.
361
+ #
362
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest, ::Hash]
363
+ # A request object representing the call parameters. Required. To specify no
364
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
365
+ # @param options [::Gapic::CallOptions, ::Hash]
366
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
367
+ #
368
+ # @overload list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil)
369
+ # Pass arguments to `list_conversations` via keyword arguments. Note that at
370
+ # least one keyword argument is required. To specify no parameters, or to keep all
371
+ # the default parameter values, pass an empty Hash as a request object (see above).
372
+ #
373
+ # @param parent [::String]
374
+ # Required. The parent resource of the conversation.
375
+ # @param page_size [::Integer]
376
+ # The maximum number of conversations to return in the response. A valid page
377
+ # size ranges from 0 to 1,000 inclusive. If the page size is zero or
378
+ # unspecified, a default page size of 100 will be chosen. Note that a call
379
+ # might return fewer results than the requested page size.
380
+ # @param page_token [::String]
381
+ # The value returned by the last `ListConversationsResponse`. This value
382
+ # indicates that this is a continuation of a prior `ListConversations` call
383
+ # and that the system should return the next page of data.
384
+ # @param filter [::String]
385
+ # A filter to reduce results to a specific subset. Useful for querying
386
+ # conversations with specific properties.
387
+ # @param view [::Google::Cloud::ContactCenterInsights::V1::ConversationView]
388
+ # The level of details of the conversation. Default is `BASIC`.
389
+ # @yield [result, operation] Access the result along with the TransportOperation object
390
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>]
391
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
392
+ #
393
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>]
394
+ #
395
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
396
+ def list_conversations request, options = nil
397
+ raise ::ArgumentError, "request must be provided" if request.nil?
398
+
399
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest
400
+
401
+ # Converts hash and nil to an options object
402
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
403
+
404
+ # Customize the options with defaults
405
+ call_metadata = @config.rpcs.list_conversations.metadata.to_h
406
+
407
+ # Set x-goog-api-client and x-goog-user-project headers
408
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
409
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
410
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
411
+ transports_version_send: [:rest]
412
+
413
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
414
+
415
+ options.apply_defaults timeout: @config.rpcs.list_conversations.timeout,
416
+ metadata: call_metadata,
417
+ retry_policy: @config.rpcs.list_conversations.retry_policy
418
+
419
+ options.apply_defaults timeout: @config.timeout,
420
+ metadata: @config.metadata,
421
+ retry_policy: @config.retry_policy
422
+
423
+ @contact_center_insights_stub.list_conversations request, options do |result, operation|
424
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_conversations, "conversations", request, result, options
425
+ yield result, operation if block_given?
426
+ return result
427
+ end
428
+ rescue ::Gapic::Rest::Error => e
429
+ raise ::Google::Cloud::Error.from_error(e)
430
+ end
431
+
432
+ ##
433
+ # Deletes a conversation.
434
+ #
435
+ # @overload delete_conversation(request, options = nil)
436
+ # Pass arguments to `delete_conversation` via a request object, either of type
437
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest} or an equivalent Hash.
438
+ #
439
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest, ::Hash]
440
+ # A request object representing the call parameters. Required. To specify no
441
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
442
+ # @param options [::Gapic::CallOptions, ::Hash]
443
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
444
+ #
445
+ # @overload delete_conversation(name: nil, force: nil)
446
+ # Pass arguments to `delete_conversation` via keyword arguments. Note that at
447
+ # least one keyword argument is required. To specify no parameters, or to keep all
448
+ # the default parameter values, pass an empty Hash as a request object (see above).
449
+ #
450
+ # @param name [::String]
451
+ # Required. The name of the conversation to delete.
452
+ # @param force [::Boolean]
453
+ # If set to true, all of this conversation's analyses will also be deleted.
454
+ # Otherwise, the request will only succeed if the conversation has no
455
+ # analyses.
456
+ # @yield [result, operation] Access the result along with the TransportOperation object
457
+ # @yieldparam result [::Google::Protobuf::Empty]
458
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
459
+ #
460
+ # @return [::Google::Protobuf::Empty]
461
+ #
462
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
463
+ def delete_conversation request, options = nil
464
+ raise ::ArgumentError, "request must be provided" if request.nil?
465
+
466
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest
467
+
468
+ # Converts hash and nil to an options object
469
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
470
+
471
+ # Customize the options with defaults
472
+ call_metadata = @config.rpcs.delete_conversation.metadata.to_h
473
+
474
+ # Set x-goog-api-client and x-goog-user-project headers
475
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
476
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
477
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
478
+ transports_version_send: [:rest]
479
+
480
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
481
+
482
+ options.apply_defaults timeout: @config.rpcs.delete_conversation.timeout,
483
+ metadata: call_metadata,
484
+ retry_policy: @config.rpcs.delete_conversation.retry_policy
485
+
486
+ options.apply_defaults timeout: @config.timeout,
487
+ metadata: @config.metadata,
488
+ retry_policy: @config.retry_policy
489
+
490
+ @contact_center_insights_stub.delete_conversation request, options do |result, operation|
491
+ yield result, operation if block_given?
492
+ return result
493
+ end
494
+ rescue ::Gapic::Rest::Error => e
495
+ raise ::Google::Cloud::Error.from_error(e)
496
+ end
497
+
498
+ ##
499
+ # Creates an analysis. The long running operation is done when the analysis
500
+ # has completed.
501
+ #
502
+ # @overload create_analysis(request, options = nil)
503
+ # Pass arguments to `create_analysis` via a request object, either of type
504
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest} or an equivalent Hash.
505
+ #
506
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest, ::Hash]
507
+ # A request object representing the call parameters. Required. To specify no
508
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
509
+ # @param options [::Gapic::CallOptions, ::Hash]
510
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
511
+ #
512
+ # @overload create_analysis(parent: nil, analysis: nil)
513
+ # Pass arguments to `create_analysis` via keyword arguments. Note that at
514
+ # least one keyword argument is required. To specify no parameters, or to keep all
515
+ # the default parameter values, pass an empty Hash as a request object (see above).
516
+ #
517
+ # @param parent [::String]
518
+ # Required. The parent resource of the analysis.
519
+ # @param analysis [::Google::Cloud::ContactCenterInsights::V1::Analysis, ::Hash]
520
+ # Required. The analysis to create.
521
+ # @yield [result, operation] Access the result along with the TransportOperation object
522
+ # @yieldparam result [::Gapic::Operation]
523
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
524
+ #
525
+ # @return [::Gapic::Operation]
526
+ #
527
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
528
+ def create_analysis request, options = nil
529
+ raise ::ArgumentError, "request must be provided" if request.nil?
530
+
531
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest
532
+
533
+ # Converts hash and nil to an options object
534
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
535
+
536
+ # Customize the options with defaults
537
+ call_metadata = @config.rpcs.create_analysis.metadata.to_h
538
+
539
+ # Set x-goog-api-client and x-goog-user-project headers
540
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
541
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
542
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
543
+ transports_version_send: [:rest]
544
+
545
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
546
+
547
+ options.apply_defaults timeout: @config.rpcs.create_analysis.timeout,
548
+ metadata: call_metadata,
549
+ retry_policy: @config.rpcs.create_analysis.retry_policy
550
+
551
+ options.apply_defaults timeout: @config.timeout,
552
+ metadata: @config.metadata,
553
+ retry_policy: @config.retry_policy
554
+
555
+ @contact_center_insights_stub.create_analysis request, options do |result, operation|
556
+ result = ::Gapic::Operation.new result, @operations_client, options: options
557
+ yield result, operation if block_given?
558
+ return result
559
+ end
560
+ rescue ::Gapic::Rest::Error => e
561
+ raise ::Google::Cloud::Error.from_error(e)
562
+ end
563
+
564
+ ##
565
+ # Gets an analysis.
566
+ #
567
+ # @overload get_analysis(request, options = nil)
568
+ # Pass arguments to `get_analysis` via a request object, either of type
569
+ # {::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest} or an equivalent Hash.
570
+ #
571
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest, ::Hash]
572
+ # A request object representing the call parameters. Required. To specify no
573
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
574
+ # @param options [::Gapic::CallOptions, ::Hash]
575
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
576
+ #
577
+ # @overload get_analysis(name: nil)
578
+ # Pass arguments to `get_analysis` via keyword arguments. Note that at
579
+ # least one keyword argument is required. To specify no parameters, or to keep all
580
+ # the default parameter values, pass an empty Hash as a request object (see above).
581
+ #
582
+ # @param name [::String]
583
+ # Required. The name of the analysis to get.
584
+ # @yield [result, operation] Access the result along with the TransportOperation object
585
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Analysis]
586
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
587
+ #
588
+ # @return [::Google::Cloud::ContactCenterInsights::V1::Analysis]
589
+ #
590
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
591
+ def get_analysis request, options = nil
592
+ raise ::ArgumentError, "request must be provided" if request.nil?
593
+
594
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest
595
+
596
+ # Converts hash and nil to an options object
597
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
598
+
599
+ # Customize the options with defaults
600
+ call_metadata = @config.rpcs.get_analysis.metadata.to_h
601
+
602
+ # Set x-goog-api-client and x-goog-user-project headers
603
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
604
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
605
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
606
+ transports_version_send: [:rest]
607
+
608
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
609
+
610
+ options.apply_defaults timeout: @config.rpcs.get_analysis.timeout,
611
+ metadata: call_metadata,
612
+ retry_policy: @config.rpcs.get_analysis.retry_policy
613
+
614
+ options.apply_defaults timeout: @config.timeout,
615
+ metadata: @config.metadata,
616
+ retry_policy: @config.retry_policy
617
+
618
+ @contact_center_insights_stub.get_analysis request, options do |result, operation|
619
+ yield result, operation if block_given?
620
+ return result
621
+ end
622
+ rescue ::Gapic::Rest::Error => e
623
+ raise ::Google::Cloud::Error.from_error(e)
624
+ end
625
+
626
+ ##
627
+ # Lists analyses.
628
+ #
629
+ # @overload list_analyses(request, options = nil)
630
+ # Pass arguments to `list_analyses` via a request object, either of type
631
+ # {::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest} or an equivalent Hash.
632
+ #
633
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest, ::Hash]
634
+ # A request object representing the call parameters. Required. To specify no
635
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
636
+ # @param options [::Gapic::CallOptions, ::Hash]
637
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
638
+ #
639
+ # @overload list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil)
640
+ # Pass arguments to `list_analyses` via keyword arguments. Note that at
641
+ # least one keyword argument is required. To specify no parameters, or to keep all
642
+ # the default parameter values, pass an empty Hash as a request object (see above).
643
+ #
644
+ # @param parent [::String]
645
+ # Required. The parent resource of the analyses.
646
+ # @param page_size [::Integer]
647
+ # The maximum number of analyses to return in the response. If this
648
+ # value is zero, the service will select a default size. A call might return
649
+ # fewer objects than requested. A non-empty `next_page_token` in the response
650
+ # indicates that more data is available.
651
+ # @param page_token [::String]
652
+ # The value returned by the last `ListAnalysesResponse`; indicates
653
+ # that this is a continuation of a prior `ListAnalyses` call and
654
+ # the system should return the next page of data.
655
+ # @param filter [::String]
656
+ # A filter to reduce results to a specific subset. Useful for querying
657
+ # conversations with specific properties.
658
+ # @yield [result, operation] Access the result along with the TransportOperation object
659
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>]
660
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
661
+ #
662
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>]
663
+ #
664
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
665
+ def list_analyses request, options = nil
666
+ raise ::ArgumentError, "request must be provided" if request.nil?
667
+
668
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest
669
+
670
+ # Converts hash and nil to an options object
671
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
672
+
673
+ # Customize the options with defaults
674
+ call_metadata = @config.rpcs.list_analyses.metadata.to_h
675
+
676
+ # Set x-goog-api-client and x-goog-user-project headers
677
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
678
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
679
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
680
+ transports_version_send: [:rest]
681
+
682
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
683
+
684
+ options.apply_defaults timeout: @config.rpcs.list_analyses.timeout,
685
+ metadata: call_metadata,
686
+ retry_policy: @config.rpcs.list_analyses.retry_policy
687
+
688
+ options.apply_defaults timeout: @config.timeout,
689
+ metadata: @config.metadata,
690
+ retry_policy: @config.retry_policy
691
+
692
+ @contact_center_insights_stub.list_analyses request, options do |result, operation|
693
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_analyses, "analyses", request, result, options
694
+ yield result, operation if block_given?
695
+ return result
696
+ end
697
+ rescue ::Gapic::Rest::Error => e
698
+ raise ::Google::Cloud::Error.from_error(e)
699
+ end
700
+
701
+ ##
702
+ # Deletes an analysis.
703
+ #
704
+ # @overload delete_analysis(request, options = nil)
705
+ # Pass arguments to `delete_analysis` via a request object, either of type
706
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest} or an equivalent Hash.
707
+ #
708
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest, ::Hash]
709
+ # A request object representing the call parameters. Required. To specify no
710
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
711
+ # @param options [::Gapic::CallOptions, ::Hash]
712
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
713
+ #
714
+ # @overload delete_analysis(name: nil)
715
+ # Pass arguments to `delete_analysis` via keyword arguments. Note that at
716
+ # least one keyword argument is required. To specify no parameters, or to keep all
717
+ # the default parameter values, pass an empty Hash as a request object (see above).
718
+ #
719
+ # @param name [::String]
720
+ # Required. The name of the analysis to delete.
721
+ # @yield [result, operation] Access the result along with the TransportOperation object
722
+ # @yieldparam result [::Google::Protobuf::Empty]
723
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
724
+ #
725
+ # @return [::Google::Protobuf::Empty]
726
+ #
727
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
728
+ def delete_analysis request, options = nil
729
+ raise ::ArgumentError, "request must be provided" if request.nil?
730
+
731
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest
732
+
733
+ # Converts hash and nil to an options object
734
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
735
+
736
+ # Customize the options with defaults
737
+ call_metadata = @config.rpcs.delete_analysis.metadata.to_h
738
+
739
+ # Set x-goog-api-client and x-goog-user-project headers
740
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
741
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
742
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
743
+ transports_version_send: [:rest]
744
+
745
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
746
+
747
+ options.apply_defaults timeout: @config.rpcs.delete_analysis.timeout,
748
+ metadata: call_metadata,
749
+ retry_policy: @config.rpcs.delete_analysis.retry_policy
750
+
751
+ options.apply_defaults timeout: @config.timeout,
752
+ metadata: @config.metadata,
753
+ retry_policy: @config.retry_policy
754
+
755
+ @contact_center_insights_stub.delete_analysis request, options do |result, operation|
756
+ yield result, operation if block_given?
757
+ return result
758
+ end
759
+ rescue ::Gapic::Rest::Error => e
760
+ raise ::Google::Cloud::Error.from_error(e)
761
+ end
762
+
763
+ ##
764
+ # Analyzes multiple conversations in a single request.
765
+ #
766
+ # @overload bulk_analyze_conversations(request, options = nil)
767
+ # Pass arguments to `bulk_analyze_conversations` via a request object, either of type
768
+ # {::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest} or an equivalent Hash.
769
+ #
770
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest, ::Hash]
771
+ # A request object representing the call parameters. Required. To specify no
772
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
773
+ # @param options [::Gapic::CallOptions, ::Hash]
774
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
775
+ #
776
+ # @overload bulk_analyze_conversations(parent: nil, filter: nil, analysis_percentage: nil, annotator_selector: nil)
777
+ # Pass arguments to `bulk_analyze_conversations` via keyword arguments. Note that at
778
+ # least one keyword argument is required. To specify no parameters, or to keep all
779
+ # the default parameter values, pass an empty Hash as a request object (see above).
780
+ #
781
+ # @param parent [::String]
782
+ # Required. The parent resource to create analyses in.
783
+ # @param filter [::String]
784
+ # Required. Filter used to select the subset of conversations to analyze.
785
+ # @param analysis_percentage [::Float]
786
+ # Required. Percentage of selected conversation to analyze, between
787
+ # [0, 100].
788
+ # @param annotator_selector [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector, ::Hash]
789
+ # To select the annotators to run and the phrase matchers to use
790
+ # (if any). If not specified, all annotators will be run.
791
+ # @yield [result, operation] Access the result along with the TransportOperation object
792
+ # @yieldparam result [::Gapic::Operation]
793
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
794
+ #
795
+ # @return [::Gapic::Operation]
796
+ #
797
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
798
+ def bulk_analyze_conversations request, options = nil
799
+ raise ::ArgumentError, "request must be provided" if request.nil?
800
+
801
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest
802
+
803
+ # Converts hash and nil to an options object
804
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
805
+
806
+ # Customize the options with defaults
807
+ call_metadata = @config.rpcs.bulk_analyze_conversations.metadata.to_h
808
+
809
+ # Set x-goog-api-client and x-goog-user-project headers
810
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
811
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
812
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
813
+ transports_version_send: [:rest]
814
+
815
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
816
+
817
+ options.apply_defaults timeout: @config.rpcs.bulk_analyze_conversations.timeout,
818
+ metadata: call_metadata,
819
+ retry_policy: @config.rpcs.bulk_analyze_conversations.retry_policy
820
+
821
+ options.apply_defaults timeout: @config.timeout,
822
+ metadata: @config.metadata,
823
+ retry_policy: @config.retry_policy
824
+
825
+ @contact_center_insights_stub.bulk_analyze_conversations request, options do |result, operation|
826
+ result = ::Gapic::Operation.new result, @operations_client, options: options
827
+ yield result, operation if block_given?
828
+ return result
829
+ end
830
+ rescue ::Gapic::Rest::Error => e
831
+ raise ::Google::Cloud::Error.from_error(e)
832
+ end
833
+
834
+ ##
835
+ # Imports conversations and processes them according to the user's
836
+ # configuration.
837
+ #
838
+ # @overload ingest_conversations(request, options = nil)
839
+ # Pass arguments to `ingest_conversations` via a request object, either of type
840
+ # {::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest} or an equivalent Hash.
841
+ #
842
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest, ::Hash]
843
+ # A request object representing the call parameters. Required. To specify no
844
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
845
+ # @param options [::Gapic::CallOptions, ::Hash]
846
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
847
+ #
848
+ # @overload ingest_conversations(gcs_source: nil, transcript_object_config: nil, parent: nil, conversation_config: nil)
849
+ # Pass arguments to `ingest_conversations` via keyword arguments. Note that at
850
+ # least one keyword argument is required. To specify no parameters, or to keep all
851
+ # the default parameter values, pass an empty Hash as a request object (see above).
852
+ #
853
+ # @param gcs_source [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::GcsSource, ::Hash]
854
+ # A cloud storage bucket source.
855
+ # @param transcript_object_config [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::TranscriptObjectConfig, ::Hash]
856
+ # Configuration for when `source` contains conversation transcripts.
857
+ # @param parent [::String]
858
+ # Required. The parent resource for new conversations.
859
+ # @param conversation_config [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::ConversationConfig, ::Hash]
860
+ # Configuration that applies to all conversations.
861
+ # @yield [result, operation] Access the result along with the TransportOperation object
862
+ # @yieldparam result [::Gapic::Operation]
863
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
864
+ #
865
+ # @return [::Gapic::Operation]
866
+ #
867
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
868
+ def ingest_conversations request, options = nil
869
+ raise ::ArgumentError, "request must be provided" if request.nil?
870
+
871
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest
872
+
873
+ # Converts hash and nil to an options object
874
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
875
+
876
+ # Customize the options with defaults
877
+ call_metadata = @config.rpcs.ingest_conversations.metadata.to_h
878
+
879
+ # Set x-goog-api-client and x-goog-user-project headers
880
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
881
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
882
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
883
+ transports_version_send: [:rest]
884
+
885
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
886
+
887
+ options.apply_defaults timeout: @config.rpcs.ingest_conversations.timeout,
888
+ metadata: call_metadata,
889
+ retry_policy: @config.rpcs.ingest_conversations.retry_policy
890
+
891
+ options.apply_defaults timeout: @config.timeout,
892
+ metadata: @config.metadata,
893
+ retry_policy: @config.retry_policy
894
+
895
+ @contact_center_insights_stub.ingest_conversations request, options do |result, operation|
896
+ result = ::Gapic::Operation.new result, @operations_client, options: options
897
+ yield result, operation if block_given?
898
+ return result
899
+ end
900
+ rescue ::Gapic::Rest::Error => e
901
+ raise ::Google::Cloud::Error.from_error(e)
902
+ end
903
+
904
+ ##
905
+ # Export insights data to a destination defined in the request body.
906
+ #
907
+ # @overload export_insights_data(request, options = nil)
908
+ # Pass arguments to `export_insights_data` via a request object, either of type
909
+ # {::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest} or an equivalent Hash.
910
+ #
911
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest, ::Hash]
912
+ # A request object representing the call parameters. Required. To specify no
913
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
914
+ # @param options [::Gapic::CallOptions, ::Hash]
915
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
916
+ #
917
+ # @overload export_insights_data(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil, write_disposition: nil)
918
+ # Pass arguments to `export_insights_data` via keyword arguments. Note that at
919
+ # least one keyword argument is required. To specify no parameters, or to keep all
920
+ # the default parameter values, pass an empty Hash as a request object (see above).
921
+ #
922
+ # @param big_query_destination [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::BigQueryDestination, ::Hash]
923
+ # Specified if sink is a BigQuery table.
924
+ # @param parent [::String]
925
+ # Required. The parent resource to export data from.
926
+ # @param filter [::String]
927
+ # A filter to reduce results to a specific subset. Useful for exporting
928
+ # conversations with specific properties.
929
+ # @param kms_key [::String]
930
+ # A fully qualified KMS key name for BigQuery tables protected by CMEK.
931
+ # Format:
932
+ # projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}/cryptoKeyVersions/\\{version}
933
+ # @param write_disposition [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::WriteDisposition]
934
+ # Options for what to do if the destination table already exists.
935
+ # @yield [result, operation] Access the result along with the TransportOperation object
936
+ # @yieldparam result [::Gapic::Operation]
937
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
938
+ #
939
+ # @return [::Gapic::Operation]
940
+ #
941
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
942
+ def export_insights_data request, options = nil
943
+ raise ::ArgumentError, "request must be provided" if request.nil?
944
+
945
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest
946
+
947
+ # Converts hash and nil to an options object
948
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
949
+
950
+ # Customize the options with defaults
951
+ call_metadata = @config.rpcs.export_insights_data.metadata.to_h
952
+
953
+ # Set x-goog-api-client and x-goog-user-project headers
954
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
955
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
956
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
957
+ transports_version_send: [:rest]
958
+
959
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
960
+
961
+ options.apply_defaults timeout: @config.rpcs.export_insights_data.timeout,
962
+ metadata: call_metadata,
963
+ retry_policy: @config.rpcs.export_insights_data.retry_policy
964
+
965
+ options.apply_defaults timeout: @config.timeout,
966
+ metadata: @config.metadata,
967
+ retry_policy: @config.retry_policy
968
+
969
+ @contact_center_insights_stub.export_insights_data request, options do |result, operation|
970
+ result = ::Gapic::Operation.new result, @operations_client, options: options
971
+ yield result, operation if block_given?
972
+ return result
973
+ end
974
+ rescue ::Gapic::Rest::Error => e
975
+ raise ::Google::Cloud::Error.from_error(e)
976
+ end
977
+
978
+ ##
979
+ # Creates an issue model.
980
+ #
981
+ # @overload create_issue_model(request, options = nil)
982
+ # Pass arguments to `create_issue_model` via a request object, either of type
983
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest} or an equivalent Hash.
984
+ #
985
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest, ::Hash]
986
+ # A request object representing the call parameters. Required. To specify no
987
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
988
+ # @param options [::Gapic::CallOptions, ::Hash]
989
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
990
+ #
991
+ # @overload create_issue_model(parent: nil, issue_model: nil)
992
+ # Pass arguments to `create_issue_model` via keyword arguments. Note that at
993
+ # least one keyword argument is required. To specify no parameters, or to keep all
994
+ # the default parameter values, pass an empty Hash as a request object (see above).
995
+ #
996
+ # @param parent [::String]
997
+ # Required. The parent resource of the issue model.
998
+ # @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash]
999
+ # Required. The issue model to create.
1000
+ # @yield [result, operation] Access the result along with the TransportOperation object
1001
+ # @yieldparam result [::Gapic::Operation]
1002
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1003
+ #
1004
+ # @return [::Gapic::Operation]
1005
+ #
1006
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1007
+ def create_issue_model request, options = nil
1008
+ raise ::ArgumentError, "request must be provided" if request.nil?
1009
+
1010
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest
1011
+
1012
+ # Converts hash and nil to an options object
1013
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1014
+
1015
+ # Customize the options with defaults
1016
+ call_metadata = @config.rpcs.create_issue_model.metadata.to_h
1017
+
1018
+ # Set x-goog-api-client and x-goog-user-project headers
1019
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1020
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1021
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1022
+ transports_version_send: [:rest]
1023
+
1024
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1025
+
1026
+ options.apply_defaults timeout: @config.rpcs.create_issue_model.timeout,
1027
+ metadata: call_metadata,
1028
+ retry_policy: @config.rpcs.create_issue_model.retry_policy
1029
+
1030
+ options.apply_defaults timeout: @config.timeout,
1031
+ metadata: @config.metadata,
1032
+ retry_policy: @config.retry_policy
1033
+
1034
+ @contact_center_insights_stub.create_issue_model request, options do |result, operation|
1035
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1036
+ yield result, operation if block_given?
1037
+ return result
1038
+ end
1039
+ rescue ::Gapic::Rest::Error => e
1040
+ raise ::Google::Cloud::Error.from_error(e)
1041
+ end
1042
+
1043
+ ##
1044
+ # Updates an issue model.
1045
+ #
1046
+ # @overload update_issue_model(request, options = nil)
1047
+ # Pass arguments to `update_issue_model` via a request object, either of type
1048
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest} or an equivalent Hash.
1049
+ #
1050
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest, ::Hash]
1051
+ # A request object representing the call parameters. Required. To specify no
1052
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1053
+ # @param options [::Gapic::CallOptions, ::Hash]
1054
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1055
+ #
1056
+ # @overload update_issue_model(issue_model: nil, update_mask: nil)
1057
+ # Pass arguments to `update_issue_model` via keyword arguments. Note that at
1058
+ # least one keyword argument is required. To specify no parameters, or to keep all
1059
+ # the default parameter values, pass an empty Hash as a request object (see above).
1060
+ #
1061
+ # @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash]
1062
+ # Required. The new values for the issue model.
1063
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1064
+ # The list of fields to be updated.
1065
+ # @yield [result, operation] Access the result along with the TransportOperation object
1066
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
1067
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1068
+ #
1069
+ # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
1070
+ #
1071
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1072
+ def update_issue_model request, options = nil
1073
+ raise ::ArgumentError, "request must be provided" if request.nil?
1074
+
1075
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest
1076
+
1077
+ # Converts hash and nil to an options object
1078
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1079
+
1080
+ # Customize the options with defaults
1081
+ call_metadata = @config.rpcs.update_issue_model.metadata.to_h
1082
+
1083
+ # Set x-goog-api-client and x-goog-user-project headers
1084
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1085
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1086
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1087
+ transports_version_send: [:rest]
1088
+
1089
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1090
+
1091
+ options.apply_defaults timeout: @config.rpcs.update_issue_model.timeout,
1092
+ metadata: call_metadata,
1093
+ retry_policy: @config.rpcs.update_issue_model.retry_policy
1094
+
1095
+ options.apply_defaults timeout: @config.timeout,
1096
+ metadata: @config.metadata,
1097
+ retry_policy: @config.retry_policy
1098
+
1099
+ @contact_center_insights_stub.update_issue_model request, options do |result, operation|
1100
+ yield result, operation if block_given?
1101
+ return result
1102
+ end
1103
+ rescue ::Gapic::Rest::Error => e
1104
+ raise ::Google::Cloud::Error.from_error(e)
1105
+ end
1106
+
1107
+ ##
1108
+ # Gets an issue model.
1109
+ #
1110
+ # @overload get_issue_model(request, options = nil)
1111
+ # Pass arguments to `get_issue_model` via a request object, either of type
1112
+ # {::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest} or an equivalent Hash.
1113
+ #
1114
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest, ::Hash]
1115
+ # A request object representing the call parameters. Required. To specify no
1116
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1117
+ # @param options [::Gapic::CallOptions, ::Hash]
1118
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1119
+ #
1120
+ # @overload get_issue_model(name: nil)
1121
+ # Pass arguments to `get_issue_model` via keyword arguments. Note that at
1122
+ # least one keyword argument is required. To specify no parameters, or to keep all
1123
+ # the default parameter values, pass an empty Hash as a request object (see above).
1124
+ #
1125
+ # @param name [::String]
1126
+ # Required. The name of the issue model to get.
1127
+ # @yield [result, operation] Access the result along with the TransportOperation object
1128
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
1129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1130
+ #
1131
+ # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
1132
+ #
1133
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1134
+ def get_issue_model request, options = nil
1135
+ raise ::ArgumentError, "request must be provided" if request.nil?
1136
+
1137
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest
1138
+
1139
+ # Converts hash and nil to an options object
1140
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1141
+
1142
+ # Customize the options with defaults
1143
+ call_metadata = @config.rpcs.get_issue_model.metadata.to_h
1144
+
1145
+ # Set x-goog-api-client and x-goog-user-project headers
1146
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1147
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1148
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1149
+ transports_version_send: [:rest]
1150
+
1151
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1152
+
1153
+ options.apply_defaults timeout: @config.rpcs.get_issue_model.timeout,
1154
+ metadata: call_metadata,
1155
+ retry_policy: @config.rpcs.get_issue_model.retry_policy
1156
+
1157
+ options.apply_defaults timeout: @config.timeout,
1158
+ metadata: @config.metadata,
1159
+ retry_policy: @config.retry_policy
1160
+
1161
+ @contact_center_insights_stub.get_issue_model request, options do |result, operation|
1162
+ yield result, operation if block_given?
1163
+ return result
1164
+ end
1165
+ rescue ::Gapic::Rest::Error => e
1166
+ raise ::Google::Cloud::Error.from_error(e)
1167
+ end
1168
+
1169
+ ##
1170
+ # Lists issue models.
1171
+ #
1172
+ # @overload list_issue_models(request, options = nil)
1173
+ # Pass arguments to `list_issue_models` via a request object, either of type
1174
+ # {::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest} or an equivalent Hash.
1175
+ #
1176
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest, ::Hash]
1177
+ # A request object representing the call parameters. Required. To specify no
1178
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1179
+ # @param options [::Gapic::CallOptions, ::Hash]
1180
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1181
+ #
1182
+ # @overload list_issue_models(parent: nil)
1183
+ # Pass arguments to `list_issue_models` via keyword arguments. Note that at
1184
+ # least one keyword argument is required. To specify no parameters, or to keep all
1185
+ # the default parameter values, pass an empty Hash as a request object (see above).
1186
+ #
1187
+ # @param parent [::String]
1188
+ # Required. The parent resource of the issue model.
1189
+ # @yield [result, operation] Access the result along with the TransportOperation object
1190
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse]
1191
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1192
+ #
1193
+ # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse]
1194
+ #
1195
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1196
+ def list_issue_models request, options = nil
1197
+ raise ::ArgumentError, "request must be provided" if request.nil?
1198
+
1199
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest
1200
+
1201
+ # Converts hash and nil to an options object
1202
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1203
+
1204
+ # Customize the options with defaults
1205
+ call_metadata = @config.rpcs.list_issue_models.metadata.to_h
1206
+
1207
+ # Set x-goog-api-client and x-goog-user-project headers
1208
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1209
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1210
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1211
+ transports_version_send: [:rest]
1212
+
1213
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1214
+
1215
+ options.apply_defaults timeout: @config.rpcs.list_issue_models.timeout,
1216
+ metadata: call_metadata,
1217
+ retry_policy: @config.rpcs.list_issue_models.retry_policy
1218
+
1219
+ options.apply_defaults timeout: @config.timeout,
1220
+ metadata: @config.metadata,
1221
+ retry_policy: @config.retry_policy
1222
+
1223
+ @contact_center_insights_stub.list_issue_models request, options do |result, operation|
1224
+ yield result, operation if block_given?
1225
+ return result
1226
+ end
1227
+ rescue ::Gapic::Rest::Error => e
1228
+ raise ::Google::Cloud::Error.from_error(e)
1229
+ end
1230
+
1231
+ ##
1232
+ # Deletes an issue model.
1233
+ #
1234
+ # @overload delete_issue_model(request, options = nil)
1235
+ # Pass arguments to `delete_issue_model` via a request object, either of type
1236
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest} or an equivalent Hash.
1237
+ #
1238
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest, ::Hash]
1239
+ # A request object representing the call parameters. Required. To specify no
1240
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1241
+ # @param options [::Gapic::CallOptions, ::Hash]
1242
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1243
+ #
1244
+ # @overload delete_issue_model(name: nil)
1245
+ # Pass arguments to `delete_issue_model` via keyword arguments. Note that at
1246
+ # least one keyword argument is required. To specify no parameters, or to keep all
1247
+ # the default parameter values, pass an empty Hash as a request object (see above).
1248
+ #
1249
+ # @param name [::String]
1250
+ # Required. The name of the issue model to delete.
1251
+ # @yield [result, operation] Access the result along with the TransportOperation object
1252
+ # @yieldparam result [::Gapic::Operation]
1253
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1254
+ #
1255
+ # @return [::Gapic::Operation]
1256
+ #
1257
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1258
+ def delete_issue_model request, options = nil
1259
+ raise ::ArgumentError, "request must be provided" if request.nil?
1260
+
1261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest
1262
+
1263
+ # Converts hash and nil to an options object
1264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1265
+
1266
+ # Customize the options with defaults
1267
+ call_metadata = @config.rpcs.delete_issue_model.metadata.to_h
1268
+
1269
+ # Set x-goog-api-client and x-goog-user-project headers
1270
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1272
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1273
+ transports_version_send: [:rest]
1274
+
1275
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1276
+
1277
+ options.apply_defaults timeout: @config.rpcs.delete_issue_model.timeout,
1278
+ metadata: call_metadata,
1279
+ retry_policy: @config.rpcs.delete_issue_model.retry_policy
1280
+
1281
+ options.apply_defaults timeout: @config.timeout,
1282
+ metadata: @config.metadata,
1283
+ retry_policy: @config.retry_policy
1284
+
1285
+ @contact_center_insights_stub.delete_issue_model request, options do |result, operation|
1286
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1287
+ yield result, operation if block_given?
1288
+ return result
1289
+ end
1290
+ rescue ::Gapic::Rest::Error => e
1291
+ raise ::Google::Cloud::Error.from_error(e)
1292
+ end
1293
+
1294
+ ##
1295
+ # Deploys an issue model. Returns an error if a model is already deployed.
1296
+ # An issue model can only be used in analysis after it has been deployed.
1297
+ #
1298
+ # @overload deploy_issue_model(request, options = nil)
1299
+ # Pass arguments to `deploy_issue_model` via a request object, either of type
1300
+ # {::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest} or an equivalent Hash.
1301
+ #
1302
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest, ::Hash]
1303
+ # A request object representing the call parameters. Required. To specify no
1304
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1305
+ # @param options [::Gapic::CallOptions, ::Hash]
1306
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1307
+ #
1308
+ # @overload deploy_issue_model(name: nil)
1309
+ # Pass arguments to `deploy_issue_model` via keyword arguments. Note that at
1310
+ # least one keyword argument is required. To specify no parameters, or to keep all
1311
+ # the default parameter values, pass an empty Hash as a request object (see above).
1312
+ #
1313
+ # @param name [::String]
1314
+ # Required. The issue model to deploy.
1315
+ # @yield [result, operation] Access the result along with the TransportOperation object
1316
+ # @yieldparam result [::Gapic::Operation]
1317
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1318
+ #
1319
+ # @return [::Gapic::Operation]
1320
+ #
1321
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1322
+ def deploy_issue_model request, options = nil
1323
+ raise ::ArgumentError, "request must be provided" if request.nil?
1324
+
1325
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest
1326
+
1327
+ # Converts hash and nil to an options object
1328
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1329
+
1330
+ # Customize the options with defaults
1331
+ call_metadata = @config.rpcs.deploy_issue_model.metadata.to_h
1332
+
1333
+ # Set x-goog-api-client and x-goog-user-project headers
1334
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1335
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1336
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1337
+ transports_version_send: [:rest]
1338
+
1339
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1340
+
1341
+ options.apply_defaults timeout: @config.rpcs.deploy_issue_model.timeout,
1342
+ metadata: call_metadata,
1343
+ retry_policy: @config.rpcs.deploy_issue_model.retry_policy
1344
+
1345
+ options.apply_defaults timeout: @config.timeout,
1346
+ metadata: @config.metadata,
1347
+ retry_policy: @config.retry_policy
1348
+
1349
+ @contact_center_insights_stub.deploy_issue_model request, options do |result, operation|
1350
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1351
+ yield result, operation if block_given?
1352
+ return result
1353
+ end
1354
+ rescue ::Gapic::Rest::Error => e
1355
+ raise ::Google::Cloud::Error.from_error(e)
1356
+ end
1357
+
1358
+ ##
1359
+ # Undeploys an issue model.
1360
+ # An issue model can not be used in analysis after it has been undeployed.
1361
+ #
1362
+ # @overload undeploy_issue_model(request, options = nil)
1363
+ # Pass arguments to `undeploy_issue_model` via a request object, either of type
1364
+ # {::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest} or an equivalent Hash.
1365
+ #
1366
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest, ::Hash]
1367
+ # A request object representing the call parameters. Required. To specify no
1368
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1369
+ # @param options [::Gapic::CallOptions, ::Hash]
1370
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1371
+ #
1372
+ # @overload undeploy_issue_model(name: nil)
1373
+ # Pass arguments to `undeploy_issue_model` via keyword arguments. Note that at
1374
+ # least one keyword argument is required. To specify no parameters, or to keep all
1375
+ # the default parameter values, pass an empty Hash as a request object (see above).
1376
+ #
1377
+ # @param name [::String]
1378
+ # Required. The issue model to undeploy.
1379
+ # @yield [result, operation] Access the result along with the TransportOperation object
1380
+ # @yieldparam result [::Gapic::Operation]
1381
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1382
+ #
1383
+ # @return [::Gapic::Operation]
1384
+ #
1385
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1386
+ def undeploy_issue_model request, options = nil
1387
+ raise ::ArgumentError, "request must be provided" if request.nil?
1388
+
1389
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest
1390
+
1391
+ # Converts hash and nil to an options object
1392
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1393
+
1394
+ # Customize the options with defaults
1395
+ call_metadata = @config.rpcs.undeploy_issue_model.metadata.to_h
1396
+
1397
+ # Set x-goog-api-client and x-goog-user-project headers
1398
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1399
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1400
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1401
+ transports_version_send: [:rest]
1402
+
1403
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1404
+
1405
+ options.apply_defaults timeout: @config.rpcs.undeploy_issue_model.timeout,
1406
+ metadata: call_metadata,
1407
+ retry_policy: @config.rpcs.undeploy_issue_model.retry_policy
1408
+
1409
+ options.apply_defaults timeout: @config.timeout,
1410
+ metadata: @config.metadata,
1411
+ retry_policy: @config.retry_policy
1412
+
1413
+ @contact_center_insights_stub.undeploy_issue_model request, options do |result, operation|
1414
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1415
+ yield result, operation if block_given?
1416
+ return result
1417
+ end
1418
+ rescue ::Gapic::Rest::Error => e
1419
+ raise ::Google::Cloud::Error.from_error(e)
1420
+ end
1421
+
1422
+ ##
1423
+ # Gets an issue.
1424
+ #
1425
+ # @overload get_issue(request, options = nil)
1426
+ # Pass arguments to `get_issue` via a request object, either of type
1427
+ # {::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest} or an equivalent Hash.
1428
+ #
1429
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest, ::Hash]
1430
+ # A request object representing the call parameters. Required. To specify no
1431
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1432
+ # @param options [::Gapic::CallOptions, ::Hash]
1433
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1434
+ #
1435
+ # @overload get_issue(name: nil)
1436
+ # Pass arguments to `get_issue` via keyword arguments. Note that at
1437
+ # least one keyword argument is required. To specify no parameters, or to keep all
1438
+ # the default parameter values, pass an empty Hash as a request object (see above).
1439
+ #
1440
+ # @param name [::String]
1441
+ # Required. The name of the issue to get.
1442
+ # @yield [result, operation] Access the result along with the TransportOperation object
1443
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Issue]
1444
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1445
+ #
1446
+ # @return [::Google::Cloud::ContactCenterInsights::V1::Issue]
1447
+ #
1448
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1449
+ def get_issue request, options = nil
1450
+ raise ::ArgumentError, "request must be provided" if request.nil?
1451
+
1452
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest
1453
+
1454
+ # Converts hash and nil to an options object
1455
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1456
+
1457
+ # Customize the options with defaults
1458
+ call_metadata = @config.rpcs.get_issue.metadata.to_h
1459
+
1460
+ # Set x-goog-api-client and x-goog-user-project headers
1461
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1462
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1463
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1464
+ transports_version_send: [:rest]
1465
+
1466
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1467
+
1468
+ options.apply_defaults timeout: @config.rpcs.get_issue.timeout,
1469
+ metadata: call_metadata,
1470
+ retry_policy: @config.rpcs.get_issue.retry_policy
1471
+
1472
+ options.apply_defaults timeout: @config.timeout,
1473
+ metadata: @config.metadata,
1474
+ retry_policy: @config.retry_policy
1475
+
1476
+ @contact_center_insights_stub.get_issue request, options do |result, operation|
1477
+ yield result, operation if block_given?
1478
+ return result
1479
+ end
1480
+ rescue ::Gapic::Rest::Error => e
1481
+ raise ::Google::Cloud::Error.from_error(e)
1482
+ end
1483
+
1484
+ ##
1485
+ # Lists issues.
1486
+ #
1487
+ # @overload list_issues(request, options = nil)
1488
+ # Pass arguments to `list_issues` via a request object, either of type
1489
+ # {::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest} or an equivalent Hash.
1490
+ #
1491
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest, ::Hash]
1492
+ # A request object representing the call parameters. Required. To specify no
1493
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1494
+ # @param options [::Gapic::CallOptions, ::Hash]
1495
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1496
+ #
1497
+ # @overload list_issues(parent: nil)
1498
+ # Pass arguments to `list_issues` via keyword arguments. Note that at
1499
+ # least one keyword argument is required. To specify no parameters, or to keep all
1500
+ # the default parameter values, pass an empty Hash as a request object (see above).
1501
+ #
1502
+ # @param parent [::String]
1503
+ # Required. The parent resource of the issue.
1504
+ # @yield [result, operation] Access the result along with the TransportOperation object
1505
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse]
1506
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1507
+ #
1508
+ # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse]
1509
+ #
1510
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1511
+ def list_issues request, options = nil
1512
+ raise ::ArgumentError, "request must be provided" if request.nil?
1513
+
1514
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest
1515
+
1516
+ # Converts hash and nil to an options object
1517
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1518
+
1519
+ # Customize the options with defaults
1520
+ call_metadata = @config.rpcs.list_issues.metadata.to_h
1521
+
1522
+ # Set x-goog-api-client and x-goog-user-project headers
1523
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1524
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1525
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1526
+ transports_version_send: [:rest]
1527
+
1528
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1529
+
1530
+ options.apply_defaults timeout: @config.rpcs.list_issues.timeout,
1531
+ metadata: call_metadata,
1532
+ retry_policy: @config.rpcs.list_issues.retry_policy
1533
+
1534
+ options.apply_defaults timeout: @config.timeout,
1535
+ metadata: @config.metadata,
1536
+ retry_policy: @config.retry_policy
1537
+
1538
+ @contact_center_insights_stub.list_issues request, options do |result, operation|
1539
+ yield result, operation if block_given?
1540
+ return result
1541
+ end
1542
+ rescue ::Gapic::Rest::Error => e
1543
+ raise ::Google::Cloud::Error.from_error(e)
1544
+ end
1545
+
1546
+ ##
1547
+ # Updates an issue.
1548
+ #
1549
+ # @overload update_issue(request, options = nil)
1550
+ # Pass arguments to `update_issue` via a request object, either of type
1551
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest} or an equivalent Hash.
1552
+ #
1553
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest, ::Hash]
1554
+ # A request object representing the call parameters. Required. To specify no
1555
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1556
+ # @param options [::Gapic::CallOptions, ::Hash]
1557
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1558
+ #
1559
+ # @overload update_issue(issue: nil, update_mask: nil)
1560
+ # Pass arguments to `update_issue` via keyword arguments. Note that at
1561
+ # least one keyword argument is required. To specify no parameters, or to keep all
1562
+ # the default parameter values, pass an empty Hash as a request object (see above).
1563
+ #
1564
+ # @param issue [::Google::Cloud::ContactCenterInsights::V1::Issue, ::Hash]
1565
+ # Required. The new values for the issue.
1566
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1567
+ # The list of fields to be updated.
1568
+ # @yield [result, operation] Access the result along with the TransportOperation object
1569
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Issue]
1570
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1571
+ #
1572
+ # @return [::Google::Cloud::ContactCenterInsights::V1::Issue]
1573
+ #
1574
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1575
+ def update_issue request, options = nil
1576
+ raise ::ArgumentError, "request must be provided" if request.nil?
1577
+
1578
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest
1579
+
1580
+ # Converts hash and nil to an options object
1581
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1582
+
1583
+ # Customize the options with defaults
1584
+ call_metadata = @config.rpcs.update_issue.metadata.to_h
1585
+
1586
+ # Set x-goog-api-client and x-goog-user-project headers
1587
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1588
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1589
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1590
+ transports_version_send: [:rest]
1591
+
1592
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1593
+
1594
+ options.apply_defaults timeout: @config.rpcs.update_issue.timeout,
1595
+ metadata: call_metadata,
1596
+ retry_policy: @config.rpcs.update_issue.retry_policy
1597
+
1598
+ options.apply_defaults timeout: @config.timeout,
1599
+ metadata: @config.metadata,
1600
+ retry_policy: @config.retry_policy
1601
+
1602
+ @contact_center_insights_stub.update_issue request, options do |result, operation|
1603
+ yield result, operation if block_given?
1604
+ return result
1605
+ end
1606
+ rescue ::Gapic::Rest::Error => e
1607
+ raise ::Google::Cloud::Error.from_error(e)
1608
+ end
1609
+
1610
+ ##
1611
+ # Deletes an issue.
1612
+ #
1613
+ # @overload delete_issue(request, options = nil)
1614
+ # Pass arguments to `delete_issue` via a request object, either of type
1615
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest} or an equivalent Hash.
1616
+ #
1617
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest, ::Hash]
1618
+ # A request object representing the call parameters. Required. To specify no
1619
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1620
+ # @param options [::Gapic::CallOptions, ::Hash]
1621
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1622
+ #
1623
+ # @overload delete_issue(name: nil)
1624
+ # Pass arguments to `delete_issue` via keyword arguments. Note that at
1625
+ # least one keyword argument is required. To specify no parameters, or to keep all
1626
+ # the default parameter values, pass an empty Hash as a request object (see above).
1627
+ #
1628
+ # @param name [::String]
1629
+ # Required. The name of the issue to delete.
1630
+ # @yield [result, operation] Access the result along with the TransportOperation object
1631
+ # @yieldparam result [::Google::Protobuf::Empty]
1632
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1633
+ #
1634
+ # @return [::Google::Protobuf::Empty]
1635
+ #
1636
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1637
+ def delete_issue request, options = nil
1638
+ raise ::ArgumentError, "request must be provided" if request.nil?
1639
+
1640
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest
1641
+
1642
+ # Converts hash and nil to an options object
1643
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1644
+
1645
+ # Customize the options with defaults
1646
+ call_metadata = @config.rpcs.delete_issue.metadata.to_h
1647
+
1648
+ # Set x-goog-api-client and x-goog-user-project headers
1649
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1650
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1651
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1652
+ transports_version_send: [:rest]
1653
+
1654
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1655
+
1656
+ options.apply_defaults timeout: @config.rpcs.delete_issue.timeout,
1657
+ metadata: call_metadata,
1658
+ retry_policy: @config.rpcs.delete_issue.retry_policy
1659
+
1660
+ options.apply_defaults timeout: @config.timeout,
1661
+ metadata: @config.metadata,
1662
+ retry_policy: @config.retry_policy
1663
+
1664
+ @contact_center_insights_stub.delete_issue request, options do |result, operation|
1665
+ yield result, operation if block_given?
1666
+ return result
1667
+ end
1668
+ rescue ::Gapic::Rest::Error => e
1669
+ raise ::Google::Cloud::Error.from_error(e)
1670
+ end
1671
+
1672
+ ##
1673
+ # Gets an issue model's statistics.
1674
+ #
1675
+ # @overload calculate_issue_model_stats(request, options = nil)
1676
+ # Pass arguments to `calculate_issue_model_stats` via a request object, either of type
1677
+ # {::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest} or an equivalent Hash.
1678
+ #
1679
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest, ::Hash]
1680
+ # A request object representing the call parameters. Required. To specify no
1681
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1682
+ # @param options [::Gapic::CallOptions, ::Hash]
1683
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1684
+ #
1685
+ # @overload calculate_issue_model_stats(issue_model: nil)
1686
+ # Pass arguments to `calculate_issue_model_stats` via keyword arguments. Note that at
1687
+ # least one keyword argument is required. To specify no parameters, or to keep all
1688
+ # the default parameter values, pass an empty Hash as a request object (see above).
1689
+ #
1690
+ # @param issue_model [::String]
1691
+ # Required. The resource name of the issue model to query against.
1692
+ # @yield [result, operation] Access the result along with the TransportOperation object
1693
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse]
1694
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1695
+ #
1696
+ # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse]
1697
+ #
1698
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1699
+ def calculate_issue_model_stats request, options = nil
1700
+ raise ::ArgumentError, "request must be provided" if request.nil?
1701
+
1702
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest
1703
+
1704
+ # Converts hash and nil to an options object
1705
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1706
+
1707
+ # Customize the options with defaults
1708
+ call_metadata = @config.rpcs.calculate_issue_model_stats.metadata.to_h
1709
+
1710
+ # Set x-goog-api-client and x-goog-user-project headers
1711
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1712
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1713
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1714
+ transports_version_send: [:rest]
1715
+
1716
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1717
+
1718
+ options.apply_defaults timeout: @config.rpcs.calculate_issue_model_stats.timeout,
1719
+ metadata: call_metadata,
1720
+ retry_policy: @config.rpcs.calculate_issue_model_stats.retry_policy
1721
+
1722
+ options.apply_defaults timeout: @config.timeout,
1723
+ metadata: @config.metadata,
1724
+ retry_policy: @config.retry_policy
1725
+
1726
+ @contact_center_insights_stub.calculate_issue_model_stats request, options do |result, operation|
1727
+ yield result, operation if block_given?
1728
+ return result
1729
+ end
1730
+ rescue ::Gapic::Rest::Error => e
1731
+ raise ::Google::Cloud::Error.from_error(e)
1732
+ end
1733
+
1734
+ ##
1735
+ # Creates a phrase matcher.
1736
+ #
1737
+ # @overload create_phrase_matcher(request, options = nil)
1738
+ # Pass arguments to `create_phrase_matcher` via a request object, either of type
1739
+ # {::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest} or an equivalent Hash.
1740
+ #
1741
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest, ::Hash]
1742
+ # A request object representing the call parameters. Required. To specify no
1743
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1744
+ # @param options [::Gapic::CallOptions, ::Hash]
1745
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1746
+ #
1747
+ # @overload create_phrase_matcher(parent: nil, phrase_matcher: nil)
1748
+ # Pass arguments to `create_phrase_matcher` via keyword arguments. Note that at
1749
+ # least one keyword argument is required. To specify no parameters, or to keep all
1750
+ # the default parameter values, pass an empty Hash as a request object (see above).
1751
+ #
1752
+ # @param parent [::String]
1753
+ # Required. The parent resource of the phrase matcher. Required. The location
1754
+ # to create a phrase matcher for. Format: `projects/<Project
1755
+ # ID>/locations/<Location ID>` or `projects/<Project
1756
+ # Number>/locations/<Location ID>`
1757
+ # @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash]
1758
+ # Required. The phrase matcher resource to create.
1759
+ # @yield [result, operation] Access the result along with the TransportOperation object
1760
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
1761
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1762
+ #
1763
+ # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
1764
+ #
1765
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1766
+ def create_phrase_matcher request, options = nil
1767
+ raise ::ArgumentError, "request must be provided" if request.nil?
1768
+
1769
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest
1770
+
1771
+ # Converts hash and nil to an options object
1772
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1773
+
1774
+ # Customize the options with defaults
1775
+ call_metadata = @config.rpcs.create_phrase_matcher.metadata.to_h
1776
+
1777
+ # Set x-goog-api-client and x-goog-user-project headers
1778
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1779
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1780
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1781
+ transports_version_send: [:rest]
1782
+
1783
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1784
+
1785
+ options.apply_defaults timeout: @config.rpcs.create_phrase_matcher.timeout,
1786
+ metadata: call_metadata,
1787
+ retry_policy: @config.rpcs.create_phrase_matcher.retry_policy
1788
+
1789
+ options.apply_defaults timeout: @config.timeout,
1790
+ metadata: @config.metadata,
1791
+ retry_policy: @config.retry_policy
1792
+
1793
+ @contact_center_insights_stub.create_phrase_matcher request, options do |result, operation|
1794
+ yield result, operation if block_given?
1795
+ return result
1796
+ end
1797
+ rescue ::Gapic::Rest::Error => e
1798
+ raise ::Google::Cloud::Error.from_error(e)
1799
+ end
1800
+
1801
+ ##
1802
+ # Gets a phrase matcher.
1803
+ #
1804
+ # @overload get_phrase_matcher(request, options = nil)
1805
+ # Pass arguments to `get_phrase_matcher` via a request object, either of type
1806
+ # {::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest} or an equivalent Hash.
1807
+ #
1808
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest, ::Hash]
1809
+ # A request object representing the call parameters. Required. To specify no
1810
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1811
+ # @param options [::Gapic::CallOptions, ::Hash]
1812
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1813
+ #
1814
+ # @overload get_phrase_matcher(name: nil)
1815
+ # Pass arguments to `get_phrase_matcher` via keyword arguments. Note that at
1816
+ # least one keyword argument is required. To specify no parameters, or to keep all
1817
+ # the default parameter values, pass an empty Hash as a request object (see above).
1818
+ #
1819
+ # @param name [::String]
1820
+ # Required. The name of the phrase matcher to get.
1821
+ # @yield [result, operation] Access the result along with the TransportOperation object
1822
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
1823
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1824
+ #
1825
+ # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
1826
+ #
1827
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1828
+ def get_phrase_matcher request, options = nil
1829
+ raise ::ArgumentError, "request must be provided" if request.nil?
1830
+
1831
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest
1832
+
1833
+ # Converts hash and nil to an options object
1834
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1835
+
1836
+ # Customize the options with defaults
1837
+ call_metadata = @config.rpcs.get_phrase_matcher.metadata.to_h
1838
+
1839
+ # Set x-goog-api-client and x-goog-user-project headers
1840
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1841
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1842
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1843
+ transports_version_send: [:rest]
1844
+
1845
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1846
+
1847
+ options.apply_defaults timeout: @config.rpcs.get_phrase_matcher.timeout,
1848
+ metadata: call_metadata,
1849
+ retry_policy: @config.rpcs.get_phrase_matcher.retry_policy
1850
+
1851
+ options.apply_defaults timeout: @config.timeout,
1852
+ metadata: @config.metadata,
1853
+ retry_policy: @config.retry_policy
1854
+
1855
+ @contact_center_insights_stub.get_phrase_matcher request, options do |result, operation|
1856
+ yield result, operation if block_given?
1857
+ return result
1858
+ end
1859
+ rescue ::Gapic::Rest::Error => e
1860
+ raise ::Google::Cloud::Error.from_error(e)
1861
+ end
1862
+
1863
+ ##
1864
+ # Lists phrase matchers.
1865
+ #
1866
+ # @overload list_phrase_matchers(request, options = nil)
1867
+ # Pass arguments to `list_phrase_matchers` via a request object, either of type
1868
+ # {::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest} or an equivalent Hash.
1869
+ #
1870
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest, ::Hash]
1871
+ # A request object representing the call parameters. Required. To specify no
1872
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1873
+ # @param options [::Gapic::CallOptions, ::Hash]
1874
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1875
+ #
1876
+ # @overload list_phrase_matchers(parent: nil, page_size: nil, page_token: nil, filter: nil)
1877
+ # Pass arguments to `list_phrase_matchers` via keyword arguments. Note that at
1878
+ # least one keyword argument is required. To specify no parameters, or to keep all
1879
+ # the default parameter values, pass an empty Hash as a request object (see above).
1880
+ #
1881
+ # @param parent [::String]
1882
+ # Required. The parent resource of the phrase matcher.
1883
+ # @param page_size [::Integer]
1884
+ # The maximum number of phrase matchers to return in the response. If this
1885
+ # value is zero, the service will select a default size. A call might return
1886
+ # fewer objects than requested. A non-empty `next_page_token` in the response
1887
+ # indicates that more data is available.
1888
+ # @param page_token [::String]
1889
+ # The value returned by the last `ListPhraseMatchersResponse`. This value
1890
+ # indicates that this is a continuation of a prior `ListPhraseMatchers` call
1891
+ # and that the system should return the next page of data.
1892
+ # @param filter [::String]
1893
+ # A filter to reduce results to a specific subset. Useful for querying
1894
+ # phrase matchers with specific properties.
1895
+ # @yield [result, operation] Access the result along with the TransportOperation object
1896
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>]
1897
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1898
+ #
1899
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>]
1900
+ #
1901
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1902
+ def list_phrase_matchers request, options = nil
1903
+ raise ::ArgumentError, "request must be provided" if request.nil?
1904
+
1905
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest
1906
+
1907
+ # Converts hash and nil to an options object
1908
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1909
+
1910
+ # Customize the options with defaults
1911
+ call_metadata = @config.rpcs.list_phrase_matchers.metadata.to_h
1912
+
1913
+ # Set x-goog-api-client and x-goog-user-project headers
1914
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1915
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1916
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1917
+ transports_version_send: [:rest]
1918
+
1919
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1920
+
1921
+ options.apply_defaults timeout: @config.rpcs.list_phrase_matchers.timeout,
1922
+ metadata: call_metadata,
1923
+ retry_policy: @config.rpcs.list_phrase_matchers.retry_policy
1924
+
1925
+ options.apply_defaults timeout: @config.timeout,
1926
+ metadata: @config.metadata,
1927
+ retry_policy: @config.retry_policy
1928
+
1929
+ @contact_center_insights_stub.list_phrase_matchers request, options do |result, operation|
1930
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_phrase_matchers, "phrase_matchers", request, result, options
1931
+ yield result, operation if block_given?
1932
+ return result
1933
+ end
1934
+ rescue ::Gapic::Rest::Error => e
1935
+ raise ::Google::Cloud::Error.from_error(e)
1936
+ end
1937
+
1938
+ ##
1939
+ # Deletes a phrase matcher.
1940
+ #
1941
+ # @overload delete_phrase_matcher(request, options = nil)
1942
+ # Pass arguments to `delete_phrase_matcher` via a request object, either of type
1943
+ # {::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest} or an equivalent Hash.
1944
+ #
1945
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest, ::Hash]
1946
+ # A request object representing the call parameters. Required. To specify no
1947
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1948
+ # @param options [::Gapic::CallOptions, ::Hash]
1949
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1950
+ #
1951
+ # @overload delete_phrase_matcher(name: nil)
1952
+ # Pass arguments to `delete_phrase_matcher` via keyword arguments. Note that at
1953
+ # least one keyword argument is required. To specify no parameters, or to keep all
1954
+ # the default parameter values, pass an empty Hash as a request object (see above).
1955
+ #
1956
+ # @param name [::String]
1957
+ # Required. The name of the phrase matcher to delete.
1958
+ # @yield [result, operation] Access the result along with the TransportOperation object
1959
+ # @yieldparam result [::Google::Protobuf::Empty]
1960
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1961
+ #
1962
+ # @return [::Google::Protobuf::Empty]
1963
+ #
1964
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1965
+ def delete_phrase_matcher request, options = nil
1966
+ raise ::ArgumentError, "request must be provided" if request.nil?
1967
+
1968
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest
1969
+
1970
+ # Converts hash and nil to an options object
1971
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1972
+
1973
+ # Customize the options with defaults
1974
+ call_metadata = @config.rpcs.delete_phrase_matcher.metadata.to_h
1975
+
1976
+ # Set x-goog-api-client and x-goog-user-project headers
1977
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1978
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1979
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
1980
+ transports_version_send: [:rest]
1981
+
1982
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1983
+
1984
+ options.apply_defaults timeout: @config.rpcs.delete_phrase_matcher.timeout,
1985
+ metadata: call_metadata,
1986
+ retry_policy: @config.rpcs.delete_phrase_matcher.retry_policy
1987
+
1988
+ options.apply_defaults timeout: @config.timeout,
1989
+ metadata: @config.metadata,
1990
+ retry_policy: @config.retry_policy
1991
+
1992
+ @contact_center_insights_stub.delete_phrase_matcher request, options do |result, operation|
1993
+ yield result, operation if block_given?
1994
+ return result
1995
+ end
1996
+ rescue ::Gapic::Rest::Error => e
1997
+ raise ::Google::Cloud::Error.from_error(e)
1998
+ end
1999
+
2000
+ ##
2001
+ # Updates a phrase matcher.
2002
+ #
2003
+ # @overload update_phrase_matcher(request, options = nil)
2004
+ # Pass arguments to `update_phrase_matcher` via a request object, either of type
2005
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest} or an equivalent Hash.
2006
+ #
2007
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest, ::Hash]
2008
+ # A request object representing the call parameters. Required. To specify no
2009
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2010
+ # @param options [::Gapic::CallOptions, ::Hash]
2011
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2012
+ #
2013
+ # @overload update_phrase_matcher(phrase_matcher: nil, update_mask: nil)
2014
+ # Pass arguments to `update_phrase_matcher` via keyword arguments. Note that at
2015
+ # least one keyword argument is required. To specify no parameters, or to keep all
2016
+ # the default parameter values, pass an empty Hash as a request object (see above).
2017
+ #
2018
+ # @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash]
2019
+ # Required. The new values for the phrase matcher.
2020
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2021
+ # The list of fields to be updated.
2022
+ # @yield [result, operation] Access the result along with the TransportOperation object
2023
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
2024
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2025
+ #
2026
+ # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
2027
+ #
2028
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2029
+ def update_phrase_matcher request, options = nil
2030
+ raise ::ArgumentError, "request must be provided" if request.nil?
2031
+
2032
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest
2033
+
2034
+ # Converts hash and nil to an options object
2035
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2036
+
2037
+ # Customize the options with defaults
2038
+ call_metadata = @config.rpcs.update_phrase_matcher.metadata.to_h
2039
+
2040
+ # Set x-goog-api-client and x-goog-user-project headers
2041
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2042
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2043
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
2044
+ transports_version_send: [:rest]
2045
+
2046
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2047
+
2048
+ options.apply_defaults timeout: @config.rpcs.update_phrase_matcher.timeout,
2049
+ metadata: call_metadata,
2050
+ retry_policy: @config.rpcs.update_phrase_matcher.retry_policy
2051
+
2052
+ options.apply_defaults timeout: @config.timeout,
2053
+ metadata: @config.metadata,
2054
+ retry_policy: @config.retry_policy
2055
+
2056
+ @contact_center_insights_stub.update_phrase_matcher request, options do |result, operation|
2057
+ yield result, operation if block_given?
2058
+ return result
2059
+ end
2060
+ rescue ::Gapic::Rest::Error => e
2061
+ raise ::Google::Cloud::Error.from_error(e)
2062
+ end
2063
+
2064
+ ##
2065
+ # Gets conversation statistics.
2066
+ #
2067
+ # @overload calculate_stats(request, options = nil)
2068
+ # Pass arguments to `calculate_stats` via a request object, either of type
2069
+ # {::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest} or an equivalent Hash.
2070
+ #
2071
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest, ::Hash]
2072
+ # A request object representing the call parameters. Required. To specify no
2073
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2074
+ # @param options [::Gapic::CallOptions, ::Hash]
2075
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2076
+ #
2077
+ # @overload calculate_stats(location: nil, filter: nil)
2078
+ # Pass arguments to `calculate_stats` via keyword arguments. Note that at
2079
+ # least one keyword argument is required. To specify no parameters, or to keep all
2080
+ # the default parameter values, pass an empty Hash as a request object (see above).
2081
+ #
2082
+ # @param location [::String]
2083
+ # Required. The location of the conversations.
2084
+ # @param filter [::String]
2085
+ # A filter to reduce results to a specific subset. This field is useful for
2086
+ # getting statistics about conversations with specific properties.
2087
+ # @yield [result, operation] Access the result along with the TransportOperation object
2088
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse]
2089
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2090
+ #
2091
+ # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse]
2092
+ #
2093
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2094
+ def calculate_stats request, options = nil
2095
+ raise ::ArgumentError, "request must be provided" if request.nil?
2096
+
2097
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest
2098
+
2099
+ # Converts hash and nil to an options object
2100
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2101
+
2102
+ # Customize the options with defaults
2103
+ call_metadata = @config.rpcs.calculate_stats.metadata.to_h
2104
+
2105
+ # Set x-goog-api-client and x-goog-user-project headers
2106
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2107
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2108
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
2109
+ transports_version_send: [:rest]
2110
+
2111
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2112
+
2113
+ options.apply_defaults timeout: @config.rpcs.calculate_stats.timeout,
2114
+ metadata: call_metadata,
2115
+ retry_policy: @config.rpcs.calculate_stats.retry_policy
2116
+
2117
+ options.apply_defaults timeout: @config.timeout,
2118
+ metadata: @config.metadata,
2119
+ retry_policy: @config.retry_policy
2120
+
2121
+ @contact_center_insights_stub.calculate_stats request, options do |result, operation|
2122
+ yield result, operation if block_given?
2123
+ return result
2124
+ end
2125
+ rescue ::Gapic::Rest::Error => e
2126
+ raise ::Google::Cloud::Error.from_error(e)
2127
+ end
2128
+
2129
+ ##
2130
+ # Gets project-level settings.
2131
+ #
2132
+ # @overload get_settings(request, options = nil)
2133
+ # Pass arguments to `get_settings` via a request object, either of type
2134
+ # {::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest} or an equivalent Hash.
2135
+ #
2136
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest, ::Hash]
2137
+ # A request object representing the call parameters. Required. To specify no
2138
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2139
+ # @param options [::Gapic::CallOptions, ::Hash]
2140
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2141
+ #
2142
+ # @overload get_settings(name: nil)
2143
+ # Pass arguments to `get_settings` via keyword arguments. Note that at
2144
+ # least one keyword argument is required. To specify no parameters, or to keep all
2145
+ # the default parameter values, pass an empty Hash as a request object (see above).
2146
+ #
2147
+ # @param name [::String]
2148
+ # Required. The name of the settings resource to get.
2149
+ # @yield [result, operation] Access the result along with the TransportOperation object
2150
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Settings]
2151
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2152
+ #
2153
+ # @return [::Google::Cloud::ContactCenterInsights::V1::Settings]
2154
+ #
2155
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2156
+ def get_settings request, options = nil
2157
+ raise ::ArgumentError, "request must be provided" if request.nil?
2158
+
2159
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest
2160
+
2161
+ # Converts hash and nil to an options object
2162
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2163
+
2164
+ # Customize the options with defaults
2165
+ call_metadata = @config.rpcs.get_settings.metadata.to_h
2166
+
2167
+ # Set x-goog-api-client and x-goog-user-project headers
2168
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2169
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2170
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
2171
+ transports_version_send: [:rest]
2172
+
2173
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2174
+
2175
+ options.apply_defaults timeout: @config.rpcs.get_settings.timeout,
2176
+ metadata: call_metadata,
2177
+ retry_policy: @config.rpcs.get_settings.retry_policy
2178
+
2179
+ options.apply_defaults timeout: @config.timeout,
2180
+ metadata: @config.metadata,
2181
+ retry_policy: @config.retry_policy
2182
+
2183
+ @contact_center_insights_stub.get_settings request, options do |result, operation|
2184
+ yield result, operation if block_given?
2185
+ return result
2186
+ end
2187
+ rescue ::Gapic::Rest::Error => e
2188
+ raise ::Google::Cloud::Error.from_error(e)
2189
+ end
2190
+
2191
+ ##
2192
+ # Updates project-level settings.
2193
+ #
2194
+ # @overload update_settings(request, options = nil)
2195
+ # Pass arguments to `update_settings` via a request object, either of type
2196
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest} or an equivalent Hash.
2197
+ #
2198
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest, ::Hash]
2199
+ # A request object representing the call parameters. Required. To specify no
2200
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2201
+ # @param options [::Gapic::CallOptions, ::Hash]
2202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2203
+ #
2204
+ # @overload update_settings(settings: nil, update_mask: nil)
2205
+ # Pass arguments to `update_settings` via keyword arguments. Note that at
2206
+ # least one keyword argument is required. To specify no parameters, or to keep all
2207
+ # the default parameter values, pass an empty Hash as a request object (see above).
2208
+ #
2209
+ # @param settings [::Google::Cloud::ContactCenterInsights::V1::Settings, ::Hash]
2210
+ # Required. The new settings values.
2211
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2212
+ # Required. The list of fields to be updated.
2213
+ # @yield [result, operation] Access the result along with the TransportOperation object
2214
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Settings]
2215
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2216
+ #
2217
+ # @return [::Google::Cloud::ContactCenterInsights::V1::Settings]
2218
+ #
2219
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2220
+ def update_settings request, options = nil
2221
+ raise ::ArgumentError, "request must be provided" if request.nil?
2222
+
2223
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest
2224
+
2225
+ # Converts hash and nil to an options object
2226
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2227
+
2228
+ # Customize the options with defaults
2229
+ call_metadata = @config.rpcs.update_settings.metadata.to_h
2230
+
2231
+ # Set x-goog-api-client and x-goog-user-project headers
2232
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2233
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2234
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
2235
+ transports_version_send: [:rest]
2236
+
2237
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2238
+
2239
+ options.apply_defaults timeout: @config.rpcs.update_settings.timeout,
2240
+ metadata: call_metadata,
2241
+ retry_policy: @config.rpcs.update_settings.retry_policy
2242
+
2243
+ options.apply_defaults timeout: @config.timeout,
2244
+ metadata: @config.metadata,
2245
+ retry_policy: @config.retry_policy
2246
+
2247
+ @contact_center_insights_stub.update_settings request, options do |result, operation|
2248
+ yield result, operation if block_given?
2249
+ return result
2250
+ end
2251
+ rescue ::Gapic::Rest::Error => e
2252
+ raise ::Google::Cloud::Error.from_error(e)
2253
+ end
2254
+
2255
+ ##
2256
+ # Creates a view.
2257
+ #
2258
+ # @overload create_view(request, options = nil)
2259
+ # Pass arguments to `create_view` via a request object, either of type
2260
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest} or an equivalent Hash.
2261
+ #
2262
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest, ::Hash]
2263
+ # A request object representing the call parameters. Required. To specify no
2264
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2265
+ # @param options [::Gapic::CallOptions, ::Hash]
2266
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2267
+ #
2268
+ # @overload create_view(parent: nil, view: nil)
2269
+ # Pass arguments to `create_view` via keyword arguments. Note that at
2270
+ # least one keyword argument is required. To specify no parameters, or to keep all
2271
+ # the default parameter values, pass an empty Hash as a request object (see above).
2272
+ #
2273
+ # @param parent [::String]
2274
+ # Required. The parent resource of the view. Required. The location to create
2275
+ # a view for.
2276
+ # Format: `projects/<Project ID>/locations/<Location ID>` or
2277
+ # `projects/<Project Number>/locations/<Location ID>`
2278
+ # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash]
2279
+ # Required. The view resource to create.
2280
+ # @yield [result, operation] Access the result along with the TransportOperation object
2281
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View]
2282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2283
+ #
2284
+ # @return [::Google::Cloud::ContactCenterInsights::V1::View]
2285
+ #
2286
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2287
+ def create_view request, options = nil
2288
+ raise ::ArgumentError, "request must be provided" if request.nil?
2289
+
2290
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest
2291
+
2292
+ # Converts hash and nil to an options object
2293
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2294
+
2295
+ # Customize the options with defaults
2296
+ call_metadata = @config.rpcs.create_view.metadata.to_h
2297
+
2298
+ # Set x-goog-api-client and x-goog-user-project headers
2299
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2300
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2301
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
2302
+ transports_version_send: [:rest]
2303
+
2304
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2305
+
2306
+ options.apply_defaults timeout: @config.rpcs.create_view.timeout,
2307
+ metadata: call_metadata,
2308
+ retry_policy: @config.rpcs.create_view.retry_policy
2309
+
2310
+ options.apply_defaults timeout: @config.timeout,
2311
+ metadata: @config.metadata,
2312
+ retry_policy: @config.retry_policy
2313
+
2314
+ @contact_center_insights_stub.create_view request, options do |result, operation|
2315
+ yield result, operation if block_given?
2316
+ return result
2317
+ end
2318
+ rescue ::Gapic::Rest::Error => e
2319
+ raise ::Google::Cloud::Error.from_error(e)
2320
+ end
2321
+
2322
+ ##
2323
+ # Gets a view.
2324
+ #
2325
+ # @overload get_view(request, options = nil)
2326
+ # Pass arguments to `get_view` via a request object, either of type
2327
+ # {::Google::Cloud::ContactCenterInsights::V1::GetViewRequest} or an equivalent Hash.
2328
+ #
2329
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetViewRequest, ::Hash]
2330
+ # A request object representing the call parameters. Required. To specify no
2331
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2332
+ # @param options [::Gapic::CallOptions, ::Hash]
2333
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2334
+ #
2335
+ # @overload get_view(name: nil)
2336
+ # Pass arguments to `get_view` via keyword arguments. Note that at
2337
+ # least one keyword argument is required. To specify no parameters, or to keep all
2338
+ # the default parameter values, pass an empty Hash as a request object (see above).
2339
+ #
2340
+ # @param name [::String]
2341
+ # Required. The name of the view to get.
2342
+ # @yield [result, operation] Access the result along with the TransportOperation object
2343
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View]
2344
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2345
+ #
2346
+ # @return [::Google::Cloud::ContactCenterInsights::V1::View]
2347
+ #
2348
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2349
+ def get_view request, options = nil
2350
+ raise ::ArgumentError, "request must be provided" if request.nil?
2351
+
2352
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest
2353
+
2354
+ # Converts hash and nil to an options object
2355
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2356
+
2357
+ # Customize the options with defaults
2358
+ call_metadata = @config.rpcs.get_view.metadata.to_h
2359
+
2360
+ # Set x-goog-api-client and x-goog-user-project headers
2361
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2362
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2363
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
2364
+ transports_version_send: [:rest]
2365
+
2366
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2367
+
2368
+ options.apply_defaults timeout: @config.rpcs.get_view.timeout,
2369
+ metadata: call_metadata,
2370
+ retry_policy: @config.rpcs.get_view.retry_policy
2371
+
2372
+ options.apply_defaults timeout: @config.timeout,
2373
+ metadata: @config.metadata,
2374
+ retry_policy: @config.retry_policy
2375
+
2376
+ @contact_center_insights_stub.get_view request, options do |result, operation|
2377
+ yield result, operation if block_given?
2378
+ return result
2379
+ end
2380
+ rescue ::Gapic::Rest::Error => e
2381
+ raise ::Google::Cloud::Error.from_error(e)
2382
+ end
2383
+
2384
+ ##
2385
+ # Lists views.
2386
+ #
2387
+ # @overload list_views(request, options = nil)
2388
+ # Pass arguments to `list_views` via a request object, either of type
2389
+ # {::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest} or an equivalent Hash.
2390
+ #
2391
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest, ::Hash]
2392
+ # A request object representing the call parameters. Required. To specify no
2393
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2394
+ # @param options [::Gapic::CallOptions, ::Hash]
2395
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2396
+ #
2397
+ # @overload list_views(parent: nil, page_size: nil, page_token: nil)
2398
+ # Pass arguments to `list_views` via keyword arguments. Note that at
2399
+ # least one keyword argument is required. To specify no parameters, or to keep all
2400
+ # the default parameter values, pass an empty Hash as a request object (see above).
2401
+ #
2402
+ # @param parent [::String]
2403
+ # Required. The parent resource of the views.
2404
+ # @param page_size [::Integer]
2405
+ # The maximum number of views to return in the response. If this
2406
+ # value is zero, the service will select a default size. A call may return
2407
+ # fewer objects than requested. A non-empty `next_page_token` in the response
2408
+ # indicates that more data is available.
2409
+ # @param page_token [::String]
2410
+ # The value returned by the last `ListViewsResponse`; indicates
2411
+ # that this is a continuation of a prior `ListViews` call and
2412
+ # the system should return the next page of data.
2413
+ # @yield [result, operation] Access the result along with the TransportOperation object
2414
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>]
2415
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2416
+ #
2417
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>]
2418
+ #
2419
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2420
+ def list_views request, options = nil
2421
+ raise ::ArgumentError, "request must be provided" if request.nil?
2422
+
2423
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest
2424
+
2425
+ # Converts hash and nil to an options object
2426
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2427
+
2428
+ # Customize the options with defaults
2429
+ call_metadata = @config.rpcs.list_views.metadata.to_h
2430
+
2431
+ # Set x-goog-api-client and x-goog-user-project headers
2432
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2433
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2434
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
2435
+ transports_version_send: [:rest]
2436
+
2437
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2438
+
2439
+ options.apply_defaults timeout: @config.rpcs.list_views.timeout,
2440
+ metadata: call_metadata,
2441
+ retry_policy: @config.rpcs.list_views.retry_policy
2442
+
2443
+ options.apply_defaults timeout: @config.timeout,
2444
+ metadata: @config.metadata,
2445
+ retry_policy: @config.retry_policy
2446
+
2447
+ @contact_center_insights_stub.list_views request, options do |result, operation|
2448
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_views, "views", request, result, options
2449
+ yield result, operation if block_given?
2450
+ return result
2451
+ end
2452
+ rescue ::Gapic::Rest::Error => e
2453
+ raise ::Google::Cloud::Error.from_error(e)
2454
+ end
2455
+
2456
+ ##
2457
+ # Updates a view.
2458
+ #
2459
+ # @overload update_view(request, options = nil)
2460
+ # Pass arguments to `update_view` via a request object, either of type
2461
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest} or an equivalent Hash.
2462
+ #
2463
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest, ::Hash]
2464
+ # A request object representing the call parameters. Required. To specify no
2465
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2466
+ # @param options [::Gapic::CallOptions, ::Hash]
2467
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2468
+ #
2469
+ # @overload update_view(view: nil, update_mask: nil)
2470
+ # Pass arguments to `update_view` via keyword arguments. Note that at
2471
+ # least one keyword argument is required. To specify no parameters, or to keep all
2472
+ # the default parameter values, pass an empty Hash as a request object (see above).
2473
+ #
2474
+ # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash]
2475
+ # Required. The new view.
2476
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2477
+ # The list of fields to be updated.
2478
+ # @yield [result, operation] Access the result along with the TransportOperation object
2479
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View]
2480
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2481
+ #
2482
+ # @return [::Google::Cloud::ContactCenterInsights::V1::View]
2483
+ #
2484
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2485
+ def update_view request, options = nil
2486
+ raise ::ArgumentError, "request must be provided" if request.nil?
2487
+
2488
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest
2489
+
2490
+ # Converts hash and nil to an options object
2491
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2492
+
2493
+ # Customize the options with defaults
2494
+ call_metadata = @config.rpcs.update_view.metadata.to_h
2495
+
2496
+ # Set x-goog-api-client and x-goog-user-project headers
2497
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2498
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2499
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
2500
+ transports_version_send: [:rest]
2501
+
2502
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2503
+
2504
+ options.apply_defaults timeout: @config.rpcs.update_view.timeout,
2505
+ metadata: call_metadata,
2506
+ retry_policy: @config.rpcs.update_view.retry_policy
2507
+
2508
+ options.apply_defaults timeout: @config.timeout,
2509
+ metadata: @config.metadata,
2510
+ retry_policy: @config.retry_policy
2511
+
2512
+ @contact_center_insights_stub.update_view request, options do |result, operation|
2513
+ yield result, operation if block_given?
2514
+ return result
2515
+ end
2516
+ rescue ::Gapic::Rest::Error => e
2517
+ raise ::Google::Cloud::Error.from_error(e)
2518
+ end
2519
+
2520
+ ##
2521
+ # Deletes a view.
2522
+ #
2523
+ # @overload delete_view(request, options = nil)
2524
+ # Pass arguments to `delete_view` via a request object, either of type
2525
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest} or an equivalent Hash.
2526
+ #
2527
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest, ::Hash]
2528
+ # A request object representing the call parameters. Required. To specify no
2529
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2530
+ # @param options [::Gapic::CallOptions, ::Hash]
2531
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2532
+ #
2533
+ # @overload delete_view(name: nil)
2534
+ # Pass arguments to `delete_view` via keyword arguments. Note that at
2535
+ # least one keyword argument is required. To specify no parameters, or to keep all
2536
+ # the default parameter values, pass an empty Hash as a request object (see above).
2537
+ #
2538
+ # @param name [::String]
2539
+ # Required. The name of the view to delete.
2540
+ # @yield [result, operation] Access the result along with the TransportOperation object
2541
+ # @yieldparam result [::Google::Protobuf::Empty]
2542
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2543
+ #
2544
+ # @return [::Google::Protobuf::Empty]
2545
+ #
2546
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2547
+ def delete_view request, options = nil
2548
+ raise ::ArgumentError, "request must be provided" if request.nil?
2549
+
2550
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest
2551
+
2552
+ # Converts hash and nil to an options object
2553
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2554
+
2555
+ # Customize the options with defaults
2556
+ call_metadata = @config.rpcs.delete_view.metadata.to_h
2557
+
2558
+ # Set x-goog-api-client and x-goog-user-project headers
2559
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2560
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2561
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
2562
+ transports_version_send: [:rest]
2563
+
2564
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2565
+
2566
+ options.apply_defaults timeout: @config.rpcs.delete_view.timeout,
2567
+ metadata: call_metadata,
2568
+ retry_policy: @config.rpcs.delete_view.retry_policy
2569
+
2570
+ options.apply_defaults timeout: @config.timeout,
2571
+ metadata: @config.metadata,
2572
+ retry_policy: @config.retry_policy
2573
+
2574
+ @contact_center_insights_stub.delete_view request, options do |result, operation|
2575
+ yield result, operation if block_given?
2576
+ return result
2577
+ end
2578
+ rescue ::Gapic::Rest::Error => e
2579
+ raise ::Google::Cloud::Error.from_error(e)
2580
+ end
2581
+
2582
+ ##
2583
+ # Configuration class for the ContactCenterInsights REST API.
2584
+ #
2585
+ # This class represents the configuration for ContactCenterInsights REST,
2586
+ # providing control over timeouts, retry behavior, logging, transport
2587
+ # parameters, and other low-level controls. Certain parameters can also be
2588
+ # applied individually to specific RPCs. See
2589
+ # {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client::Configuration::Rpcs}
2590
+ # for a list of RPCs that can be configured independently.
2591
+ #
2592
+ # Configuration can be applied globally to all clients, or to a single client
2593
+ # on construction.
2594
+ #
2595
+ # @example
2596
+ #
2597
+ # # Modify the global config, setting the timeout for
2598
+ # # create_conversation to 20 seconds,
2599
+ # # and all remaining timeouts to 10 seconds.
2600
+ # ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.configure do |config|
2601
+ # config.timeout = 10.0
2602
+ # config.rpcs.create_conversation.timeout = 20.0
2603
+ # end
2604
+ #
2605
+ # # Apply the above configuration only to a new client.
2606
+ # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config|
2607
+ # config.timeout = 10.0
2608
+ # config.rpcs.create_conversation.timeout = 20.0
2609
+ # end
2610
+ #
2611
+ # @!attribute [rw] endpoint
2612
+ # The hostname or hostname:port of the service endpoint.
2613
+ # Defaults to `"contactcenterinsights.googleapis.com"`.
2614
+ # @return [::String]
2615
+ # @!attribute [rw] credentials
2616
+ # Credentials to send with calls. You may provide any of the following types:
2617
+ # * (`String`) The path to a service account key file in JSON format
2618
+ # * (`Hash`) A service account key as a Hash
2619
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2620
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
2621
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2622
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
2623
+ # * (`nil`) indicating no credentials
2624
+ # @return [::Object]
2625
+ # @!attribute [rw] scope
2626
+ # The OAuth scopes
2627
+ # @return [::Array<::String>]
2628
+ # @!attribute [rw] lib_name
2629
+ # The library name as recorded in instrumentation and logging
2630
+ # @return [::String]
2631
+ # @!attribute [rw] lib_version
2632
+ # The library version as recorded in instrumentation and logging
2633
+ # @return [::String]
2634
+ # @!attribute [rw] timeout
2635
+ # The call timeout in seconds.
2636
+ # @return [::Numeric]
2637
+ # @!attribute [rw] metadata
2638
+ # Additional headers to be sent with the call.
2639
+ # @return [::Hash{::Symbol=>::String}]
2640
+ # @!attribute [rw] retry_policy
2641
+ # The retry policy. The value is a hash with the following keys:
2642
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2643
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2644
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2645
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2646
+ # trigger a retry.
2647
+ # @return [::Hash]
2648
+ # @!attribute [rw] quota_project
2649
+ # A separate project against which to charge quota.
2650
+ # @return [::String]
2651
+ #
2652
+ class Configuration
2653
+ extend ::Gapic::Config
2654
+
2655
+ config_attr :endpoint, "contactcenterinsights.googleapis.com", ::String
2656
+ config_attr :credentials, nil do |value|
2657
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2658
+ allowed.any? { |klass| klass === value }
2659
+ end
2660
+ config_attr :scope, nil, ::String, ::Array, nil
2661
+ config_attr :lib_name, nil, ::String, nil
2662
+ config_attr :lib_version, nil, ::String, nil
2663
+ config_attr :timeout, nil, ::Numeric, nil
2664
+ config_attr :metadata, nil, ::Hash, nil
2665
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2666
+ config_attr :quota_project, nil, ::String, nil
2667
+
2668
+ # @private
2669
+ def initialize parent_config = nil
2670
+ @parent_config = parent_config unless parent_config.nil?
2671
+
2672
+ yield self if block_given?
2673
+ end
2674
+
2675
+ ##
2676
+ # Configurations for individual RPCs
2677
+ # @return [Rpcs]
2678
+ #
2679
+ def rpcs
2680
+ @rpcs ||= begin
2681
+ parent_rpcs = nil
2682
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2683
+ Rpcs.new parent_rpcs
2684
+ end
2685
+ end
2686
+
2687
+ ##
2688
+ # Configuration RPC class for the ContactCenterInsights API.
2689
+ #
2690
+ # Includes fields providing the configuration for each RPC in this service.
2691
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2692
+ # the following configuration fields:
2693
+ #
2694
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2695
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2696
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2697
+ # include the following keys:
2698
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2699
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2700
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2701
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2702
+ # trigger a retry.
2703
+ #
2704
+ class Rpcs
2705
+ ##
2706
+ # RPC-specific configuration for `create_conversation`
2707
+ # @return [::Gapic::Config::Method]
2708
+ #
2709
+ attr_reader :create_conversation
2710
+ ##
2711
+ # RPC-specific configuration for `update_conversation`
2712
+ # @return [::Gapic::Config::Method]
2713
+ #
2714
+ attr_reader :update_conversation
2715
+ ##
2716
+ # RPC-specific configuration for `get_conversation`
2717
+ # @return [::Gapic::Config::Method]
2718
+ #
2719
+ attr_reader :get_conversation
2720
+ ##
2721
+ # RPC-specific configuration for `list_conversations`
2722
+ # @return [::Gapic::Config::Method]
2723
+ #
2724
+ attr_reader :list_conversations
2725
+ ##
2726
+ # RPC-specific configuration for `delete_conversation`
2727
+ # @return [::Gapic::Config::Method]
2728
+ #
2729
+ attr_reader :delete_conversation
2730
+ ##
2731
+ # RPC-specific configuration for `create_analysis`
2732
+ # @return [::Gapic::Config::Method]
2733
+ #
2734
+ attr_reader :create_analysis
2735
+ ##
2736
+ # RPC-specific configuration for `get_analysis`
2737
+ # @return [::Gapic::Config::Method]
2738
+ #
2739
+ attr_reader :get_analysis
2740
+ ##
2741
+ # RPC-specific configuration for `list_analyses`
2742
+ # @return [::Gapic::Config::Method]
2743
+ #
2744
+ attr_reader :list_analyses
2745
+ ##
2746
+ # RPC-specific configuration for `delete_analysis`
2747
+ # @return [::Gapic::Config::Method]
2748
+ #
2749
+ attr_reader :delete_analysis
2750
+ ##
2751
+ # RPC-specific configuration for `bulk_analyze_conversations`
2752
+ # @return [::Gapic::Config::Method]
2753
+ #
2754
+ attr_reader :bulk_analyze_conversations
2755
+ ##
2756
+ # RPC-specific configuration for `ingest_conversations`
2757
+ # @return [::Gapic::Config::Method]
2758
+ #
2759
+ attr_reader :ingest_conversations
2760
+ ##
2761
+ # RPC-specific configuration for `export_insights_data`
2762
+ # @return [::Gapic::Config::Method]
2763
+ #
2764
+ attr_reader :export_insights_data
2765
+ ##
2766
+ # RPC-specific configuration for `create_issue_model`
2767
+ # @return [::Gapic::Config::Method]
2768
+ #
2769
+ attr_reader :create_issue_model
2770
+ ##
2771
+ # RPC-specific configuration for `update_issue_model`
2772
+ # @return [::Gapic::Config::Method]
2773
+ #
2774
+ attr_reader :update_issue_model
2775
+ ##
2776
+ # RPC-specific configuration for `get_issue_model`
2777
+ # @return [::Gapic::Config::Method]
2778
+ #
2779
+ attr_reader :get_issue_model
2780
+ ##
2781
+ # RPC-specific configuration for `list_issue_models`
2782
+ # @return [::Gapic::Config::Method]
2783
+ #
2784
+ attr_reader :list_issue_models
2785
+ ##
2786
+ # RPC-specific configuration for `delete_issue_model`
2787
+ # @return [::Gapic::Config::Method]
2788
+ #
2789
+ attr_reader :delete_issue_model
2790
+ ##
2791
+ # RPC-specific configuration for `deploy_issue_model`
2792
+ # @return [::Gapic::Config::Method]
2793
+ #
2794
+ attr_reader :deploy_issue_model
2795
+ ##
2796
+ # RPC-specific configuration for `undeploy_issue_model`
2797
+ # @return [::Gapic::Config::Method]
2798
+ #
2799
+ attr_reader :undeploy_issue_model
2800
+ ##
2801
+ # RPC-specific configuration for `get_issue`
2802
+ # @return [::Gapic::Config::Method]
2803
+ #
2804
+ attr_reader :get_issue
2805
+ ##
2806
+ # RPC-specific configuration for `list_issues`
2807
+ # @return [::Gapic::Config::Method]
2808
+ #
2809
+ attr_reader :list_issues
2810
+ ##
2811
+ # RPC-specific configuration for `update_issue`
2812
+ # @return [::Gapic::Config::Method]
2813
+ #
2814
+ attr_reader :update_issue
2815
+ ##
2816
+ # RPC-specific configuration for `delete_issue`
2817
+ # @return [::Gapic::Config::Method]
2818
+ #
2819
+ attr_reader :delete_issue
2820
+ ##
2821
+ # RPC-specific configuration for `calculate_issue_model_stats`
2822
+ # @return [::Gapic::Config::Method]
2823
+ #
2824
+ attr_reader :calculate_issue_model_stats
2825
+ ##
2826
+ # RPC-specific configuration for `create_phrase_matcher`
2827
+ # @return [::Gapic::Config::Method]
2828
+ #
2829
+ attr_reader :create_phrase_matcher
2830
+ ##
2831
+ # RPC-specific configuration for `get_phrase_matcher`
2832
+ # @return [::Gapic::Config::Method]
2833
+ #
2834
+ attr_reader :get_phrase_matcher
2835
+ ##
2836
+ # RPC-specific configuration for `list_phrase_matchers`
2837
+ # @return [::Gapic::Config::Method]
2838
+ #
2839
+ attr_reader :list_phrase_matchers
2840
+ ##
2841
+ # RPC-specific configuration for `delete_phrase_matcher`
2842
+ # @return [::Gapic::Config::Method]
2843
+ #
2844
+ attr_reader :delete_phrase_matcher
2845
+ ##
2846
+ # RPC-specific configuration for `update_phrase_matcher`
2847
+ # @return [::Gapic::Config::Method]
2848
+ #
2849
+ attr_reader :update_phrase_matcher
2850
+ ##
2851
+ # RPC-specific configuration for `calculate_stats`
2852
+ # @return [::Gapic::Config::Method]
2853
+ #
2854
+ attr_reader :calculate_stats
2855
+ ##
2856
+ # RPC-specific configuration for `get_settings`
2857
+ # @return [::Gapic::Config::Method]
2858
+ #
2859
+ attr_reader :get_settings
2860
+ ##
2861
+ # RPC-specific configuration for `update_settings`
2862
+ # @return [::Gapic::Config::Method]
2863
+ #
2864
+ attr_reader :update_settings
2865
+ ##
2866
+ # RPC-specific configuration for `create_view`
2867
+ # @return [::Gapic::Config::Method]
2868
+ #
2869
+ attr_reader :create_view
2870
+ ##
2871
+ # RPC-specific configuration for `get_view`
2872
+ # @return [::Gapic::Config::Method]
2873
+ #
2874
+ attr_reader :get_view
2875
+ ##
2876
+ # RPC-specific configuration for `list_views`
2877
+ # @return [::Gapic::Config::Method]
2878
+ #
2879
+ attr_reader :list_views
2880
+ ##
2881
+ # RPC-specific configuration for `update_view`
2882
+ # @return [::Gapic::Config::Method]
2883
+ #
2884
+ attr_reader :update_view
2885
+ ##
2886
+ # RPC-specific configuration for `delete_view`
2887
+ # @return [::Gapic::Config::Method]
2888
+ #
2889
+ attr_reader :delete_view
2890
+
2891
+ # @private
2892
+ def initialize parent_rpcs = nil
2893
+ create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation
2894
+ @create_conversation = ::Gapic::Config::Method.new create_conversation_config
2895
+ update_conversation_config = parent_rpcs.update_conversation if parent_rpcs.respond_to? :update_conversation
2896
+ @update_conversation = ::Gapic::Config::Method.new update_conversation_config
2897
+ get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation
2898
+ @get_conversation = ::Gapic::Config::Method.new get_conversation_config
2899
+ list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations
2900
+ @list_conversations = ::Gapic::Config::Method.new list_conversations_config
2901
+ delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation
2902
+ @delete_conversation = ::Gapic::Config::Method.new delete_conversation_config
2903
+ create_analysis_config = parent_rpcs.create_analysis if parent_rpcs.respond_to? :create_analysis
2904
+ @create_analysis = ::Gapic::Config::Method.new create_analysis_config
2905
+ get_analysis_config = parent_rpcs.get_analysis if parent_rpcs.respond_to? :get_analysis
2906
+ @get_analysis = ::Gapic::Config::Method.new get_analysis_config
2907
+ list_analyses_config = parent_rpcs.list_analyses if parent_rpcs.respond_to? :list_analyses
2908
+ @list_analyses = ::Gapic::Config::Method.new list_analyses_config
2909
+ delete_analysis_config = parent_rpcs.delete_analysis if parent_rpcs.respond_to? :delete_analysis
2910
+ @delete_analysis = ::Gapic::Config::Method.new delete_analysis_config
2911
+ bulk_analyze_conversations_config = parent_rpcs.bulk_analyze_conversations if parent_rpcs.respond_to? :bulk_analyze_conversations
2912
+ @bulk_analyze_conversations = ::Gapic::Config::Method.new bulk_analyze_conversations_config
2913
+ ingest_conversations_config = parent_rpcs.ingest_conversations if parent_rpcs.respond_to? :ingest_conversations
2914
+ @ingest_conversations = ::Gapic::Config::Method.new ingest_conversations_config
2915
+ export_insights_data_config = parent_rpcs.export_insights_data if parent_rpcs.respond_to? :export_insights_data
2916
+ @export_insights_data = ::Gapic::Config::Method.new export_insights_data_config
2917
+ create_issue_model_config = parent_rpcs.create_issue_model if parent_rpcs.respond_to? :create_issue_model
2918
+ @create_issue_model = ::Gapic::Config::Method.new create_issue_model_config
2919
+ update_issue_model_config = parent_rpcs.update_issue_model if parent_rpcs.respond_to? :update_issue_model
2920
+ @update_issue_model = ::Gapic::Config::Method.new update_issue_model_config
2921
+ get_issue_model_config = parent_rpcs.get_issue_model if parent_rpcs.respond_to? :get_issue_model
2922
+ @get_issue_model = ::Gapic::Config::Method.new get_issue_model_config
2923
+ list_issue_models_config = parent_rpcs.list_issue_models if parent_rpcs.respond_to? :list_issue_models
2924
+ @list_issue_models = ::Gapic::Config::Method.new list_issue_models_config
2925
+ delete_issue_model_config = parent_rpcs.delete_issue_model if parent_rpcs.respond_to? :delete_issue_model
2926
+ @delete_issue_model = ::Gapic::Config::Method.new delete_issue_model_config
2927
+ deploy_issue_model_config = parent_rpcs.deploy_issue_model if parent_rpcs.respond_to? :deploy_issue_model
2928
+ @deploy_issue_model = ::Gapic::Config::Method.new deploy_issue_model_config
2929
+ undeploy_issue_model_config = parent_rpcs.undeploy_issue_model if parent_rpcs.respond_to? :undeploy_issue_model
2930
+ @undeploy_issue_model = ::Gapic::Config::Method.new undeploy_issue_model_config
2931
+ get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue
2932
+ @get_issue = ::Gapic::Config::Method.new get_issue_config
2933
+ list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues
2934
+ @list_issues = ::Gapic::Config::Method.new list_issues_config
2935
+ update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue
2936
+ @update_issue = ::Gapic::Config::Method.new update_issue_config
2937
+ delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue
2938
+ @delete_issue = ::Gapic::Config::Method.new delete_issue_config
2939
+ calculate_issue_model_stats_config = parent_rpcs.calculate_issue_model_stats if parent_rpcs.respond_to? :calculate_issue_model_stats
2940
+ @calculate_issue_model_stats = ::Gapic::Config::Method.new calculate_issue_model_stats_config
2941
+ create_phrase_matcher_config = parent_rpcs.create_phrase_matcher if parent_rpcs.respond_to? :create_phrase_matcher
2942
+ @create_phrase_matcher = ::Gapic::Config::Method.new create_phrase_matcher_config
2943
+ get_phrase_matcher_config = parent_rpcs.get_phrase_matcher if parent_rpcs.respond_to? :get_phrase_matcher
2944
+ @get_phrase_matcher = ::Gapic::Config::Method.new get_phrase_matcher_config
2945
+ list_phrase_matchers_config = parent_rpcs.list_phrase_matchers if parent_rpcs.respond_to? :list_phrase_matchers
2946
+ @list_phrase_matchers = ::Gapic::Config::Method.new list_phrase_matchers_config
2947
+ delete_phrase_matcher_config = parent_rpcs.delete_phrase_matcher if parent_rpcs.respond_to? :delete_phrase_matcher
2948
+ @delete_phrase_matcher = ::Gapic::Config::Method.new delete_phrase_matcher_config
2949
+ update_phrase_matcher_config = parent_rpcs.update_phrase_matcher if parent_rpcs.respond_to? :update_phrase_matcher
2950
+ @update_phrase_matcher = ::Gapic::Config::Method.new update_phrase_matcher_config
2951
+ calculate_stats_config = parent_rpcs.calculate_stats if parent_rpcs.respond_to? :calculate_stats
2952
+ @calculate_stats = ::Gapic::Config::Method.new calculate_stats_config
2953
+ get_settings_config = parent_rpcs.get_settings if parent_rpcs.respond_to? :get_settings
2954
+ @get_settings = ::Gapic::Config::Method.new get_settings_config
2955
+ update_settings_config = parent_rpcs.update_settings if parent_rpcs.respond_to? :update_settings
2956
+ @update_settings = ::Gapic::Config::Method.new update_settings_config
2957
+ create_view_config = parent_rpcs.create_view if parent_rpcs.respond_to? :create_view
2958
+ @create_view = ::Gapic::Config::Method.new create_view_config
2959
+ get_view_config = parent_rpcs.get_view if parent_rpcs.respond_to? :get_view
2960
+ @get_view = ::Gapic::Config::Method.new get_view_config
2961
+ list_views_config = parent_rpcs.list_views if parent_rpcs.respond_to? :list_views
2962
+ @list_views = ::Gapic::Config::Method.new list_views_config
2963
+ update_view_config = parent_rpcs.update_view if parent_rpcs.respond_to? :update_view
2964
+ @update_view = ::Gapic::Config::Method.new update_view_config
2965
+ delete_view_config = parent_rpcs.delete_view if parent_rpcs.respond_to? :delete_view
2966
+ @delete_view = ::Gapic::Config::Method.new delete_view_config
2967
+
2968
+ yield self if block_given?
2969
+ end
2970
+ end
2971
+ end
2972
+ end
2973
+ end
2974
+ end
2975
+ end
2976
+ end
2977
+ end
2978
+ end