google-cloud-contact_center_insights-v1 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/contactcenterinsights/v1/contact_center_insights_pb"
21
21
  require "google/cloud/contact_center_insights/v1/contact_center_insights/rest/service_stub"
22
+ require "google/iam/v1/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -164,6 +165,13 @@ module Google
164
165
  universe_domain: @config.universe_domain,
165
166
  credentials: credentials
166
167
  )
168
+
169
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
170
+ config.credentials = credentials
171
+ config.quota_project = @quota_project_id
172
+ config.endpoint = @contact_center_insights_stub.endpoint
173
+ config.universe_domain = @contact_center_insights_stub.universe_domain
174
+ end
167
175
  end
168
176
 
169
177
  ##
@@ -173,6 +181,13 @@ module Google
173
181
  #
174
182
  attr_reader :operations_client
175
183
 
184
+ ##
185
+ # Get the associated client for mix-in of the IAMPolicy.
186
+ #
187
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
188
+ #
189
+ attr_reader :iam_policy_client
190
+
176
191
  # Service calls
177
192
 
178
193
  ##
@@ -3313,30 +3328,35 @@ module Google
3313
3328
  end
3314
3329
 
3315
3330
  ##
3316
- # Gets location-level encryption key specification.
3331
+ # Creates a analysis rule.
3317
3332
  #
3318
- # @overload get_encryption_spec(request, options = nil)
3319
- # Pass arguments to `get_encryption_spec` via a request object, either of type
3320
- # {::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest} or an equivalent Hash.
3333
+ # @overload create_analysis_rule(request, options = nil)
3334
+ # Pass arguments to `create_analysis_rule` via a request object, either of type
3335
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRuleRequest} or an equivalent Hash.
3321
3336
  #
3322
- # @param request [::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest, ::Hash]
3337
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRuleRequest, ::Hash]
3323
3338
  # A request object representing the call parameters. Required. To specify no
3324
3339
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3325
3340
  # @param options [::Gapic::CallOptions, ::Hash]
3326
3341
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3327
3342
  #
3328
- # @overload get_encryption_spec(name: nil)
3329
- # Pass arguments to `get_encryption_spec` via keyword arguments. Note that at
3343
+ # @overload create_analysis_rule(parent: nil, analysis_rule: nil)
3344
+ # Pass arguments to `create_analysis_rule` via keyword arguments. Note that at
3330
3345
  # least one keyword argument is required. To specify no parameters, or to keep all
3331
3346
  # the default parameter values, pass an empty Hash as a request object (see above).
3332
3347
  #
3333
- # @param name [::String]
3334
- # Required. The name of the encryption spec resource to get.
3348
+ # @param parent [::String]
3349
+ # Required. The parent resource of the analysis rule. Required. The location
3350
+ # to create a analysis rule for. Format: `projects/<Project
3351
+ # ID>/locations/<Location ID>` or `projects/<Project
3352
+ # Number>/locations/<Location ID>`
3353
+ # @param analysis_rule [::Google::Cloud::ContactCenterInsights::V1::AnalysisRule, ::Hash]
3354
+ # Required. The analysis rule resource to create.
3335
3355
  # @yield [result, operation] Access the result along with the TransportOperation object
3336
- # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec]
3356
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::AnalysisRule]
3337
3357
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3338
3358
  #
3339
- # @return [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec]
3359
+ # @return [::Google::Cloud::ContactCenterInsights::V1::AnalysisRule]
3340
3360
  #
3341
3361
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3342
3362
  #
@@ -3347,24 +3367,24 @@ module Google
3347
3367
  # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
3348
3368
  #
3349
3369
  # # Create a request. To set request fields, pass in keyword arguments.
3350
- # request = Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new
3370
+ # request = Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRuleRequest.new
3351
3371
  #
3352
- # # Call the get_encryption_spec method.
3353
- # result = client.get_encryption_spec request
3372
+ # # Call the create_analysis_rule method.
3373
+ # result = client.create_analysis_rule request
3354
3374
  #
3355
- # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::EncryptionSpec.
3375
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::AnalysisRule.
3356
3376
  # p result
3357
3377
  #
3358
- def get_encryption_spec request, options = nil
3378
+ def create_analysis_rule request, options = nil
3359
3379
  raise ::ArgumentError, "request must be provided" if request.nil?
3360
3380
 
3361
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest
3381
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRuleRequest
3362
3382
 
3363
3383
  # Converts hash and nil to an options object
3364
3384
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3365
3385
 
3366
3386
  # Customize the options with defaults
3367
- call_metadata = @config.rpcs.get_encryption_spec.metadata.to_h
3387
+ call_metadata = @config.rpcs.create_analysis_rule.metadata.to_h
3368
3388
 
3369
3389
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3370
3390
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3375,15 +3395,15 @@ module Google
3375
3395
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3376
3396
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3377
3397
 
3378
- options.apply_defaults timeout: @config.rpcs.get_encryption_spec.timeout,
3398
+ options.apply_defaults timeout: @config.rpcs.create_analysis_rule.timeout,
3379
3399
  metadata: call_metadata,
3380
- retry_policy: @config.rpcs.get_encryption_spec.retry_policy
3400
+ retry_policy: @config.rpcs.create_analysis_rule.retry_policy
3381
3401
 
3382
3402
  options.apply_defaults timeout: @config.timeout,
3383
3403
  metadata: @config.metadata,
3384
3404
  retry_policy: @config.retry_policy
3385
3405
 
3386
- @contact_center_insights_stub.get_encryption_spec request, options do |result, operation|
3406
+ @contact_center_insights_stub.create_analysis_rule request, options do |result, operation|
3387
3407
  yield result, operation if block_given?
3388
3408
  return result
3389
3409
  end
@@ -3392,37 +3412,30 @@ module Google
3392
3412
  end
3393
3413
 
3394
3414
  ##
3395
- # Initializes a location-level encryption key specification. An error will
3396
- # be thrown if the location has resources already created before the
3397
- # initialization. Once the encryption specification is initialized at a
3398
- # location, it is immutable and all newly created resources under the
3399
- # location will be encrypted with the existing specification.
3415
+ # Get a analysis rule.
3400
3416
  #
3401
- # @overload initialize_encryption_spec(request, options = nil)
3402
- # Pass arguments to `initialize_encryption_spec` via a request object, either of type
3403
- # {::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest} or an equivalent Hash.
3417
+ # @overload get_analysis_rule(request, options = nil)
3418
+ # Pass arguments to `get_analysis_rule` via a request object, either of type
3419
+ # {::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRuleRequest} or an equivalent Hash.
3404
3420
  #
3405
- # @param request [::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest, ::Hash]
3421
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRuleRequest, ::Hash]
3406
3422
  # A request object representing the call parameters. Required. To specify no
3407
3423
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3408
3424
  # @param options [::Gapic::CallOptions, ::Hash]
3409
3425
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3410
3426
  #
3411
- # @overload initialize_encryption_spec(encryption_spec: nil)
3412
- # Pass arguments to `initialize_encryption_spec` via keyword arguments. Note that at
3427
+ # @overload get_analysis_rule(name: nil)
3428
+ # Pass arguments to `get_analysis_rule` via keyword arguments. Note that at
3413
3429
  # least one keyword argument is required. To specify no parameters, or to keep all
3414
3430
  # the default parameter values, pass an empty Hash as a request object (see above).
3415
3431
  #
3416
- # @param encryption_spec [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec, ::Hash]
3417
- # Required. The encryption spec used for CMEK encryption. It is required that
3418
- # the kms key is in the same region as the endpoint. The same key will be
3419
- # used for all provisioned resources, if encryption is available. If the
3420
- # kms_key_name is left empty, no encryption will be enforced.
3432
+ # @param name [::String]
3433
+ # Required. The name of the AnalysisRule to get.
3421
3434
  # @yield [result, operation] Access the result along with the TransportOperation object
3422
- # @yieldparam result [::Gapic::Operation]
3435
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::AnalysisRule]
3423
3436
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3424
3437
  #
3425
- # @return [::Gapic::Operation]
3438
+ # @return [::Google::Cloud::ContactCenterInsights::V1::AnalysisRule]
3426
3439
  #
3427
3440
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3428
3441
  #
@@ -3433,31 +3446,24 @@ module Google
3433
3446
  # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
3434
3447
  #
3435
3448
  # # Create a request. To set request fields, pass in keyword arguments.
3436
- # request = Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new
3449
+ # request = Google::Cloud::ContactCenterInsights::V1::GetAnalysisRuleRequest.new
3437
3450
  #
3438
- # # Call the initialize_encryption_spec method.
3439
- # result = client.initialize_encryption_spec request
3451
+ # # Call the get_analysis_rule method.
3452
+ # result = client.get_analysis_rule request
3440
3453
  #
3441
- # # The returned object is of type Gapic::Operation. You can use it to
3442
- # # check the status of an operation, cancel it, or wait for results.
3443
- # # Here is how to wait for a response.
3444
- # result.wait_until_done! timeout: 60
3445
- # if result.response?
3446
- # p result.response
3447
- # else
3448
- # puts "No response received."
3449
- # end
3454
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::AnalysisRule.
3455
+ # p result
3450
3456
  #
3451
- def initialize_encryption_spec request, options = nil
3457
+ def get_analysis_rule request, options = nil
3452
3458
  raise ::ArgumentError, "request must be provided" if request.nil?
3453
3459
 
3454
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest
3460
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRuleRequest
3455
3461
 
3456
3462
  # Converts hash and nil to an options object
3457
3463
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3458
3464
 
3459
3465
  # Customize the options with defaults
3460
- call_metadata = @config.rpcs.initialize_encryption_spec.metadata.to_h
3466
+ call_metadata = @config.rpcs.get_analysis_rule.metadata.to_h
3461
3467
 
3462
3468
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3463
3469
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3468,16 +3474,15 @@ module Google
3468
3474
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3469
3475
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3470
3476
 
3471
- options.apply_defaults timeout: @config.rpcs.initialize_encryption_spec.timeout,
3477
+ options.apply_defaults timeout: @config.rpcs.get_analysis_rule.timeout,
3472
3478
  metadata: call_metadata,
3473
- retry_policy: @config.rpcs.initialize_encryption_spec.retry_policy
3479
+ retry_policy: @config.rpcs.get_analysis_rule.retry_policy
3474
3480
 
3475
3481
  options.apply_defaults timeout: @config.timeout,
3476
3482
  metadata: @config.metadata,
3477
3483
  retry_policy: @config.retry_policy
3478
3484
 
3479
- @contact_center_insights_stub.initialize_encryption_spec request, options do |result, operation|
3480
- result = ::Gapic::Operation.new result, @operations_client, options: options
3485
+ @contact_center_insights_stub.get_analysis_rule request, options do |result, operation|
3481
3486
  yield result, operation if block_given?
3482
3487
  return result
3483
3488
  end
@@ -3486,35 +3491,39 @@ module Google
3486
3491
  end
3487
3492
 
3488
3493
  ##
3489
- # Creates a view.
3494
+ # Lists analysis rules.
3490
3495
  #
3491
- # @overload create_view(request, options = nil)
3492
- # Pass arguments to `create_view` via a request object, either of type
3493
- # {::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest} or an equivalent Hash.
3496
+ # @overload list_analysis_rules(request, options = nil)
3497
+ # Pass arguments to `list_analysis_rules` via a request object, either of type
3498
+ # {::Google::Cloud::ContactCenterInsights::V1::ListAnalysisRulesRequest} or an equivalent Hash.
3494
3499
  #
3495
- # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest, ::Hash]
3500
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListAnalysisRulesRequest, ::Hash]
3496
3501
  # A request object representing the call parameters. Required. To specify no
3497
3502
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3498
3503
  # @param options [::Gapic::CallOptions, ::Hash]
3499
3504
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3500
3505
  #
3501
- # @overload create_view(parent: nil, view: nil)
3502
- # Pass arguments to `create_view` via keyword arguments. Note that at
3506
+ # @overload list_analysis_rules(parent: nil, page_size: nil, page_token: nil)
3507
+ # Pass arguments to `list_analysis_rules` via keyword arguments. Note that at
3503
3508
  # least one keyword argument is required. To specify no parameters, or to keep all
3504
3509
  # the default parameter values, pass an empty Hash as a request object (see above).
3505
3510
  #
3506
3511
  # @param parent [::String]
3507
- # Required. The parent resource of the view. Required. The location to create
3508
- # a view for.
3509
- # Format: `projects/<Project ID>/locations/<Location ID>` or
3510
- # `projects/<Project Number>/locations/<Location ID>`
3511
- # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash]
3512
- # Required. The view resource to create.
3512
+ # Required. The parent resource of the analysis rules.
3513
+ # @param page_size [::Integer]
3514
+ # Optional. The maximum number of analysis rule to return in the response. If
3515
+ # this value is zero, the service will select a default size. A call may
3516
+ # return fewer objects than requested. A non-empty `next_page_token` in the
3517
+ # response indicates that more data is available.
3518
+ # @param page_token [::String]
3519
+ # Optional. The value returned by the last `ListAnalysisRulesResponse`;
3520
+ # indicates that this is a continuation of a prior `ListAnalysisRules` call
3521
+ # and the system should return the next page of data.
3513
3522
  # @yield [result, operation] Access the result along with the TransportOperation object
3514
- # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View]
3523
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::AnalysisRule>]
3515
3524
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3516
3525
  #
3517
- # @return [::Google::Cloud::ContactCenterInsights::V1::View]
3526
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::AnalysisRule>]
3518
3527
  #
3519
3528
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3520
3529
  #
@@ -3525,24 +3534,28 @@ module Google
3525
3534
  # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
3526
3535
  #
3527
3536
  # # Create a request. To set request fields, pass in keyword arguments.
3528
- # request = Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new
3537
+ # request = Google::Cloud::ContactCenterInsights::V1::ListAnalysisRulesRequest.new
3529
3538
  #
3530
- # # Call the create_view method.
3531
- # result = client.create_view request
3539
+ # # Call the list_analysis_rules method.
3540
+ # result = client.list_analysis_rules request
3532
3541
  #
3533
- # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View.
3534
- # p result
3542
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3543
+ # # over elements, and API calls will be issued to fetch pages as needed.
3544
+ # result.each do |item|
3545
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::AnalysisRule.
3546
+ # p item
3547
+ # end
3535
3548
  #
3536
- def create_view request, options = nil
3549
+ def list_analysis_rules request, options = nil
3537
3550
  raise ::ArgumentError, "request must be provided" if request.nil?
3538
3551
 
3539
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest
3552
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAnalysisRulesRequest
3540
3553
 
3541
3554
  # Converts hash and nil to an options object
3542
3555
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3543
3556
 
3544
3557
  # Customize the options with defaults
3545
- call_metadata = @config.rpcs.create_view.metadata.to_h
3558
+ call_metadata = @config.rpcs.list_analysis_rules.metadata.to_h
3546
3559
 
3547
3560
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3548
3561
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3553,15 +3566,16 @@ module Google
3553
3566
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3554
3567
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3555
3568
 
3556
- options.apply_defaults timeout: @config.rpcs.create_view.timeout,
3569
+ options.apply_defaults timeout: @config.rpcs.list_analysis_rules.timeout,
3557
3570
  metadata: call_metadata,
3558
- retry_policy: @config.rpcs.create_view.retry_policy
3571
+ retry_policy: @config.rpcs.list_analysis_rules.retry_policy
3559
3572
 
3560
3573
  options.apply_defaults timeout: @config.timeout,
3561
3574
  metadata: @config.metadata,
3562
3575
  retry_policy: @config.retry_policy
3563
3576
 
3564
- @contact_center_insights_stub.create_view request, options do |result, operation|
3577
+ @contact_center_insights_stub.list_analysis_rules request, options do |result, operation|
3578
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_analysis_rules, "analysis_rules", request, result, options
3565
3579
  yield result, operation if block_given?
3566
3580
  return result
3567
3581
  end
@@ -3570,30 +3584,34 @@ module Google
3570
3584
  end
3571
3585
 
3572
3586
  ##
3573
- # Gets a view.
3587
+ # Updates a analysis rule.
3574
3588
  #
3575
- # @overload get_view(request, options = nil)
3576
- # Pass arguments to `get_view` via a request object, either of type
3577
- # {::Google::Cloud::ContactCenterInsights::V1::GetViewRequest} or an equivalent Hash.
3589
+ # @overload update_analysis_rule(request, options = nil)
3590
+ # Pass arguments to `update_analysis_rule` via a request object, either of type
3591
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateAnalysisRuleRequest} or an equivalent Hash.
3578
3592
  #
3579
- # @param request [::Google::Cloud::ContactCenterInsights::V1::GetViewRequest, ::Hash]
3593
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateAnalysisRuleRequest, ::Hash]
3580
3594
  # A request object representing the call parameters. Required. To specify no
3581
3595
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3582
3596
  # @param options [::Gapic::CallOptions, ::Hash]
3583
3597
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3584
3598
  #
3585
- # @overload get_view(name: nil)
3586
- # Pass arguments to `get_view` via keyword arguments. Note that at
3599
+ # @overload update_analysis_rule(analysis_rule: nil, update_mask: nil)
3600
+ # Pass arguments to `update_analysis_rule` via keyword arguments. Note that at
3587
3601
  # least one keyword argument is required. To specify no parameters, or to keep all
3588
3602
  # the default parameter values, pass an empty Hash as a request object (see above).
3589
3603
  #
3590
- # @param name [::String]
3591
- # Required. The name of the view to get.
3604
+ # @param analysis_rule [::Google::Cloud::ContactCenterInsights::V1::AnalysisRule, ::Hash]
3605
+ # Required. The new analysis rule.
3606
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3607
+ # Optional. The list of fields to be updated.
3608
+ # If the update_mask is not provided, the update will be applied to all
3609
+ # fields.
3592
3610
  # @yield [result, operation] Access the result along with the TransportOperation object
3593
- # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View]
3611
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::AnalysisRule]
3594
3612
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3595
3613
  #
3596
- # @return [::Google::Cloud::ContactCenterInsights::V1::View]
3614
+ # @return [::Google::Cloud::ContactCenterInsights::V1::AnalysisRule]
3597
3615
  #
3598
3616
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3599
3617
  #
@@ -3604,24 +3622,24 @@ module Google
3604
3622
  # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
3605
3623
  #
3606
3624
  # # Create a request. To set request fields, pass in keyword arguments.
3607
- # request = Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new
3625
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdateAnalysisRuleRequest.new
3608
3626
  #
3609
- # # Call the get_view method.
3610
- # result = client.get_view request
3627
+ # # Call the update_analysis_rule method.
3628
+ # result = client.update_analysis_rule request
3611
3629
  #
3612
- # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View.
3630
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::AnalysisRule.
3613
3631
  # p result
3614
3632
  #
3615
- def get_view request, options = nil
3633
+ def update_analysis_rule request, options = nil
3616
3634
  raise ::ArgumentError, "request must be provided" if request.nil?
3617
3635
 
3618
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest
3636
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateAnalysisRuleRequest
3619
3637
 
3620
3638
  # Converts hash and nil to an options object
3621
3639
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3622
3640
 
3623
3641
  # Customize the options with defaults
3624
- call_metadata = @config.rpcs.get_view.metadata.to_h
3642
+ call_metadata = @config.rpcs.update_analysis_rule.metadata.to_h
3625
3643
 
3626
3644
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3627
3645
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3632,15 +3650,15 @@ module Google
3632
3650
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3633
3651
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3634
3652
 
3635
- options.apply_defaults timeout: @config.rpcs.get_view.timeout,
3653
+ options.apply_defaults timeout: @config.rpcs.update_analysis_rule.timeout,
3636
3654
  metadata: call_metadata,
3637
- retry_policy: @config.rpcs.get_view.retry_policy
3655
+ retry_policy: @config.rpcs.update_analysis_rule.retry_policy
3638
3656
 
3639
3657
  options.apply_defaults timeout: @config.timeout,
3640
3658
  metadata: @config.metadata,
3641
3659
  retry_policy: @config.retry_policy
3642
3660
 
3643
- @contact_center_insights_stub.get_view request, options do |result, operation|
3661
+ @contact_center_insights_stub.update_analysis_rule request, options do |result, operation|
3644
3662
  yield result, operation if block_given?
3645
3663
  return result
3646
3664
  end
@@ -3649,39 +3667,30 @@ module Google
3649
3667
  end
3650
3668
 
3651
3669
  ##
3652
- # Lists views.
3670
+ # Deletes a analysis rule.
3653
3671
  #
3654
- # @overload list_views(request, options = nil)
3655
- # Pass arguments to `list_views` via a request object, either of type
3656
- # {::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest} or an equivalent Hash.
3672
+ # @overload delete_analysis_rule(request, options = nil)
3673
+ # Pass arguments to `delete_analysis_rule` via a request object, either of type
3674
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRuleRequest} or an equivalent Hash.
3657
3675
  #
3658
- # @param request [::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest, ::Hash]
3676
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRuleRequest, ::Hash]
3659
3677
  # A request object representing the call parameters. Required. To specify no
3660
3678
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3661
3679
  # @param options [::Gapic::CallOptions, ::Hash]
3662
3680
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3663
3681
  #
3664
- # @overload list_views(parent: nil, page_size: nil, page_token: nil)
3665
- # Pass arguments to `list_views` via keyword arguments. Note that at
3682
+ # @overload delete_analysis_rule(name: nil)
3683
+ # Pass arguments to `delete_analysis_rule` via keyword arguments. Note that at
3666
3684
  # least one keyword argument is required. To specify no parameters, or to keep all
3667
3685
  # the default parameter values, pass an empty Hash as a request object (see above).
3668
3686
  #
3669
- # @param parent [::String]
3670
- # Required. The parent resource of the views.
3671
- # @param page_size [::Integer]
3672
- # The maximum number of views to return in the response. If this
3673
- # value is zero, the service will select a default size. A call may return
3674
- # fewer objects than requested. A non-empty `next_page_token` in the response
3675
- # indicates that more data is available.
3676
- # @param page_token [::String]
3677
- # The value returned by the last `ListViewsResponse`; indicates
3678
- # that this is a continuation of a prior `ListViews` call and
3679
- # the system should return the next page of data.
3687
+ # @param name [::String]
3688
+ # Required. The name of the analysis rule to delete.
3680
3689
  # @yield [result, operation] Access the result along with the TransportOperation object
3681
- # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>]
3690
+ # @yieldparam result [::Google::Protobuf::Empty]
3682
3691
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3683
3692
  #
3684
- # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>]
3693
+ # @return [::Google::Protobuf::Empty]
3685
3694
  #
3686
3695
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3687
3696
  #
@@ -3692,28 +3701,24 @@ module Google
3692
3701
  # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
3693
3702
  #
3694
3703
  # # Create a request. To set request fields, pass in keyword arguments.
3695
- # request = Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new
3704
+ # request = Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRuleRequest.new
3696
3705
  #
3697
- # # Call the list_views method.
3698
- # result = client.list_views request
3706
+ # # Call the delete_analysis_rule method.
3707
+ # result = client.delete_analysis_rule request
3699
3708
  #
3700
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3701
- # # over elements, and API calls will be issued to fetch pages as needed.
3702
- # result.each do |item|
3703
- # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::View.
3704
- # p item
3705
- # end
3709
+ # # The returned object is of type Google::Protobuf::Empty.
3710
+ # p result
3706
3711
  #
3707
- def list_views request, options = nil
3712
+ def delete_analysis_rule request, options = nil
3708
3713
  raise ::ArgumentError, "request must be provided" if request.nil?
3709
3714
 
3710
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest
3715
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRuleRequest
3711
3716
 
3712
3717
  # Converts hash and nil to an options object
3713
3718
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3714
3719
 
3715
3720
  # Customize the options with defaults
3716
- call_metadata = @config.rpcs.list_views.metadata.to_h
3721
+ call_metadata = @config.rpcs.delete_analysis_rule.metadata.to_h
3717
3722
 
3718
3723
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3719
3724
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3724,16 +3729,15 @@ module Google
3724
3729
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3725
3730
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3726
3731
 
3727
- options.apply_defaults timeout: @config.rpcs.list_views.timeout,
3732
+ options.apply_defaults timeout: @config.rpcs.delete_analysis_rule.timeout,
3728
3733
  metadata: call_metadata,
3729
- retry_policy: @config.rpcs.list_views.retry_policy
3734
+ retry_policy: @config.rpcs.delete_analysis_rule.retry_policy
3730
3735
 
3731
3736
  options.apply_defaults timeout: @config.timeout,
3732
3737
  metadata: @config.metadata,
3733
3738
  retry_policy: @config.retry_policy
3734
3739
 
3735
- @contact_center_insights_stub.list_views request, options do |result, operation|
3736
- result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_views, "views", request, result, options
3740
+ @contact_center_insights_stub.delete_analysis_rule request, options do |result, operation|
3737
3741
  yield result, operation if block_given?
3738
3742
  return result
3739
3743
  end
@@ -3742,32 +3746,30 @@ module Google
3742
3746
  end
3743
3747
 
3744
3748
  ##
3745
- # Updates a view.
3749
+ # Gets location-level encryption key specification.
3746
3750
  #
3747
- # @overload update_view(request, options = nil)
3748
- # Pass arguments to `update_view` via a request object, either of type
3749
- # {::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest} or an equivalent Hash.
3751
+ # @overload get_encryption_spec(request, options = nil)
3752
+ # Pass arguments to `get_encryption_spec` via a request object, either of type
3753
+ # {::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest} or an equivalent Hash.
3750
3754
  #
3751
- # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest, ::Hash]
3755
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest, ::Hash]
3752
3756
  # A request object representing the call parameters. Required. To specify no
3753
3757
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3754
3758
  # @param options [::Gapic::CallOptions, ::Hash]
3755
3759
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3756
3760
  #
3757
- # @overload update_view(view: nil, update_mask: nil)
3758
- # Pass arguments to `update_view` via keyword arguments. Note that at
3761
+ # @overload get_encryption_spec(name: nil)
3762
+ # Pass arguments to `get_encryption_spec` via keyword arguments. Note that at
3759
3763
  # least one keyword argument is required. To specify no parameters, or to keep all
3760
3764
  # the default parameter values, pass an empty Hash as a request object (see above).
3761
3765
  #
3762
- # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash]
3763
- # Required. The new view.
3764
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3765
- # The list of fields to be updated.
3766
+ # @param name [::String]
3767
+ # Required. The name of the encryption spec resource to get.
3766
3768
  # @yield [result, operation] Access the result along with the TransportOperation object
3767
- # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View]
3769
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec]
3768
3770
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3769
3771
  #
3770
- # @return [::Google::Cloud::ContactCenterInsights::V1::View]
3772
+ # @return [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec]
3771
3773
  #
3772
3774
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3773
3775
  #
@@ -3778,24 +3780,24 @@ module Google
3778
3780
  # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
3779
3781
  #
3780
3782
  # # Create a request. To set request fields, pass in keyword arguments.
3781
- # request = Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new
3783
+ # request = Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new
3782
3784
  #
3783
- # # Call the update_view method.
3784
- # result = client.update_view request
3785
+ # # Call the get_encryption_spec method.
3786
+ # result = client.get_encryption_spec request
3785
3787
  #
3786
- # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View.
3788
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::EncryptionSpec.
3787
3789
  # p result
3788
3790
  #
3789
- def update_view request, options = nil
3791
+ def get_encryption_spec request, options = nil
3790
3792
  raise ::ArgumentError, "request must be provided" if request.nil?
3791
3793
 
3792
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest
3794
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest
3793
3795
 
3794
3796
  # Converts hash and nil to an options object
3795
3797
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3796
3798
 
3797
3799
  # Customize the options with defaults
3798
- call_metadata = @config.rpcs.update_view.metadata.to_h
3800
+ call_metadata = @config.rpcs.get_encryption_spec.metadata.to_h
3799
3801
 
3800
3802
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3801
3803
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3806,15 +3808,15 @@ module Google
3806
3808
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3807
3809
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3808
3810
 
3809
- options.apply_defaults timeout: @config.rpcs.update_view.timeout,
3811
+ options.apply_defaults timeout: @config.rpcs.get_encryption_spec.timeout,
3810
3812
  metadata: call_metadata,
3811
- retry_policy: @config.rpcs.update_view.retry_policy
3813
+ retry_policy: @config.rpcs.get_encryption_spec.retry_policy
3812
3814
 
3813
3815
  options.apply_defaults timeout: @config.timeout,
3814
3816
  metadata: @config.metadata,
3815
3817
  retry_policy: @config.retry_policy
3816
3818
 
3817
- @contact_center_insights_stub.update_view request, options do |result, operation|
3819
+ @contact_center_insights_stub.get_encryption_spec request, options do |result, operation|
3818
3820
  yield result, operation if block_given?
3819
3821
  return result
3820
3822
  end
@@ -3823,30 +3825,37 @@ module Google
3823
3825
  end
3824
3826
 
3825
3827
  ##
3826
- # Deletes a view.
3828
+ # Initializes a location-level encryption key specification. An error will
3829
+ # result if the location has resources already created before the
3830
+ # initialization. After the encryption specification is initialized at a
3831
+ # location, it is immutable and all newly created resources under the
3832
+ # location will be encrypted with the existing specification.
3827
3833
  #
3828
- # @overload delete_view(request, options = nil)
3829
- # Pass arguments to `delete_view` via a request object, either of type
3830
- # {::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest} or an equivalent Hash.
3834
+ # @overload initialize_encryption_spec(request, options = nil)
3835
+ # Pass arguments to `initialize_encryption_spec` via a request object, either of type
3836
+ # {::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest} or an equivalent Hash.
3831
3837
  #
3832
- # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest, ::Hash]
3838
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest, ::Hash]
3833
3839
  # A request object representing the call parameters. Required. To specify no
3834
3840
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3835
3841
  # @param options [::Gapic::CallOptions, ::Hash]
3836
3842
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3837
3843
  #
3838
- # @overload delete_view(name: nil)
3839
- # Pass arguments to `delete_view` via keyword arguments. Note that at
3844
+ # @overload initialize_encryption_spec(encryption_spec: nil)
3845
+ # Pass arguments to `initialize_encryption_spec` via keyword arguments. Note that at
3840
3846
  # least one keyword argument is required. To specify no parameters, or to keep all
3841
3847
  # the default parameter values, pass an empty Hash as a request object (see above).
3842
3848
  #
3843
- # @param name [::String]
3844
- # Required. The name of the view to delete.
3849
+ # @param encryption_spec [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec, ::Hash]
3850
+ # Required. The encryption spec used for CMEK encryption. It is required that
3851
+ # the kms key is in the same region as the endpoint. The same key will be
3852
+ # used for all provisioned resources, if encryption is available. If the
3853
+ # `kms_key_name` field is left empty, no encryption will be enforced.
3845
3854
  # @yield [result, operation] Access the result along with the TransportOperation object
3846
- # @yieldparam result [::Google::Protobuf::Empty]
3855
+ # @yieldparam result [::Gapic::Operation]
3847
3856
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3848
3857
  #
3849
- # @return [::Google::Protobuf::Empty]
3858
+ # @return [::Gapic::Operation]
3850
3859
  #
3851
3860
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3852
3861
  #
@@ -3857,24 +3866,31 @@ module Google
3857
3866
  # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
3858
3867
  #
3859
3868
  # # Create a request. To set request fields, pass in keyword arguments.
3860
- # request = Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new
3869
+ # request = Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new
3861
3870
  #
3862
- # # Call the delete_view method.
3863
- # result = client.delete_view request
3871
+ # # Call the initialize_encryption_spec method.
3872
+ # result = client.initialize_encryption_spec request
3864
3873
  #
3865
- # # The returned object is of type Google::Protobuf::Empty.
3866
- # p result
3874
+ # # The returned object is of type Gapic::Operation. You can use it to
3875
+ # # check the status of an operation, cancel it, or wait for results.
3876
+ # # Here is how to wait for a response.
3877
+ # result.wait_until_done! timeout: 60
3878
+ # if result.response?
3879
+ # p result.response
3880
+ # else
3881
+ # puts "No response received."
3882
+ # end
3867
3883
  #
3868
- def delete_view request, options = nil
3884
+ def initialize_encryption_spec request, options = nil
3869
3885
  raise ::ArgumentError, "request must be provided" if request.nil?
3870
3886
 
3871
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest
3887
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest
3872
3888
 
3873
3889
  # Converts hash and nil to an options object
3874
3890
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3875
3891
 
3876
3892
  # Customize the options with defaults
3877
- call_metadata = @config.rpcs.delete_view.metadata.to_h
3893
+ call_metadata = @config.rpcs.initialize_encryption_spec.metadata.to_h
3878
3894
 
3879
3895
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3880
3896
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3885,15 +3901,2754 @@ module Google
3885
3901
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3886
3902
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3887
3903
 
3888
- options.apply_defaults timeout: @config.rpcs.delete_view.timeout,
3904
+ options.apply_defaults timeout: @config.rpcs.initialize_encryption_spec.timeout,
3905
+ metadata: call_metadata,
3906
+ retry_policy: @config.rpcs.initialize_encryption_spec.retry_policy
3907
+
3908
+ options.apply_defaults timeout: @config.timeout,
3909
+ metadata: @config.metadata,
3910
+ retry_policy: @config.retry_policy
3911
+
3912
+ @contact_center_insights_stub.initialize_encryption_spec request, options do |result, operation|
3913
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3914
+ yield result, operation if block_given?
3915
+ return result
3916
+ end
3917
+ rescue ::Gapic::Rest::Error => e
3918
+ raise ::Google::Cloud::Error.from_error(e)
3919
+ end
3920
+
3921
+ ##
3922
+ # Creates a view.
3923
+ #
3924
+ # @overload create_view(request, options = nil)
3925
+ # Pass arguments to `create_view` via a request object, either of type
3926
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest} or an equivalent Hash.
3927
+ #
3928
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest, ::Hash]
3929
+ # A request object representing the call parameters. Required. To specify no
3930
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3931
+ # @param options [::Gapic::CallOptions, ::Hash]
3932
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3933
+ #
3934
+ # @overload create_view(parent: nil, view: nil)
3935
+ # Pass arguments to `create_view` via keyword arguments. Note that at
3936
+ # least one keyword argument is required. To specify no parameters, or to keep all
3937
+ # the default parameter values, pass an empty Hash as a request object (see above).
3938
+ #
3939
+ # @param parent [::String]
3940
+ # Required. The parent resource of the view. Required. The location to create
3941
+ # a view for.
3942
+ # Format: `projects/<Project ID>/locations/<Location ID>` or
3943
+ # `projects/<Project Number>/locations/<Location ID>`
3944
+ # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash]
3945
+ # Required. The view resource to create.
3946
+ # @yield [result, operation] Access the result along with the TransportOperation object
3947
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View]
3948
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3949
+ #
3950
+ # @return [::Google::Cloud::ContactCenterInsights::V1::View]
3951
+ #
3952
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3953
+ #
3954
+ # @example Basic example
3955
+ # require "google/cloud/contact_center_insights/v1"
3956
+ #
3957
+ # # Create a client object. The client can be reused for multiple calls.
3958
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
3959
+ #
3960
+ # # Create a request. To set request fields, pass in keyword arguments.
3961
+ # request = Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new
3962
+ #
3963
+ # # Call the create_view method.
3964
+ # result = client.create_view request
3965
+ #
3966
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View.
3967
+ # p result
3968
+ #
3969
+ def create_view request, options = nil
3970
+ raise ::ArgumentError, "request must be provided" if request.nil?
3971
+
3972
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest
3973
+
3974
+ # Converts hash and nil to an options object
3975
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3976
+
3977
+ # Customize the options with defaults
3978
+ call_metadata = @config.rpcs.create_view.metadata.to_h
3979
+
3980
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3981
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3982
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3983
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
3984
+ transports_version_send: [:rest]
3985
+
3986
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3987
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3988
+
3989
+ options.apply_defaults timeout: @config.rpcs.create_view.timeout,
3990
+ metadata: call_metadata,
3991
+ retry_policy: @config.rpcs.create_view.retry_policy
3992
+
3993
+ options.apply_defaults timeout: @config.timeout,
3994
+ metadata: @config.metadata,
3995
+ retry_policy: @config.retry_policy
3996
+
3997
+ @contact_center_insights_stub.create_view request, options do |result, operation|
3998
+ yield result, operation if block_given?
3999
+ return result
4000
+ end
4001
+ rescue ::Gapic::Rest::Error => e
4002
+ raise ::Google::Cloud::Error.from_error(e)
4003
+ end
4004
+
4005
+ ##
4006
+ # Gets a view.
4007
+ #
4008
+ # @overload get_view(request, options = nil)
4009
+ # Pass arguments to `get_view` via a request object, either of type
4010
+ # {::Google::Cloud::ContactCenterInsights::V1::GetViewRequest} or an equivalent Hash.
4011
+ #
4012
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetViewRequest, ::Hash]
4013
+ # A request object representing the call parameters. Required. To specify no
4014
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4015
+ # @param options [::Gapic::CallOptions, ::Hash]
4016
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4017
+ #
4018
+ # @overload get_view(name: nil)
4019
+ # Pass arguments to `get_view` via keyword arguments. Note that at
4020
+ # least one keyword argument is required. To specify no parameters, or to keep all
4021
+ # the default parameter values, pass an empty Hash as a request object (see above).
4022
+ #
4023
+ # @param name [::String]
4024
+ # Required. The name of the view to get.
4025
+ # @yield [result, operation] Access the result along with the TransportOperation object
4026
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View]
4027
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4028
+ #
4029
+ # @return [::Google::Cloud::ContactCenterInsights::V1::View]
4030
+ #
4031
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4032
+ #
4033
+ # @example Basic example
4034
+ # require "google/cloud/contact_center_insights/v1"
4035
+ #
4036
+ # # Create a client object. The client can be reused for multiple calls.
4037
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4038
+ #
4039
+ # # Create a request. To set request fields, pass in keyword arguments.
4040
+ # request = Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new
4041
+ #
4042
+ # # Call the get_view method.
4043
+ # result = client.get_view request
4044
+ #
4045
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View.
4046
+ # p result
4047
+ #
4048
+ def get_view request, options = nil
4049
+ raise ::ArgumentError, "request must be provided" if request.nil?
4050
+
4051
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest
4052
+
4053
+ # Converts hash and nil to an options object
4054
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4055
+
4056
+ # Customize the options with defaults
4057
+ call_metadata = @config.rpcs.get_view.metadata.to_h
4058
+
4059
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4060
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4061
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4062
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4063
+ transports_version_send: [:rest]
4064
+
4065
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4066
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4067
+
4068
+ options.apply_defaults timeout: @config.rpcs.get_view.timeout,
4069
+ metadata: call_metadata,
4070
+ retry_policy: @config.rpcs.get_view.retry_policy
4071
+
4072
+ options.apply_defaults timeout: @config.timeout,
4073
+ metadata: @config.metadata,
4074
+ retry_policy: @config.retry_policy
4075
+
4076
+ @contact_center_insights_stub.get_view request, options do |result, operation|
4077
+ yield result, operation if block_given?
4078
+ return result
4079
+ end
4080
+ rescue ::Gapic::Rest::Error => e
4081
+ raise ::Google::Cloud::Error.from_error(e)
4082
+ end
4083
+
4084
+ ##
4085
+ # Lists views.
4086
+ #
4087
+ # @overload list_views(request, options = nil)
4088
+ # Pass arguments to `list_views` via a request object, either of type
4089
+ # {::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest} or an equivalent Hash.
4090
+ #
4091
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest, ::Hash]
4092
+ # A request object representing the call parameters. Required. To specify no
4093
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4094
+ # @param options [::Gapic::CallOptions, ::Hash]
4095
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4096
+ #
4097
+ # @overload list_views(parent: nil, page_size: nil, page_token: nil)
4098
+ # Pass arguments to `list_views` via keyword arguments. Note that at
4099
+ # least one keyword argument is required. To specify no parameters, or to keep all
4100
+ # the default parameter values, pass an empty Hash as a request object (see above).
4101
+ #
4102
+ # @param parent [::String]
4103
+ # Required. The parent resource of the views.
4104
+ # @param page_size [::Integer]
4105
+ # The maximum number of views to return in the response. If this
4106
+ # value is zero, the service will select a default size. A call may return
4107
+ # fewer objects than requested. A non-empty `next_page_token` in the response
4108
+ # indicates that more data is available.
4109
+ # @param page_token [::String]
4110
+ # The value returned by the last `ListViewsResponse`; indicates
4111
+ # that this is a continuation of a prior `ListViews` call and
4112
+ # the system should return the next page of data.
4113
+ # @yield [result, operation] Access the result along with the TransportOperation object
4114
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>]
4115
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4116
+ #
4117
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>]
4118
+ #
4119
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4120
+ #
4121
+ # @example Basic example
4122
+ # require "google/cloud/contact_center_insights/v1"
4123
+ #
4124
+ # # Create a client object. The client can be reused for multiple calls.
4125
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4126
+ #
4127
+ # # Create a request. To set request fields, pass in keyword arguments.
4128
+ # request = Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new
4129
+ #
4130
+ # # Call the list_views method.
4131
+ # result = client.list_views request
4132
+ #
4133
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4134
+ # # over elements, and API calls will be issued to fetch pages as needed.
4135
+ # result.each do |item|
4136
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::View.
4137
+ # p item
4138
+ # end
4139
+ #
4140
+ def list_views request, options = nil
4141
+ raise ::ArgumentError, "request must be provided" if request.nil?
4142
+
4143
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest
4144
+
4145
+ # Converts hash and nil to an options object
4146
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4147
+
4148
+ # Customize the options with defaults
4149
+ call_metadata = @config.rpcs.list_views.metadata.to_h
4150
+
4151
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4152
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4153
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4154
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4155
+ transports_version_send: [:rest]
4156
+
4157
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4158
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4159
+
4160
+ options.apply_defaults timeout: @config.rpcs.list_views.timeout,
4161
+ metadata: call_metadata,
4162
+ retry_policy: @config.rpcs.list_views.retry_policy
4163
+
4164
+ options.apply_defaults timeout: @config.timeout,
4165
+ metadata: @config.metadata,
4166
+ retry_policy: @config.retry_policy
4167
+
4168
+ @contact_center_insights_stub.list_views request, options do |result, operation|
4169
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_views, "views", request, result, options
4170
+ yield result, operation if block_given?
4171
+ return result
4172
+ end
4173
+ rescue ::Gapic::Rest::Error => e
4174
+ raise ::Google::Cloud::Error.from_error(e)
4175
+ end
4176
+
4177
+ ##
4178
+ # Updates a view.
4179
+ #
4180
+ # @overload update_view(request, options = nil)
4181
+ # Pass arguments to `update_view` via a request object, either of type
4182
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest} or an equivalent Hash.
4183
+ #
4184
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest, ::Hash]
4185
+ # A request object representing the call parameters. Required. To specify no
4186
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4187
+ # @param options [::Gapic::CallOptions, ::Hash]
4188
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4189
+ #
4190
+ # @overload update_view(view: nil, update_mask: nil)
4191
+ # Pass arguments to `update_view` via keyword arguments. Note that at
4192
+ # least one keyword argument is required. To specify no parameters, or to keep all
4193
+ # the default parameter values, pass an empty Hash as a request object (see above).
4194
+ #
4195
+ # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash]
4196
+ # Required. The new view.
4197
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4198
+ # The list of fields to be updated.
4199
+ # @yield [result, operation] Access the result along with the TransportOperation object
4200
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View]
4201
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4202
+ #
4203
+ # @return [::Google::Cloud::ContactCenterInsights::V1::View]
4204
+ #
4205
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4206
+ #
4207
+ # @example Basic example
4208
+ # require "google/cloud/contact_center_insights/v1"
4209
+ #
4210
+ # # Create a client object. The client can be reused for multiple calls.
4211
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4212
+ #
4213
+ # # Create a request. To set request fields, pass in keyword arguments.
4214
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new
4215
+ #
4216
+ # # Call the update_view method.
4217
+ # result = client.update_view request
4218
+ #
4219
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View.
4220
+ # p result
4221
+ #
4222
+ def update_view request, options = nil
4223
+ raise ::ArgumentError, "request must be provided" if request.nil?
4224
+
4225
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest
4226
+
4227
+ # Converts hash and nil to an options object
4228
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4229
+
4230
+ # Customize the options with defaults
4231
+ call_metadata = @config.rpcs.update_view.metadata.to_h
4232
+
4233
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4234
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4235
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4236
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4237
+ transports_version_send: [:rest]
4238
+
4239
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4240
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4241
+
4242
+ options.apply_defaults timeout: @config.rpcs.update_view.timeout,
4243
+ metadata: call_metadata,
4244
+ retry_policy: @config.rpcs.update_view.retry_policy
4245
+
4246
+ options.apply_defaults timeout: @config.timeout,
4247
+ metadata: @config.metadata,
4248
+ retry_policy: @config.retry_policy
4249
+
4250
+ @contact_center_insights_stub.update_view request, options do |result, operation|
4251
+ yield result, operation if block_given?
4252
+ return result
4253
+ end
4254
+ rescue ::Gapic::Rest::Error => e
4255
+ raise ::Google::Cloud::Error.from_error(e)
4256
+ end
4257
+
4258
+ ##
4259
+ # Deletes a view.
4260
+ #
4261
+ # @overload delete_view(request, options = nil)
4262
+ # Pass arguments to `delete_view` via a request object, either of type
4263
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest} or an equivalent Hash.
4264
+ #
4265
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest, ::Hash]
4266
+ # A request object representing the call parameters. Required. To specify no
4267
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4268
+ # @param options [::Gapic::CallOptions, ::Hash]
4269
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4270
+ #
4271
+ # @overload delete_view(name: nil)
4272
+ # Pass arguments to `delete_view` via keyword arguments. Note that at
4273
+ # least one keyword argument is required. To specify no parameters, or to keep all
4274
+ # the default parameter values, pass an empty Hash as a request object (see above).
4275
+ #
4276
+ # @param name [::String]
4277
+ # Required. The name of the view to delete.
4278
+ # @yield [result, operation] Access the result along with the TransportOperation object
4279
+ # @yieldparam result [::Google::Protobuf::Empty]
4280
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4281
+ #
4282
+ # @return [::Google::Protobuf::Empty]
4283
+ #
4284
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4285
+ #
4286
+ # @example Basic example
4287
+ # require "google/cloud/contact_center_insights/v1"
4288
+ #
4289
+ # # Create a client object. The client can be reused for multiple calls.
4290
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4291
+ #
4292
+ # # Create a request. To set request fields, pass in keyword arguments.
4293
+ # request = Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new
4294
+ #
4295
+ # # Call the delete_view method.
4296
+ # result = client.delete_view request
4297
+ #
4298
+ # # The returned object is of type Google::Protobuf::Empty.
4299
+ # p result
4300
+ #
4301
+ def delete_view request, options = nil
4302
+ raise ::ArgumentError, "request must be provided" if request.nil?
4303
+
4304
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest
4305
+
4306
+ # Converts hash and nil to an options object
4307
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4308
+
4309
+ # Customize the options with defaults
4310
+ call_metadata = @config.rpcs.delete_view.metadata.to_h
4311
+
4312
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4313
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4314
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4315
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4316
+ transports_version_send: [:rest]
4317
+
4318
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4319
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4320
+
4321
+ options.apply_defaults timeout: @config.rpcs.delete_view.timeout,
4322
+ metadata: call_metadata,
4323
+ retry_policy: @config.rpcs.delete_view.retry_policy
4324
+
4325
+ options.apply_defaults timeout: @config.timeout,
4326
+ metadata: @config.metadata,
4327
+ retry_policy: @config.retry_policy
4328
+
4329
+ @contact_center_insights_stub.delete_view request, options do |result, operation|
4330
+ yield result, operation if block_given?
4331
+ return result
4332
+ end
4333
+ rescue ::Gapic::Rest::Error => e
4334
+ raise ::Google::Cloud::Error.from_error(e)
4335
+ end
4336
+
4337
+ ##
4338
+ # Query metrics.
4339
+ #
4340
+ # @overload query_metrics(request, options = nil)
4341
+ # Pass arguments to `query_metrics` via a request object, either of type
4342
+ # {::Google::Cloud::ContactCenterInsights::V1::QueryMetricsRequest} or an equivalent Hash.
4343
+ #
4344
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::QueryMetricsRequest, ::Hash]
4345
+ # A request object representing the call parameters. Required. To specify no
4346
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4347
+ # @param options [::Gapic::CallOptions, ::Hash]
4348
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4349
+ #
4350
+ # @overload query_metrics(location: nil, filter: nil, time_granularity: nil, dimensions: nil, measure_mask: nil)
4351
+ # Pass arguments to `query_metrics` via keyword arguments. Note that at
4352
+ # least one keyword argument is required. To specify no parameters, or to keep all
4353
+ # the default parameter values, pass an empty Hash as a request object (see above).
4354
+ #
4355
+ # @param location [::String]
4356
+ # Required. The location of the data.
4357
+ # "projects/\\{project}/locations/\\{location}"
4358
+ # @param filter [::String]
4359
+ # Required. Filter to select a subset of conversations to compute the
4360
+ # metrics. Must specify a window of the conversation create time to compute
4361
+ # the metrics. The returned metrics will be from the range [DATE(starting
4362
+ # create time), DATE(ending create time)).
4363
+ # @param time_granularity [::Google::Cloud::ContactCenterInsights::V1::QueryMetricsRequest::TimeGranularity]
4364
+ # The time granularity of each data point in the time series.
4365
+ # Defaults to NONE if this field is unspecified.
4366
+ # @param dimensions [::Array<::Google::Cloud::ContactCenterInsights::V1::Dimension, ::Hash>]
4367
+ # The dimensions that determine the grouping key for the query. Defaults to
4368
+ # no dimension if this field is unspecified. If a dimension is specified,
4369
+ # its key must also be specified. Each dimension's key must be unique.
4370
+ #
4371
+ # If a time granularity is also specified, metric values in the dimension
4372
+ # will be bucketed by this granularity.
4373
+ #
4374
+ # Up to one dimension is supported for now.
4375
+ # @param measure_mask [::Google::Protobuf::FieldMask, ::Hash]
4376
+ # Measures to return. Defaults to all measures if this field is unspecified.
4377
+ # A valid mask should traverse from the `measure` field from the response.
4378
+ # For example, a path from a measure mask to get the conversation count is
4379
+ # "conversation_measure.count".
4380
+ # @yield [result, operation] Access the result along with the TransportOperation object
4381
+ # @yieldparam result [::Gapic::Operation]
4382
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4383
+ #
4384
+ # @return [::Gapic::Operation]
4385
+ #
4386
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4387
+ #
4388
+ # @example Basic example
4389
+ # require "google/cloud/contact_center_insights/v1"
4390
+ #
4391
+ # # Create a client object. The client can be reused for multiple calls.
4392
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4393
+ #
4394
+ # # Create a request. To set request fields, pass in keyword arguments.
4395
+ # request = Google::Cloud::ContactCenterInsights::V1::QueryMetricsRequest.new
4396
+ #
4397
+ # # Call the query_metrics method.
4398
+ # result = client.query_metrics request
4399
+ #
4400
+ # # The returned object is of type Gapic::Operation. You can use it to
4401
+ # # check the status of an operation, cancel it, or wait for results.
4402
+ # # Here is how to wait for a response.
4403
+ # result.wait_until_done! timeout: 60
4404
+ # if result.response?
4405
+ # p result.response
4406
+ # else
4407
+ # puts "No response received."
4408
+ # end
4409
+ #
4410
+ def query_metrics request, options = nil
4411
+ raise ::ArgumentError, "request must be provided" if request.nil?
4412
+
4413
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::QueryMetricsRequest
4414
+
4415
+ # Converts hash and nil to an options object
4416
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4417
+
4418
+ # Customize the options with defaults
4419
+ call_metadata = @config.rpcs.query_metrics.metadata.to_h
4420
+
4421
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4422
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4423
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4424
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4425
+ transports_version_send: [:rest]
4426
+
4427
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4428
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4429
+
4430
+ options.apply_defaults timeout: @config.rpcs.query_metrics.timeout,
4431
+ metadata: call_metadata,
4432
+ retry_policy: @config.rpcs.query_metrics.retry_policy
4433
+
4434
+ options.apply_defaults timeout: @config.timeout,
4435
+ metadata: @config.metadata,
4436
+ retry_policy: @config.retry_policy
4437
+
4438
+ @contact_center_insights_stub.query_metrics request, options do |result, operation|
4439
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4440
+ yield result, operation if block_given?
4441
+ return result
4442
+ end
4443
+ rescue ::Gapic::Rest::Error => e
4444
+ raise ::Google::Cloud::Error.from_error(e)
4445
+ end
4446
+
4447
+ ##
4448
+ # Create a QaQuestion.
4449
+ #
4450
+ # @overload create_qa_question(request, options = nil)
4451
+ # Pass arguments to `create_qa_question` via a request object, either of type
4452
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateQaQuestionRequest} or an equivalent Hash.
4453
+ #
4454
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateQaQuestionRequest, ::Hash]
4455
+ # A request object representing the call parameters. Required. To specify no
4456
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4457
+ # @param options [::Gapic::CallOptions, ::Hash]
4458
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4459
+ #
4460
+ # @overload create_qa_question(parent: nil, qa_question: nil, qa_question_id: nil)
4461
+ # Pass arguments to `create_qa_question` via keyword arguments. Note that at
4462
+ # least one keyword argument is required. To specify no parameters, or to keep all
4463
+ # the default parameter values, pass an empty Hash as a request object (see above).
4464
+ #
4465
+ # @param parent [::String]
4466
+ # Required. The parent resource of the QaQuestion.
4467
+ # @param qa_question [::Google::Cloud::ContactCenterInsights::V1::QaQuestion, ::Hash]
4468
+ # Required. The QaQuestion to create.
4469
+ # @param qa_question_id [::String]
4470
+ # Optional. A unique ID for the new question. This ID will become the final
4471
+ # component of the question's resource name. If no ID is specified, a
4472
+ # server-generated ID will be used.
4473
+ #
4474
+ # This value should be 4-64 characters and must match the regular
4475
+ # expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`.
4476
+ # @yield [result, operation] Access the result along with the TransportOperation object
4477
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaQuestion]
4478
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4479
+ #
4480
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaQuestion]
4481
+ #
4482
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4483
+ #
4484
+ # @example Basic example
4485
+ # require "google/cloud/contact_center_insights/v1"
4486
+ #
4487
+ # # Create a client object. The client can be reused for multiple calls.
4488
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4489
+ #
4490
+ # # Create a request. To set request fields, pass in keyword arguments.
4491
+ # request = Google::Cloud::ContactCenterInsights::V1::CreateQaQuestionRequest.new
4492
+ #
4493
+ # # Call the create_qa_question method.
4494
+ # result = client.create_qa_question request
4495
+ #
4496
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaQuestion.
4497
+ # p result
4498
+ #
4499
+ def create_qa_question request, options = nil
4500
+ raise ::ArgumentError, "request must be provided" if request.nil?
4501
+
4502
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateQaQuestionRequest
4503
+
4504
+ # Converts hash and nil to an options object
4505
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4506
+
4507
+ # Customize the options with defaults
4508
+ call_metadata = @config.rpcs.create_qa_question.metadata.to_h
4509
+
4510
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4511
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4512
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4513
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4514
+ transports_version_send: [:rest]
4515
+
4516
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4517
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4518
+
4519
+ options.apply_defaults timeout: @config.rpcs.create_qa_question.timeout,
4520
+ metadata: call_metadata,
4521
+ retry_policy: @config.rpcs.create_qa_question.retry_policy
4522
+
4523
+ options.apply_defaults timeout: @config.timeout,
4524
+ metadata: @config.metadata,
4525
+ retry_policy: @config.retry_policy
4526
+
4527
+ @contact_center_insights_stub.create_qa_question request, options do |result, operation|
4528
+ yield result, operation if block_given?
4529
+ return result
4530
+ end
4531
+ rescue ::Gapic::Rest::Error => e
4532
+ raise ::Google::Cloud::Error.from_error(e)
4533
+ end
4534
+
4535
+ ##
4536
+ # Gets a QaQuestion.
4537
+ #
4538
+ # @overload get_qa_question(request, options = nil)
4539
+ # Pass arguments to `get_qa_question` via a request object, either of type
4540
+ # {::Google::Cloud::ContactCenterInsights::V1::GetQaQuestionRequest} or an equivalent Hash.
4541
+ #
4542
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetQaQuestionRequest, ::Hash]
4543
+ # A request object representing the call parameters. Required. To specify no
4544
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4545
+ # @param options [::Gapic::CallOptions, ::Hash]
4546
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4547
+ #
4548
+ # @overload get_qa_question(name: nil)
4549
+ # Pass arguments to `get_qa_question` via keyword arguments. Note that at
4550
+ # least one keyword argument is required. To specify no parameters, or to keep all
4551
+ # the default parameter values, pass an empty Hash as a request object (see above).
4552
+ #
4553
+ # @param name [::String]
4554
+ # Required. The name of the QaQuestion to get.
4555
+ # @yield [result, operation] Access the result along with the TransportOperation object
4556
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaQuestion]
4557
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4558
+ #
4559
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaQuestion]
4560
+ #
4561
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4562
+ #
4563
+ # @example Basic example
4564
+ # require "google/cloud/contact_center_insights/v1"
4565
+ #
4566
+ # # Create a client object. The client can be reused for multiple calls.
4567
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4568
+ #
4569
+ # # Create a request. To set request fields, pass in keyword arguments.
4570
+ # request = Google::Cloud::ContactCenterInsights::V1::GetQaQuestionRequest.new
4571
+ #
4572
+ # # Call the get_qa_question method.
4573
+ # result = client.get_qa_question request
4574
+ #
4575
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaQuestion.
4576
+ # p result
4577
+ #
4578
+ def get_qa_question request, options = nil
4579
+ raise ::ArgumentError, "request must be provided" if request.nil?
4580
+
4581
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetQaQuestionRequest
4582
+
4583
+ # Converts hash and nil to an options object
4584
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4585
+
4586
+ # Customize the options with defaults
4587
+ call_metadata = @config.rpcs.get_qa_question.metadata.to_h
4588
+
4589
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4590
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4591
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4592
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4593
+ transports_version_send: [:rest]
4594
+
4595
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4596
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4597
+
4598
+ options.apply_defaults timeout: @config.rpcs.get_qa_question.timeout,
4599
+ metadata: call_metadata,
4600
+ retry_policy: @config.rpcs.get_qa_question.retry_policy
4601
+
4602
+ options.apply_defaults timeout: @config.timeout,
4603
+ metadata: @config.metadata,
4604
+ retry_policy: @config.retry_policy
4605
+
4606
+ @contact_center_insights_stub.get_qa_question request, options do |result, operation|
4607
+ yield result, operation if block_given?
4608
+ return result
4609
+ end
4610
+ rescue ::Gapic::Rest::Error => e
4611
+ raise ::Google::Cloud::Error.from_error(e)
4612
+ end
4613
+
4614
+ ##
4615
+ # Updates a QaQuestion.
4616
+ #
4617
+ # @overload update_qa_question(request, options = nil)
4618
+ # Pass arguments to `update_qa_question` via a request object, either of type
4619
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateQaQuestionRequest} or an equivalent Hash.
4620
+ #
4621
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateQaQuestionRequest, ::Hash]
4622
+ # A request object representing the call parameters. Required. To specify no
4623
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4624
+ # @param options [::Gapic::CallOptions, ::Hash]
4625
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4626
+ #
4627
+ # @overload update_qa_question(qa_question: nil, update_mask: nil)
4628
+ # Pass arguments to `update_qa_question` via keyword arguments. Note that at
4629
+ # least one keyword argument is required. To specify no parameters, or to keep all
4630
+ # the default parameter values, pass an empty Hash as a request object (see above).
4631
+ #
4632
+ # @param qa_question [::Google::Cloud::ContactCenterInsights::V1::QaQuestion, ::Hash]
4633
+ # Required. The QaQuestion to update.
4634
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4635
+ # Required. The list of fields to be updated. All possible fields can be
4636
+ # updated by passing `*`, or a subset of the following updateable fields can
4637
+ # be provided:
4638
+ #
4639
+ # * `abbreviation`
4640
+ # * `answer_choices`
4641
+ # * `answer_instructions`
4642
+ # * `order`
4643
+ # * `question_body`
4644
+ # * `tags`
4645
+ # @yield [result, operation] Access the result along with the TransportOperation object
4646
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaQuestion]
4647
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4648
+ #
4649
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaQuestion]
4650
+ #
4651
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4652
+ #
4653
+ # @example Basic example
4654
+ # require "google/cloud/contact_center_insights/v1"
4655
+ #
4656
+ # # Create a client object. The client can be reused for multiple calls.
4657
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4658
+ #
4659
+ # # Create a request. To set request fields, pass in keyword arguments.
4660
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdateQaQuestionRequest.new
4661
+ #
4662
+ # # Call the update_qa_question method.
4663
+ # result = client.update_qa_question request
4664
+ #
4665
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaQuestion.
4666
+ # p result
4667
+ #
4668
+ def update_qa_question request, options = nil
4669
+ raise ::ArgumentError, "request must be provided" if request.nil?
4670
+
4671
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateQaQuestionRequest
4672
+
4673
+ # Converts hash and nil to an options object
4674
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4675
+
4676
+ # Customize the options with defaults
4677
+ call_metadata = @config.rpcs.update_qa_question.metadata.to_h
4678
+
4679
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4680
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4681
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4682
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4683
+ transports_version_send: [:rest]
4684
+
4685
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4686
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4687
+
4688
+ options.apply_defaults timeout: @config.rpcs.update_qa_question.timeout,
4689
+ metadata: call_metadata,
4690
+ retry_policy: @config.rpcs.update_qa_question.retry_policy
4691
+
4692
+ options.apply_defaults timeout: @config.timeout,
4693
+ metadata: @config.metadata,
4694
+ retry_policy: @config.retry_policy
4695
+
4696
+ @contact_center_insights_stub.update_qa_question request, options do |result, operation|
4697
+ yield result, operation if block_given?
4698
+ return result
4699
+ end
4700
+ rescue ::Gapic::Rest::Error => e
4701
+ raise ::Google::Cloud::Error.from_error(e)
4702
+ end
4703
+
4704
+ ##
4705
+ # Deletes a QaQuestion.
4706
+ #
4707
+ # @overload delete_qa_question(request, options = nil)
4708
+ # Pass arguments to `delete_qa_question` via a request object, either of type
4709
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteQaQuestionRequest} or an equivalent Hash.
4710
+ #
4711
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteQaQuestionRequest, ::Hash]
4712
+ # A request object representing the call parameters. Required. To specify no
4713
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4714
+ # @param options [::Gapic::CallOptions, ::Hash]
4715
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4716
+ #
4717
+ # @overload delete_qa_question(name: nil)
4718
+ # Pass arguments to `delete_qa_question` via keyword arguments. Note that at
4719
+ # least one keyword argument is required. To specify no parameters, or to keep all
4720
+ # the default parameter values, pass an empty Hash as a request object (see above).
4721
+ #
4722
+ # @param name [::String]
4723
+ # Required. The name of the QaQuestion to delete.
4724
+ # @yield [result, operation] Access the result along with the TransportOperation object
4725
+ # @yieldparam result [::Google::Protobuf::Empty]
4726
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4727
+ #
4728
+ # @return [::Google::Protobuf::Empty]
4729
+ #
4730
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4731
+ #
4732
+ # @example Basic example
4733
+ # require "google/cloud/contact_center_insights/v1"
4734
+ #
4735
+ # # Create a client object. The client can be reused for multiple calls.
4736
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4737
+ #
4738
+ # # Create a request. To set request fields, pass in keyword arguments.
4739
+ # request = Google::Cloud::ContactCenterInsights::V1::DeleteQaQuestionRequest.new
4740
+ #
4741
+ # # Call the delete_qa_question method.
4742
+ # result = client.delete_qa_question request
4743
+ #
4744
+ # # The returned object is of type Google::Protobuf::Empty.
4745
+ # p result
4746
+ #
4747
+ def delete_qa_question request, options = nil
4748
+ raise ::ArgumentError, "request must be provided" if request.nil?
4749
+
4750
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteQaQuestionRequest
4751
+
4752
+ # Converts hash and nil to an options object
4753
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4754
+
4755
+ # Customize the options with defaults
4756
+ call_metadata = @config.rpcs.delete_qa_question.metadata.to_h
4757
+
4758
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4759
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4760
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4761
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4762
+ transports_version_send: [:rest]
4763
+
4764
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4765
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4766
+
4767
+ options.apply_defaults timeout: @config.rpcs.delete_qa_question.timeout,
4768
+ metadata: call_metadata,
4769
+ retry_policy: @config.rpcs.delete_qa_question.retry_policy
4770
+
4771
+ options.apply_defaults timeout: @config.timeout,
4772
+ metadata: @config.metadata,
4773
+ retry_policy: @config.retry_policy
4774
+
4775
+ @contact_center_insights_stub.delete_qa_question request, options do |result, operation|
4776
+ yield result, operation if block_given?
4777
+ return result
4778
+ end
4779
+ rescue ::Gapic::Rest::Error => e
4780
+ raise ::Google::Cloud::Error.from_error(e)
4781
+ end
4782
+
4783
+ ##
4784
+ # Lists QaQuestions.
4785
+ #
4786
+ # @overload list_qa_questions(request, options = nil)
4787
+ # Pass arguments to `list_qa_questions` via a request object, either of type
4788
+ # {::Google::Cloud::ContactCenterInsights::V1::ListQaQuestionsRequest} or an equivalent Hash.
4789
+ #
4790
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListQaQuestionsRequest, ::Hash]
4791
+ # A request object representing the call parameters. Required. To specify no
4792
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4793
+ # @param options [::Gapic::CallOptions, ::Hash]
4794
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4795
+ #
4796
+ # @overload list_qa_questions(parent: nil, page_size: nil, page_token: nil)
4797
+ # Pass arguments to `list_qa_questions` via keyword arguments. Note that at
4798
+ # least one keyword argument is required. To specify no parameters, or to keep all
4799
+ # the default parameter values, pass an empty Hash as a request object (see above).
4800
+ #
4801
+ # @param parent [::String]
4802
+ # Required. The parent resource of the questions.
4803
+ # @param page_size [::Integer]
4804
+ # Optional. The maximum number of questions to return in the response. If the
4805
+ # value is zero, the service will select a default size. A call might return
4806
+ # fewer objects than requested. A non-empty `next_page_token` in the response
4807
+ # indicates that more data is available.
4808
+ # @param page_token [::String]
4809
+ # Optional. The value returned by the last `ListQaQuestionsResponse`. This
4810
+ # value indicates that this is a continuation of a prior `ListQaQuestions`
4811
+ # call and that the system should return the next page of data.
4812
+ # @yield [result, operation] Access the result along with the TransportOperation object
4813
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaQuestion>]
4814
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4815
+ #
4816
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaQuestion>]
4817
+ #
4818
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4819
+ #
4820
+ # @example Basic example
4821
+ # require "google/cloud/contact_center_insights/v1"
4822
+ #
4823
+ # # Create a client object. The client can be reused for multiple calls.
4824
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4825
+ #
4826
+ # # Create a request. To set request fields, pass in keyword arguments.
4827
+ # request = Google::Cloud::ContactCenterInsights::V1::ListQaQuestionsRequest.new
4828
+ #
4829
+ # # Call the list_qa_questions method.
4830
+ # result = client.list_qa_questions request
4831
+ #
4832
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4833
+ # # over elements, and API calls will be issued to fetch pages as needed.
4834
+ # result.each do |item|
4835
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::QaQuestion.
4836
+ # p item
4837
+ # end
4838
+ #
4839
+ def list_qa_questions request, options = nil
4840
+ raise ::ArgumentError, "request must be provided" if request.nil?
4841
+
4842
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListQaQuestionsRequest
4843
+
4844
+ # Converts hash and nil to an options object
4845
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4846
+
4847
+ # Customize the options with defaults
4848
+ call_metadata = @config.rpcs.list_qa_questions.metadata.to_h
4849
+
4850
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4851
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4852
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4853
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4854
+ transports_version_send: [:rest]
4855
+
4856
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4857
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4858
+
4859
+ options.apply_defaults timeout: @config.rpcs.list_qa_questions.timeout,
4860
+ metadata: call_metadata,
4861
+ retry_policy: @config.rpcs.list_qa_questions.retry_policy
4862
+
4863
+ options.apply_defaults timeout: @config.timeout,
4864
+ metadata: @config.metadata,
4865
+ retry_policy: @config.retry_policy
4866
+
4867
+ @contact_center_insights_stub.list_qa_questions request, options do |result, operation|
4868
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_qa_questions, "qa_questions", request, result, options
4869
+ yield result, operation if block_given?
4870
+ return result
4871
+ end
4872
+ rescue ::Gapic::Rest::Error => e
4873
+ raise ::Google::Cloud::Error.from_error(e)
4874
+ end
4875
+
4876
+ ##
4877
+ # Create a QaScorecard.
4878
+ #
4879
+ # @overload create_qa_scorecard(request, options = nil)
4880
+ # Pass arguments to `create_qa_scorecard` via a request object, either of type
4881
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRequest} or an equivalent Hash.
4882
+ #
4883
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRequest, ::Hash]
4884
+ # A request object representing the call parameters. Required. To specify no
4885
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4886
+ # @param options [::Gapic::CallOptions, ::Hash]
4887
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4888
+ #
4889
+ # @overload create_qa_scorecard(parent: nil, qa_scorecard: nil, qa_scorecard_id: nil)
4890
+ # Pass arguments to `create_qa_scorecard` via keyword arguments. Note that at
4891
+ # least one keyword argument is required. To specify no parameters, or to keep all
4892
+ # the default parameter values, pass an empty Hash as a request object (see above).
4893
+ #
4894
+ # @param parent [::String]
4895
+ # Required. The parent resource of the QaScorecard.
4896
+ # @param qa_scorecard [::Google::Cloud::ContactCenterInsights::V1::QaScorecard, ::Hash]
4897
+ # Required. The QaScorecard to create.
4898
+ # @param qa_scorecard_id [::String]
4899
+ # Optional. A unique ID for the new QaScorecard. This ID will become the
4900
+ # final component of the QaScorecard's resource name. If no ID is specified,
4901
+ # a server-generated ID will be used.
4902
+ #
4903
+ # This value should be 4-64 characters and must match the regular
4904
+ # expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`.
4905
+ # @yield [result, operation] Access the result along with the TransportOperation object
4906
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaScorecard]
4907
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4908
+ #
4909
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaScorecard]
4910
+ #
4911
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4912
+ #
4913
+ # @example Basic example
4914
+ # require "google/cloud/contact_center_insights/v1"
4915
+ #
4916
+ # # Create a client object. The client can be reused for multiple calls.
4917
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4918
+ #
4919
+ # # Create a request. To set request fields, pass in keyword arguments.
4920
+ # request = Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRequest.new
4921
+ #
4922
+ # # Call the create_qa_scorecard method.
4923
+ # result = client.create_qa_scorecard request
4924
+ #
4925
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecard.
4926
+ # p result
4927
+ #
4928
+ def create_qa_scorecard request, options = nil
4929
+ raise ::ArgumentError, "request must be provided" if request.nil?
4930
+
4931
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRequest
4932
+
4933
+ # Converts hash and nil to an options object
4934
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4935
+
4936
+ # Customize the options with defaults
4937
+ call_metadata = @config.rpcs.create_qa_scorecard.metadata.to_h
4938
+
4939
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4940
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4941
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4942
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
4943
+ transports_version_send: [:rest]
4944
+
4945
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4946
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4947
+
4948
+ options.apply_defaults timeout: @config.rpcs.create_qa_scorecard.timeout,
4949
+ metadata: call_metadata,
4950
+ retry_policy: @config.rpcs.create_qa_scorecard.retry_policy
4951
+
4952
+ options.apply_defaults timeout: @config.timeout,
4953
+ metadata: @config.metadata,
4954
+ retry_policy: @config.retry_policy
4955
+
4956
+ @contact_center_insights_stub.create_qa_scorecard request, options do |result, operation|
4957
+ yield result, operation if block_given?
4958
+ return result
4959
+ end
4960
+ rescue ::Gapic::Rest::Error => e
4961
+ raise ::Google::Cloud::Error.from_error(e)
4962
+ end
4963
+
4964
+ ##
4965
+ # Gets a QaScorecard.
4966
+ #
4967
+ # @overload get_qa_scorecard(request, options = nil)
4968
+ # Pass arguments to `get_qa_scorecard` via a request object, either of type
4969
+ # {::Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRequest} or an equivalent Hash.
4970
+ #
4971
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRequest, ::Hash]
4972
+ # A request object representing the call parameters. Required. To specify no
4973
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4974
+ # @param options [::Gapic::CallOptions, ::Hash]
4975
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4976
+ #
4977
+ # @overload get_qa_scorecard(name: nil)
4978
+ # Pass arguments to `get_qa_scorecard` via keyword arguments. Note that at
4979
+ # least one keyword argument is required. To specify no parameters, or to keep all
4980
+ # the default parameter values, pass an empty Hash as a request object (see above).
4981
+ #
4982
+ # @param name [::String]
4983
+ # Required. The name of the QaScorecard to get.
4984
+ # @yield [result, operation] Access the result along with the TransportOperation object
4985
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaScorecard]
4986
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4987
+ #
4988
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaScorecard]
4989
+ #
4990
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4991
+ #
4992
+ # @example Basic example
4993
+ # require "google/cloud/contact_center_insights/v1"
4994
+ #
4995
+ # # Create a client object. The client can be reused for multiple calls.
4996
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
4997
+ #
4998
+ # # Create a request. To set request fields, pass in keyword arguments.
4999
+ # request = Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRequest.new
5000
+ #
5001
+ # # Call the get_qa_scorecard method.
5002
+ # result = client.get_qa_scorecard request
5003
+ #
5004
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecard.
5005
+ # p result
5006
+ #
5007
+ def get_qa_scorecard request, options = nil
5008
+ raise ::ArgumentError, "request must be provided" if request.nil?
5009
+
5010
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRequest
5011
+
5012
+ # Converts hash and nil to an options object
5013
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5014
+
5015
+ # Customize the options with defaults
5016
+ call_metadata = @config.rpcs.get_qa_scorecard.metadata.to_h
5017
+
5018
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5019
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5020
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5021
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5022
+ transports_version_send: [:rest]
5023
+
5024
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5025
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5026
+
5027
+ options.apply_defaults timeout: @config.rpcs.get_qa_scorecard.timeout,
5028
+ metadata: call_metadata,
5029
+ retry_policy: @config.rpcs.get_qa_scorecard.retry_policy
5030
+
5031
+ options.apply_defaults timeout: @config.timeout,
5032
+ metadata: @config.metadata,
5033
+ retry_policy: @config.retry_policy
5034
+
5035
+ @contact_center_insights_stub.get_qa_scorecard request, options do |result, operation|
5036
+ yield result, operation if block_given?
5037
+ return result
5038
+ end
5039
+ rescue ::Gapic::Rest::Error => e
5040
+ raise ::Google::Cloud::Error.from_error(e)
5041
+ end
5042
+
5043
+ ##
5044
+ # Updates a QaScorecard.
5045
+ #
5046
+ # @overload update_qa_scorecard(request, options = nil)
5047
+ # Pass arguments to `update_qa_scorecard` via a request object, either of type
5048
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateQaScorecardRequest} or an equivalent Hash.
5049
+ #
5050
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateQaScorecardRequest, ::Hash]
5051
+ # A request object representing the call parameters. Required. To specify no
5052
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5053
+ # @param options [::Gapic::CallOptions, ::Hash]
5054
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5055
+ #
5056
+ # @overload update_qa_scorecard(qa_scorecard: nil, update_mask: nil)
5057
+ # Pass arguments to `update_qa_scorecard` via keyword arguments. Note that at
5058
+ # least one keyword argument is required. To specify no parameters, or to keep all
5059
+ # the default parameter values, pass an empty Hash as a request object (see above).
5060
+ #
5061
+ # @param qa_scorecard [::Google::Cloud::ContactCenterInsights::V1::QaScorecard, ::Hash]
5062
+ # Required. The QaScorecard to update.
5063
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
5064
+ # Required. The list of fields to be updated. All possible fields can be
5065
+ # updated by passing `*`, or a subset of the following updateable fields can
5066
+ # be provided:
5067
+ #
5068
+ # * `description`
5069
+ # * `display_name`
5070
+ # @yield [result, operation] Access the result along with the TransportOperation object
5071
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaScorecard]
5072
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5073
+ #
5074
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaScorecard]
5075
+ #
5076
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5077
+ #
5078
+ # @example Basic example
5079
+ # require "google/cloud/contact_center_insights/v1"
5080
+ #
5081
+ # # Create a client object. The client can be reused for multiple calls.
5082
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5083
+ #
5084
+ # # Create a request. To set request fields, pass in keyword arguments.
5085
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdateQaScorecardRequest.new
5086
+ #
5087
+ # # Call the update_qa_scorecard method.
5088
+ # result = client.update_qa_scorecard request
5089
+ #
5090
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecard.
5091
+ # p result
5092
+ #
5093
+ def update_qa_scorecard request, options = nil
5094
+ raise ::ArgumentError, "request must be provided" if request.nil?
5095
+
5096
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateQaScorecardRequest
5097
+
5098
+ # Converts hash and nil to an options object
5099
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5100
+
5101
+ # Customize the options with defaults
5102
+ call_metadata = @config.rpcs.update_qa_scorecard.metadata.to_h
5103
+
5104
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5105
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5106
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5107
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5108
+ transports_version_send: [:rest]
5109
+
5110
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5111
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5112
+
5113
+ options.apply_defaults timeout: @config.rpcs.update_qa_scorecard.timeout,
5114
+ metadata: call_metadata,
5115
+ retry_policy: @config.rpcs.update_qa_scorecard.retry_policy
5116
+
5117
+ options.apply_defaults timeout: @config.timeout,
5118
+ metadata: @config.metadata,
5119
+ retry_policy: @config.retry_policy
5120
+
5121
+ @contact_center_insights_stub.update_qa_scorecard request, options do |result, operation|
5122
+ yield result, operation if block_given?
5123
+ return result
5124
+ end
5125
+ rescue ::Gapic::Rest::Error => e
5126
+ raise ::Google::Cloud::Error.from_error(e)
5127
+ end
5128
+
5129
+ ##
5130
+ # Deletes a QaScorecard.
5131
+ #
5132
+ # @overload delete_qa_scorecard(request, options = nil)
5133
+ # Pass arguments to `delete_qa_scorecard` via a request object, either of type
5134
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRequest} or an equivalent Hash.
5135
+ #
5136
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRequest, ::Hash]
5137
+ # A request object representing the call parameters. Required. To specify no
5138
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5139
+ # @param options [::Gapic::CallOptions, ::Hash]
5140
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5141
+ #
5142
+ # @overload delete_qa_scorecard(name: nil, force: nil)
5143
+ # Pass arguments to `delete_qa_scorecard` via keyword arguments. Note that at
5144
+ # least one keyword argument is required. To specify no parameters, or to keep all
5145
+ # the default parameter values, pass an empty Hash as a request object (see above).
5146
+ #
5147
+ # @param name [::String]
5148
+ # Required. The name of the QaScorecard to delete.
5149
+ # @param force [::Boolean]
5150
+ # Optional. If set to true, all of this QaScorecard's child resources will
5151
+ # also be deleted. Otherwise, the request will only succeed if it has none.
5152
+ # @yield [result, operation] Access the result along with the TransportOperation object
5153
+ # @yieldparam result [::Google::Protobuf::Empty]
5154
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5155
+ #
5156
+ # @return [::Google::Protobuf::Empty]
5157
+ #
5158
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5159
+ #
5160
+ # @example Basic example
5161
+ # require "google/cloud/contact_center_insights/v1"
5162
+ #
5163
+ # # Create a client object. The client can be reused for multiple calls.
5164
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5165
+ #
5166
+ # # Create a request. To set request fields, pass in keyword arguments.
5167
+ # request = Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRequest.new
5168
+ #
5169
+ # # Call the delete_qa_scorecard method.
5170
+ # result = client.delete_qa_scorecard request
5171
+ #
5172
+ # # The returned object is of type Google::Protobuf::Empty.
5173
+ # p result
5174
+ #
5175
+ def delete_qa_scorecard request, options = nil
5176
+ raise ::ArgumentError, "request must be provided" if request.nil?
5177
+
5178
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRequest
5179
+
5180
+ # Converts hash and nil to an options object
5181
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5182
+
5183
+ # Customize the options with defaults
5184
+ call_metadata = @config.rpcs.delete_qa_scorecard.metadata.to_h
5185
+
5186
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5187
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5188
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5189
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5190
+ transports_version_send: [:rest]
5191
+
5192
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5193
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5194
+
5195
+ options.apply_defaults timeout: @config.rpcs.delete_qa_scorecard.timeout,
5196
+ metadata: call_metadata,
5197
+ retry_policy: @config.rpcs.delete_qa_scorecard.retry_policy
5198
+
5199
+ options.apply_defaults timeout: @config.timeout,
5200
+ metadata: @config.metadata,
5201
+ retry_policy: @config.retry_policy
5202
+
5203
+ @contact_center_insights_stub.delete_qa_scorecard request, options do |result, operation|
5204
+ yield result, operation if block_given?
5205
+ return result
5206
+ end
5207
+ rescue ::Gapic::Rest::Error => e
5208
+ raise ::Google::Cloud::Error.from_error(e)
5209
+ end
5210
+
5211
+ ##
5212
+ # Lists QaScorecards.
5213
+ #
5214
+ # @overload list_qa_scorecards(request, options = nil)
5215
+ # Pass arguments to `list_qa_scorecards` via a request object, either of type
5216
+ # {::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardsRequest} or an equivalent Hash.
5217
+ #
5218
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardsRequest, ::Hash]
5219
+ # A request object representing the call parameters. Required. To specify no
5220
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5221
+ # @param options [::Gapic::CallOptions, ::Hash]
5222
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5223
+ #
5224
+ # @overload list_qa_scorecards(parent: nil, page_size: nil, page_token: nil)
5225
+ # Pass arguments to `list_qa_scorecards` via keyword arguments. Note that at
5226
+ # least one keyword argument is required. To specify no parameters, or to keep all
5227
+ # the default parameter values, pass an empty Hash as a request object (see above).
5228
+ #
5229
+ # @param parent [::String]
5230
+ # Required. The parent resource of the scorecards.
5231
+ # @param page_size [::Integer]
5232
+ # Optional. The maximum number of scorecards to return in the response. If
5233
+ # the value is zero, the service will select a default size. A call might
5234
+ # return fewer objects than requested. A non-empty `next_page_token` in the
5235
+ # response indicates that more data is available.
5236
+ # @param page_token [::String]
5237
+ # Optional. The value returned by the last `ListQaScorecardsResponse`. This
5238
+ # value indicates that this is a continuation of a prior `ListQaScorecards`
5239
+ # call and that the system should return the next page of data.
5240
+ # @yield [result, operation] Access the result along with the TransportOperation object
5241
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecard>]
5242
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5243
+ #
5244
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecard>]
5245
+ #
5246
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5247
+ #
5248
+ # @example Basic example
5249
+ # require "google/cloud/contact_center_insights/v1"
5250
+ #
5251
+ # # Create a client object. The client can be reused for multiple calls.
5252
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5253
+ #
5254
+ # # Create a request. To set request fields, pass in keyword arguments.
5255
+ # request = Google::Cloud::ContactCenterInsights::V1::ListQaScorecardsRequest.new
5256
+ #
5257
+ # # Call the list_qa_scorecards method.
5258
+ # result = client.list_qa_scorecards request
5259
+ #
5260
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
5261
+ # # over elements, and API calls will be issued to fetch pages as needed.
5262
+ # result.each do |item|
5263
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::QaScorecard.
5264
+ # p item
5265
+ # end
5266
+ #
5267
+ def list_qa_scorecards request, options = nil
5268
+ raise ::ArgumentError, "request must be provided" if request.nil?
5269
+
5270
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardsRequest
5271
+
5272
+ # Converts hash and nil to an options object
5273
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5274
+
5275
+ # Customize the options with defaults
5276
+ call_metadata = @config.rpcs.list_qa_scorecards.metadata.to_h
5277
+
5278
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5279
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5280
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5281
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5282
+ transports_version_send: [:rest]
5283
+
5284
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5285
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5286
+
5287
+ options.apply_defaults timeout: @config.rpcs.list_qa_scorecards.timeout,
5288
+ metadata: call_metadata,
5289
+ retry_policy: @config.rpcs.list_qa_scorecards.retry_policy
5290
+
5291
+ options.apply_defaults timeout: @config.timeout,
5292
+ metadata: @config.metadata,
5293
+ retry_policy: @config.retry_policy
5294
+
5295
+ @contact_center_insights_stub.list_qa_scorecards request, options do |result, operation|
5296
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_qa_scorecards, "qa_scorecards", request, result, options
5297
+ yield result, operation if block_given?
5298
+ return result
5299
+ end
5300
+ rescue ::Gapic::Rest::Error => e
5301
+ raise ::Google::Cloud::Error.from_error(e)
5302
+ end
5303
+
5304
+ ##
5305
+ # Creates a QaScorecardRevision.
5306
+ #
5307
+ # @overload create_qa_scorecard_revision(request, options = nil)
5308
+ # Pass arguments to `create_qa_scorecard_revision` via a request object, either of type
5309
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRevisionRequest} or an equivalent Hash.
5310
+ #
5311
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRevisionRequest, ::Hash]
5312
+ # A request object representing the call parameters. Required. To specify no
5313
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5314
+ # @param options [::Gapic::CallOptions, ::Hash]
5315
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5316
+ #
5317
+ # @overload create_qa_scorecard_revision(parent: nil, qa_scorecard_revision: nil, qa_scorecard_revision_id: nil)
5318
+ # Pass arguments to `create_qa_scorecard_revision` via keyword arguments. Note that at
5319
+ # least one keyword argument is required. To specify no parameters, or to keep all
5320
+ # the default parameter values, pass an empty Hash as a request object (see above).
5321
+ #
5322
+ # @param parent [::String]
5323
+ # Required. The parent resource of the QaScorecardRevision.
5324
+ # @param qa_scorecard_revision [::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision, ::Hash]
5325
+ # Required. The QaScorecardRevision to create.
5326
+ # @param qa_scorecard_revision_id [::String]
5327
+ # Optional. A unique ID for the new QaScorecardRevision. This ID will become
5328
+ # the final component of the QaScorecardRevision's resource name. If no ID is
5329
+ # specified, a server-generated ID will be used.
5330
+ #
5331
+ # This value should be 4-64 characters and must match the regular
5332
+ # expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`.
5333
+ # @yield [result, operation] Access the result along with the TransportOperation object
5334
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision]
5335
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5336
+ #
5337
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision]
5338
+ #
5339
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5340
+ #
5341
+ # @example Basic example
5342
+ # require "google/cloud/contact_center_insights/v1"
5343
+ #
5344
+ # # Create a client object. The client can be reused for multiple calls.
5345
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5346
+ #
5347
+ # # Create a request. To set request fields, pass in keyword arguments.
5348
+ # request = Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRevisionRequest.new
5349
+ #
5350
+ # # Call the create_qa_scorecard_revision method.
5351
+ # result = client.create_qa_scorecard_revision request
5352
+ #
5353
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision.
5354
+ # p result
5355
+ #
5356
+ def create_qa_scorecard_revision request, options = nil
5357
+ raise ::ArgumentError, "request must be provided" if request.nil?
5358
+
5359
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRevisionRequest
5360
+
5361
+ # Converts hash and nil to an options object
5362
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5363
+
5364
+ # Customize the options with defaults
5365
+ call_metadata = @config.rpcs.create_qa_scorecard_revision.metadata.to_h
5366
+
5367
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5368
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5369
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5370
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5371
+ transports_version_send: [:rest]
5372
+
5373
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5374
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5375
+
5376
+ options.apply_defaults timeout: @config.rpcs.create_qa_scorecard_revision.timeout,
5377
+ metadata: call_metadata,
5378
+ retry_policy: @config.rpcs.create_qa_scorecard_revision.retry_policy
5379
+
5380
+ options.apply_defaults timeout: @config.timeout,
5381
+ metadata: @config.metadata,
5382
+ retry_policy: @config.retry_policy
5383
+
5384
+ @contact_center_insights_stub.create_qa_scorecard_revision request, options do |result, operation|
5385
+ yield result, operation if block_given?
5386
+ return result
5387
+ end
5388
+ rescue ::Gapic::Rest::Error => e
5389
+ raise ::Google::Cloud::Error.from_error(e)
5390
+ end
5391
+
5392
+ ##
5393
+ # Gets a QaScorecardRevision.
5394
+ #
5395
+ # @overload get_qa_scorecard_revision(request, options = nil)
5396
+ # Pass arguments to `get_qa_scorecard_revision` via a request object, either of type
5397
+ # {::Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRevisionRequest} or an equivalent Hash.
5398
+ #
5399
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRevisionRequest, ::Hash]
5400
+ # A request object representing the call parameters. Required. To specify no
5401
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5402
+ # @param options [::Gapic::CallOptions, ::Hash]
5403
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5404
+ #
5405
+ # @overload get_qa_scorecard_revision(name: nil)
5406
+ # Pass arguments to `get_qa_scorecard_revision` via keyword arguments. Note that at
5407
+ # least one keyword argument is required. To specify no parameters, or to keep all
5408
+ # the default parameter values, pass an empty Hash as a request object (see above).
5409
+ #
5410
+ # @param name [::String]
5411
+ # Required. The name of the QaScorecardRevision to get.
5412
+ # @yield [result, operation] Access the result along with the TransportOperation object
5413
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision]
5414
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5415
+ #
5416
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision]
5417
+ #
5418
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5419
+ #
5420
+ # @example Basic example
5421
+ # require "google/cloud/contact_center_insights/v1"
5422
+ #
5423
+ # # Create a client object. The client can be reused for multiple calls.
5424
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5425
+ #
5426
+ # # Create a request. To set request fields, pass in keyword arguments.
5427
+ # request = Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRevisionRequest.new
5428
+ #
5429
+ # # Call the get_qa_scorecard_revision method.
5430
+ # result = client.get_qa_scorecard_revision request
5431
+ #
5432
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision.
5433
+ # p result
5434
+ #
5435
+ def get_qa_scorecard_revision request, options = nil
5436
+ raise ::ArgumentError, "request must be provided" if request.nil?
5437
+
5438
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRevisionRequest
5439
+
5440
+ # Converts hash and nil to an options object
5441
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5442
+
5443
+ # Customize the options with defaults
5444
+ call_metadata = @config.rpcs.get_qa_scorecard_revision.metadata.to_h
5445
+
5446
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5447
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5448
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5449
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5450
+ transports_version_send: [:rest]
5451
+
5452
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5453
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5454
+
5455
+ options.apply_defaults timeout: @config.rpcs.get_qa_scorecard_revision.timeout,
5456
+ metadata: call_metadata,
5457
+ retry_policy: @config.rpcs.get_qa_scorecard_revision.retry_policy
5458
+
5459
+ options.apply_defaults timeout: @config.timeout,
5460
+ metadata: @config.metadata,
5461
+ retry_policy: @config.retry_policy
5462
+
5463
+ @contact_center_insights_stub.get_qa_scorecard_revision request, options do |result, operation|
5464
+ yield result, operation if block_given?
5465
+ return result
5466
+ end
5467
+ rescue ::Gapic::Rest::Error => e
5468
+ raise ::Google::Cloud::Error.from_error(e)
5469
+ end
5470
+
5471
+ ##
5472
+ # Fine tune one or more QaModels.
5473
+ #
5474
+ # @overload tune_qa_scorecard_revision(request, options = nil)
5475
+ # Pass arguments to `tune_qa_scorecard_revision` via a request object, either of type
5476
+ # {::Google::Cloud::ContactCenterInsights::V1::TuneQaScorecardRevisionRequest} or an equivalent Hash.
5477
+ #
5478
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::TuneQaScorecardRevisionRequest, ::Hash]
5479
+ # A request object representing the call parameters. Required. To specify no
5480
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5481
+ # @param options [::Gapic::CallOptions, ::Hash]
5482
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5483
+ #
5484
+ # @overload tune_qa_scorecard_revision(parent: nil, filter: nil, validate_only: nil)
5485
+ # Pass arguments to `tune_qa_scorecard_revision` via keyword arguments. Note that at
5486
+ # least one keyword argument is required. To specify no parameters, or to keep all
5487
+ # the default parameter values, pass an empty Hash as a request object (see above).
5488
+ #
5489
+ # @param parent [::String]
5490
+ # Required. The parent resource for new fine tuning job instance.
5491
+ # @param filter [::String]
5492
+ # Required. Filter for selecting the feedback labels that needs to be
5493
+ # used for training.
5494
+ # This filter can be used to limit the feedback labels used for tuning to a
5495
+ # feedback labels created or updated for a specific time-window etc.
5496
+ # @param validate_only [::Boolean]
5497
+ # Optional. Run in validate only mode, no fine tuning will actually run.
5498
+ # Data quality validations like training data distributions will run.
5499
+ # Even when set to false, the data quality validations will still run but
5500
+ # once the validations complete we will proceed with the fine tune, if
5501
+ # applicable.
5502
+ # @yield [result, operation] Access the result along with the TransportOperation object
5503
+ # @yieldparam result [::Gapic::Operation]
5504
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5505
+ #
5506
+ # @return [::Gapic::Operation]
5507
+ #
5508
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5509
+ #
5510
+ # @example Basic example
5511
+ # require "google/cloud/contact_center_insights/v1"
5512
+ #
5513
+ # # Create a client object. The client can be reused for multiple calls.
5514
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5515
+ #
5516
+ # # Create a request. To set request fields, pass in keyword arguments.
5517
+ # request = Google::Cloud::ContactCenterInsights::V1::TuneQaScorecardRevisionRequest.new
5518
+ #
5519
+ # # Call the tune_qa_scorecard_revision method.
5520
+ # result = client.tune_qa_scorecard_revision request
5521
+ #
5522
+ # # The returned object is of type Gapic::Operation. You can use it to
5523
+ # # check the status of an operation, cancel it, or wait for results.
5524
+ # # Here is how to wait for a response.
5525
+ # result.wait_until_done! timeout: 60
5526
+ # if result.response?
5527
+ # p result.response
5528
+ # else
5529
+ # puts "No response received."
5530
+ # end
5531
+ #
5532
+ def tune_qa_scorecard_revision request, options = nil
5533
+ raise ::ArgumentError, "request must be provided" if request.nil?
5534
+
5535
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::TuneQaScorecardRevisionRequest
5536
+
5537
+ # Converts hash and nil to an options object
5538
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5539
+
5540
+ # Customize the options with defaults
5541
+ call_metadata = @config.rpcs.tune_qa_scorecard_revision.metadata.to_h
5542
+
5543
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5544
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5545
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5546
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5547
+ transports_version_send: [:rest]
5548
+
5549
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5550
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5551
+
5552
+ options.apply_defaults timeout: @config.rpcs.tune_qa_scorecard_revision.timeout,
5553
+ metadata: call_metadata,
5554
+ retry_policy: @config.rpcs.tune_qa_scorecard_revision.retry_policy
5555
+
5556
+ options.apply_defaults timeout: @config.timeout,
5557
+ metadata: @config.metadata,
5558
+ retry_policy: @config.retry_policy
5559
+
5560
+ @contact_center_insights_stub.tune_qa_scorecard_revision request, options do |result, operation|
5561
+ result = ::Gapic::Operation.new result, @operations_client, options: options
5562
+ yield result, operation if block_given?
5563
+ return result
5564
+ end
5565
+ rescue ::Gapic::Rest::Error => e
5566
+ raise ::Google::Cloud::Error.from_error(e)
5567
+ end
5568
+
5569
+ ##
5570
+ # Deploy a QaScorecardRevision.
5571
+ #
5572
+ # @overload deploy_qa_scorecard_revision(request, options = nil)
5573
+ # Pass arguments to `deploy_qa_scorecard_revision` via a request object, either of type
5574
+ # {::Google::Cloud::ContactCenterInsights::V1::DeployQaScorecardRevisionRequest} or an equivalent Hash.
5575
+ #
5576
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeployQaScorecardRevisionRequest, ::Hash]
5577
+ # A request object representing the call parameters. Required. To specify no
5578
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5579
+ # @param options [::Gapic::CallOptions, ::Hash]
5580
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5581
+ #
5582
+ # @overload deploy_qa_scorecard_revision(name: nil)
5583
+ # Pass arguments to `deploy_qa_scorecard_revision` via keyword arguments. Note that at
5584
+ # least one keyword argument is required. To specify no parameters, or to keep all
5585
+ # the default parameter values, pass an empty Hash as a request object (see above).
5586
+ #
5587
+ # @param name [::String]
5588
+ # Required. The name of the QaScorecardRevision to deploy.
5589
+ # @yield [result, operation] Access the result along with the TransportOperation object
5590
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision]
5591
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5592
+ #
5593
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision]
5594
+ #
5595
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5596
+ #
5597
+ # @example Basic example
5598
+ # require "google/cloud/contact_center_insights/v1"
5599
+ #
5600
+ # # Create a client object. The client can be reused for multiple calls.
5601
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5602
+ #
5603
+ # # Create a request. To set request fields, pass in keyword arguments.
5604
+ # request = Google::Cloud::ContactCenterInsights::V1::DeployQaScorecardRevisionRequest.new
5605
+ #
5606
+ # # Call the deploy_qa_scorecard_revision method.
5607
+ # result = client.deploy_qa_scorecard_revision request
5608
+ #
5609
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision.
5610
+ # p result
5611
+ #
5612
+ def deploy_qa_scorecard_revision request, options = nil
5613
+ raise ::ArgumentError, "request must be provided" if request.nil?
5614
+
5615
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeployQaScorecardRevisionRequest
5616
+
5617
+ # Converts hash and nil to an options object
5618
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5619
+
5620
+ # Customize the options with defaults
5621
+ call_metadata = @config.rpcs.deploy_qa_scorecard_revision.metadata.to_h
5622
+
5623
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5624
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5625
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5626
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5627
+ transports_version_send: [:rest]
5628
+
5629
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5630
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5631
+
5632
+ options.apply_defaults timeout: @config.rpcs.deploy_qa_scorecard_revision.timeout,
5633
+ metadata: call_metadata,
5634
+ retry_policy: @config.rpcs.deploy_qa_scorecard_revision.retry_policy
5635
+
5636
+ options.apply_defaults timeout: @config.timeout,
5637
+ metadata: @config.metadata,
5638
+ retry_policy: @config.retry_policy
5639
+
5640
+ @contact_center_insights_stub.deploy_qa_scorecard_revision request, options do |result, operation|
5641
+ yield result, operation if block_given?
5642
+ return result
5643
+ end
5644
+ rescue ::Gapic::Rest::Error => e
5645
+ raise ::Google::Cloud::Error.from_error(e)
5646
+ end
5647
+
5648
+ ##
5649
+ # Undeploy a QaScorecardRevision.
5650
+ #
5651
+ # @overload undeploy_qa_scorecard_revision(request, options = nil)
5652
+ # Pass arguments to `undeploy_qa_scorecard_revision` via a request object, either of type
5653
+ # {::Google::Cloud::ContactCenterInsights::V1::UndeployQaScorecardRevisionRequest} or an equivalent Hash.
5654
+ #
5655
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UndeployQaScorecardRevisionRequest, ::Hash]
5656
+ # A request object representing the call parameters. Required. To specify no
5657
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5658
+ # @param options [::Gapic::CallOptions, ::Hash]
5659
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5660
+ #
5661
+ # @overload undeploy_qa_scorecard_revision(name: nil)
5662
+ # Pass arguments to `undeploy_qa_scorecard_revision` via keyword arguments. Note that at
5663
+ # least one keyword argument is required. To specify no parameters, or to keep all
5664
+ # the default parameter values, pass an empty Hash as a request object (see above).
5665
+ #
5666
+ # @param name [::String]
5667
+ # Required. The name of the QaScorecardRevision to undeploy.
5668
+ # @yield [result, operation] Access the result along with the TransportOperation object
5669
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision]
5670
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5671
+ #
5672
+ # @return [::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision]
5673
+ #
5674
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5675
+ #
5676
+ # @example Basic example
5677
+ # require "google/cloud/contact_center_insights/v1"
5678
+ #
5679
+ # # Create a client object. The client can be reused for multiple calls.
5680
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5681
+ #
5682
+ # # Create a request. To set request fields, pass in keyword arguments.
5683
+ # request = Google::Cloud::ContactCenterInsights::V1::UndeployQaScorecardRevisionRequest.new
5684
+ #
5685
+ # # Call the undeploy_qa_scorecard_revision method.
5686
+ # result = client.undeploy_qa_scorecard_revision request
5687
+ #
5688
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision.
5689
+ # p result
5690
+ #
5691
+ def undeploy_qa_scorecard_revision request, options = nil
5692
+ raise ::ArgumentError, "request must be provided" if request.nil?
5693
+
5694
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UndeployQaScorecardRevisionRequest
5695
+
5696
+ # Converts hash and nil to an options object
5697
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5698
+
5699
+ # Customize the options with defaults
5700
+ call_metadata = @config.rpcs.undeploy_qa_scorecard_revision.metadata.to_h
5701
+
5702
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5703
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5704
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5705
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5706
+ transports_version_send: [:rest]
5707
+
5708
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5709
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5710
+
5711
+ options.apply_defaults timeout: @config.rpcs.undeploy_qa_scorecard_revision.timeout,
5712
+ metadata: call_metadata,
5713
+ retry_policy: @config.rpcs.undeploy_qa_scorecard_revision.retry_policy
5714
+
5715
+ options.apply_defaults timeout: @config.timeout,
5716
+ metadata: @config.metadata,
5717
+ retry_policy: @config.retry_policy
5718
+
5719
+ @contact_center_insights_stub.undeploy_qa_scorecard_revision request, options do |result, operation|
5720
+ yield result, operation if block_given?
5721
+ return result
5722
+ end
5723
+ rescue ::Gapic::Rest::Error => e
5724
+ raise ::Google::Cloud::Error.from_error(e)
5725
+ end
5726
+
5727
+ ##
5728
+ # Deletes a QaScorecardRevision.
5729
+ #
5730
+ # @overload delete_qa_scorecard_revision(request, options = nil)
5731
+ # Pass arguments to `delete_qa_scorecard_revision` via a request object, either of type
5732
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRevisionRequest} or an equivalent Hash.
5733
+ #
5734
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRevisionRequest, ::Hash]
5735
+ # A request object representing the call parameters. Required. To specify no
5736
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5737
+ # @param options [::Gapic::CallOptions, ::Hash]
5738
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5739
+ #
5740
+ # @overload delete_qa_scorecard_revision(name: nil, force: nil)
5741
+ # Pass arguments to `delete_qa_scorecard_revision` via keyword arguments. Note that at
5742
+ # least one keyword argument is required. To specify no parameters, or to keep all
5743
+ # the default parameter values, pass an empty Hash as a request object (see above).
5744
+ #
5745
+ # @param name [::String]
5746
+ # Required. The name of the QaScorecardRevision to delete.
5747
+ # @param force [::Boolean]
5748
+ # Optional. If set to true, all of this QaScorecardRevision's child resources
5749
+ # will also be deleted. Otherwise, the request will only succeed if it has
5750
+ # none.
5751
+ # @yield [result, operation] Access the result along with the TransportOperation object
5752
+ # @yieldparam result [::Google::Protobuf::Empty]
5753
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5754
+ #
5755
+ # @return [::Google::Protobuf::Empty]
5756
+ #
5757
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5758
+ #
5759
+ # @example Basic example
5760
+ # require "google/cloud/contact_center_insights/v1"
5761
+ #
5762
+ # # Create a client object. The client can be reused for multiple calls.
5763
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5764
+ #
5765
+ # # Create a request. To set request fields, pass in keyword arguments.
5766
+ # request = Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRevisionRequest.new
5767
+ #
5768
+ # # Call the delete_qa_scorecard_revision method.
5769
+ # result = client.delete_qa_scorecard_revision request
5770
+ #
5771
+ # # The returned object is of type Google::Protobuf::Empty.
5772
+ # p result
5773
+ #
5774
+ def delete_qa_scorecard_revision request, options = nil
5775
+ raise ::ArgumentError, "request must be provided" if request.nil?
5776
+
5777
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRevisionRequest
5778
+
5779
+ # Converts hash and nil to an options object
5780
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5781
+
5782
+ # Customize the options with defaults
5783
+ call_metadata = @config.rpcs.delete_qa_scorecard_revision.metadata.to_h
5784
+
5785
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5786
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5787
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5788
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5789
+ transports_version_send: [:rest]
5790
+
5791
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5792
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5793
+
5794
+ options.apply_defaults timeout: @config.rpcs.delete_qa_scorecard_revision.timeout,
5795
+ metadata: call_metadata,
5796
+ retry_policy: @config.rpcs.delete_qa_scorecard_revision.retry_policy
5797
+
5798
+ options.apply_defaults timeout: @config.timeout,
5799
+ metadata: @config.metadata,
5800
+ retry_policy: @config.retry_policy
5801
+
5802
+ @contact_center_insights_stub.delete_qa_scorecard_revision request, options do |result, operation|
5803
+ yield result, operation if block_given?
5804
+ return result
5805
+ end
5806
+ rescue ::Gapic::Rest::Error => e
5807
+ raise ::Google::Cloud::Error.from_error(e)
5808
+ end
5809
+
5810
+ ##
5811
+ # Lists all revisions under the parent QaScorecard.
5812
+ #
5813
+ # @overload list_qa_scorecard_revisions(request, options = nil)
5814
+ # Pass arguments to `list_qa_scorecard_revisions` via a request object, either of type
5815
+ # {::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardRevisionsRequest} or an equivalent Hash.
5816
+ #
5817
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardRevisionsRequest, ::Hash]
5818
+ # A request object representing the call parameters. Required. To specify no
5819
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5820
+ # @param options [::Gapic::CallOptions, ::Hash]
5821
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5822
+ #
5823
+ # @overload list_qa_scorecard_revisions(parent: nil, page_size: nil, page_token: nil, filter: nil)
5824
+ # Pass arguments to `list_qa_scorecard_revisions` via keyword arguments. Note that at
5825
+ # least one keyword argument is required. To specify no parameters, or to keep all
5826
+ # the default parameter values, pass an empty Hash as a request object (see above).
5827
+ #
5828
+ # @param parent [::String]
5829
+ # Required. The parent resource of the scorecard revisions. To list all
5830
+ # revisions of all scorecards, substitute the QaScorecard ID with a '-'
5831
+ # character.
5832
+ # @param page_size [::Integer]
5833
+ # Optional. The maximum number of scorecard revisions to return in the
5834
+ # response. If the value is zero, the service will select a default size. A
5835
+ # call might return fewer objects than requested. A non-empty
5836
+ # `next_page_token` in the response indicates that more data is available.
5837
+ # @param page_token [::String]
5838
+ # Optional. The value returned by the last
5839
+ # `ListQaScorecardRevisionsResponse`. This value indicates that this is a
5840
+ # continuation of a prior `ListQaScorecardRevisions` call and that the system
5841
+ # should return the next page of data.
5842
+ # @param filter [::String]
5843
+ # Optional. A filter to reduce results to a specific subset. Useful for
5844
+ # querying scorecard revisions with specific properties.
5845
+ # @yield [result, operation] Access the result along with the TransportOperation object
5846
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision>]
5847
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5848
+ #
5849
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision>]
5850
+ #
5851
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5852
+ #
5853
+ # @example Basic example
5854
+ # require "google/cloud/contact_center_insights/v1"
5855
+ #
5856
+ # # Create a client object. The client can be reused for multiple calls.
5857
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5858
+ #
5859
+ # # Create a request. To set request fields, pass in keyword arguments.
5860
+ # request = Google::Cloud::ContactCenterInsights::V1::ListQaScorecardRevisionsRequest.new
5861
+ #
5862
+ # # Call the list_qa_scorecard_revisions method.
5863
+ # result = client.list_qa_scorecard_revisions request
5864
+ #
5865
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
5866
+ # # over elements, and API calls will be issued to fetch pages as needed.
5867
+ # result.each do |item|
5868
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision.
5869
+ # p item
5870
+ # end
5871
+ #
5872
+ def list_qa_scorecard_revisions request, options = nil
5873
+ raise ::ArgumentError, "request must be provided" if request.nil?
5874
+
5875
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardRevisionsRequest
5876
+
5877
+ # Converts hash and nil to an options object
5878
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5879
+
5880
+ # Customize the options with defaults
5881
+ call_metadata = @config.rpcs.list_qa_scorecard_revisions.metadata.to_h
5882
+
5883
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5884
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5885
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5886
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5887
+ transports_version_send: [:rest]
5888
+
5889
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5890
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5891
+
5892
+ options.apply_defaults timeout: @config.rpcs.list_qa_scorecard_revisions.timeout,
5893
+ metadata: call_metadata,
5894
+ retry_policy: @config.rpcs.list_qa_scorecard_revisions.retry_policy
5895
+
5896
+ options.apply_defaults timeout: @config.timeout,
5897
+ metadata: @config.metadata,
5898
+ retry_policy: @config.retry_policy
5899
+
5900
+ @contact_center_insights_stub.list_qa_scorecard_revisions request, options do |result, operation|
5901
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_qa_scorecard_revisions, "qa_scorecard_revisions", request, result, options
5902
+ yield result, operation if block_given?
5903
+ return result
5904
+ end
5905
+ rescue ::Gapic::Rest::Error => e
5906
+ raise ::Google::Cloud::Error.from_error(e)
5907
+ end
5908
+
5909
+ ##
5910
+ # Create feedback label.
5911
+ #
5912
+ # @overload create_feedback_label(request, options = nil)
5913
+ # Pass arguments to `create_feedback_label` via a request object, either of type
5914
+ # {::Google::Cloud::ContactCenterInsights::V1::CreateFeedbackLabelRequest} or an equivalent Hash.
5915
+ #
5916
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateFeedbackLabelRequest, ::Hash]
5917
+ # A request object representing the call parameters. Required. To specify no
5918
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5919
+ # @param options [::Gapic::CallOptions, ::Hash]
5920
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5921
+ #
5922
+ # @overload create_feedback_label(parent: nil, feedback_label_id: nil, feedback_label: nil)
5923
+ # Pass arguments to `create_feedback_label` via keyword arguments. Note that at
5924
+ # least one keyword argument is required. To specify no parameters, or to keep all
5925
+ # the default parameter values, pass an empty Hash as a request object (see above).
5926
+ #
5927
+ # @param parent [::String]
5928
+ # Required. The parent resource of the feedback label.
5929
+ # @param feedback_label_id [::String]
5930
+ # Optional. The ID of the feedback label to create.
5931
+ # If one is not specified it will be generated by the server.
5932
+ # @param feedback_label [::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel, ::Hash]
5933
+ # Required. The feedback label to create.
5934
+ # @yield [result, operation] Access the result along with the TransportOperation object
5935
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel]
5936
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5937
+ #
5938
+ # @return [::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel]
5939
+ #
5940
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5941
+ #
5942
+ # @example Basic example
5943
+ # require "google/cloud/contact_center_insights/v1"
5944
+ #
5945
+ # # Create a client object. The client can be reused for multiple calls.
5946
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
5947
+ #
5948
+ # # Create a request. To set request fields, pass in keyword arguments.
5949
+ # request = Google::Cloud::ContactCenterInsights::V1::CreateFeedbackLabelRequest.new
5950
+ #
5951
+ # # Call the create_feedback_label method.
5952
+ # result = client.create_feedback_label request
5953
+ #
5954
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::FeedbackLabel.
5955
+ # p result
5956
+ #
5957
+ def create_feedback_label request, options = nil
5958
+ raise ::ArgumentError, "request must be provided" if request.nil?
5959
+
5960
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateFeedbackLabelRequest
5961
+
5962
+ # Converts hash and nil to an options object
5963
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5964
+
5965
+ # Customize the options with defaults
5966
+ call_metadata = @config.rpcs.create_feedback_label.metadata.to_h
5967
+
5968
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5969
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5970
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5971
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
5972
+ transports_version_send: [:rest]
5973
+
5974
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5975
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5976
+
5977
+ options.apply_defaults timeout: @config.rpcs.create_feedback_label.timeout,
5978
+ metadata: call_metadata,
5979
+ retry_policy: @config.rpcs.create_feedback_label.retry_policy
5980
+
5981
+ options.apply_defaults timeout: @config.timeout,
5982
+ metadata: @config.metadata,
5983
+ retry_policy: @config.retry_policy
5984
+
5985
+ @contact_center_insights_stub.create_feedback_label request, options do |result, operation|
5986
+ yield result, operation if block_given?
5987
+ return result
5988
+ end
5989
+ rescue ::Gapic::Rest::Error => e
5990
+ raise ::Google::Cloud::Error.from_error(e)
5991
+ end
5992
+
5993
+ ##
5994
+ # List feedback labels.
5995
+ #
5996
+ # @overload list_feedback_labels(request, options = nil)
5997
+ # Pass arguments to `list_feedback_labels` via a request object, either of type
5998
+ # {::Google::Cloud::ContactCenterInsights::V1::ListFeedbackLabelsRequest} or an equivalent Hash.
5999
+ #
6000
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListFeedbackLabelsRequest, ::Hash]
6001
+ # A request object representing the call parameters. Required. To specify no
6002
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6003
+ # @param options [::Gapic::CallOptions, ::Hash]
6004
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6005
+ #
6006
+ # @overload list_feedback_labels(parent: nil, filter: nil, page_size: nil, page_token: nil)
6007
+ # Pass arguments to `list_feedback_labels` via keyword arguments. Note that at
6008
+ # least one keyword argument is required. To specify no parameters, or to keep all
6009
+ # the default parameter values, pass an empty Hash as a request object (see above).
6010
+ #
6011
+ # @param parent [::String]
6012
+ # Required. The parent resource of the feedback labels.
6013
+ # @param filter [::String]
6014
+ # Optional. A filter to reduce results to a specific subset. Supports
6015
+ # disjunctions (OR) and conjunctions (AND). Automatically sorts by
6016
+ # conversation ID. To sort by all feedback labels in a project see
6017
+ # ListAllFeedbackLabels.
6018
+ #
6019
+ # Supported fields:
6020
+ #
6021
+ # * `issue_model_id`
6022
+ # * `qa_question_id`
6023
+ # * `qa_scorecard_id`
6024
+ # * `min_create_time`
6025
+ # * `max_create_time`
6026
+ # * `min_update_time`
6027
+ # * `max_update_time`
6028
+ # * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING
6029
+ # @param page_size [::Integer]
6030
+ # Optional. The maximum number of feedback labels to return in the response.
6031
+ # A valid page size ranges from 0 to 100,000 inclusive. If the page size is
6032
+ # zero or unspecified, a default page size of 100 will be chosen. Note that a
6033
+ # call might return fewer results than the requested page size.
6034
+ # @param page_token [::String]
6035
+ # Optional. The value returned by the last `ListFeedbackLabelsResponse`. This
6036
+ # value indicates that this is a continuation of a prior `ListFeedbackLabels`
6037
+ # call and that the system should return the next page of data.
6038
+ # @yield [result, operation] Access the result along with the TransportOperation object
6039
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>]
6040
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6041
+ #
6042
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>]
6043
+ #
6044
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6045
+ #
6046
+ # @example Basic example
6047
+ # require "google/cloud/contact_center_insights/v1"
6048
+ #
6049
+ # # Create a client object. The client can be reused for multiple calls.
6050
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
6051
+ #
6052
+ # # Create a request. To set request fields, pass in keyword arguments.
6053
+ # request = Google::Cloud::ContactCenterInsights::V1::ListFeedbackLabelsRequest.new
6054
+ #
6055
+ # # Call the list_feedback_labels method.
6056
+ # result = client.list_feedback_labels request
6057
+ #
6058
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
6059
+ # # over elements, and API calls will be issued to fetch pages as needed.
6060
+ # result.each do |item|
6061
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel.
6062
+ # p item
6063
+ # end
6064
+ #
6065
+ def list_feedback_labels request, options = nil
6066
+ raise ::ArgumentError, "request must be provided" if request.nil?
6067
+
6068
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListFeedbackLabelsRequest
6069
+
6070
+ # Converts hash and nil to an options object
6071
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6072
+
6073
+ # Customize the options with defaults
6074
+ call_metadata = @config.rpcs.list_feedback_labels.metadata.to_h
6075
+
6076
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6077
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6078
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6079
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
6080
+ transports_version_send: [:rest]
6081
+
6082
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6083
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6084
+
6085
+ options.apply_defaults timeout: @config.rpcs.list_feedback_labels.timeout,
6086
+ metadata: call_metadata,
6087
+ retry_policy: @config.rpcs.list_feedback_labels.retry_policy
6088
+
6089
+ options.apply_defaults timeout: @config.timeout,
6090
+ metadata: @config.metadata,
6091
+ retry_policy: @config.retry_policy
6092
+
6093
+ @contact_center_insights_stub.list_feedback_labels request, options do |result, operation|
6094
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_feedback_labels, "feedback_labels", request, result, options
6095
+ yield result, operation if block_given?
6096
+ return result
6097
+ end
6098
+ rescue ::Gapic::Rest::Error => e
6099
+ raise ::Google::Cloud::Error.from_error(e)
6100
+ end
6101
+
6102
+ ##
6103
+ # Get feedback label.
6104
+ #
6105
+ # @overload get_feedback_label(request, options = nil)
6106
+ # Pass arguments to `get_feedback_label` via a request object, either of type
6107
+ # {::Google::Cloud::ContactCenterInsights::V1::GetFeedbackLabelRequest} or an equivalent Hash.
6108
+ #
6109
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::GetFeedbackLabelRequest, ::Hash]
6110
+ # A request object representing the call parameters. Required. To specify no
6111
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6112
+ # @param options [::Gapic::CallOptions, ::Hash]
6113
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6114
+ #
6115
+ # @overload get_feedback_label(name: nil)
6116
+ # Pass arguments to `get_feedback_label` via keyword arguments. Note that at
6117
+ # least one keyword argument is required. To specify no parameters, or to keep all
6118
+ # the default parameter values, pass an empty Hash as a request object (see above).
6119
+ #
6120
+ # @param name [::String]
6121
+ # Required. The name of the feedback label to get.
6122
+ # @yield [result, operation] Access the result along with the TransportOperation object
6123
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel]
6124
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6125
+ #
6126
+ # @return [::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel]
6127
+ #
6128
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6129
+ #
6130
+ # @example Basic example
6131
+ # require "google/cloud/contact_center_insights/v1"
6132
+ #
6133
+ # # Create a client object. The client can be reused for multiple calls.
6134
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
6135
+ #
6136
+ # # Create a request. To set request fields, pass in keyword arguments.
6137
+ # request = Google::Cloud::ContactCenterInsights::V1::GetFeedbackLabelRequest.new
6138
+ #
6139
+ # # Call the get_feedback_label method.
6140
+ # result = client.get_feedback_label request
6141
+ #
6142
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::FeedbackLabel.
6143
+ # p result
6144
+ #
6145
+ def get_feedback_label request, options = nil
6146
+ raise ::ArgumentError, "request must be provided" if request.nil?
6147
+
6148
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetFeedbackLabelRequest
6149
+
6150
+ # Converts hash and nil to an options object
6151
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6152
+
6153
+ # Customize the options with defaults
6154
+ call_metadata = @config.rpcs.get_feedback_label.metadata.to_h
6155
+
6156
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6157
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6158
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6159
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
6160
+ transports_version_send: [:rest]
6161
+
6162
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6163
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6164
+
6165
+ options.apply_defaults timeout: @config.rpcs.get_feedback_label.timeout,
6166
+ metadata: call_metadata,
6167
+ retry_policy: @config.rpcs.get_feedback_label.retry_policy
6168
+
6169
+ options.apply_defaults timeout: @config.timeout,
6170
+ metadata: @config.metadata,
6171
+ retry_policy: @config.retry_policy
6172
+
6173
+ @contact_center_insights_stub.get_feedback_label request, options do |result, operation|
6174
+ yield result, operation if block_given?
6175
+ return result
6176
+ end
6177
+ rescue ::Gapic::Rest::Error => e
6178
+ raise ::Google::Cloud::Error.from_error(e)
6179
+ end
6180
+
6181
+ ##
6182
+ # Update feedback label.
6183
+ #
6184
+ # @overload update_feedback_label(request, options = nil)
6185
+ # Pass arguments to `update_feedback_label` via a request object, either of type
6186
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdateFeedbackLabelRequest} or an equivalent Hash.
6187
+ #
6188
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateFeedbackLabelRequest, ::Hash]
6189
+ # A request object representing the call parameters. Required. To specify no
6190
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6191
+ # @param options [::Gapic::CallOptions, ::Hash]
6192
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6193
+ #
6194
+ # @overload update_feedback_label(feedback_label: nil, update_mask: nil)
6195
+ # Pass arguments to `update_feedback_label` via keyword arguments. Note that at
6196
+ # least one keyword argument is required. To specify no parameters, or to keep all
6197
+ # the default parameter values, pass an empty Hash as a request object (see above).
6198
+ #
6199
+ # @param feedback_label [::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel, ::Hash]
6200
+ # Required. The feedback label to update.
6201
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
6202
+ # Required. The list of fields to be updated.
6203
+ # @yield [result, operation] Access the result along with the TransportOperation object
6204
+ # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel]
6205
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6206
+ #
6207
+ # @return [::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel]
6208
+ #
6209
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6210
+ #
6211
+ # @example Basic example
6212
+ # require "google/cloud/contact_center_insights/v1"
6213
+ #
6214
+ # # Create a client object. The client can be reused for multiple calls.
6215
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
6216
+ #
6217
+ # # Create a request. To set request fields, pass in keyword arguments.
6218
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdateFeedbackLabelRequest.new
6219
+ #
6220
+ # # Call the update_feedback_label method.
6221
+ # result = client.update_feedback_label request
6222
+ #
6223
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::FeedbackLabel.
6224
+ # p result
6225
+ #
6226
+ def update_feedback_label request, options = nil
6227
+ raise ::ArgumentError, "request must be provided" if request.nil?
6228
+
6229
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateFeedbackLabelRequest
6230
+
6231
+ # Converts hash and nil to an options object
6232
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6233
+
6234
+ # Customize the options with defaults
6235
+ call_metadata = @config.rpcs.update_feedback_label.metadata.to_h
6236
+
6237
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6238
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6239
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6240
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
6241
+ transports_version_send: [:rest]
6242
+
6243
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6244
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6245
+
6246
+ options.apply_defaults timeout: @config.rpcs.update_feedback_label.timeout,
6247
+ metadata: call_metadata,
6248
+ retry_policy: @config.rpcs.update_feedback_label.retry_policy
6249
+
6250
+ options.apply_defaults timeout: @config.timeout,
6251
+ metadata: @config.metadata,
6252
+ retry_policy: @config.retry_policy
6253
+
6254
+ @contact_center_insights_stub.update_feedback_label request, options do |result, operation|
6255
+ yield result, operation if block_given?
6256
+ return result
6257
+ end
6258
+ rescue ::Gapic::Rest::Error => e
6259
+ raise ::Google::Cloud::Error.from_error(e)
6260
+ end
6261
+
6262
+ ##
6263
+ # Delete feedback label.
6264
+ #
6265
+ # @overload delete_feedback_label(request, options = nil)
6266
+ # Pass arguments to `delete_feedback_label` via a request object, either of type
6267
+ # {::Google::Cloud::ContactCenterInsights::V1::DeleteFeedbackLabelRequest} or an equivalent Hash.
6268
+ #
6269
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteFeedbackLabelRequest, ::Hash]
6270
+ # A request object representing the call parameters. Required. To specify no
6271
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6272
+ # @param options [::Gapic::CallOptions, ::Hash]
6273
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6274
+ #
6275
+ # @overload delete_feedback_label(name: nil)
6276
+ # Pass arguments to `delete_feedback_label` via keyword arguments. Note that at
6277
+ # least one keyword argument is required. To specify no parameters, or to keep all
6278
+ # the default parameter values, pass an empty Hash as a request object (see above).
6279
+ #
6280
+ # @param name [::String]
6281
+ # Required. The name of the feedback label to delete.
6282
+ # @yield [result, operation] Access the result along with the TransportOperation object
6283
+ # @yieldparam result [::Google::Protobuf::Empty]
6284
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6285
+ #
6286
+ # @return [::Google::Protobuf::Empty]
6287
+ #
6288
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6289
+ #
6290
+ # @example Basic example
6291
+ # require "google/cloud/contact_center_insights/v1"
6292
+ #
6293
+ # # Create a client object. The client can be reused for multiple calls.
6294
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
6295
+ #
6296
+ # # Create a request. To set request fields, pass in keyword arguments.
6297
+ # request = Google::Cloud::ContactCenterInsights::V1::DeleteFeedbackLabelRequest.new
6298
+ #
6299
+ # # Call the delete_feedback_label method.
6300
+ # result = client.delete_feedback_label request
6301
+ #
6302
+ # # The returned object is of type Google::Protobuf::Empty.
6303
+ # p result
6304
+ #
6305
+ def delete_feedback_label request, options = nil
6306
+ raise ::ArgumentError, "request must be provided" if request.nil?
6307
+
6308
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteFeedbackLabelRequest
6309
+
6310
+ # Converts hash and nil to an options object
6311
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6312
+
6313
+ # Customize the options with defaults
6314
+ call_metadata = @config.rpcs.delete_feedback_label.metadata.to_h
6315
+
6316
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6317
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6318
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6319
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
6320
+ transports_version_send: [:rest]
6321
+
6322
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6323
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6324
+
6325
+ options.apply_defaults timeout: @config.rpcs.delete_feedback_label.timeout,
6326
+ metadata: call_metadata,
6327
+ retry_policy: @config.rpcs.delete_feedback_label.retry_policy
6328
+
6329
+ options.apply_defaults timeout: @config.timeout,
6330
+ metadata: @config.metadata,
6331
+ retry_policy: @config.retry_policy
6332
+
6333
+ @contact_center_insights_stub.delete_feedback_label request, options do |result, operation|
6334
+ yield result, operation if block_given?
6335
+ return result
6336
+ end
6337
+ rescue ::Gapic::Rest::Error => e
6338
+ raise ::Google::Cloud::Error.from_error(e)
6339
+ end
6340
+
6341
+ ##
6342
+ # List all feedback labels by project number.
6343
+ #
6344
+ # @overload list_all_feedback_labels(request, options = nil)
6345
+ # Pass arguments to `list_all_feedback_labels` via a request object, either of type
6346
+ # {::Google::Cloud::ContactCenterInsights::V1::ListAllFeedbackLabelsRequest} or an equivalent Hash.
6347
+ #
6348
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::ListAllFeedbackLabelsRequest, ::Hash]
6349
+ # A request object representing the call parameters. Required. To specify no
6350
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6351
+ # @param options [::Gapic::CallOptions, ::Hash]
6352
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6353
+ #
6354
+ # @overload list_all_feedback_labels(parent: nil, page_size: nil, page_token: nil, filter: nil)
6355
+ # Pass arguments to `list_all_feedback_labels` via keyword arguments. Note that at
6356
+ # least one keyword argument is required. To specify no parameters, or to keep all
6357
+ # the default parameter values, pass an empty Hash as a request object (see above).
6358
+ #
6359
+ # @param parent [::String]
6360
+ # Required. The parent resource of all feedback labels per project.
6361
+ # @param page_size [::Integer]
6362
+ # Optional. The maximum number of feedback labels to return in the response.
6363
+ # A valid page size ranges from 0 to 100,000 inclusive. If the page size is
6364
+ # zero or unspecified, a default page size of 100 will be chosen. Note that a
6365
+ # call might return fewer results than the requested page size.
6366
+ # @param page_token [::String]
6367
+ # Optional. The value returned by the last `ListAllFeedbackLabelsResponse`.
6368
+ # This value indicates that this is a continuation of a prior
6369
+ # `ListAllFeedbackLabels` call and that the system should return the next
6370
+ # page of data.
6371
+ # @param filter [::String]
6372
+ # Optional. A filter to reduce results to a specific subset in the entire
6373
+ # project. Supports disjunctions (OR) and conjunctions (AND).
6374
+ #
6375
+ # Supported fields:
6376
+ #
6377
+ # * `issue_model_id`
6378
+ # * `qa_question_id`
6379
+ # * `min_create_time`
6380
+ # * `max_create_time`
6381
+ # * `min_update_time`
6382
+ # * `max_update_time`
6383
+ # * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING
6384
+ # @yield [result, operation] Access the result along with the TransportOperation object
6385
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>]
6386
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6387
+ #
6388
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>]
6389
+ #
6390
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6391
+ #
6392
+ # @example Basic example
6393
+ # require "google/cloud/contact_center_insights/v1"
6394
+ #
6395
+ # # Create a client object. The client can be reused for multiple calls.
6396
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
6397
+ #
6398
+ # # Create a request. To set request fields, pass in keyword arguments.
6399
+ # request = Google::Cloud::ContactCenterInsights::V1::ListAllFeedbackLabelsRequest.new
6400
+ #
6401
+ # # Call the list_all_feedback_labels method.
6402
+ # result = client.list_all_feedback_labels request
6403
+ #
6404
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
6405
+ # # over elements, and API calls will be issued to fetch pages as needed.
6406
+ # result.each do |item|
6407
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel.
6408
+ # p item
6409
+ # end
6410
+ #
6411
+ def list_all_feedback_labels request, options = nil
6412
+ raise ::ArgumentError, "request must be provided" if request.nil?
6413
+
6414
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAllFeedbackLabelsRequest
6415
+
6416
+ # Converts hash and nil to an options object
6417
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6418
+
6419
+ # Customize the options with defaults
6420
+ call_metadata = @config.rpcs.list_all_feedback_labels.metadata.to_h
6421
+
6422
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6423
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6424
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6425
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
6426
+ transports_version_send: [:rest]
6427
+
6428
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6429
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6430
+
6431
+ options.apply_defaults timeout: @config.rpcs.list_all_feedback_labels.timeout,
3889
6432
  metadata: call_metadata,
3890
- retry_policy: @config.rpcs.delete_view.retry_policy
6433
+ retry_policy: @config.rpcs.list_all_feedback_labels.retry_policy
3891
6434
 
3892
6435
  options.apply_defaults timeout: @config.timeout,
3893
6436
  metadata: @config.metadata,
3894
6437
  retry_policy: @config.retry_policy
3895
6438
 
3896
- @contact_center_insights_stub.delete_view request, options do |result, operation|
6439
+ @contact_center_insights_stub.list_all_feedback_labels request, options do |result, operation|
6440
+ result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_all_feedback_labels, "feedback_labels", request, result, options
6441
+ yield result, operation if block_given?
6442
+ return result
6443
+ end
6444
+ rescue ::Gapic::Rest::Error => e
6445
+ raise ::Google::Cloud::Error.from_error(e)
6446
+ end
6447
+
6448
+ ##
6449
+ # Upload feedback labels in bulk.
6450
+ #
6451
+ # @overload bulk_upload_feedback_labels(request, options = nil)
6452
+ # Pass arguments to `bulk_upload_feedback_labels` via a request object, either of type
6453
+ # {::Google::Cloud::ContactCenterInsights::V1::BulkUploadFeedbackLabelsRequest} or an equivalent Hash.
6454
+ #
6455
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::BulkUploadFeedbackLabelsRequest, ::Hash]
6456
+ # A request object representing the call parameters. Required. To specify no
6457
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6458
+ # @param options [::Gapic::CallOptions, ::Hash]
6459
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6460
+ #
6461
+ # @overload bulk_upload_feedback_labels(gcs_source: nil, parent: nil, validate_only: nil)
6462
+ # Pass arguments to `bulk_upload_feedback_labels` via keyword arguments. Note that at
6463
+ # least one keyword argument is required. To specify no parameters, or to keep all
6464
+ # the default parameter values, pass an empty Hash as a request object (see above).
6465
+ #
6466
+ # @param gcs_source [::Google::Cloud::ContactCenterInsights::V1::BulkUploadFeedbackLabelsRequest::GcsSource, ::Hash]
6467
+ # A cloud storage bucket source.
6468
+ # @param parent [::String]
6469
+ # Required. The parent resource for new feedback labels.
6470
+ # @param validate_only [::Boolean]
6471
+ # Optional. If set, upload will not happen and the labels will be validated.
6472
+ # If not set, then default behavior will be to upload the labels after
6473
+ # validation is complete.
6474
+ # @yield [result, operation] Access the result along with the TransportOperation object
6475
+ # @yieldparam result [::Gapic::Operation]
6476
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6477
+ #
6478
+ # @return [::Gapic::Operation]
6479
+ #
6480
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6481
+ #
6482
+ # @example Basic example
6483
+ # require "google/cloud/contact_center_insights/v1"
6484
+ #
6485
+ # # Create a client object. The client can be reused for multiple calls.
6486
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
6487
+ #
6488
+ # # Create a request. To set request fields, pass in keyword arguments.
6489
+ # request = Google::Cloud::ContactCenterInsights::V1::BulkUploadFeedbackLabelsRequest.new
6490
+ #
6491
+ # # Call the bulk_upload_feedback_labels method.
6492
+ # result = client.bulk_upload_feedback_labels request
6493
+ #
6494
+ # # The returned object is of type Gapic::Operation. You can use it to
6495
+ # # check the status of an operation, cancel it, or wait for results.
6496
+ # # Here is how to wait for a response.
6497
+ # result.wait_until_done! timeout: 60
6498
+ # if result.response?
6499
+ # p result.response
6500
+ # else
6501
+ # puts "No response received."
6502
+ # end
6503
+ #
6504
+ def bulk_upload_feedback_labels request, options = nil
6505
+ raise ::ArgumentError, "request must be provided" if request.nil?
6506
+
6507
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkUploadFeedbackLabelsRequest
6508
+
6509
+ # Converts hash and nil to an options object
6510
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6511
+
6512
+ # Customize the options with defaults
6513
+ call_metadata = @config.rpcs.bulk_upload_feedback_labels.metadata.to_h
6514
+
6515
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6516
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6517
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6518
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
6519
+ transports_version_send: [:rest]
6520
+
6521
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6522
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6523
+
6524
+ options.apply_defaults timeout: @config.rpcs.bulk_upload_feedback_labels.timeout,
6525
+ metadata: call_metadata,
6526
+ retry_policy: @config.rpcs.bulk_upload_feedback_labels.retry_policy
6527
+
6528
+ options.apply_defaults timeout: @config.timeout,
6529
+ metadata: @config.metadata,
6530
+ retry_policy: @config.retry_policy
6531
+
6532
+ @contact_center_insights_stub.bulk_upload_feedback_labels request, options do |result, operation|
6533
+ result = ::Gapic::Operation.new result, @operations_client, options: options
6534
+ yield result, operation if block_given?
6535
+ return result
6536
+ end
6537
+ rescue ::Gapic::Rest::Error => e
6538
+ raise ::Google::Cloud::Error.from_error(e)
6539
+ end
6540
+
6541
+ ##
6542
+ # Download feedback labels in bulk.
6543
+ #
6544
+ # @overload bulk_download_feedback_labels(request, options = nil)
6545
+ # Pass arguments to `bulk_download_feedback_labels` via a request object, either of type
6546
+ # {::Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest} or an equivalent Hash.
6547
+ #
6548
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest, ::Hash]
6549
+ # A request object representing the call parameters. Required. To specify no
6550
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6551
+ # @param options [::Gapic::CallOptions, ::Hash]
6552
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6553
+ #
6554
+ # @overload bulk_download_feedback_labels(gcs_destination: nil, parent: nil, filter: nil, max_download_count: nil, feedback_label_type: nil, conversation_filter: nil, template_qa_scorecard_id: nil)
6555
+ # Pass arguments to `bulk_download_feedback_labels` via keyword arguments. Note that at
6556
+ # least one keyword argument is required. To specify no parameters, or to keep all
6557
+ # the default parameter values, pass an empty Hash as a request object (see above).
6558
+ #
6559
+ # @param gcs_destination [::Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest::GcsDestination, ::Hash]
6560
+ # A cloud storage bucket destination.
6561
+ # @param parent [::String]
6562
+ # Required. The parent resource for new feedback labels.
6563
+ # @param filter [::String]
6564
+ # Optional. A filter to reduce results to a specific subset. Supports
6565
+ # disjunctions (OR) and conjunctions (AND).
6566
+ #
6567
+ # Supported fields:
6568
+ #
6569
+ # * `issue_model_id`
6570
+ # * `qa_question_id`
6571
+ # * `qa_scorecard_id`
6572
+ # * `min_create_time`
6573
+ # * `max_create_time`
6574
+ # * `min_update_time`
6575
+ # * `max_update_time`
6576
+ # * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING
6577
+ # @param max_download_count [::Integer]
6578
+ # Optional. Limits the maximum number of feedback labels that will be
6579
+ # downloaded. The first `N` feedback labels will be downloaded.
6580
+ # @param feedback_label_type [::Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest::FeedbackLabelType]
6581
+ # Optional. The type of feedback labels that will be downloaded.
6582
+ # @param conversation_filter [::String]
6583
+ # Optional. Filter parent conversations to download feedback labels for.
6584
+ # When specified, the feedback labels will be downloaded for the
6585
+ # conversations that match the filter.
6586
+ # If `template_qa_scorecard_id` is set, all the conversations that match the
6587
+ # filter will be paired with the questions under the scorecard for labeling.
6588
+ # @param template_qa_scorecard_id [::Array<::String>]
6589
+ # Optional. If set, a template for labeling conversations and scorecard
6590
+ # questions will be created from the conversation_filter and the questions
6591
+ # under the scorecard(s). The feedback label `filter` will be ignored.
6592
+ # @yield [result, operation] Access the result along with the TransportOperation object
6593
+ # @yieldparam result [::Gapic::Operation]
6594
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6595
+ #
6596
+ # @return [::Gapic::Operation]
6597
+ #
6598
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6599
+ #
6600
+ # @example Basic example
6601
+ # require "google/cloud/contact_center_insights/v1"
6602
+ #
6603
+ # # Create a client object. The client can be reused for multiple calls.
6604
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new
6605
+ #
6606
+ # # Create a request. To set request fields, pass in keyword arguments.
6607
+ # request = Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest.new
6608
+ #
6609
+ # # Call the bulk_download_feedback_labels method.
6610
+ # result = client.bulk_download_feedback_labels request
6611
+ #
6612
+ # # The returned object is of type Gapic::Operation. You can use it to
6613
+ # # check the status of an operation, cancel it, or wait for results.
6614
+ # # Here is how to wait for a response.
6615
+ # result.wait_until_done! timeout: 60
6616
+ # if result.response?
6617
+ # p result.response
6618
+ # else
6619
+ # puts "No response received."
6620
+ # end
6621
+ #
6622
+ def bulk_download_feedback_labels request, options = nil
6623
+ raise ::ArgumentError, "request must be provided" if request.nil?
6624
+
6625
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest
6626
+
6627
+ # Converts hash and nil to an options object
6628
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6629
+
6630
+ # Customize the options with defaults
6631
+ call_metadata = @config.rpcs.bulk_download_feedback_labels.metadata.to_h
6632
+
6633
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6634
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6635
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6636
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION,
6637
+ transports_version_send: [:rest]
6638
+
6639
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6640
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6641
+
6642
+ options.apply_defaults timeout: @config.rpcs.bulk_download_feedback_labels.timeout,
6643
+ metadata: call_metadata,
6644
+ retry_policy: @config.rpcs.bulk_download_feedback_labels.retry_policy
6645
+
6646
+ options.apply_defaults timeout: @config.timeout,
6647
+ metadata: @config.metadata,
6648
+ retry_policy: @config.retry_policy
6649
+
6650
+ @contact_center_insights_stub.bulk_download_feedback_labels request, options do |result, operation|
6651
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3897
6652
  yield result, operation if block_given?
3898
6653
  return result
3899
6654
  end
@@ -4215,6 +6970,31 @@ module Google
4215
6970
  #
4216
6971
  attr_reader :update_settings
4217
6972
  ##
6973
+ # RPC-specific configuration for `create_analysis_rule`
6974
+ # @return [::Gapic::Config::Method]
6975
+ #
6976
+ attr_reader :create_analysis_rule
6977
+ ##
6978
+ # RPC-specific configuration for `get_analysis_rule`
6979
+ # @return [::Gapic::Config::Method]
6980
+ #
6981
+ attr_reader :get_analysis_rule
6982
+ ##
6983
+ # RPC-specific configuration for `list_analysis_rules`
6984
+ # @return [::Gapic::Config::Method]
6985
+ #
6986
+ attr_reader :list_analysis_rules
6987
+ ##
6988
+ # RPC-specific configuration for `update_analysis_rule`
6989
+ # @return [::Gapic::Config::Method]
6990
+ #
6991
+ attr_reader :update_analysis_rule
6992
+ ##
6993
+ # RPC-specific configuration for `delete_analysis_rule`
6994
+ # @return [::Gapic::Config::Method]
6995
+ #
6996
+ attr_reader :delete_analysis_rule
6997
+ ##
4218
6998
  # RPC-specific configuration for `get_encryption_spec`
4219
6999
  # @return [::Gapic::Config::Method]
4220
7000
  #
@@ -4249,6 +7029,136 @@ module Google
4249
7029
  # @return [::Gapic::Config::Method]
4250
7030
  #
4251
7031
  attr_reader :delete_view
7032
+ ##
7033
+ # RPC-specific configuration for `query_metrics`
7034
+ # @return [::Gapic::Config::Method]
7035
+ #
7036
+ attr_reader :query_metrics
7037
+ ##
7038
+ # RPC-specific configuration for `create_qa_question`
7039
+ # @return [::Gapic::Config::Method]
7040
+ #
7041
+ attr_reader :create_qa_question
7042
+ ##
7043
+ # RPC-specific configuration for `get_qa_question`
7044
+ # @return [::Gapic::Config::Method]
7045
+ #
7046
+ attr_reader :get_qa_question
7047
+ ##
7048
+ # RPC-specific configuration for `update_qa_question`
7049
+ # @return [::Gapic::Config::Method]
7050
+ #
7051
+ attr_reader :update_qa_question
7052
+ ##
7053
+ # RPC-specific configuration for `delete_qa_question`
7054
+ # @return [::Gapic::Config::Method]
7055
+ #
7056
+ attr_reader :delete_qa_question
7057
+ ##
7058
+ # RPC-specific configuration for `list_qa_questions`
7059
+ # @return [::Gapic::Config::Method]
7060
+ #
7061
+ attr_reader :list_qa_questions
7062
+ ##
7063
+ # RPC-specific configuration for `create_qa_scorecard`
7064
+ # @return [::Gapic::Config::Method]
7065
+ #
7066
+ attr_reader :create_qa_scorecard
7067
+ ##
7068
+ # RPC-specific configuration for `get_qa_scorecard`
7069
+ # @return [::Gapic::Config::Method]
7070
+ #
7071
+ attr_reader :get_qa_scorecard
7072
+ ##
7073
+ # RPC-specific configuration for `update_qa_scorecard`
7074
+ # @return [::Gapic::Config::Method]
7075
+ #
7076
+ attr_reader :update_qa_scorecard
7077
+ ##
7078
+ # RPC-specific configuration for `delete_qa_scorecard`
7079
+ # @return [::Gapic::Config::Method]
7080
+ #
7081
+ attr_reader :delete_qa_scorecard
7082
+ ##
7083
+ # RPC-specific configuration for `list_qa_scorecards`
7084
+ # @return [::Gapic::Config::Method]
7085
+ #
7086
+ attr_reader :list_qa_scorecards
7087
+ ##
7088
+ # RPC-specific configuration for `create_qa_scorecard_revision`
7089
+ # @return [::Gapic::Config::Method]
7090
+ #
7091
+ attr_reader :create_qa_scorecard_revision
7092
+ ##
7093
+ # RPC-specific configuration for `get_qa_scorecard_revision`
7094
+ # @return [::Gapic::Config::Method]
7095
+ #
7096
+ attr_reader :get_qa_scorecard_revision
7097
+ ##
7098
+ # RPC-specific configuration for `tune_qa_scorecard_revision`
7099
+ # @return [::Gapic::Config::Method]
7100
+ #
7101
+ attr_reader :tune_qa_scorecard_revision
7102
+ ##
7103
+ # RPC-specific configuration for `deploy_qa_scorecard_revision`
7104
+ # @return [::Gapic::Config::Method]
7105
+ #
7106
+ attr_reader :deploy_qa_scorecard_revision
7107
+ ##
7108
+ # RPC-specific configuration for `undeploy_qa_scorecard_revision`
7109
+ # @return [::Gapic::Config::Method]
7110
+ #
7111
+ attr_reader :undeploy_qa_scorecard_revision
7112
+ ##
7113
+ # RPC-specific configuration for `delete_qa_scorecard_revision`
7114
+ # @return [::Gapic::Config::Method]
7115
+ #
7116
+ attr_reader :delete_qa_scorecard_revision
7117
+ ##
7118
+ # RPC-specific configuration for `list_qa_scorecard_revisions`
7119
+ # @return [::Gapic::Config::Method]
7120
+ #
7121
+ attr_reader :list_qa_scorecard_revisions
7122
+ ##
7123
+ # RPC-specific configuration for `create_feedback_label`
7124
+ # @return [::Gapic::Config::Method]
7125
+ #
7126
+ attr_reader :create_feedback_label
7127
+ ##
7128
+ # RPC-specific configuration for `list_feedback_labels`
7129
+ # @return [::Gapic::Config::Method]
7130
+ #
7131
+ attr_reader :list_feedback_labels
7132
+ ##
7133
+ # RPC-specific configuration for `get_feedback_label`
7134
+ # @return [::Gapic::Config::Method]
7135
+ #
7136
+ attr_reader :get_feedback_label
7137
+ ##
7138
+ # RPC-specific configuration for `update_feedback_label`
7139
+ # @return [::Gapic::Config::Method]
7140
+ #
7141
+ attr_reader :update_feedback_label
7142
+ ##
7143
+ # RPC-specific configuration for `delete_feedback_label`
7144
+ # @return [::Gapic::Config::Method]
7145
+ #
7146
+ attr_reader :delete_feedback_label
7147
+ ##
7148
+ # RPC-specific configuration for `list_all_feedback_labels`
7149
+ # @return [::Gapic::Config::Method]
7150
+ #
7151
+ attr_reader :list_all_feedback_labels
7152
+ ##
7153
+ # RPC-specific configuration for `bulk_upload_feedback_labels`
7154
+ # @return [::Gapic::Config::Method]
7155
+ #
7156
+ attr_reader :bulk_upload_feedback_labels
7157
+ ##
7158
+ # RPC-specific configuration for `bulk_download_feedback_labels`
7159
+ # @return [::Gapic::Config::Method]
7160
+ #
7161
+ attr_reader :bulk_download_feedback_labels
4252
7162
 
4253
7163
  # @private
4254
7164
  def initialize parent_rpcs = nil
@@ -4324,6 +7234,16 @@ module Google
4324
7234
  @get_settings = ::Gapic::Config::Method.new get_settings_config
4325
7235
  update_settings_config = parent_rpcs.update_settings if parent_rpcs.respond_to? :update_settings
4326
7236
  @update_settings = ::Gapic::Config::Method.new update_settings_config
7237
+ create_analysis_rule_config = parent_rpcs.create_analysis_rule if parent_rpcs.respond_to? :create_analysis_rule
7238
+ @create_analysis_rule = ::Gapic::Config::Method.new create_analysis_rule_config
7239
+ get_analysis_rule_config = parent_rpcs.get_analysis_rule if parent_rpcs.respond_to? :get_analysis_rule
7240
+ @get_analysis_rule = ::Gapic::Config::Method.new get_analysis_rule_config
7241
+ list_analysis_rules_config = parent_rpcs.list_analysis_rules if parent_rpcs.respond_to? :list_analysis_rules
7242
+ @list_analysis_rules = ::Gapic::Config::Method.new list_analysis_rules_config
7243
+ update_analysis_rule_config = parent_rpcs.update_analysis_rule if parent_rpcs.respond_to? :update_analysis_rule
7244
+ @update_analysis_rule = ::Gapic::Config::Method.new update_analysis_rule_config
7245
+ delete_analysis_rule_config = parent_rpcs.delete_analysis_rule if parent_rpcs.respond_to? :delete_analysis_rule
7246
+ @delete_analysis_rule = ::Gapic::Config::Method.new delete_analysis_rule_config
4327
7247
  get_encryption_spec_config = parent_rpcs.get_encryption_spec if parent_rpcs.respond_to? :get_encryption_spec
4328
7248
  @get_encryption_spec = ::Gapic::Config::Method.new get_encryption_spec_config
4329
7249
  initialize_encryption_spec_config = parent_rpcs.initialize_encryption_spec if parent_rpcs.respond_to? :initialize_encryption_spec
@@ -4338,6 +7258,58 @@ module Google
4338
7258
  @update_view = ::Gapic::Config::Method.new update_view_config
4339
7259
  delete_view_config = parent_rpcs.delete_view if parent_rpcs.respond_to? :delete_view
4340
7260
  @delete_view = ::Gapic::Config::Method.new delete_view_config
7261
+ query_metrics_config = parent_rpcs.query_metrics if parent_rpcs.respond_to? :query_metrics
7262
+ @query_metrics = ::Gapic::Config::Method.new query_metrics_config
7263
+ create_qa_question_config = parent_rpcs.create_qa_question if parent_rpcs.respond_to? :create_qa_question
7264
+ @create_qa_question = ::Gapic::Config::Method.new create_qa_question_config
7265
+ get_qa_question_config = parent_rpcs.get_qa_question if parent_rpcs.respond_to? :get_qa_question
7266
+ @get_qa_question = ::Gapic::Config::Method.new get_qa_question_config
7267
+ update_qa_question_config = parent_rpcs.update_qa_question if parent_rpcs.respond_to? :update_qa_question
7268
+ @update_qa_question = ::Gapic::Config::Method.new update_qa_question_config
7269
+ delete_qa_question_config = parent_rpcs.delete_qa_question if parent_rpcs.respond_to? :delete_qa_question
7270
+ @delete_qa_question = ::Gapic::Config::Method.new delete_qa_question_config
7271
+ list_qa_questions_config = parent_rpcs.list_qa_questions if parent_rpcs.respond_to? :list_qa_questions
7272
+ @list_qa_questions = ::Gapic::Config::Method.new list_qa_questions_config
7273
+ create_qa_scorecard_config = parent_rpcs.create_qa_scorecard if parent_rpcs.respond_to? :create_qa_scorecard
7274
+ @create_qa_scorecard = ::Gapic::Config::Method.new create_qa_scorecard_config
7275
+ get_qa_scorecard_config = parent_rpcs.get_qa_scorecard if parent_rpcs.respond_to? :get_qa_scorecard
7276
+ @get_qa_scorecard = ::Gapic::Config::Method.new get_qa_scorecard_config
7277
+ update_qa_scorecard_config = parent_rpcs.update_qa_scorecard if parent_rpcs.respond_to? :update_qa_scorecard
7278
+ @update_qa_scorecard = ::Gapic::Config::Method.new update_qa_scorecard_config
7279
+ delete_qa_scorecard_config = parent_rpcs.delete_qa_scorecard if parent_rpcs.respond_to? :delete_qa_scorecard
7280
+ @delete_qa_scorecard = ::Gapic::Config::Method.new delete_qa_scorecard_config
7281
+ list_qa_scorecards_config = parent_rpcs.list_qa_scorecards if parent_rpcs.respond_to? :list_qa_scorecards
7282
+ @list_qa_scorecards = ::Gapic::Config::Method.new list_qa_scorecards_config
7283
+ create_qa_scorecard_revision_config = parent_rpcs.create_qa_scorecard_revision if parent_rpcs.respond_to? :create_qa_scorecard_revision
7284
+ @create_qa_scorecard_revision = ::Gapic::Config::Method.new create_qa_scorecard_revision_config
7285
+ get_qa_scorecard_revision_config = parent_rpcs.get_qa_scorecard_revision if parent_rpcs.respond_to? :get_qa_scorecard_revision
7286
+ @get_qa_scorecard_revision = ::Gapic::Config::Method.new get_qa_scorecard_revision_config
7287
+ tune_qa_scorecard_revision_config = parent_rpcs.tune_qa_scorecard_revision if parent_rpcs.respond_to? :tune_qa_scorecard_revision
7288
+ @tune_qa_scorecard_revision = ::Gapic::Config::Method.new tune_qa_scorecard_revision_config
7289
+ deploy_qa_scorecard_revision_config = parent_rpcs.deploy_qa_scorecard_revision if parent_rpcs.respond_to? :deploy_qa_scorecard_revision
7290
+ @deploy_qa_scorecard_revision = ::Gapic::Config::Method.new deploy_qa_scorecard_revision_config
7291
+ undeploy_qa_scorecard_revision_config = parent_rpcs.undeploy_qa_scorecard_revision if parent_rpcs.respond_to? :undeploy_qa_scorecard_revision
7292
+ @undeploy_qa_scorecard_revision = ::Gapic::Config::Method.new undeploy_qa_scorecard_revision_config
7293
+ delete_qa_scorecard_revision_config = parent_rpcs.delete_qa_scorecard_revision if parent_rpcs.respond_to? :delete_qa_scorecard_revision
7294
+ @delete_qa_scorecard_revision = ::Gapic::Config::Method.new delete_qa_scorecard_revision_config
7295
+ list_qa_scorecard_revisions_config = parent_rpcs.list_qa_scorecard_revisions if parent_rpcs.respond_to? :list_qa_scorecard_revisions
7296
+ @list_qa_scorecard_revisions = ::Gapic::Config::Method.new list_qa_scorecard_revisions_config
7297
+ create_feedback_label_config = parent_rpcs.create_feedback_label if parent_rpcs.respond_to? :create_feedback_label
7298
+ @create_feedback_label = ::Gapic::Config::Method.new create_feedback_label_config
7299
+ list_feedback_labels_config = parent_rpcs.list_feedback_labels if parent_rpcs.respond_to? :list_feedback_labels
7300
+ @list_feedback_labels = ::Gapic::Config::Method.new list_feedback_labels_config
7301
+ get_feedback_label_config = parent_rpcs.get_feedback_label if parent_rpcs.respond_to? :get_feedback_label
7302
+ @get_feedback_label = ::Gapic::Config::Method.new get_feedback_label_config
7303
+ update_feedback_label_config = parent_rpcs.update_feedback_label if parent_rpcs.respond_to? :update_feedback_label
7304
+ @update_feedback_label = ::Gapic::Config::Method.new update_feedback_label_config
7305
+ delete_feedback_label_config = parent_rpcs.delete_feedback_label if parent_rpcs.respond_to? :delete_feedback_label
7306
+ @delete_feedback_label = ::Gapic::Config::Method.new delete_feedback_label_config
7307
+ list_all_feedback_labels_config = parent_rpcs.list_all_feedback_labels if parent_rpcs.respond_to? :list_all_feedback_labels
7308
+ @list_all_feedback_labels = ::Gapic::Config::Method.new list_all_feedback_labels_config
7309
+ bulk_upload_feedback_labels_config = parent_rpcs.bulk_upload_feedback_labels if parent_rpcs.respond_to? :bulk_upload_feedback_labels
7310
+ @bulk_upload_feedback_labels = ::Gapic::Config::Method.new bulk_upload_feedback_labels_config
7311
+ bulk_download_feedback_labels_config = parent_rpcs.bulk_download_feedback_labels if parent_rpcs.respond_to? :bulk_download_feedback_labels
7312
+ @bulk_download_feedback_labels = ::Gapic::Config::Method.new bulk_download_feedback_labels_config
4341
7313
 
4342
7314
  yield self if block_given?
4343
7315
  end