google-cloud-dialogflow-cx-v3 0.2.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +201 -27
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +115 -12
  6. data/lib/google/cloud/dialogflow/cx/v3/changelog_pb.rb +52 -0
  7. data/lib/google/cloud/dialogflow/cx/v3/changelog_services_pb.rb +49 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +522 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/changelogs/credentials.rb +54 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/changelogs/paths.rb +75 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +51 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +46 -6
  13. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +106 -15
  14. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +1 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +227 -27
  16. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +115 -12
  17. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +146 -21
  18. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +228 -30
  19. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +115 -12
  20. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +106 -15
  21. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +106 -15
  22. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +7 -0
  23. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +106 -15
  24. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +106 -15
  25. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +84 -9
  26. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +281 -36
  27. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +115 -12
  28. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +106 -15
  29. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  30. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +12 -0
  31. data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +2 -0
  32. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +250 -18
  33. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +115 -12
  34. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +2 -0
  35. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +106 -15
  36. data/lib/google/cloud/dialogflow/cx/v3.rb +2 -1
  37. data/proto_docs/google/api/resource.rb +10 -71
  38. data/proto_docs/google/cloud/dialogflow/cx/v3/changelog.rb +122 -0
  39. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +15 -0
  40. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +11 -1
  41. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +54 -42
  42. data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +43 -0
  43. data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +17 -0
  44. metadata +10 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c569fab9e4982554d1a6848682bbc6b2be3101809f17433f34fd717a4b690dd
4
- data.tar.gz: f8412e6d023b6b0736a3689b345ec68a32f4dc315fddc70ab4f6099a45cd2480
3
+ metadata.gz: b2e4d6df916cd1ec66541de62560a1df00498546cae45346bc8659ab70800e9e
4
+ data.tar.gz: 81b7cfda16f3f0edaa278a1a48554fc809966eb673c193a54a72115e47dc5144
5
5
  SHA512:
6
- metadata.gz: 8a2fd77e6556c9d6bb68bdbc79eae991c6bdfe326aa6e93f23a694ef3af861c880853fdc192e63353d65a6080dfd380902c14091df251089f759f1a3f1b709d9
7
- data.tar.gz: a8abd49e9cf183f7f199f35e770c28b4716725072b4ea3373a74e0043e3f8e6a2e9213be909cddfc8af765e4adb3d960f41a0d93a8ea79c3f03c1824f7e0af25
6
+ metadata.gz: ee476d6dbf2ea36cad25c20e0ad09180b12b7a0ab31566b4db1503288f5c8aff372ecdcdf69da30dbd03dbe5fe45c602496027ac9cac42425ab44121169db51b
7
+ data.tar.gz: de84b957b161b685b62d0fd90438aec138d4a11184b3dc5bc4e410e6cfb834f7f87870f2be302b6159a24d9cd45431d5642920620672f8b1579e41cfb8aedd27
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Dialogflow CX V3 API
2
+ --title="Dialogflow CX V3 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
@@ -141,6 +141,7 @@ module Google
141
141
 
142
142
  @operations_client = Operations.new do |config|
143
143
  config.credentials = credentials
144
+ config.quota_project = @quota_project_id
144
145
  config.endpoint = @config.endpoint
145
146
  end
146
147
 
@@ -197,6 +198,27 @@ module Google
197
198
  #
198
199
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
199
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::Agents::Client.new
206
+ #
207
+ # # Create a request. To set request fields, pass in keyword arguments.
208
+ # request = Google::Cloud::Dialogflow::CX::V3::ListAgentsRequest.new
209
+ #
210
+ # # Call the list_agents method.
211
+ # result = client.list_agents 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::Agent.
219
+ # p response
220
+ # end
221
+ #
200
222
  def list_agents request, options = nil
201
223
  raise ::ArgumentError, "request must be provided" if request.nil?
202
224
 
@@ -214,9 +236,11 @@ module Google
214
236
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
215
237
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
216
238
 
217
- header_params = {
218
- "parent" => request.parent
219
- }
239
+ header_params = {}
240
+ if request.parent
241
+ header_params["parent"] = request.parent
242
+ end
243
+
220
244
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
221
245
  metadata[:"x-goog-request-params"] ||= request_params_header
222
246
 
@@ -267,6 +291,21 @@ module Google
267
291
  #
268
292
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
269
293
  #
294
+ # @example Basic example
295
+ # require "google/cloud/dialogflow/cx/v3"
296
+ #
297
+ # # Create a client object. The client can be reused for multiple calls.
298
+ # client = Google::Cloud::Dialogflow::CX::V3::Agents::Client.new
299
+ #
300
+ # # Create a request. To set request fields, pass in keyword arguments.
301
+ # request = Google::Cloud::Dialogflow::CX::V3::GetAgentRequest.new
302
+ #
303
+ # # Call the get_agent method.
304
+ # result = client.get_agent request
305
+ #
306
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Agent.
307
+ # p result
308
+ #
270
309
  def get_agent request, options = nil
271
310
  raise ::ArgumentError, "request must be provided" if request.nil?
272
311
 
@@ -284,9 +323,11 @@ module Google
284
323
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
285
324
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
286
325
 
287
- header_params = {
288
- "name" => request.name
289
- }
326
+ header_params = {}
327
+ if request.name
328
+ header_params["name"] = request.name
329
+ end
330
+
290
331
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
291
332
  metadata[:"x-goog-request-params"] ||= request_params_header
292
333
 
@@ -342,6 +383,21 @@ module Google
342
383
  #
343
384
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
344
385
  #
386
+ # @example Basic example
387
+ # require "google/cloud/dialogflow/cx/v3"
388
+ #
389
+ # # Create a client object. The client can be reused for multiple calls.
390
+ # client = Google::Cloud::Dialogflow::CX::V3::Agents::Client.new
391
+ #
392
+ # # Create a request. To set request fields, pass in keyword arguments.
393
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateAgentRequest.new
394
+ #
395
+ # # Call the create_agent method.
396
+ # result = client.create_agent request
397
+ #
398
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Agent.
399
+ # p result
400
+ #
345
401
  def create_agent request, options = nil
346
402
  raise ::ArgumentError, "request must be provided" if request.nil?
347
403
 
@@ -359,9 +415,11 @@ module Google
359
415
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
360
416
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
417
 
362
- header_params = {
363
- "parent" => request.parent
364
- }
418
+ header_params = {}
419
+ if request.parent
420
+ header_params["parent"] = request.parent
421
+ end
422
+
365
423
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
366
424
  metadata[:"x-goog-request-params"] ||= request_params_header
367
425
 
@@ -417,6 +475,21 @@ module Google
417
475
  #
418
476
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
419
477
  #
478
+ # @example Basic example
479
+ # require "google/cloud/dialogflow/cx/v3"
480
+ #
481
+ # # Create a client object. The client can be reused for multiple calls.
482
+ # client = Google::Cloud::Dialogflow::CX::V3::Agents::Client.new
483
+ #
484
+ # # Create a request. To set request fields, pass in keyword arguments.
485
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateAgentRequest.new
486
+ #
487
+ # # Call the update_agent method.
488
+ # result = client.update_agent request
489
+ #
490
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Agent.
491
+ # p result
492
+ #
420
493
  def update_agent request, options = nil
421
494
  raise ::ArgumentError, "request must be provided" if request.nil?
422
495
 
@@ -434,9 +507,11 @@ module Google
434
507
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
435
508
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
436
509
 
437
- header_params = {
438
- "agent.name" => request.agent.name
439
- }
510
+ header_params = {}
511
+ if request.agent&.name
512
+ header_params["agent.name"] = request.agent.name
513
+ end
514
+
440
515
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
441
516
  metadata[:"x-goog-request-params"] ||= request_params_header
442
517
 
@@ -486,6 +561,21 @@ module Google
486
561
  #
487
562
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
488
563
  #
564
+ # @example Basic example
565
+ # require "google/cloud/dialogflow/cx/v3"
566
+ #
567
+ # # Create a client object. The client can be reused for multiple calls.
568
+ # client = Google::Cloud::Dialogflow::CX::V3::Agents::Client.new
569
+ #
570
+ # # Create a request. To set request fields, pass in keyword arguments.
571
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteAgentRequest.new
572
+ #
573
+ # # Call the delete_agent method.
574
+ # result = client.delete_agent request
575
+ #
576
+ # # The returned object is of type Google::Protobuf::Empty.
577
+ # p result
578
+ #
489
579
  def delete_agent request, options = nil
490
580
  raise ::ArgumentError, "request must be provided" if request.nil?
491
581
 
@@ -503,9 +593,11 @@ module Google
503
593
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
504
594
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
505
595
 
506
- header_params = {
507
- "name" => request.name
508
- }
596
+ header_params = {}
597
+ if request.name
598
+ header_params["name"] = request.name
599
+ end
600
+
509
601
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
510
602
  metadata[:"x-goog-request-params"] ||= request_params_header
511
603
 
@@ -572,6 +664,28 @@ module Google
572
664
  #
573
665
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
574
666
  #
667
+ # @example Basic example
668
+ # require "google/cloud/dialogflow/cx/v3"
669
+ #
670
+ # # Create a client object. The client can be reused for multiple calls.
671
+ # client = Google::Cloud::Dialogflow::CX::V3::Agents::Client.new
672
+ #
673
+ # # Create a request. To set request fields, pass in keyword arguments.
674
+ # request = Google::Cloud::Dialogflow::CX::V3::ExportAgentRequest.new
675
+ #
676
+ # # Call the export_agent method.
677
+ # result = client.export_agent request
678
+ #
679
+ # # The returned object is of type Gapic::Operation. You can use this
680
+ # # object to check the status of an operation, cancel it, or wait
681
+ # # for results. Here is how to block until completion:
682
+ # result.wait_until_done! timeout: 60
683
+ # if result.response?
684
+ # p result.response
685
+ # else
686
+ # puts "Error!"
687
+ # end
688
+ #
575
689
  def export_agent request, options = nil
576
690
  raise ::ArgumentError, "request must be provided" if request.nil?
577
691
 
@@ -589,9 +703,11 @@ module Google
589
703
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
590
704
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
591
705
 
592
- header_params = {
593
- "name" => request.name
594
- }
706
+ header_params = {}
707
+ if request.name
708
+ header_params["name"] = request.name
709
+ end
710
+
595
711
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
596
712
  metadata[:"x-goog-request-params"] ||= request_params_header
597
713
 
@@ -666,6 +782,28 @@ module Google
666
782
  #
667
783
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
668
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::Agents::Client.new
790
+ #
791
+ # # Create a request. To set request fields, pass in keyword arguments.
792
+ # request = Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest.new
793
+ #
794
+ # # Call the restore_agent method.
795
+ # result = client.restore_agent request
796
+ #
797
+ # # The returned object is of type Gapic::Operation. You can use this
798
+ # # object to check the status of an operation, cancel it, or wait
799
+ # # for results. Here is how to block until completion:
800
+ # result.wait_until_done! timeout: 60
801
+ # if result.response?
802
+ # p result.response
803
+ # else
804
+ # puts "Error!"
805
+ # end
806
+ #
669
807
  def restore_agent request, options = nil
670
808
  raise ::ArgumentError, "request must be provided" if request.nil?
671
809
 
@@ -683,9 +821,11 @@ module Google
683
821
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
684
822
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
685
823
 
686
- header_params = {
687
- "name" => request.name
688
- }
824
+ header_params = {}
825
+ if request.name
826
+ header_params["name"] = request.name
827
+ end
828
+
689
829
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
690
830
  metadata[:"x-goog-request-params"] ||= request_params_header
691
831
 
@@ -740,6 +880,21 @@ module Google
740
880
  #
741
881
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
742
882
  #
883
+ # @example Basic example
884
+ # require "google/cloud/dialogflow/cx/v3"
885
+ #
886
+ # # Create a client object. The client can be reused for multiple calls.
887
+ # client = Google::Cloud::Dialogflow::CX::V3::Agents::Client.new
888
+ #
889
+ # # Create a request. To set request fields, pass in keyword arguments.
890
+ # request = Google::Cloud::Dialogflow::CX::V3::ValidateAgentRequest.new
891
+ #
892
+ # # Call the validate_agent method.
893
+ # result = client.validate_agent request
894
+ #
895
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::AgentValidationResult.
896
+ # p result
897
+ #
743
898
  def validate_agent request, options = nil
744
899
  raise ::ArgumentError, "request must be provided" if request.nil?
745
900
 
@@ -757,9 +912,11 @@ module Google
757
912
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
758
913
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
759
914
 
760
- header_params = {
761
- "name" => request.name
762
- }
915
+ header_params = {}
916
+ if request.name
917
+ header_params["name"] = request.name
918
+ end
919
+
763
920
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
764
921
  metadata[:"x-goog-request-params"] ||= request_params_header
765
922
 
@@ -813,6 +970,21 @@ module Google
813
970
  #
814
971
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
815
972
  #
973
+ # @example Basic example
974
+ # require "google/cloud/dialogflow/cx/v3"
975
+ #
976
+ # # Create a client object. The client can be reused for multiple calls.
977
+ # client = Google::Cloud::Dialogflow::CX::V3::Agents::Client.new
978
+ #
979
+ # # Create a request. To set request fields, pass in keyword arguments.
980
+ # request = Google::Cloud::Dialogflow::CX::V3::GetAgentValidationResultRequest.new
981
+ #
982
+ # # Call the get_agent_validation_result method.
983
+ # result = client.get_agent_validation_result request
984
+ #
985
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::AgentValidationResult.
986
+ # p result
987
+ #
816
988
  def get_agent_validation_result request, options = nil
817
989
  raise ::ArgumentError, "request must be provided" if request.nil?
818
990
 
@@ -830,9 +1002,11 @@ module Google
830
1002
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
831
1003
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
832
1004
 
833
- header_params = {
834
- "name" => request.name
835
- }
1005
+ header_params = {}
1006
+ if request.name
1007
+ header_params["name"] = request.name
1008
+ end
1009
+
836
1010
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
837
1011
  metadata[:"x-goog-request-params"] ||= request_params_header
838
1012
 
@@ -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
 
@@ -0,0 +1,52 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/dialogflow/cx/v3/changelog.proto
3
+
4
+ require 'google/api/annotations_pb'
5
+ require 'google/api/client_pb'
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+ require 'google/protobuf/struct_pb'
9
+ require 'google/protobuf/timestamp_pb'
10
+ require 'google/protobuf'
11
+
12
+ Google::Protobuf::DescriptorPool.generated_pool.build do
13
+ add_file("google/cloud/dialogflow/cx/v3/changelog.proto", :syntax => :proto3) do
14
+ add_message "google.cloud.dialogflow.cx.v3.ListChangelogsRequest" do
15
+ optional :parent, :string, 1
16
+ optional :filter, :string, 2
17
+ optional :page_size, :int32, 3
18
+ optional :page_token, :string, 4
19
+ end
20
+ add_message "google.cloud.dialogflow.cx.v3.ListChangelogsResponse" do
21
+ repeated :changelogs, :message, 1, "google.cloud.dialogflow.cx.v3.Changelog"
22
+ optional :next_page_token, :string, 2
23
+ end
24
+ add_message "google.cloud.dialogflow.cx.v3.GetChangelogRequest" do
25
+ optional :name, :string, 1
26
+ end
27
+ add_message "google.cloud.dialogflow.cx.v3.Changelog" do
28
+ optional :name, :string, 1
29
+ optional :user_email, :string, 2
30
+ optional :display_name, :string, 7
31
+ optional :action, :string, 11
32
+ optional :type, :string, 8
33
+ optional :resource, :string, 3
34
+ optional :create_time, :message, 4, "google.protobuf.Timestamp"
35
+ end
36
+ end
37
+ end
38
+
39
+ module Google
40
+ module Cloud
41
+ module Dialogflow
42
+ module CX
43
+ module V3
44
+ ListChangelogsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListChangelogsRequest").msgclass
45
+ ListChangelogsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListChangelogsResponse").msgclass
46
+ GetChangelogRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.GetChangelogRequest").msgclass
47
+ Changelog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Changelog").msgclass
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end