google-cloud-dialogflow-cx-v3 0.1.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +2 -2
  3. data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +2 -2
  4. data/lib/google/cloud/dialogflow/cx/v3/agent_services_pb.rb +10 -1
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +209 -27
  6. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +115 -12
  7. data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +2 -2
  8. data/lib/google/cloud/dialogflow/cx/v3/changelog_pb.rb +52 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/changelog_services_pb.rb +49 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +522 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs/credentials.rb +54 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/changelogs/paths.rb +75 -0
  13. data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +51 -0
  14. data/lib/google/cloud/dialogflow/cx/v3/deployment_pb.rb +63 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/deployment_services_pb.rb +49 -0
  16. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +502 -0
  17. data/lib/google/cloud/dialogflow/cx/v3/deployments/credentials.rb +54 -0
  18. data/lib/google/cloud/dialogflow/cx/v3/deployments/paths.rb +79 -0
  19. data/lib/google/cloud/dialogflow/cx/v3/deployments.rb +51 -0
  20. data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +2 -2
  21. data/lib/google/cloud/dialogflow/cx/v3/entity_type_services_pb.rb +1 -1
  22. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +106 -15
  23. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +24 -2
  24. data/lib/google/cloud/dialogflow/cx/v3/environment_services_pb.rb +33 -1
  25. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +335 -24
  26. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +115 -12
  27. data/lib/google/cloud/dialogflow/cx/v3/environments/paths.rb +21 -0
  28. data/lib/google/cloud/dialogflow/cx/v3/experiment_pb.rb +2 -2
  29. data/lib/google/cloud/dialogflow/cx/v3/experiment_services_pb.rb +1 -1
  30. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +146 -21
  31. data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +2 -2
  32. data/lib/google/cloud/dialogflow/cx/v3/flow_services_pb.rb +26 -1
  33. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +252 -30
  34. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +115 -12
  35. data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +2 -2
  36. data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +2 -2
  37. data/lib/google/cloud/dialogflow/cx/v3/intent_services_pb.rb +1 -1
  38. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +106 -15
  39. data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +2 -2
  40. data/lib/google/cloud/dialogflow/cx/v3/page_services_pb.rb +1 -1
  41. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +106 -15
  42. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +9 -2
  43. data/lib/google/cloud/dialogflow/cx/v3/security_settings_pb.rb +2 -2
  44. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +106 -15
  45. data/lib/google/cloud/dialogflow/cx/v3/security_settings_services_pb.rb +1 -1
  46. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_pb.rb +2 -2
  47. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_services_pb.rb +1 -1
  48. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +106 -15
  49. data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +3 -2
  50. data/lib/google/cloud/dialogflow/cx/v3/session_services_pb.rb +1 -1
  51. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +84 -9
  52. data/lib/google/cloud/dialogflow/cx/v3/test_case_pb.rb +2 -2
  53. data/lib/google/cloud/dialogflow/cx/v3/test_case_services_pb.rb +23 -1
  54. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +302 -36
  55. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +115 -12
  56. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_pb.rb +2 -2
  57. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_services_pb.rb +1 -1
  58. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +106 -15
  59. data/lib/google/cloud/dialogflow/cx/v3/validation_message_pb.rb +2 -2
  60. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  61. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +14 -2
  62. data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +19 -1
  63. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +265 -18
  64. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +115 -12
  65. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +3 -2
  66. data/lib/google/cloud/dialogflow/cx/v3/webhook_services_pb.rb +1 -1
  67. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +106 -15
  68. data/lib/google/cloud/dialogflow/cx/v3.rb +3 -1
  69. data/proto_docs/google/cloud/dialogflow/cx/v3/changelog.rb +122 -0
  70. data/proto_docs/google/cloud/dialogflow/cx/v3/deployment.rb +135 -0
  71. data/proto_docs/google/cloud/dialogflow/cx/v3/environment.rb +62 -0
  72. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +15 -0
  73. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +15 -2
  74. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +58 -42
  75. data/proto_docs/google/cloud/dialogflow/cx/v3/test_case.rb +1 -0
  76. data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +43 -0
  77. data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +13 -0
  78. metadata +16 -2
@@ -198,6 +198,27 @@ module Google
198
198
  #
199
199
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
200
200
  #
201
+ # @example Basic example
202
+ # require "google/cloud/dialogflow/cx/v3"
203
+ #
204
+ # # Create a client object. The client can be reused for multiple calls.
205
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
206
+ #
207
+ # # Create a request. To set request fields, pass in keyword arguments.
208
+ # request = Google::Cloud::Dialogflow::CX::V3::ListVersionsRequest.new
209
+ #
210
+ # # Call the list_versions method.
211
+ # result = client.list_versions request
212
+ #
213
+ # # The returned object is of type Gapic::PagedEnumerable. You can
214
+ # # iterate over all elements by calling #each, and the enumerable
215
+ # # will lazily make API calls to fetch subsequent pages. Other
216
+ # # methods are also available for managing paging directly.
217
+ # result.each do |response|
218
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Version.
219
+ # p response
220
+ # end
221
+ #
201
222
  def list_versions request, options = nil
202
223
  raise ::ArgumentError, "request must be provided" if request.nil?
203
224
 
@@ -215,9 +236,11 @@ module Google
215
236
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
216
237
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
217
238
 
218
- header_params = {
219
- "parent" => request.parent
220
- }
239
+ header_params = {}
240
+ if request.parent
241
+ header_params["parent"] = request.parent
242
+ end
243
+
221
244
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
222
245
  metadata[:"x-goog-request-params"] ||= request_params_header
223
246
 
@@ -269,6 +292,21 @@ module Google
269
292
  #
270
293
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
271
294
  #
295
+ # @example Basic example
296
+ # require "google/cloud/dialogflow/cx/v3"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Dialogflow::CX::V3::GetVersionRequest.new
303
+ #
304
+ # # Call the get_version method.
305
+ # result = client.get_version request
306
+ #
307
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Version.
308
+ # p result
309
+ #
272
310
  def get_version request, options = nil
273
311
  raise ::ArgumentError, "request must be provided" if request.nil?
274
312
 
@@ -286,9 +324,11 @@ module Google
286
324
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
287
325
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
288
326
 
289
- header_params = {
290
- "name" => request.name
291
- }
327
+ header_params = {}
328
+ if request.name
329
+ header_params["name"] = request.name
330
+ end
331
+
292
332
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
293
333
  metadata[:"x-goog-request-params"] ||= request_params_header
294
334
 
@@ -311,6 +351,13 @@ module Google
311
351
  ##
312
352
  # Creates a {::Google::Cloud::Dialogflow::CX::V3::Version Version} in the specified {::Google::Cloud::Dialogflow::CX::V3::Flow Flow}.
313
353
  #
354
+ # This method is a [long-running
355
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
356
+ # The returned `Operation` type has the following method-specific fields:
357
+ #
358
+ # - `metadata`: {::Google::Cloud::Dialogflow::CX::V3::CreateVersionOperationMetadata CreateVersionOperationMetadata}
359
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::Version Version}
360
+ #
314
361
  # @overload create_version(request, options = nil)
315
362
  # Pass arguments to `create_version` via a request object, either of type
316
363
  # {::Google::Cloud::Dialogflow::CX::V3::CreateVersionRequest} or an equivalent Hash.
@@ -341,6 +388,28 @@ module Google
341
388
  #
342
389
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
343
390
  #
391
+ # @example Basic example
392
+ # require "google/cloud/dialogflow/cx/v3"
393
+ #
394
+ # # Create a client object. The client can be reused for multiple calls.
395
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
396
+ #
397
+ # # Create a request. To set request fields, pass in keyword arguments.
398
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateVersionRequest.new
399
+ #
400
+ # # Call the create_version method.
401
+ # result = client.create_version request
402
+ #
403
+ # # The returned object is of type Gapic::Operation. You can use this
404
+ # # object to check the status of an operation, cancel it, or wait
405
+ # # for results. Here is how to block until completion:
406
+ # result.wait_until_done! timeout: 60
407
+ # if result.response?
408
+ # p result.response
409
+ # else
410
+ # puts "Error!"
411
+ # end
412
+ #
344
413
  def create_version request, options = nil
345
414
  raise ::ArgumentError, "request must be provided" if request.nil?
346
415
 
@@ -358,9 +427,11 @@ module Google
358
427
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
359
428
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
360
429
 
361
- header_params = {
362
- "parent" => request.parent
363
- }
430
+ header_params = {}
431
+ if request.parent
432
+ header_params["parent"] = request.parent
433
+ end
434
+
364
435
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
365
436
  metadata[:"x-goog-request-params"] ||= request_params_header
366
437
 
@@ -413,6 +484,21 @@ module Google
413
484
  #
414
485
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
415
486
  #
487
+ # @example Basic example
488
+ # require "google/cloud/dialogflow/cx/v3"
489
+ #
490
+ # # Create a client object. The client can be reused for multiple calls.
491
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
492
+ #
493
+ # # Create a request. To set request fields, pass in keyword arguments.
494
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateVersionRequest.new
495
+ #
496
+ # # Call the update_version method.
497
+ # result = client.update_version request
498
+ #
499
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Version.
500
+ # p result
501
+ #
416
502
  def update_version request, options = nil
417
503
  raise ::ArgumentError, "request must be provided" if request.nil?
418
504
 
@@ -430,9 +516,11 @@ module Google
430
516
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
431
517
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
432
518
 
433
- header_params = {
434
- "version.name" => request.version.name
435
- }
519
+ header_params = {}
520
+ if request.version&.name
521
+ header_params["version.name"] = request.version.name
522
+ end
523
+
436
524
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
437
525
  metadata[:"x-goog-request-params"] ||= request_params_header
438
526
 
@@ -483,6 +571,21 @@ module Google
483
571
  #
484
572
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
485
573
  #
574
+ # @example Basic example
575
+ # require "google/cloud/dialogflow/cx/v3"
576
+ #
577
+ # # Create a client object. The client can be reused for multiple calls.
578
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
579
+ #
580
+ # # Create a request. To set request fields, pass in keyword arguments.
581
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteVersionRequest.new
582
+ #
583
+ # # Call the delete_version method.
584
+ # result = client.delete_version request
585
+ #
586
+ # # The returned object is of type Google::Protobuf::Empty.
587
+ # p result
588
+ #
486
589
  def delete_version request, options = nil
487
590
  raise ::ArgumentError, "request must be provided" if request.nil?
488
591
 
@@ -500,9 +603,11 @@ module Google
500
603
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
501
604
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
502
605
 
503
- header_params = {
504
- "name" => request.name
505
- }
606
+ header_params = {}
607
+ if request.name
608
+ header_params["name"] = request.name
609
+ end
610
+
506
611
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
507
612
  metadata[:"x-goog-request-params"] ||= request_params_header
508
613
 
@@ -525,6 +630,15 @@ module Google
525
630
  ##
526
631
  # Loads resources in the specified version to the draft flow.
527
632
  #
633
+ # This method is a [long-running
634
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
635
+ # The returned `Operation` type has the following method-specific fields:
636
+ #
637
+ # - `metadata`: An empty [Struct
638
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
639
+ # - `response`: An [Empty
640
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
641
+ #
528
642
  # @overload load_version(request, options = nil)
529
643
  # Pass arguments to `load_version` via a request object, either of type
530
644
  # {::Google::Cloud::Dialogflow::CX::V3::LoadVersionRequest} or an equivalent Hash.
@@ -558,6 +672,28 @@ module Google
558
672
  #
559
673
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
560
674
  #
675
+ # @example Basic example
676
+ # require "google/cloud/dialogflow/cx/v3"
677
+ #
678
+ # # Create a client object. The client can be reused for multiple calls.
679
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
680
+ #
681
+ # # Create a request. To set request fields, pass in keyword arguments.
682
+ # request = Google::Cloud::Dialogflow::CX::V3::LoadVersionRequest.new
683
+ #
684
+ # # Call the load_version method.
685
+ # result = client.load_version request
686
+ #
687
+ # # The returned object is of type Gapic::Operation. You can use this
688
+ # # object to check the status of an operation, cancel it, or wait
689
+ # # for results. Here is how to block until completion:
690
+ # result.wait_until_done! timeout: 60
691
+ # if result.response?
692
+ # p result.response
693
+ # else
694
+ # puts "Error!"
695
+ # end
696
+ #
561
697
  def load_version request, options = nil
562
698
  raise ::ArgumentError, "request must be provided" if request.nil?
563
699
 
@@ -575,9 +711,11 @@ module Google
575
711
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
576
712
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
577
713
 
578
- header_params = {
579
- "name" => request.name
580
- }
714
+ header_params = {}
715
+ if request.name
716
+ header_params["name"] = request.name
717
+ end
718
+
581
719
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
582
720
  metadata[:"x-goog-request-params"] ||= request_params_header
583
721
 
@@ -598,6 +736,108 @@ module Google
598
736
  raise ::Google::Cloud::Error.from_error(e)
599
737
  end
600
738
 
739
+ ##
740
+ # Compares the specified base version with target version.
741
+ #
742
+ # @overload compare_versions(request, options = nil)
743
+ # Pass arguments to `compare_versions` via a request object, either of type
744
+ # {::Google::Cloud::Dialogflow::CX::V3::CompareVersionsRequest} or an equivalent Hash.
745
+ #
746
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::CompareVersionsRequest, ::Hash]
747
+ # A request object representing the call parameters. Required. To specify no
748
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
749
+ # @param options [::Gapic::CallOptions, ::Hash]
750
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
751
+ #
752
+ # @overload compare_versions(base_version: nil, target_version: nil, language_code: nil)
753
+ # Pass arguments to `compare_versions` via keyword arguments. Note that at
754
+ # least one keyword argument is required. To specify no parameters, or to keep all
755
+ # the default parameter values, pass an empty Hash as a request object (see above).
756
+ #
757
+ # @param base_version [::String]
758
+ # Required. Name of the base flow version to compare with the target version. Use
759
+ # version ID `0` to indicate the draft version of the specified flow.
760
+ #
761
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/
762
+ # <Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
763
+ # @param target_version [::String]
764
+ # Required. Name of the target flow version to compare with the
765
+ # base version. Use version ID `0` to indicate the draft version of the
766
+ # specified flow. Format: `projects/<Project ID>/locations/<Location
767
+ # ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
768
+ # @param language_code [::String]
769
+ # The language to compare the flow versions for.
770
+ #
771
+ # If not specified, the agent's default language is used.
772
+ # [Many
773
+ # languages](https://cloud.google.com/dialogflow/docs/reference/language) are
774
+ # supported. Note: languages must be enabled in the agent before they can be
775
+ # used.
776
+ #
777
+ # @yield [response, operation] Access the result along with the RPC operation
778
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse]
779
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
780
+ #
781
+ # @return [::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse]
782
+ #
783
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
784
+ #
785
+ # @example Basic example
786
+ # require "google/cloud/dialogflow/cx/v3"
787
+ #
788
+ # # Create a client object. The client can be reused for multiple calls.
789
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
790
+ #
791
+ # # Create a request. To set request fields, pass in keyword arguments.
792
+ # request = Google::Cloud::Dialogflow::CX::V3::CompareVersionsRequest.new
793
+ #
794
+ # # Call the compare_versions method.
795
+ # result = client.compare_versions request
796
+ #
797
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse.
798
+ # p result
799
+ #
800
+ def compare_versions request, options = nil
801
+ raise ::ArgumentError, "request must be provided" if request.nil?
802
+
803
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::CompareVersionsRequest
804
+
805
+ # Converts hash and nil to an options object
806
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
807
+
808
+ # Customize the options with defaults
809
+ metadata = @config.rpcs.compare_versions.metadata.to_h
810
+
811
+ # Set x-goog-api-client and x-goog-user-project headers
812
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
813
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
814
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
815
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
816
+
817
+ header_params = {}
818
+ if request.base_version
819
+ header_params["base_version"] = request.base_version
820
+ end
821
+
822
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
823
+ metadata[:"x-goog-request-params"] ||= request_params_header
824
+
825
+ options.apply_defaults timeout: @config.rpcs.compare_versions.timeout,
826
+ metadata: metadata,
827
+ retry_policy: @config.rpcs.compare_versions.retry_policy
828
+
829
+ options.apply_defaults timeout: @config.timeout,
830
+ metadata: @config.metadata,
831
+ retry_policy: @config.retry_policy
832
+
833
+ @versions_stub.call_rpc :compare_versions, request, options: options do |response, operation|
834
+ yield response, operation if block_given?
835
+ return response
836
+ end
837
+ rescue ::GRPC::BadStatus => e
838
+ raise ::Google::Cloud::Error.from_error(e)
839
+ end
840
+
601
841
  ##
602
842
  # Configuration class for the Versions API.
603
843
  #
@@ -763,6 +1003,11 @@ module Google
763
1003
  # @return [::Gapic::Config::Method]
764
1004
  #
765
1005
  attr_reader :load_version
1006
+ ##
1007
+ # RPC-specific configuration for `compare_versions`
1008
+ # @return [::Gapic::Config::Method]
1009
+ #
1010
+ attr_reader :compare_versions
766
1011
 
767
1012
  # @private
768
1013
  def initialize parent_rpcs = nil
@@ -778,6 +1023,8 @@ module Google
778
1023
  @delete_version = ::Gapic::Config::Method.new delete_version_config
779
1024
  load_version_config = parent_rpcs.load_version if parent_rpcs.respond_to? :load_version
780
1025
  @load_version = ::Gapic::Config::Method.new load_version_config
1026
+ compare_versions_config = parent_rpcs.compare_versions if parent_rpcs.respond_to? :compare_versions
1027
+ @compare_versions = ::Gapic::Config::Method.new compare_versions_config
781
1028
 
782
1029
  yield self if block_given?
783
1030
  end
@@ -144,6 +144,27 @@ module Google
144
144
  #
145
145
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
146
146
  #
147
+ # @example Basic example
148
+ # require "google/longrunning"
149
+ #
150
+ # # Create a client object. The client can be reused for multiple calls.
151
+ # client = Google::Longrunning::Operations::Client.new
152
+ #
153
+ # # Create a request. To set request fields, pass in keyword arguments.
154
+ # request = Google::Longrunning::ListOperationsRequest.new
155
+ #
156
+ # # Call the list_operations method.
157
+ # result = client.list_operations request
158
+ #
159
+ # # The returned object is of type Gapic::PagedEnumerable. You can
160
+ # # iterate over all elements by calling #each, and the enumerable
161
+ # # will lazily make API calls to fetch subsequent pages. Other
162
+ # # methods are also available for managing paging directly.
163
+ # result.each do |response|
164
+ # # Each element is of type ::Google::Longrunning::Operation.
165
+ # p response
166
+ # end
167
+ #
147
168
  def list_operations request, options = nil
148
169
  raise ::ArgumentError, "request must be provided" if request.nil?
149
170
 
@@ -161,9 +182,11 @@ module Google
161
182
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
162
183
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
163
184
 
164
- header_params = {
165
- "name" => request.name
166
- }
185
+ header_params = {}
186
+ if request.name
187
+ header_params["name"] = request.name
188
+ end
189
+
167
190
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
168
191
  metadata[:"x-goog-request-params"] ||= request_params_header
169
192
 
@@ -216,6 +239,28 @@ module Google
216
239
  #
217
240
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
218
241
  #
242
+ # @example Basic example
243
+ # require "google/longrunning"
244
+ #
245
+ # # Create a client object. The client can be reused for multiple calls.
246
+ # client = Google::Longrunning::Operations::Client.new
247
+ #
248
+ # # Create a request. To set request fields, pass in keyword arguments.
249
+ # request = Google::Longrunning::GetOperationRequest.new
250
+ #
251
+ # # Call the get_operation method.
252
+ # result = client.get_operation request
253
+ #
254
+ # # The returned object is of type Gapic::Operation. You can use this
255
+ # # object to check the status of an operation, cancel it, or wait
256
+ # # for results. Here is how to block until completion:
257
+ # result.wait_until_done! timeout: 60
258
+ # if result.response?
259
+ # p result.response
260
+ # else
261
+ # puts "Error!"
262
+ # end
263
+ #
219
264
  def get_operation request, options = nil
220
265
  raise ::ArgumentError, "request must be provided" if request.nil?
221
266
 
@@ -233,9 +278,11 @@ module Google
233
278
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
234
279
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
235
280
 
236
- header_params = {
237
- "name" => request.name
238
- }
281
+ header_params = {}
282
+ if request.name
283
+ header_params["name"] = request.name
284
+ end
285
+
239
286
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
240
287
  metadata[:"x-goog-request-params"] ||= request_params_header
241
288
 
@@ -288,6 +335,21 @@ module Google
288
335
  #
289
336
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
290
337
  #
338
+ # @example Basic example
339
+ # require "google/longrunning"
340
+ #
341
+ # # Create a client object. The client can be reused for multiple calls.
342
+ # client = Google::Longrunning::Operations::Client.new
343
+ #
344
+ # # Create a request. To set request fields, pass in keyword arguments.
345
+ # request = Google::Longrunning::DeleteOperationRequest.new
346
+ #
347
+ # # Call the delete_operation method.
348
+ # result = client.delete_operation request
349
+ #
350
+ # # The returned object is of type Google::Protobuf::Empty.
351
+ # p result
352
+ #
291
353
  def delete_operation request, options = nil
292
354
  raise ::ArgumentError, "request must be provided" if request.nil?
293
355
 
@@ -305,9 +367,11 @@ module Google
305
367
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
306
368
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
369
 
308
- header_params = {
309
- "name" => request.name
310
- }
370
+ header_params = {}
371
+ if request.name
372
+ header_params["name"] = request.name
373
+ end
374
+
311
375
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
312
376
  metadata[:"x-goog-request-params"] ||= request_params_header
313
377
 
@@ -365,6 +429,21 @@ module Google
365
429
  #
366
430
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
367
431
  #
432
+ # @example Basic example
433
+ # require "google/longrunning"
434
+ #
435
+ # # Create a client object. The client can be reused for multiple calls.
436
+ # client = Google::Longrunning::Operations::Client.new
437
+ #
438
+ # # Create a request. To set request fields, pass in keyword arguments.
439
+ # request = Google::Longrunning::CancelOperationRequest.new
440
+ #
441
+ # # Call the cancel_operation method.
442
+ # result = client.cancel_operation request
443
+ #
444
+ # # The returned object is of type Google::Protobuf::Empty.
445
+ # p result
446
+ #
368
447
  def cancel_operation request, options = nil
369
448
  raise ::ArgumentError, "request must be provided" if request.nil?
370
449
 
@@ -382,9 +461,11 @@ module Google
382
461
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
383
462
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
463
 
385
- header_params = {
386
- "name" => request.name
387
- }
464
+ header_params = {}
465
+ if request.name
466
+ header_params["name"] = request.name
467
+ end
468
+
388
469
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
389
470
  metadata[:"x-goog-request-params"] ||= request_params_header
390
471
 
@@ -445,6 +526,28 @@ module Google
445
526
  #
446
527
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
447
528
  #
529
+ # @example Basic example
530
+ # require "google/longrunning"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Longrunning::Operations::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Longrunning::WaitOperationRequest.new
537
+ #
538
+ # # Call the wait_operation method.
539
+ # result = client.wait_operation request
540
+ #
541
+ # # The returned object is of type Gapic::Operation. You can use this
542
+ # # object to check the status of an operation, cancel it, or wait
543
+ # # for results. Here is how to block until completion:
544
+ # result.wait_until_done! timeout: 60
545
+ # if result.response?
546
+ # p result.response
547
+ # else
548
+ # puts "Error!"
549
+ # end
550
+ #
448
551
  def wait_operation request, options = nil
449
552
  raise ::ArgumentError, "request must be provided" if request.nil?
450
553
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/cx/v3/webhook.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -12,6 +10,8 @@ require 'google/protobuf/duration_pb'
12
10
  require 'google/protobuf/empty_pb'
13
11
  require 'google/protobuf/field_mask_pb'
14
12
  require 'google/protobuf/struct_pb'
13
+ require 'google/protobuf'
14
+
15
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
16
  add_file("google/cloud/dialogflow/cx/v3/webhook.proto", :syntax => :proto3) do
17
17
  add_message "google.cloud.dialogflow.cx.v3.Webhook" do
@@ -29,6 +29,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
29
  optional :username, :string, 2
30
30
  optional :password, :string, 3
31
31
  map :request_headers, :string, :string, 4
32
+ repeated :allowed_ca_certs, :bytes, 5
32
33
  end
33
34
  add_message "google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig" do
34
35
  optional :service, :string, 1
@@ -28,7 +28,7 @@ module Google
28
28
  # Service for managing [Webhooks][google.cloud.dialogflow.cx.v3.Webhook].
29
29
  class Service
30
30
 
31
- include GRPC::GenericService
31
+ include ::GRPC::GenericService
32
32
 
33
33
  self.marshal_class_method = :encode
34
34
  self.unmarshal_class_method = :decode