google-cloud-contact_center_insights-v1 0.11.0 → 0.13.0

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