google-cloud-contact_center_insights-v1 0.2.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -188,8 +188,8 @@ module Google
188
188
  # component of the conversation's resource name. If no ID is specified, a
189
189
  # server-generated ID will be used.
190
190
  #
191
- # This value should be 4-32 characters and must match the regular
192
- # expression /^[a-z0-9-]\\{4,32}$/. Valid characters are /[a-z][0-9]-/
191
+ # This value should be 4-64 characters and must match the regular
192
+ # expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`
193
193
  #
194
194
  # @yield [response, operation] Access the result along with the RPC operation
195
195
  # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation]
@@ -199,6 +199,21 @@ module Google
199
199
  #
200
200
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
201
201
  #
202
+ # @example Basic example
203
+ # require "google/cloud/contact_center_insights/v1"
204
+ #
205
+ # # Create a client object. The client can be reused for multiple calls.
206
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
207
+ #
208
+ # # Create a request. To set request fields, pass in keyword arguments.
209
+ # request = Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new
210
+ #
211
+ # # Call the create_conversation method.
212
+ # result = client.create_conversation request
213
+ #
214
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation.
215
+ # p result
216
+ #
202
217
  def create_conversation request, options = nil
203
218
  raise ::ArgumentError, "request must be provided" if request.nil?
204
219
 
@@ -216,9 +231,11 @@ module Google
216
231
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
217
232
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
218
233
 
219
- header_params = {
220
- "parent" => request.parent
221
- }
234
+ header_params = {}
235
+ if request.parent
236
+ header_params["parent"] = request.parent
237
+ end
238
+
222
239
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
223
240
  metadata[:"x-goog-request-params"] ||= request_params_header
224
241
 
@@ -269,6 +286,21 @@ module Google
269
286
  #
270
287
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
271
288
  #
289
+ # @example Basic example
290
+ # require "google/cloud/contact_center_insights/v1"
291
+ #
292
+ # # Create a client object. The client can be reused for multiple calls.
293
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
294
+ #
295
+ # # Create a request. To set request fields, pass in keyword arguments.
296
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new
297
+ #
298
+ # # Call the update_conversation method.
299
+ # result = client.update_conversation request
300
+ #
301
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation.
302
+ # p result
303
+ #
272
304
  def update_conversation request, options = nil
273
305
  raise ::ArgumentError, "request must be provided" if request.nil?
274
306
 
@@ -286,9 +318,11 @@ module Google
286
318
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
287
319
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
288
320
 
289
- header_params = {
290
- "conversation.name" => request.conversation.name
291
- }
321
+ header_params = {}
322
+ if request.conversation&.name
323
+ header_params["conversation.name"] = request.conversation.name
324
+ end
325
+
292
326
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
293
327
  metadata[:"x-goog-request-params"] ||= request_params_header
294
328
 
@@ -339,6 +373,21 @@ module Google
339
373
  #
340
374
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
341
375
  #
376
+ # @example Basic example
377
+ # require "google/cloud/contact_center_insights/v1"
378
+ #
379
+ # # Create a client object. The client can be reused for multiple calls.
380
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
381
+ #
382
+ # # Create a request. To set request fields, pass in keyword arguments.
383
+ # request = Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new
384
+ #
385
+ # # Call the get_conversation method.
386
+ # result = client.get_conversation request
387
+ #
388
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation.
389
+ # p result
390
+ #
342
391
  def get_conversation request, options = nil
343
392
  raise ::ArgumentError, "request must be provided" if request.nil?
344
393
 
@@ -356,9 +405,11 @@ module Google
356
405
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
357
406
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
358
407
 
359
- header_params = {
360
- "name" => request.name
361
- }
408
+ header_params = {}
409
+ if request.name
410
+ header_params["name"] = request.name
411
+ end
412
+
362
413
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
363
414
  metadata[:"x-goog-request-params"] ||= request_params_header
364
415
 
@@ -421,6 +472,27 @@ module Google
421
472
  #
422
473
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
423
474
  #
475
+ # @example Basic example
476
+ # require "google/cloud/contact_center_insights/v1"
477
+ #
478
+ # # Create a client object. The client can be reused for multiple calls.
479
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
480
+ #
481
+ # # Create a request. To set request fields, pass in keyword arguments.
482
+ # request = Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new
483
+ #
484
+ # # Call the list_conversations method.
485
+ # result = client.list_conversations request
486
+ #
487
+ # # The returned object is of type Gapic::PagedEnumerable. You can
488
+ # # iterate over all elements by calling #each, and the enumerable
489
+ # # will lazily make API calls to fetch subsequent pages. Other
490
+ # # methods are also available for managing paging directly.
491
+ # result.each do |response|
492
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Conversation.
493
+ # p response
494
+ # end
495
+ #
424
496
  def list_conversations request, options = nil
425
497
  raise ::ArgumentError, "request must be provided" if request.nil?
426
498
 
@@ -438,9 +510,11 @@ module Google
438
510
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
439
511
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
440
512
 
441
- header_params = {
442
- "parent" => request.parent
443
- }
513
+ header_params = {}
514
+ if request.parent
515
+ header_params["parent"] = request.parent
516
+ end
517
+
444
518
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
445
519
  metadata[:"x-goog-request-params"] ||= request_params_header
446
520
 
@@ -494,6 +568,21 @@ module Google
494
568
  #
495
569
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
496
570
  #
571
+ # @example Basic example
572
+ # require "google/cloud/contact_center_insights/v1"
573
+ #
574
+ # # Create a client object. The client can be reused for multiple calls.
575
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
576
+ #
577
+ # # Create a request. To set request fields, pass in keyword arguments.
578
+ # request = Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new
579
+ #
580
+ # # Call the delete_conversation method.
581
+ # result = client.delete_conversation request
582
+ #
583
+ # # The returned object is of type Google::Protobuf::Empty.
584
+ # p result
585
+ #
497
586
  def delete_conversation request, options = nil
498
587
  raise ::ArgumentError, "request must be provided" if request.nil?
499
588
 
@@ -511,9 +600,11 @@ module Google
511
600
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
512
601
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
513
602
 
514
- header_params = {
515
- "name" => request.name
516
- }
603
+ header_params = {}
604
+ if request.name
605
+ header_params["name"] = request.name
606
+ end
607
+
517
608
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
518
609
  metadata[:"x-goog-request-params"] ||= request_params_header
519
610
 
@@ -565,6 +656,28 @@ module Google
565
656
  #
566
657
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
567
658
  #
659
+ # @example Basic example
660
+ # require "google/cloud/contact_center_insights/v1"
661
+ #
662
+ # # Create a client object. The client can be reused for multiple calls.
663
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
664
+ #
665
+ # # Create a request. To set request fields, pass in keyword arguments.
666
+ # request = Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new
667
+ #
668
+ # # Call the create_analysis method.
669
+ # result = client.create_analysis request
670
+ #
671
+ # # The returned object is of type Gapic::Operation. You can use this
672
+ # # object to check the status of an operation, cancel it, or wait
673
+ # # for results. Here is how to block until completion:
674
+ # result.wait_until_done! timeout: 60
675
+ # if result.response?
676
+ # p result.response
677
+ # else
678
+ # puts "Error!"
679
+ # end
680
+ #
568
681
  def create_analysis request, options = nil
569
682
  raise ::ArgumentError, "request must be provided" if request.nil?
570
683
 
@@ -582,9 +695,11 @@ module Google
582
695
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
583
696
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
584
697
 
585
- header_params = {
586
- "parent" => request.parent
587
- }
698
+ header_params = {}
699
+ if request.parent
700
+ header_params["parent"] = request.parent
701
+ end
702
+
588
703
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
589
704
  metadata[:"x-goog-request-params"] ||= request_params_header
590
705
 
@@ -634,6 +749,21 @@ module Google
634
749
  #
635
750
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
636
751
  #
752
+ # @example Basic example
753
+ # require "google/cloud/contact_center_insights/v1"
754
+ #
755
+ # # Create a client object. The client can be reused for multiple calls.
756
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
757
+ #
758
+ # # Create a request. To set request fields, pass in keyword arguments.
759
+ # request = Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new
760
+ #
761
+ # # Call the get_analysis method.
762
+ # result = client.get_analysis request
763
+ #
764
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Analysis.
765
+ # p result
766
+ #
637
767
  def get_analysis request, options = nil
638
768
  raise ::ArgumentError, "request must be provided" if request.nil?
639
769
 
@@ -651,9 +781,11 @@ module Google
651
781
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
652
782
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
653
783
 
654
- header_params = {
655
- "name" => request.name
656
- }
784
+ header_params = {}
785
+ if request.name
786
+ header_params["name"] = request.name
787
+ end
788
+
657
789
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
658
790
  metadata[:"x-goog-request-params"] ||= request_params_header
659
791
 
@@ -714,6 +846,27 @@ module Google
714
846
  #
715
847
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
716
848
  #
849
+ # @example Basic example
850
+ # require "google/cloud/contact_center_insights/v1"
851
+ #
852
+ # # Create a client object. The client can be reused for multiple calls.
853
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
854
+ #
855
+ # # Create a request. To set request fields, pass in keyword arguments.
856
+ # request = Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new
857
+ #
858
+ # # Call the list_analyses method.
859
+ # result = client.list_analyses request
860
+ #
861
+ # # The returned object is of type Gapic::PagedEnumerable. You can
862
+ # # iterate over all elements by calling #each, and the enumerable
863
+ # # will lazily make API calls to fetch subsequent pages. Other
864
+ # # methods are also available for managing paging directly.
865
+ # result.each do |response|
866
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Analysis.
867
+ # p response
868
+ # end
869
+ #
717
870
  def list_analyses request, options = nil
718
871
  raise ::ArgumentError, "request must be provided" if request.nil?
719
872
 
@@ -731,9 +884,11 @@ module Google
731
884
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
732
885
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
733
886
 
734
- header_params = {
735
- "parent" => request.parent
736
- }
887
+ header_params = {}
888
+ if request.parent
889
+ header_params["parent"] = request.parent
890
+ end
891
+
737
892
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
738
893
  metadata[:"x-goog-request-params"] ||= request_params_header
739
894
 
@@ -783,6 +938,21 @@ module Google
783
938
  #
784
939
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
785
940
  #
941
+ # @example Basic example
942
+ # require "google/cloud/contact_center_insights/v1"
943
+ #
944
+ # # Create a client object. The client can be reused for multiple calls.
945
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
946
+ #
947
+ # # Create a request. To set request fields, pass in keyword arguments.
948
+ # request = Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new
949
+ #
950
+ # # Call the delete_analysis method.
951
+ # result = client.delete_analysis request
952
+ #
953
+ # # The returned object is of type Google::Protobuf::Empty.
954
+ # p result
955
+ #
786
956
  def delete_analysis request, options = nil
787
957
  raise ::ArgumentError, "request must be provided" if request.nil?
788
958
 
@@ -800,9 +970,11 @@ module Google
800
970
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
801
971
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
802
972
 
803
- header_params = {
804
- "name" => request.name
805
- }
973
+ header_params = {}
974
+ if request.name
975
+ header_params["name"] = request.name
976
+ end
977
+
806
978
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
807
979
  metadata[:"x-goog-request-params"] ||= request_params_header
808
980
 
@@ -835,7 +1007,7 @@ module Google
835
1007
  # @param options [::Gapic::CallOptions, ::Hash]
836
1008
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
837
1009
  #
838
- # @overload export_insights_data(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil)
1010
+ # @overload export_insights_data(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil, write_disposition: nil)
839
1011
  # Pass arguments to `export_insights_data` via keyword arguments. Note that at
840
1012
  # least one keyword argument is required. To specify no parameters, or to keep all
841
1013
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -851,6 +1023,8 @@ module Google
851
1023
  # A fully qualified KMS key name for BigQuery tables protected by CMEK.
852
1024
  # Format:
853
1025
  # projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}/cryptoKeyVersions/\\{version}
1026
+ # @param write_disposition [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::WriteDisposition]
1027
+ # Options for what to do if the destination table already exists.
854
1028
  #
855
1029
  # @yield [response, operation] Access the result along with the RPC operation
856
1030
  # @yieldparam response [::Gapic::Operation]
@@ -860,6 +1034,28 @@ module Google
860
1034
  #
861
1035
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
862
1036
  #
1037
+ # @example Basic example
1038
+ # require "google/cloud/contact_center_insights/v1"
1039
+ #
1040
+ # # Create a client object. The client can be reused for multiple calls.
1041
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1042
+ #
1043
+ # # Create a request. To set request fields, pass in keyword arguments.
1044
+ # request = Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new
1045
+ #
1046
+ # # Call the export_insights_data method.
1047
+ # result = client.export_insights_data request
1048
+ #
1049
+ # # The returned object is of type Gapic::Operation. You can use this
1050
+ # # object to check the status of an operation, cancel it, or wait
1051
+ # # for results. Here is how to block until completion:
1052
+ # result.wait_until_done! timeout: 60
1053
+ # if result.response?
1054
+ # p result.response
1055
+ # else
1056
+ # puts "Error!"
1057
+ # end
1058
+ #
863
1059
  def export_insights_data request, options = nil
864
1060
  raise ::ArgumentError, "request must be provided" if request.nil?
865
1061
 
@@ -877,9 +1073,11 @@ module Google
877
1073
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
878
1074
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
879
1075
 
880
- header_params = {
881
- "parent" => request.parent
882
- }
1076
+ header_params = {}
1077
+ if request.parent
1078
+ header_params["parent"] = request.parent
1079
+ end
1080
+
883
1081
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
884
1082
  metadata[:"x-goog-request-params"] ||= request_params_header
885
1083
 
@@ -931,6 +1129,28 @@ module Google
931
1129
  #
932
1130
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
933
1131
  #
1132
+ # @example Basic example
1133
+ # require "google/cloud/contact_center_insights/v1"
1134
+ #
1135
+ # # Create a client object. The client can be reused for multiple calls.
1136
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1137
+ #
1138
+ # # Create a request. To set request fields, pass in keyword arguments.
1139
+ # request = Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new
1140
+ #
1141
+ # # Call the create_issue_model method.
1142
+ # result = client.create_issue_model request
1143
+ #
1144
+ # # The returned object is of type Gapic::Operation. You can use this
1145
+ # # object to check the status of an operation, cancel it, or wait
1146
+ # # for results. Here is how to block until completion:
1147
+ # result.wait_until_done! timeout: 60
1148
+ # if result.response?
1149
+ # p result.response
1150
+ # else
1151
+ # puts "Error!"
1152
+ # end
1153
+ #
934
1154
  def create_issue_model request, options = nil
935
1155
  raise ::ArgumentError, "request must be provided" if request.nil?
936
1156
 
@@ -948,9 +1168,11 @@ module Google
948
1168
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
949
1169
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
950
1170
 
951
- header_params = {
952
- "parent" => request.parent
953
- }
1171
+ header_params = {}
1172
+ if request.parent
1173
+ header_params["parent"] = request.parent
1174
+ end
1175
+
954
1176
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
955
1177
  metadata[:"x-goog-request-params"] ||= request_params_header
956
1178
 
@@ -1002,6 +1224,21 @@ module Google
1002
1224
  #
1003
1225
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1004
1226
  #
1227
+ # @example Basic example
1228
+ # require "google/cloud/contact_center_insights/v1"
1229
+ #
1230
+ # # Create a client object. The client can be reused for multiple calls.
1231
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1232
+ #
1233
+ # # Create a request. To set request fields, pass in keyword arguments.
1234
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new
1235
+ #
1236
+ # # Call the update_issue_model method.
1237
+ # result = client.update_issue_model request
1238
+ #
1239
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel.
1240
+ # p result
1241
+ #
1005
1242
  def update_issue_model request, options = nil
1006
1243
  raise ::ArgumentError, "request must be provided" if request.nil?
1007
1244
 
@@ -1019,9 +1256,11 @@ module Google
1019
1256
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1020
1257
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1021
1258
 
1022
- header_params = {
1023
- "issue_model.name" => request.issue_model.name
1024
- }
1259
+ header_params = {}
1260
+ if request.issue_model&.name
1261
+ header_params["issue_model.name"] = request.issue_model.name
1262
+ end
1263
+
1025
1264
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1026
1265
  metadata[:"x-goog-request-params"] ||= request_params_header
1027
1266
 
@@ -1070,6 +1309,21 @@ module Google
1070
1309
  #
1071
1310
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1072
1311
  #
1312
+ # @example Basic example
1313
+ # require "google/cloud/contact_center_insights/v1"
1314
+ #
1315
+ # # Create a client object. The client can be reused for multiple calls.
1316
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1317
+ #
1318
+ # # Create a request. To set request fields, pass in keyword arguments.
1319
+ # request = Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new
1320
+ #
1321
+ # # Call the get_issue_model method.
1322
+ # result = client.get_issue_model request
1323
+ #
1324
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel.
1325
+ # p result
1326
+ #
1073
1327
  def get_issue_model request, options = nil
1074
1328
  raise ::ArgumentError, "request must be provided" if request.nil?
1075
1329
 
@@ -1087,9 +1341,11 @@ module Google
1087
1341
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1088
1342
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1089
1343
 
1090
- header_params = {
1091
- "name" => request.name
1092
- }
1344
+ header_params = {}
1345
+ if request.name
1346
+ header_params["name"] = request.name
1347
+ end
1348
+
1093
1349
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1094
1350
  metadata[:"x-goog-request-params"] ||= request_params_header
1095
1351
 
@@ -1138,6 +1394,21 @@ module Google
1138
1394
  #
1139
1395
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1140
1396
  #
1397
+ # @example Basic example
1398
+ # require "google/cloud/contact_center_insights/v1"
1399
+ #
1400
+ # # Create a client object. The client can be reused for multiple calls.
1401
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1402
+ #
1403
+ # # Create a request. To set request fields, pass in keyword arguments.
1404
+ # request = Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new
1405
+ #
1406
+ # # Call the list_issue_models method.
1407
+ # result = client.list_issue_models request
1408
+ #
1409
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse.
1410
+ # p result
1411
+ #
1141
1412
  def list_issue_models request, options = nil
1142
1413
  raise ::ArgumentError, "request must be provided" if request.nil?
1143
1414
 
@@ -1155,9 +1426,11 @@ module Google
1155
1426
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1156
1427
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1157
1428
 
1158
- header_params = {
1159
- "parent" => request.parent
1160
- }
1429
+ header_params = {}
1430
+ if request.parent
1431
+ header_params["parent"] = request.parent
1432
+ end
1433
+
1161
1434
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1162
1435
  metadata[:"x-goog-request-params"] ||= request_params_header
1163
1436
 
@@ -1206,6 +1479,28 @@ module Google
1206
1479
  #
1207
1480
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1208
1481
  #
1482
+ # @example Basic example
1483
+ # require "google/cloud/contact_center_insights/v1"
1484
+ #
1485
+ # # Create a client object. The client can be reused for multiple calls.
1486
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1487
+ #
1488
+ # # Create a request. To set request fields, pass in keyword arguments.
1489
+ # request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new
1490
+ #
1491
+ # # Call the delete_issue_model method.
1492
+ # result = client.delete_issue_model request
1493
+ #
1494
+ # # The returned object is of type Gapic::Operation. You can use this
1495
+ # # object to check the status of an operation, cancel it, or wait
1496
+ # # for results. Here is how to block until completion:
1497
+ # result.wait_until_done! timeout: 60
1498
+ # if result.response?
1499
+ # p result.response
1500
+ # else
1501
+ # puts "Error!"
1502
+ # end
1503
+ #
1209
1504
  def delete_issue_model request, options = nil
1210
1505
  raise ::ArgumentError, "request must be provided" if request.nil?
1211
1506
 
@@ -1223,9 +1518,11 @@ module Google
1223
1518
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1224
1519
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1225
1520
 
1226
- header_params = {
1227
- "name" => request.name
1228
- }
1521
+ header_params = {}
1522
+ if request.name
1523
+ header_params["name"] = request.name
1524
+ end
1525
+
1229
1526
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1230
1527
  metadata[:"x-goog-request-params"] ||= request_params_header
1231
1528
 
@@ -1276,6 +1573,28 @@ module Google
1276
1573
  #
1277
1574
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1278
1575
  #
1576
+ # @example Basic example
1577
+ # require "google/cloud/contact_center_insights/v1"
1578
+ #
1579
+ # # Create a client object. The client can be reused for multiple calls.
1580
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1581
+ #
1582
+ # # Create a request. To set request fields, pass in keyword arguments.
1583
+ # request = Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new
1584
+ #
1585
+ # # Call the deploy_issue_model method.
1586
+ # result = client.deploy_issue_model request
1587
+ #
1588
+ # # The returned object is of type Gapic::Operation. You can use this
1589
+ # # object to check the status of an operation, cancel it, or wait
1590
+ # # for results. Here is how to block until completion:
1591
+ # result.wait_until_done! timeout: 60
1592
+ # if result.response?
1593
+ # p result.response
1594
+ # else
1595
+ # puts "Error!"
1596
+ # end
1597
+ #
1279
1598
  def deploy_issue_model request, options = nil
1280
1599
  raise ::ArgumentError, "request must be provided" if request.nil?
1281
1600
 
@@ -1293,9 +1612,11 @@ module Google
1293
1612
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1294
1613
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1295
1614
 
1296
- header_params = {
1297
- "name" => request.name
1298
- }
1615
+ header_params = {}
1616
+ if request.name
1617
+ header_params["name"] = request.name
1618
+ end
1619
+
1299
1620
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1300
1621
  metadata[:"x-goog-request-params"] ||= request_params_header
1301
1622
 
@@ -1346,6 +1667,28 @@ module Google
1346
1667
  #
1347
1668
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1348
1669
  #
1670
+ # @example Basic example
1671
+ # require "google/cloud/contact_center_insights/v1"
1672
+ #
1673
+ # # Create a client object. The client can be reused for multiple calls.
1674
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1675
+ #
1676
+ # # Create a request. To set request fields, pass in keyword arguments.
1677
+ # request = Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new
1678
+ #
1679
+ # # Call the undeploy_issue_model method.
1680
+ # result = client.undeploy_issue_model request
1681
+ #
1682
+ # # The returned object is of type Gapic::Operation. You can use this
1683
+ # # object to check the status of an operation, cancel it, or wait
1684
+ # # for results. Here is how to block until completion:
1685
+ # result.wait_until_done! timeout: 60
1686
+ # if result.response?
1687
+ # p result.response
1688
+ # else
1689
+ # puts "Error!"
1690
+ # end
1691
+ #
1349
1692
  def undeploy_issue_model request, options = nil
1350
1693
  raise ::ArgumentError, "request must be provided" if request.nil?
1351
1694
 
@@ -1363,9 +1706,11 @@ module Google
1363
1706
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1364
1707
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1365
1708
 
1366
- header_params = {
1367
- "name" => request.name
1368
- }
1709
+ header_params = {}
1710
+ if request.name
1711
+ header_params["name"] = request.name
1712
+ end
1713
+
1369
1714
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1370
1715
  metadata[:"x-goog-request-params"] ||= request_params_header
1371
1716
 
@@ -1415,6 +1760,21 @@ module Google
1415
1760
  #
1416
1761
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1417
1762
  #
1763
+ # @example Basic example
1764
+ # require "google/cloud/contact_center_insights/v1"
1765
+ #
1766
+ # # Create a client object. The client can be reused for multiple calls.
1767
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1768
+ #
1769
+ # # Create a request. To set request fields, pass in keyword arguments.
1770
+ # request = Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new
1771
+ #
1772
+ # # Call the get_issue method.
1773
+ # result = client.get_issue request
1774
+ #
1775
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue.
1776
+ # p result
1777
+ #
1418
1778
  def get_issue request, options = nil
1419
1779
  raise ::ArgumentError, "request must be provided" if request.nil?
1420
1780
 
@@ -1432,9 +1792,11 @@ module Google
1432
1792
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1433
1793
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1434
1794
 
1435
- header_params = {
1436
- "name" => request.name
1437
- }
1795
+ header_params = {}
1796
+ if request.name
1797
+ header_params["name"] = request.name
1798
+ end
1799
+
1438
1800
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1439
1801
  metadata[:"x-goog-request-params"] ||= request_params_header
1440
1802
 
@@ -1483,6 +1845,21 @@ module Google
1483
1845
  #
1484
1846
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1485
1847
  #
1848
+ # @example Basic example
1849
+ # require "google/cloud/contact_center_insights/v1"
1850
+ #
1851
+ # # Create a client object. The client can be reused for multiple calls.
1852
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1853
+ #
1854
+ # # Create a request. To set request fields, pass in keyword arguments.
1855
+ # request = Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new
1856
+ #
1857
+ # # Call the list_issues method.
1858
+ # result = client.list_issues request
1859
+ #
1860
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse.
1861
+ # p result
1862
+ #
1486
1863
  def list_issues request, options = nil
1487
1864
  raise ::ArgumentError, "request must be provided" if request.nil?
1488
1865
 
@@ -1500,9 +1877,11 @@ module Google
1500
1877
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1501
1878
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1502
1879
 
1503
- header_params = {
1504
- "parent" => request.parent
1505
- }
1880
+ header_params = {}
1881
+ if request.parent
1882
+ header_params["parent"] = request.parent
1883
+ end
1884
+
1506
1885
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1507
1886
  metadata[:"x-goog-request-params"] ||= request_params_header
1508
1887
 
@@ -1553,6 +1932,21 @@ module Google
1553
1932
  #
1554
1933
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1555
1934
  #
1935
+ # @example Basic example
1936
+ # require "google/cloud/contact_center_insights/v1"
1937
+ #
1938
+ # # Create a client object. The client can be reused for multiple calls.
1939
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
1940
+ #
1941
+ # # Create a request. To set request fields, pass in keyword arguments.
1942
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new
1943
+ #
1944
+ # # Call the update_issue method.
1945
+ # result = client.update_issue request
1946
+ #
1947
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue.
1948
+ # p result
1949
+ #
1556
1950
  def update_issue request, options = nil
1557
1951
  raise ::ArgumentError, "request must be provided" if request.nil?
1558
1952
 
@@ -1570,9 +1964,11 @@ module Google
1570
1964
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1571
1965
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1572
1966
 
1573
- header_params = {
1574
- "issue.name" => request.issue.name
1575
- }
1967
+ header_params = {}
1968
+ if request.issue&.name
1969
+ header_params["issue.name"] = request.issue.name
1970
+ end
1971
+
1576
1972
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1577
1973
  metadata[:"x-goog-request-params"] ||= request_params_header
1578
1974
 
@@ -1621,6 +2017,21 @@ module Google
1621
2017
  #
1622
2018
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1623
2019
  #
2020
+ # @example Basic example
2021
+ # require "google/cloud/contact_center_insights/v1"
2022
+ #
2023
+ # # Create a client object. The client can be reused for multiple calls.
2024
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
2025
+ #
2026
+ # # Create a request. To set request fields, pass in keyword arguments.
2027
+ # request = Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new
2028
+ #
2029
+ # # Call the calculate_issue_model_stats method.
2030
+ # result = client.calculate_issue_model_stats request
2031
+ #
2032
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse.
2033
+ # p result
2034
+ #
1624
2035
  def calculate_issue_model_stats request, options = nil
1625
2036
  raise ::ArgumentError, "request must be provided" if request.nil?
1626
2037
 
@@ -1638,9 +2049,11 @@ module Google
1638
2049
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1639
2050
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1640
2051
 
1641
- header_params = {
1642
- "issue_model" => request.issue_model
1643
- }
2052
+ header_params = {}
2053
+ if request.issue_model
2054
+ header_params["issue_model"] = request.issue_model
2055
+ end
2056
+
1644
2057
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1645
2058
  metadata[:"x-goog-request-params"] ||= request_params_header
1646
2059
 
@@ -1694,6 +2107,21 @@ module Google
1694
2107
  #
1695
2108
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1696
2109
  #
2110
+ # @example Basic example
2111
+ # require "google/cloud/contact_center_insights/v1"
2112
+ #
2113
+ # # Create a client object. The client can be reused for multiple calls.
2114
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
2115
+ #
2116
+ # # Create a request. To set request fields, pass in keyword arguments.
2117
+ # request = Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new
2118
+ #
2119
+ # # Call the create_phrase_matcher method.
2120
+ # result = client.create_phrase_matcher request
2121
+ #
2122
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.
2123
+ # p result
2124
+ #
1697
2125
  def create_phrase_matcher request, options = nil
1698
2126
  raise ::ArgumentError, "request must be provided" if request.nil?
1699
2127
 
@@ -1711,9 +2139,11 @@ module Google
1711
2139
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1712
2140
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1713
2141
 
1714
- header_params = {
1715
- "parent" => request.parent
1716
- }
2142
+ header_params = {}
2143
+ if request.parent
2144
+ header_params["parent"] = request.parent
2145
+ end
2146
+
1717
2147
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1718
2148
  metadata[:"x-goog-request-params"] ||= request_params_header
1719
2149
 
@@ -1762,6 +2192,21 @@ module Google
1762
2192
  #
1763
2193
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1764
2194
  #
2195
+ # @example Basic example
2196
+ # require "google/cloud/contact_center_insights/v1"
2197
+ #
2198
+ # # Create a client object. The client can be reused for multiple calls.
2199
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
2200
+ #
2201
+ # # Create a request. To set request fields, pass in keyword arguments.
2202
+ # request = Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new
2203
+ #
2204
+ # # Call the get_phrase_matcher method.
2205
+ # result = client.get_phrase_matcher request
2206
+ #
2207
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.
2208
+ # p result
2209
+ #
1765
2210
  def get_phrase_matcher request, options = nil
1766
2211
  raise ::ArgumentError, "request must be provided" if request.nil?
1767
2212
 
@@ -1779,9 +2224,11 @@ module Google
1779
2224
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1780
2225
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1781
2226
 
1782
- header_params = {
1783
- "name" => request.name
1784
- }
2227
+ header_params = {}
2228
+ if request.name
2229
+ header_params["name"] = request.name
2230
+ end
2231
+
1785
2232
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1786
2233
  metadata[:"x-goog-request-params"] ||= request_params_header
1787
2234
 
@@ -1842,6 +2289,27 @@ module Google
1842
2289
  #
1843
2290
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1844
2291
  #
2292
+ # @example Basic example
2293
+ # require "google/cloud/contact_center_insights/v1"
2294
+ #
2295
+ # # Create a client object. The client can be reused for multiple calls.
2296
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
2297
+ #
2298
+ # # Create a request. To set request fields, pass in keyword arguments.
2299
+ # request = Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new
2300
+ #
2301
+ # # Call the list_phrase_matchers method.
2302
+ # result = client.list_phrase_matchers request
2303
+ #
2304
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2305
+ # # iterate over all elements by calling #each, and the enumerable
2306
+ # # will lazily make API calls to fetch subsequent pages. Other
2307
+ # # methods are also available for managing paging directly.
2308
+ # result.each do |response|
2309
+ # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.
2310
+ # p response
2311
+ # end
2312
+ #
1845
2313
  def list_phrase_matchers request, options = nil
1846
2314
  raise ::ArgumentError, "request must be provided" if request.nil?
1847
2315
 
@@ -1859,9 +2327,11 @@ module Google
1859
2327
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1860
2328
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1861
2329
 
1862
- header_params = {
1863
- "parent" => request.parent
1864
- }
2330
+ header_params = {}
2331
+ if request.parent
2332
+ header_params["parent"] = request.parent
2333
+ end
2334
+
1865
2335
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1866
2336
  metadata[:"x-goog-request-params"] ||= request_params_header
1867
2337
 
@@ -1911,6 +2381,21 @@ module Google
1911
2381
  #
1912
2382
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1913
2383
  #
2384
+ # @example Basic example
2385
+ # require "google/cloud/contact_center_insights/v1"
2386
+ #
2387
+ # # Create a client object. The client can be reused for multiple calls.
2388
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
2389
+ #
2390
+ # # Create a request. To set request fields, pass in keyword arguments.
2391
+ # request = Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new
2392
+ #
2393
+ # # Call the delete_phrase_matcher method.
2394
+ # result = client.delete_phrase_matcher request
2395
+ #
2396
+ # # The returned object is of type Google::Protobuf::Empty.
2397
+ # p result
2398
+ #
1914
2399
  def delete_phrase_matcher request, options = nil
1915
2400
  raise ::ArgumentError, "request must be provided" if request.nil?
1916
2401
 
@@ -1928,9 +2413,11 @@ module Google
1928
2413
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
1929
2414
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1930
2415
 
1931
- header_params = {
1932
- "name" => request.name
1933
- }
2416
+ header_params = {}
2417
+ if request.name
2418
+ header_params["name"] = request.name
2419
+ end
2420
+
1934
2421
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1935
2422
  metadata[:"x-goog-request-params"] ||= request_params_header
1936
2423
 
@@ -1950,6 +2437,93 @@ module Google
1950
2437
  raise ::Google::Cloud::Error.from_error(e)
1951
2438
  end
1952
2439
 
2440
+ ##
2441
+ # Updates a phrase matcher.
2442
+ #
2443
+ # @overload update_phrase_matcher(request, options = nil)
2444
+ # Pass arguments to `update_phrase_matcher` via a request object, either of type
2445
+ # {::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest} or an equivalent Hash.
2446
+ #
2447
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest, ::Hash]
2448
+ # A request object representing the call parameters. Required. To specify no
2449
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2450
+ # @param options [::Gapic::CallOptions, ::Hash]
2451
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2452
+ #
2453
+ # @overload update_phrase_matcher(phrase_matcher: nil, update_mask: nil)
2454
+ # Pass arguments to `update_phrase_matcher` via keyword arguments. Note that at
2455
+ # least one keyword argument is required. To specify no parameters, or to keep all
2456
+ # the default parameter values, pass an empty Hash as a request object (see above).
2457
+ #
2458
+ # @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash]
2459
+ # Required. The new values for the phrase matcher.
2460
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2461
+ # The list of fields to be updated.
2462
+ #
2463
+ # @yield [response, operation] Access the result along with the RPC operation
2464
+ # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
2465
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2466
+ #
2467
+ # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
2468
+ #
2469
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2470
+ #
2471
+ # @example Basic example
2472
+ # require "google/cloud/contact_center_insights/v1"
2473
+ #
2474
+ # # Create a client object. The client can be reused for multiple calls.
2475
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
2476
+ #
2477
+ # # Create a request. To set request fields, pass in keyword arguments.
2478
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new
2479
+ #
2480
+ # # Call the update_phrase_matcher method.
2481
+ # result = client.update_phrase_matcher request
2482
+ #
2483
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.
2484
+ # p result
2485
+ #
2486
+ def update_phrase_matcher request, options = nil
2487
+ raise ::ArgumentError, "request must be provided" if request.nil?
2488
+
2489
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest
2490
+
2491
+ # Converts hash and nil to an options object
2492
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2493
+
2494
+ # Customize the options with defaults
2495
+ metadata = @config.rpcs.update_phrase_matcher.metadata.to_h
2496
+
2497
+ # Set x-goog-api-client and x-goog-user-project headers
2498
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2499
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2500
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
2501
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2502
+
2503
+ header_params = {}
2504
+ if request.phrase_matcher&.name
2505
+ header_params["phrase_matcher.name"] = request.phrase_matcher.name
2506
+ end
2507
+
2508
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2509
+ metadata[:"x-goog-request-params"] ||= request_params_header
2510
+
2511
+ options.apply_defaults timeout: @config.rpcs.update_phrase_matcher.timeout,
2512
+ metadata: metadata,
2513
+ retry_policy: @config.rpcs.update_phrase_matcher.retry_policy
2514
+
2515
+ options.apply_defaults timeout: @config.timeout,
2516
+ metadata: @config.metadata,
2517
+ retry_policy: @config.retry_policy
2518
+
2519
+ @contact_center_insights_stub.call_rpc :update_phrase_matcher, request, options: options do |response, operation|
2520
+ yield response, operation if block_given?
2521
+ return response
2522
+ end
2523
+ rescue ::GRPC::BadStatus => e
2524
+ raise ::Google::Cloud::Error.from_error(e)
2525
+ end
2526
+
1953
2527
  ##
1954
2528
  # Gets conversation statistics.
1955
2529
  #
@@ -1982,6 +2556,21 @@ module Google
1982
2556
  #
1983
2557
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1984
2558
  #
2559
+ # @example Basic example
2560
+ # require "google/cloud/contact_center_insights/v1"
2561
+ #
2562
+ # # Create a client object. The client can be reused for multiple calls.
2563
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
2564
+ #
2565
+ # # Create a request. To set request fields, pass in keyword arguments.
2566
+ # request = Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new
2567
+ #
2568
+ # # Call the calculate_stats method.
2569
+ # result = client.calculate_stats request
2570
+ #
2571
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse.
2572
+ # p result
2573
+ #
1985
2574
  def calculate_stats request, options = nil
1986
2575
  raise ::ArgumentError, "request must be provided" if request.nil?
1987
2576
 
@@ -1999,9 +2588,11 @@ module Google
1999
2588
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
2000
2589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2001
2590
 
2002
- header_params = {
2003
- "location" => request.location
2004
- }
2591
+ header_params = {}
2592
+ if request.location
2593
+ header_params["location"] = request.location
2594
+ end
2595
+
2005
2596
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2006
2597
  metadata[:"x-goog-request-params"] ||= request_params_header
2007
2598
 
@@ -2050,6 +2641,21 @@ module Google
2050
2641
  #
2051
2642
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2052
2643
  #
2644
+ # @example Basic example
2645
+ # require "google/cloud/contact_center_insights/v1"
2646
+ #
2647
+ # # Create a client object. The client can be reused for multiple calls.
2648
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
2649
+ #
2650
+ # # Create a request. To set request fields, pass in keyword arguments.
2651
+ # request = Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new
2652
+ #
2653
+ # # Call the get_settings method.
2654
+ # result = client.get_settings request
2655
+ #
2656
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings.
2657
+ # p result
2658
+ #
2053
2659
  def get_settings request, options = nil
2054
2660
  raise ::ArgumentError, "request must be provided" if request.nil?
2055
2661
 
@@ -2067,9 +2673,11 @@ module Google
2067
2673
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
2068
2674
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2069
2675
 
2070
- header_params = {
2071
- "name" => request.name
2072
- }
2676
+ header_params = {}
2677
+ if request.name
2678
+ header_params["name"] = request.name
2679
+ end
2680
+
2073
2681
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2074
2682
  metadata[:"x-goog-request-params"] ||= request_params_header
2075
2683
 
@@ -2120,6 +2728,21 @@ module Google
2120
2728
  #
2121
2729
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2122
2730
  #
2731
+ # @example Basic example
2732
+ # require "google/cloud/contact_center_insights/v1"
2733
+ #
2734
+ # # Create a client object. The client can be reused for multiple calls.
2735
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
2736
+ #
2737
+ # # Create a request. To set request fields, pass in keyword arguments.
2738
+ # request = Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new
2739
+ #
2740
+ # # Call the update_settings method.
2741
+ # result = client.update_settings request
2742
+ #
2743
+ # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings.
2744
+ # p result
2745
+ #
2123
2746
  def update_settings request, options = nil
2124
2747
  raise ::ArgumentError, "request must be provided" if request.nil?
2125
2748
 
@@ -2137,9 +2760,11 @@ module Google
2137
2760
  gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
2138
2761
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2139
2762
 
2140
- header_params = {
2141
- "settings.name" => request.settings.name
2142
- }
2763
+ header_params = {}
2764
+ if request.settings&.name
2765
+ header_params["settings.name"] = request.settings.name
2766
+ end
2767
+
2143
2768
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2144
2769
  metadata[:"x-goog-request-params"] ||= request_params_header
2145
2770
 
@@ -2420,6 +3045,11 @@ module Google
2420
3045
  #
2421
3046
  attr_reader :delete_phrase_matcher
2422
3047
  ##
3048
+ # RPC-specific configuration for `update_phrase_matcher`
3049
+ # @return [::Gapic::Config::Method]
3050
+ #
3051
+ attr_reader :update_phrase_matcher
3052
+ ##
2423
3053
  # RPC-specific configuration for `calculate_stats`
2424
3054
  # @return [::Gapic::Config::Method]
2425
3055
  #
@@ -2487,6 +3117,8 @@ module Google
2487
3117
  @list_phrase_matchers = ::Gapic::Config::Method.new list_phrase_matchers_config
2488
3118
  delete_phrase_matcher_config = parent_rpcs.delete_phrase_matcher if parent_rpcs.respond_to? :delete_phrase_matcher
2489
3119
  @delete_phrase_matcher = ::Gapic::Config::Method.new delete_phrase_matcher_config
3120
+ update_phrase_matcher_config = parent_rpcs.update_phrase_matcher if parent_rpcs.respond_to? :update_phrase_matcher
3121
+ @update_phrase_matcher = ::Gapic::Config::Method.new update_phrase_matcher_config
2490
3122
  calculate_stats_config = parent_rpcs.calculate_stats if parent_rpcs.respond_to? :calculate_stats
2491
3123
  @calculate_stats = ::Gapic::Config::Method.new calculate_stats_config
2492
3124
  get_settings_config = parent_rpcs.get_settings if parent_rpcs.respond_to? :get_settings