google-cloud-dialogflow-v2 0.33.0 → 1.0.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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/v2/agents/client.rb +21 -9
  3. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +13 -5
  4. data/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +21 -9
  5. data/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb +11 -4
  6. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +1 -1
  7. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +7 -2
  8. data/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb +7 -2
  9. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -1
  10. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +15 -6
  11. data/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb +15 -6
  12. data/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb +13 -5
  13. data/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb +13 -5
  14. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb +13 -5
  15. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb +11 -4
  16. data/lib/google/cloud/dialogflow/v2/conversation_models/client.rb +21 -9
  17. data/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb +13 -5
  18. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb +21 -9
  19. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb +11 -4
  20. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +17 -7
  21. data/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb +13 -5
  22. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb +17 -7
  23. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb +11 -4
  24. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +19 -8
  25. data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +19 -8
  26. data/lib/google/cloud/dialogflow/v2/documents/client.rb +19 -8
  27. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +13 -5
  28. data/lib/google/cloud/dialogflow/v2/documents/rest/client.rb +19 -8
  29. data/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb +11 -4
  30. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +23 -10
  31. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +13 -5
  32. data/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +23 -10
  33. data/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb +11 -4
  34. data/lib/google/cloud/dialogflow/v2/environments/client.rb +15 -6
  35. data/lib/google/cloud/dialogflow/v2/environments/rest/client.rb +15 -6
  36. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +7 -2
  37. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb +7 -2
  38. data/lib/google/cloud/dialogflow/v2/intents/client.rb +17 -7
  39. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +13 -5
  40. data/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +17 -7
  41. data/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb +11 -4
  42. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +13 -5
  43. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb +13 -5
  44. data/lib/google/cloud/dialogflow/v2/participants/client.rb +21 -9
  45. data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +19 -8
  46. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +13 -5
  47. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb +13 -5
  48. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +7 -2
  49. data/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb +5 -1
  50. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  51. data/lib/google/cloud/dialogflow/v2/versions/client.rb +13 -5
  52. data/lib/google/cloud/dialogflow/v2/versions/rest/client.rb +13 -5
  53. data/proto_docs/google/api/client.rb +4 -0
  54. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +12 -0
  55. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +6 -0
  56. data/proto_docs/google/cloud/dialogflow/v2/session.rb +2 -2
  57. metadata +2 -2
@@ -32,6 +32,9 @@ module Google
32
32
  # {::Google::Cloud::Dialogflow::V2::Conversation Conversations}.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
35
38
  # @private
36
39
  DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
37
40
 
@@ -270,10 +273,11 @@ module Google
270
273
  # Customize the options with defaults
271
274
  metadata = @config.rpcs.create_conversation.metadata.to_h
272
275
 
273
- # Set x-goog-api-client and x-goog-user-project headers
276
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
274
277
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
275
278
  lib_name: @config.lib_name, lib_version: @config.lib_version,
276
279
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
280
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
277
281
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
278
282
 
279
283
  header_params = {}
@@ -383,10 +387,11 @@ module Google
383
387
  # Customize the options with defaults
384
388
  metadata = @config.rpcs.list_conversations.metadata.to_h
385
389
 
386
- # Set x-goog-api-client and x-goog-user-project headers
390
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
387
391
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
388
392
  lib_name: @config.lib_name, lib_version: @config.lib_version,
389
393
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
394
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
390
395
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
391
396
 
392
397
  header_params = {}
@@ -471,10 +476,11 @@ module Google
471
476
  # Customize the options with defaults
472
477
  metadata = @config.rpcs.get_conversation.metadata.to_h
473
478
 
474
- # Set x-goog-api-client and x-goog-user-project headers
479
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
475
480
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
476
481
  lib_name: @config.lib_name, lib_version: @config.lib_version,
477
482
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
483
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
478
484
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
479
485
 
480
486
  header_params = {}
@@ -559,10 +565,11 @@ module Google
559
565
  # Customize the options with defaults
560
566
  metadata = @config.rpcs.complete_conversation.metadata.to_h
561
567
 
562
- # Set x-goog-api-client and x-goog-user-project headers
568
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
563
569
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
564
570
  lib_name: @config.lib_name, lib_version: @config.lib_version,
565
571
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
572
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
566
573
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
567
574
 
568
575
  header_params = {}
@@ -668,10 +675,11 @@ module Google
668
675
  # Customize the options with defaults
669
676
  metadata = @config.rpcs.list_messages.metadata.to_h
670
677
 
671
- # Set x-goog-api-client and x-goog-user-project headers
678
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
672
679
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
673
680
  lib_name: @config.lib_name, lib_version: @config.lib_version,
674
681
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
682
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
675
683
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
676
684
 
677
685
  header_params = {}
@@ -771,10 +779,11 @@ module Google
771
779
  # Customize the options with defaults
772
780
  metadata = @config.rpcs.suggest_conversation_summary.metadata.to_h
773
781
 
774
- # Set x-goog-api-client and x-goog-user-project headers
782
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
775
783
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
776
784
  lib_name: @config.lib_name, lib_version: @config.lib_version,
777
785
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
786
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
778
787
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
779
788
 
780
789
  header_params = {}
@@ -871,10 +880,11 @@ module Google
871
880
  # Customize the options with defaults
872
881
  metadata = @config.rpcs.generate_stateless_summary.metadata.to_h
873
882
 
874
- # Set x-goog-api-client and x-goog-user-project headers
883
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
875
884
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
876
885
  lib_name: @config.lib_name, lib_version: @config.lib_version,
877
886
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
887
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
878
888
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
879
889
 
880
890
  header_params = {}
@@ -981,10 +991,11 @@ module Google
981
991
  # Customize the options with defaults
982
992
  metadata = @config.rpcs.search_knowledge.metadata.to_h
983
993
 
984
- # Set x-goog-api-client and x-goog-user-project headers
994
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
985
995
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
986
996
  lib_name: @config.lib_name, lib_version: @config.lib_version,
987
997
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
998
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
988
999
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
989
1000
 
990
1001
  header_params = {}
@@ -34,6 +34,9 @@ module Google
34
34
  # {::Google::Cloud::Dialogflow::V2::Conversation Conversations}.
35
35
  #
36
36
  class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
37
40
  # @private
38
41
  DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
39
42
 
@@ -263,12 +266,13 @@ module Google
263
266
  # Customize the options with defaults
264
267
  call_metadata = @config.rpcs.create_conversation.metadata.to_h
265
268
 
266
- # Set x-goog-api-client and x-goog-user-project headers
269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
267
270
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
268
271
  lib_name: @config.lib_name, lib_version: @config.lib_version,
269
272
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
270
273
  transports_version_send: [:rest]
271
274
 
275
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
272
276
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
273
277
 
274
278
  options.apply_defaults timeout: @config.rpcs.create_conversation.timeout,
@@ -369,12 +373,13 @@ module Google
369
373
  # Customize the options with defaults
370
374
  call_metadata = @config.rpcs.list_conversations.metadata.to_h
371
375
 
372
- # Set x-goog-api-client and x-goog-user-project headers
376
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
373
377
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
374
378
  lib_name: @config.lib_name, lib_version: @config.lib_version,
375
379
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
376
380
  transports_version_send: [:rest]
377
381
 
382
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
378
383
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
379
384
 
380
385
  options.apply_defaults timeout: @config.rpcs.list_conversations.timeout,
@@ -450,12 +455,13 @@ module Google
450
455
  # Customize the options with defaults
451
456
  call_metadata = @config.rpcs.get_conversation.metadata.to_h
452
457
 
453
- # Set x-goog-api-client and x-goog-user-project headers
458
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
454
459
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
455
460
  lib_name: @config.lib_name, lib_version: @config.lib_version,
456
461
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
457
462
  transports_version_send: [:rest]
458
463
 
464
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
459
465
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
460
466
 
461
467
  options.apply_defaults timeout: @config.rpcs.get_conversation.timeout,
@@ -531,12 +537,13 @@ module Google
531
537
  # Customize the options with defaults
532
538
  call_metadata = @config.rpcs.complete_conversation.metadata.to_h
533
539
 
534
- # Set x-goog-api-client and x-goog-user-project headers
540
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
535
541
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
536
542
  lib_name: @config.lib_name, lib_version: @config.lib_version,
537
543
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
538
544
  transports_version_send: [:rest]
539
545
 
546
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
540
547
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
541
548
 
542
549
  options.apply_defaults timeout: @config.rpcs.complete_conversation.timeout,
@@ -633,12 +640,13 @@ module Google
633
640
  # Customize the options with defaults
634
641
  call_metadata = @config.rpcs.list_messages.metadata.to_h
635
642
 
636
- # Set x-goog-api-client and x-goog-user-project headers
643
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
637
644
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
638
645
  lib_name: @config.lib_name, lib_version: @config.lib_version,
639
646
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
640
647
  transports_version_send: [:rest]
641
648
 
649
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
642
650
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
643
651
 
644
652
  options.apply_defaults timeout: @config.rpcs.list_messages.timeout,
@@ -729,12 +737,13 @@ module Google
729
737
  # Customize the options with defaults
730
738
  call_metadata = @config.rpcs.suggest_conversation_summary.metadata.to_h
731
739
 
732
- # Set x-goog-api-client and x-goog-user-project headers
740
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
733
741
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
734
742
  lib_name: @config.lib_name, lib_version: @config.lib_version,
735
743
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
736
744
  transports_version_send: [:rest]
737
745
 
746
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
738
747
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
739
748
 
740
749
  options.apply_defaults timeout: @config.rpcs.suggest_conversation_summary.timeout,
@@ -822,12 +831,13 @@ module Google
822
831
  # Customize the options with defaults
823
832
  call_metadata = @config.rpcs.generate_stateless_summary.metadata.to_h
824
833
 
825
- # Set x-goog-api-client and x-goog-user-project headers
834
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
826
835
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
827
836
  lib_name: @config.lib_name, lib_version: @config.lib_version,
828
837
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
829
838
  transports_version_send: [:rest]
830
839
 
840
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
831
841
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
832
842
 
833
843
  options.apply_defaults timeout: @config.rpcs.generate_stateless_summary.timeout,
@@ -925,12 +935,13 @@ module Google
925
935
  # Customize the options with defaults
926
936
  call_metadata = @config.rpcs.search_knowledge.metadata.to_h
927
937
 
928
- # Set x-goog-api-client and x-goog-user-project headers
938
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
929
939
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
930
940
  lib_name: @config.lib_name, lib_version: @config.lib_version,
931
941
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
932
942
  transports_version_send: [:rest]
933
943
 
944
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
934
945
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
935
946
 
936
947
  options.apply_defaults timeout: @config.rpcs.search_knowledge.timeout,
@@ -32,6 +32,9 @@ module Google
32
32
  # {::Google::Cloud::Dialogflow::V2::Document Documents}.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
35
38
  # @private
36
39
  DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
37
40
 
@@ -283,10 +286,11 @@ module Google
283
286
  # Customize the options with defaults
284
287
  metadata = @config.rpcs.list_documents.metadata.to_h
285
288
 
286
- # Set x-goog-api-client and x-goog-user-project headers
289
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
287
290
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
288
291
  lib_name: @config.lib_name, lib_version: @config.lib_version,
289
292
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
293
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
290
294
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
291
295
 
292
296
  header_params = {}
@@ -371,10 +375,11 @@ module Google
371
375
  # Customize the options with defaults
372
376
  metadata = @config.rpcs.get_document.metadata.to_h
373
377
 
374
- # Set x-goog-api-client and x-goog-user-project headers
378
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
375
379
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
376
380
  lib_name: @config.lib_name, lib_version: @config.lib_version,
377
381
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
382
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
378
383
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
379
384
 
380
385
  header_params = {}
@@ -475,10 +480,11 @@ module Google
475
480
  # Customize the options with defaults
476
481
  metadata = @config.rpcs.create_document.metadata.to_h
477
482
 
478
- # Set x-goog-api-client and x-goog-user-project headers
483
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
479
484
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
480
485
  lib_name: @config.lib_name, lib_version: @config.lib_version,
481
486
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
487
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
482
488
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
483
489
 
484
490
  header_params = {}
@@ -593,10 +599,11 @@ module Google
593
599
  # Customize the options with defaults
594
600
  metadata = @config.rpcs.import_documents.metadata.to_h
595
601
 
596
- # Set x-goog-api-client and x-goog-user-project headers
602
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
597
603
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
598
604
  lib_name: @config.lib_name, lib_version: @config.lib_version,
599
605
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
606
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
600
607
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
601
608
 
602
609
  header_params = {}
@@ -697,10 +704,11 @@ module Google
697
704
  # Customize the options with defaults
698
705
  metadata = @config.rpcs.delete_document.metadata.to_h
699
706
 
700
- # Set x-goog-api-client and x-goog-user-project headers
707
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
701
708
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
702
709
  lib_name: @config.lib_name, lib_version: @config.lib_version,
703
710
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
711
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
704
712
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
705
713
 
706
714
  header_params = {}
@@ -802,10 +810,11 @@ module Google
802
810
  # Customize the options with defaults
803
811
  metadata = @config.rpcs.update_document.metadata.to_h
804
812
 
805
- # Set x-goog-api-client and x-goog-user-project headers
813
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
806
814
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
807
815
  lib_name: @config.lib_name, lib_version: @config.lib_version,
808
816
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
817
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
809
818
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
810
819
 
811
820
  header_params = {}
@@ -923,10 +932,11 @@ module Google
923
932
  # Customize the options with defaults
924
933
  metadata = @config.rpcs.reload_document.metadata.to_h
925
934
 
926
- # Set x-goog-api-client and x-goog-user-project headers
935
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
927
936
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
928
937
  lib_name: @config.lib_name, lib_version: @config.lib_version,
929
938
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
939
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
930
940
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
931
941
 
932
942
  header_params = {}
@@ -1035,10 +1045,11 @@ module Google
1035
1045
  # Customize the options with defaults
1036
1046
  metadata = @config.rpcs.export_document.metadata.to_h
1037
1047
 
1038
- # Set x-goog-api-client and x-goog-user-project headers
1048
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1039
1049
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1040
1050
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1041
1051
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
1052
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1042
1053
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1043
1054
 
1044
1055
  header_params = {}
@@ -26,6 +26,9 @@ module Google
26
26
  module Documents
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
31
34
 
@@ -191,10 +194,11 @@ module Google
191
194
  # Customize the options with defaults
192
195
  metadata = @config.rpcs.list_operations.metadata.to_h
193
196
 
194
- # Set x-goog-api-client and x-goog-user-project headers
197
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
195
198
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
196
199
  lib_name: @config.lib_name, lib_version: @config.lib_version,
197
200
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
201
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
198
202
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
199
203
 
200
204
  header_params = {}
@@ -287,10 +291,11 @@ module Google
287
291
  # Customize the options with defaults
288
292
  metadata = @config.rpcs.get_operation.metadata.to_h
289
293
 
290
- # Set x-goog-api-client and x-goog-user-project headers
294
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
291
295
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
296
  lib_name: @config.lib_name, lib_version: @config.lib_version,
293
297
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
298
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
294
299
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
295
300
 
296
301
  header_params = {}
@@ -376,10 +381,11 @@ module Google
376
381
  # Customize the options with defaults
377
382
  metadata = @config.rpcs.delete_operation.metadata.to_h
378
383
 
379
- # Set x-goog-api-client and x-goog-user-project headers
384
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
380
385
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
381
386
  lib_name: @config.lib_name, lib_version: @config.lib_version,
382
387
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
388
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
383
389
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
390
 
385
391
  header_params = {}
@@ -470,10 +476,11 @@ module Google
470
476
  # Customize the options with defaults
471
477
  metadata = @config.rpcs.cancel_operation.metadata.to_h
472
478
 
473
- # Set x-goog-api-client and x-goog-user-project headers
479
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
474
480
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
475
481
  lib_name: @config.lib_name, lib_version: @config.lib_version,
476
482
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
483
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
477
484
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
478
485
 
479
486
  header_params = {}
@@ -574,10 +581,11 @@ module Google
574
581
  # Customize the options with defaults
575
582
  metadata = @config.rpcs.wait_operation.metadata.to_h
576
583
 
577
- # Set x-goog-api-client and x-goog-user-project headers
584
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
578
585
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
579
586
  lib_name: @config.lib_name, lib_version: @config.lib_version,
580
587
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
588
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
590
 
583
591
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
@@ -34,6 +34,9 @@ module Google
34
34
  # {::Google::Cloud::Dialogflow::V2::Document Documents}.
35
35
  #
36
36
  class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
37
40
  # @private
38
41
  DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
39
42
 
@@ -276,12 +279,13 @@ module Google
276
279
  # Customize the options with defaults
277
280
  call_metadata = @config.rpcs.list_documents.metadata.to_h
278
281
 
279
- # Set x-goog-api-client and x-goog-user-project headers
282
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
280
283
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
281
284
  lib_name: @config.lib_name, lib_version: @config.lib_version,
282
285
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
283
286
  transports_version_send: [:rest]
284
287
 
288
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
285
289
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
286
290
 
287
291
  options.apply_defaults timeout: @config.rpcs.list_documents.timeout,
@@ -357,12 +361,13 @@ module Google
357
361
  # Customize the options with defaults
358
362
  call_metadata = @config.rpcs.get_document.metadata.to_h
359
363
 
360
- # Set x-goog-api-client and x-goog-user-project headers
364
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
361
365
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
362
366
  lib_name: @config.lib_name, lib_version: @config.lib_version,
363
367
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
364
368
  transports_version_send: [:rest]
365
369
 
370
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
366
371
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
367
372
 
368
373
  options.apply_defaults timeout: @config.rpcs.get_document.timeout,
@@ -454,12 +459,13 @@ module Google
454
459
  # Customize the options with defaults
455
460
  call_metadata = @config.rpcs.create_document.metadata.to_h
456
461
 
457
- # Set x-goog-api-client and x-goog-user-project headers
462
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
458
463
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
459
464
  lib_name: @config.lib_name, lib_version: @config.lib_version,
460
465
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
461
466
  transports_version_send: [:rest]
462
467
 
468
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
463
469
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
464
470
 
465
471
  options.apply_defaults timeout: @config.rpcs.create_document.timeout,
@@ -565,12 +571,13 @@ module Google
565
571
  # Customize the options with defaults
566
572
  call_metadata = @config.rpcs.import_documents.metadata.to_h
567
573
 
568
- # Set x-goog-api-client and x-goog-user-project headers
574
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
569
575
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
570
576
  lib_name: @config.lib_name, lib_version: @config.lib_version,
571
577
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
572
578
  transports_version_send: [:rest]
573
579
 
580
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
574
581
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
575
582
 
576
583
  options.apply_defaults timeout: @config.rpcs.import_documents.timeout,
@@ -662,12 +669,13 @@ module Google
662
669
  # Customize the options with defaults
663
670
  call_metadata = @config.rpcs.delete_document.metadata.to_h
664
671
 
665
- # Set x-goog-api-client and x-goog-user-project headers
672
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
666
673
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
667
674
  lib_name: @config.lib_name, lib_version: @config.lib_version,
668
675
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
669
676
  transports_version_send: [:rest]
670
677
 
678
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
671
679
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
672
680
 
673
681
  options.apply_defaults timeout: @config.rpcs.delete_document.timeout,
@@ -760,12 +768,13 @@ module Google
760
768
  # Customize the options with defaults
761
769
  call_metadata = @config.rpcs.update_document.metadata.to_h
762
770
 
763
- # Set x-goog-api-client and x-goog-user-project headers
771
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
764
772
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
765
773
  lib_name: @config.lib_name, lib_version: @config.lib_version,
766
774
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
767
775
  transports_version_send: [:rest]
768
776
 
777
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
769
778
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
770
779
 
771
780
  options.apply_defaults timeout: @config.rpcs.update_document.timeout,
@@ -874,12 +883,13 @@ module Google
874
883
  # Customize the options with defaults
875
884
  call_metadata = @config.rpcs.reload_document.metadata.to_h
876
885
 
877
- # Set x-goog-api-client and x-goog-user-project headers
886
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
878
887
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
879
888
  lib_name: @config.lib_name, lib_version: @config.lib_version,
880
889
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
881
890
  transports_version_send: [:rest]
882
891
 
892
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
883
893
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
884
894
 
885
895
  options.apply_defaults timeout: @config.rpcs.reload_document.timeout,
@@ -979,12 +989,13 @@ module Google
979
989
  # Customize the options with defaults
980
990
  call_metadata = @config.rpcs.export_document.metadata.to_h
981
991
 
982
- # Set x-goog-api-client and x-goog-user-project headers
992
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
983
993
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
984
994
  lib_name: @config.lib_name, lib_version: @config.lib_version,
985
995
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
986
996
  transports_version_send: [:rest]
987
997
 
998
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
988
999
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
989
1000
 
990
1001
  options.apply_defaults timeout: @config.rpcs.export_document.timeout,
@@ -26,6 +26,9 @@ module Google
26
26
  module Rest
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
31
34
 
@@ -181,12 +184,13 @@ module Google
181
184
  # Customize the options with defaults
182
185
  call_metadata = @config.rpcs.list_operations.metadata.to_h
183
186
 
184
- # Set x-goog-api-client and x-goog-user-project headers
187
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
185
188
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
186
189
  lib_name: @config.lib_name, lib_version: @config.lib_version,
187
190
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
188
191
  transports_version_send: [:rest]
189
192
 
193
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
190
194
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
191
195
 
192
196
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
@@ -269,12 +273,13 @@ module Google
269
273
  # Customize the options with defaults
270
274
  call_metadata = @config.rpcs.get_operation.metadata.to_h
271
275
 
272
- # Set x-goog-api-client and x-goog-user-project headers
276
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
273
277
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
274
278
  lib_name: @config.lib_name, lib_version: @config.lib_version,
275
279
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
276
280
  transports_version_send: [:rest]
277
281
 
282
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
278
283
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
284
 
280
285
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
@@ -351,12 +356,13 @@ module Google
351
356
  # Customize the options with defaults
352
357
  call_metadata = @config.rpcs.delete_operation.metadata.to_h
353
358
 
354
- # Set x-goog-api-client and x-goog-user-project headers
359
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
355
360
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
356
361
  lib_name: @config.lib_name, lib_version: @config.lib_version,
357
362
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
358
363
  transports_version_send: [:rest]
359
364
 
365
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
360
366
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
367
 
362
368
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
@@ -438,12 +444,13 @@ module Google
438
444
  # Customize the options with defaults
439
445
  call_metadata = @config.rpcs.cancel_operation.metadata.to_h
440
446
 
441
- # Set x-goog-api-client and x-goog-user-project headers
447
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
442
448
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
443
449
  lib_name: @config.lib_name, lib_version: @config.lib_version,
444
450
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
445
451
  transports_version_send: [:rest]
446
452
 
453
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
447
454
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
455
 
449
456
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,