google-cloud-dialogflow-v2 0.11.0 → 0.11.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dialogflow/v2/agent_pb.rb +2 -2
  4. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +39 -5
  5. data/lib/google/cloud/dialogflow/v2/agents/client.rb +94 -49
  6. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +30 -21
  7. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +2 -2
  8. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
  9. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +35 -38
  10. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +3 -2
  11. data/lib/google/cloud/dialogflow/v2/context_pb.rb +2 -2
  12. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
  13. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +47 -42
  14. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +2 -2
  15. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +2 -2
  16. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +2 -2
  17. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
  18. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +44 -41
  19. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
  20. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +44 -41
  21. data/lib/google/cloud/dialogflow/v2/document_pb.rb +2 -2
  22. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +27 -10
  23. data/lib/google/cloud/dialogflow/v2/documents/client.rb +73 -51
  24. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +30 -21
  25. data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +2 -2
  26. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +45 -1
  27. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +102 -46
  28. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +30 -21
  29. data/lib/google/cloud/dialogflow/v2/environment_pb.rb +2 -2
  30. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +1 -1
  31. data/lib/google/cloud/dialogflow/v2/environments/client.rb +47 -42
  32. data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +2 -2
  33. data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
  34. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +35 -38
  35. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +2 -2
  36. data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +2 -2
  37. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -2
  38. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +16 -1
  39. data/lib/google/cloud/dialogflow/v2/intents/client.rb +65 -43
  40. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +30 -21
  41. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +2 -2
  42. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
  43. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +44 -41
  44. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +2 -2
  45. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
  46. data/lib/google/cloud/dialogflow/v2/participants/client.rb +50 -43
  47. data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +2 -2
  48. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
  49. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +44 -41
  50. data/lib/google/cloud/dialogflow/v2/session_pb.rb +2 -2
  51. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +15 -1
  52. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +49 -38
  53. data/lib/google/cloud/dialogflow/v2/validation_result_pb.rb +1 -1
  54. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  55. data/lib/google/cloud/dialogflow/v2/version_pb.rb +2 -2
  56. data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
  57. data/lib/google/cloud/dialogflow/v2/versions/client.rb +44 -41
  58. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +2 -2
  59. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +4 -3
  60. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +4 -3
  61. data/proto_docs/google/cloud/dialogflow/v2/session.rb +38 -33
  62. metadata +8 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f6a922385ad3d34527ce31b2d3cbb0ade12123fbf31a3049276b31243f15e05
4
- data.tar.gz: d68611727d8dbe3cdef29d8db1ea8c654314ca1278cc8fb0e83f7366b09ec006
3
+ metadata.gz: e42639a68d360c1a6931228d89c59d25ef302c5a004079e2d3126a147815ecd1
4
+ data.tar.gz: f6448a0999113c3105ab2e6600a9f43fcde6ec166636fd49e5a146b7812dbcda
5
5
  SHA512:
6
- metadata.gz: 66cdf0854441fdca937e45dbf73dcacd49444ff269358fec0a572bb197c6d07088093246e8a537d211ee321bdad3d4054131ad39511ce7e1ef05e1ae8a9d6c19
7
- data.tar.gz: 8ccbda725c796781f7fc883ab79a5689ed8166ae1278aeac1e59b042e129e812bd67b0df9488b3296915e92b07d760dd514e13feb9feba1563dc1f39576365d7
6
+ metadata.gz: da841cda52712d07d32576facdc5b96460c7a17f1f6dc4f23527d01f2c7d118e08670b32a551763eda77495275d6d5779e3cd98606925bcc98863c18008289de
7
+ data.tar.gz: 2d0af294ce9b58889ee049f4147431d78bb9460d53fb299450a4dde5476b230a0b617eff9dd0950d5186a76dcf4bb937c4bee33c2e03fdaf11ff6d7a46f988e0
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  API Client library for the Dialogflow V2 API
4
4
 
5
- Dialogflow is an end-to-end, build-once deploy-everywhere development suite for creating conversational interfaces for websites, mobile applications, popular messaging platforms, and IoT devices. You can use it to build interfaces (such as chatbots and conversational IVR) that enable natural and rich interactions between your users and your business.
5
+ Dialogflow is an end-to-end, build-once deploy-everywhere development suite for creating conversational interfaces for websites, mobile applications, popular messaging platforms, and IoT devices. You can use it to build interfaces (such as chatbots and conversational IVR) that enable natural and rich interactions between your users and your business. This client is for Dialogflow ES, providing the standard agent type suitable for small and simple agents.
6
6
 
7
7
  https://github.com/googleapis/google-cloud-ruby
8
8
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/agent.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'
@@ -11,6 +9,8 @@ require 'google/cloud/dialogflow/v2/validation_result_pb'
11
9
  require 'google/longrunning/operations_pb'
12
10
  require 'google/protobuf/empty_pb'
13
11
  require 'google/protobuf/field_mask_pb'
12
+ require 'google/protobuf'
13
+
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_file("google/cloud/dialogflow/v2/agent.proto", :syntax => :proto3) do
16
16
  add_message "google.cloud.dialogflow.v2.Agent" do
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -53,12 +53,28 @@ module Google
53
53
  rpc :SearchAgents, ::Google::Cloud::Dialogflow::V2::SearchAgentsRequest, ::Google::Cloud::Dialogflow::V2::SearchAgentsResponse
54
54
  # Trains the specified agent.
55
55
  #
56
+ # This method is a [long-running
57
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
58
+ # The returned `Operation` type has the following method-specific fields:
59
+ #
60
+ # - `metadata`: An empty [Struct
61
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
62
+ # - `response`: An [Empty
63
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
56
64
  #
57
65
  # Note: You should always train an agent prior to sending it queries. See the
58
66
  # [training
59
67
  # documentation](https://cloud.google.com/dialogflow/es/docs/training).
60
68
  rpc :TrainAgent, ::Google::Cloud::Dialogflow::V2::TrainAgentRequest, ::Google::Longrunning::Operation
61
69
  # Exports the specified agent to a ZIP file.
70
+ #
71
+ # This method is a [long-running
72
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
73
+ # The returned `Operation` type has the following method-specific fields:
74
+ #
75
+ # - `metadata`: An empty [Struct
76
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
77
+ # - `response`: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
62
78
  rpc :ExportAgent, ::Google::Cloud::Dialogflow::V2::ExportAgentRequest, ::Google::Longrunning::Operation
63
79
  # Imports the specified agent from a ZIP file.
64
80
  #
@@ -70,8 +86,17 @@ module Google
70
86
  # call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train
71
87
  # explicitly.
72
88
  #
73
- # An operation which tracks when importing is complete. It only tracks
74
- # when the draft agent is updated not when it is done training.
89
+ # This method is a [long-running
90
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
91
+ # The returned `Operation` type has the following method-specific fields:
92
+ #
93
+ # - `metadata`: An empty [Struct
94
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
95
+ # - `response`: An [Empty
96
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
97
+ #
98
+ # The operation only tracks when importing is complete, not when it is done
99
+ # training.
75
100
  #
76
101
  # Note: You should always train an agent prior to sending it queries. See the
77
102
  # [training
@@ -86,8 +111,17 @@ module Google
86
111
  # completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it
87
112
  # returns in order to train explicitly.
88
113
  #
89
- # An operation which tracks when restoring is complete. It only tracks
90
- # when the draft agent is updated not when it is done training.
114
+ # This method is a [long-running
115
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
116
+ # The returned `Operation` type has the following method-specific fields:
117
+ #
118
+ # - `metadata`: An empty [Struct
119
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
120
+ # - `response`: An [Empty
121
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
122
+ #
123
+ # The operation only tracks when restoring is complete, not when it is done
124
+ # training.
91
125
  #
92
126
  # Note: You should always train an agent prior to sending it queries. See the
93
127
  # [training
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Dialogflow::V2::Agents::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all Agents clients:
47
- #
48
- # ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all Agents clients
47
+ # ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -99,19 +98,15 @@ module Google
99
98
  ##
100
99
  # Create a new Agents client object.
101
100
  #
102
- # ## Examples
103
- #
104
- # To create a new Agents client with the default
105
- # configuration:
106
- #
107
- # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
101
+ # @example
108
102
  #
109
- # To create a new Agents client with a custom
110
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
111
105
  #
112
- # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
113
- # config.timeout = 10.0
114
- # end
106
+ # # Create a client using a custom configuration
107
+ # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
108
+ # config.timeout = 10.0
109
+ # end
115
110
  #
116
111
  # @yield [config] Configure the Agents client.
117
112
  # @yieldparam config [Client::Configuration]
@@ -131,10 +126,9 @@ module Google
131
126
 
132
127
  # Create credentials
133
128
  credentials = @config.credentials
134
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
129
+ # Use self-signed JWT if the endpoint is unchanged from default,
135
130
  # but only if the default endpoint does not have a region prefix.
136
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
137
- @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
138
132
  !@config.endpoint.split(".").first.include?("-")
139
133
  credentials ||= Credentials.default scope: @config.scope,
140
134
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -223,7 +217,9 @@ module Google
223
217
  options.apply_defaults timeout: @config.rpcs.get_agent.timeout,
224
218
  metadata: metadata,
225
219
  retry_policy: @config.rpcs.get_agent.retry_policy
226
- options.apply_defaults metadata: @config.metadata,
220
+
221
+ options.apply_defaults timeout: @config.timeout,
222
+ metadata: @config.metadata,
227
223
  retry_policy: @config.retry_policy
228
224
 
229
225
  @agents_stub.call_rpc :get_agent, request, options: options do |response, operation|
@@ -295,7 +291,9 @@ module Google
295
291
  options.apply_defaults timeout: @config.rpcs.set_agent.timeout,
296
292
  metadata: metadata,
297
293
  retry_policy: @config.rpcs.set_agent.retry_policy
298
- options.apply_defaults metadata: @config.metadata,
294
+
295
+ options.apply_defaults timeout: @config.timeout,
296
+ metadata: @config.metadata,
299
297
  retry_policy: @config.retry_policy
300
298
 
301
299
  @agents_stub.call_rpc :set_agent, request, options: options do |response, operation|
@@ -362,7 +360,9 @@ module Google
362
360
  options.apply_defaults timeout: @config.rpcs.delete_agent.timeout,
363
361
  metadata: metadata,
364
362
  retry_policy: @config.rpcs.delete_agent.retry_policy
365
- options.apply_defaults metadata: @config.metadata,
363
+
364
+ options.apply_defaults timeout: @config.timeout,
365
+ metadata: @config.metadata,
366
366
  retry_policy: @config.retry_policy
367
367
 
368
368
  @agents_stub.call_rpc :delete_agent, request, options: options do |response, operation|
@@ -440,7 +440,9 @@ module Google
440
440
  options.apply_defaults timeout: @config.rpcs.search_agents.timeout,
441
441
  metadata: metadata,
442
442
  retry_policy: @config.rpcs.search_agents.retry_policy
443
- options.apply_defaults metadata: @config.metadata,
443
+
444
+ options.apply_defaults timeout: @config.timeout,
445
+ metadata: @config.metadata,
444
446
  retry_policy: @config.retry_policy
445
447
 
446
448
  @agents_stub.call_rpc :search_agents, request, options: options do |response, operation|
@@ -455,6 +457,14 @@ module Google
455
457
  ##
456
458
  # Trains the specified agent.
457
459
  #
460
+ # This method is a [long-running
461
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
462
+ # The returned `Operation` type has the following method-specific fields:
463
+ #
464
+ # - `metadata`: An empty [Struct
465
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
466
+ # - `response`: An [Empty
467
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
458
468
  #
459
469
  # Note: You should always train an agent prior to sending it queries. See the
460
470
  # [training
@@ -513,7 +523,9 @@ module Google
513
523
  options.apply_defaults timeout: @config.rpcs.train_agent.timeout,
514
524
  metadata: metadata,
515
525
  retry_policy: @config.rpcs.train_agent.retry_policy
516
- options.apply_defaults metadata: @config.metadata,
526
+
527
+ options.apply_defaults timeout: @config.timeout,
528
+ metadata: @config.metadata,
517
529
  retry_policy: @config.retry_policy
518
530
 
519
531
  @agents_stub.call_rpc :train_agent, request, options: options do |response, operation|
@@ -528,6 +540,14 @@ module Google
528
540
  ##
529
541
  # Exports the specified agent to a ZIP file.
530
542
  #
543
+ # This method is a [long-running
544
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
545
+ # The returned `Operation` type has the following method-specific fields:
546
+ #
547
+ # - `metadata`: An empty [Struct
548
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
549
+ # - `response`: {::Google::Cloud::Dialogflow::V2::ExportAgentResponse ExportAgentResponse}
550
+ #
531
551
  # @overload export_agent(request, options = nil)
532
552
  # Pass arguments to `export_agent` via a request object, either of type
533
553
  # {::Google::Cloud::Dialogflow::V2::ExportAgentRequest} or an equivalent Hash.
@@ -586,7 +606,9 @@ module Google
586
606
  options.apply_defaults timeout: @config.rpcs.export_agent.timeout,
587
607
  metadata: metadata,
588
608
  retry_policy: @config.rpcs.export_agent.retry_policy
589
- options.apply_defaults metadata: @config.metadata,
609
+
610
+ options.apply_defaults timeout: @config.timeout,
611
+ metadata: @config.metadata,
590
612
  retry_policy: @config.retry_policy
591
613
 
592
614
  @agents_stub.call_rpc :export_agent, request, options: options do |response, operation|
@@ -609,8 +631,17 @@ module Google
609
631
  # call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it returns in order to train
610
632
  # explicitly.
611
633
  #
612
- # An operation which tracks when importing is complete. It only tracks
613
- # when the draft agent is updated not when it is done training.
634
+ # This method is a [long-running
635
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
636
+ # The returned `Operation` type has the following method-specific fields:
637
+ #
638
+ # - `metadata`: An empty [Struct
639
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
640
+ # - `response`: An [Empty
641
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
642
+ #
643
+ # The operation only tracks when importing is complete, not when it is done
644
+ # training.
614
645
  #
615
646
  # Note: You should always train an agent prior to sending it queries. See the
616
647
  # [training
@@ -674,7 +705,9 @@ module Google
674
705
  options.apply_defaults timeout: @config.rpcs.import_agent.timeout,
675
706
  metadata: metadata,
676
707
  retry_policy: @config.rpcs.import_agent.retry_policy
677
- options.apply_defaults metadata: @config.metadata,
708
+
709
+ options.apply_defaults timeout: @config.timeout,
710
+ metadata: @config.metadata,
678
711
  retry_policy: @config.retry_policy
679
712
 
680
713
  @agents_stub.call_rpc :import_agent, request, options: options do |response, operation|
@@ -696,8 +729,17 @@ module Google
696
729
  # completed yet. Please call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it
697
730
  # returns in order to train explicitly.
698
731
  #
699
- # An operation which tracks when restoring is complete. It only tracks
700
- # when the draft agent is updated not when it is done training.
732
+ # This method is a [long-running
733
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
734
+ # The returned `Operation` type has the following method-specific fields:
735
+ #
736
+ # - `metadata`: An empty [Struct
737
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
738
+ # - `response`: An [Empty
739
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
740
+ #
741
+ # The operation only tracks when restoring is complete, not when it is done
742
+ # training.
701
743
  #
702
744
  # Note: You should always train an agent prior to sending it queries. See the
703
745
  # [training
@@ -761,7 +803,9 @@ module Google
761
803
  options.apply_defaults timeout: @config.rpcs.restore_agent.timeout,
762
804
  metadata: metadata,
763
805
  retry_policy: @config.rpcs.restore_agent.retry_policy
764
- options.apply_defaults metadata: @config.metadata,
806
+
807
+ options.apply_defaults timeout: @config.timeout,
808
+ metadata: @config.metadata,
765
809
  retry_policy: @config.retry_policy
766
810
 
767
811
  @agents_stub.call_rpc :restore_agent, request, options: options do |response, operation|
@@ -836,7 +880,9 @@ module Google
836
880
  options.apply_defaults timeout: @config.rpcs.get_validation_result.timeout,
837
881
  metadata: metadata,
838
882
  retry_policy: @config.rpcs.get_validation_result.retry_policy
839
- options.apply_defaults metadata: @config.metadata,
883
+
884
+ options.apply_defaults timeout: @config.timeout,
885
+ metadata: @config.metadata,
840
886
  retry_policy: @config.retry_policy
841
887
 
842
888
  @agents_stub.call_rpc :get_validation_result, request, options: options do |response, operation|
@@ -860,22 +906,21 @@ module Google
860
906
  # Configuration can be applied globally to all clients, or to a single client
861
907
  # on construction.
862
908
  #
863
- # # Examples
864
- #
865
- # To modify the global config, setting the timeout for get_agent
866
- # to 20 seconds, and all remaining timeouts to 10 seconds:
867
- #
868
- # ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
869
- # config.timeout = 10.0
870
- # config.rpcs.get_agent.timeout = 20.0
871
- # end
872
- #
873
- # To apply the above configuration only to a new client:
874
- #
875
- # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
876
- # config.timeout = 10.0
877
- # config.rpcs.get_agent.timeout = 20.0
878
- # end
909
+ # @example
910
+ #
911
+ # # Modify the global config, setting the timeout for
912
+ # # get_agent to 20 seconds,
913
+ # # and all remaining timeouts to 10 seconds.
914
+ # ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
915
+ # config.timeout = 10.0
916
+ # config.rpcs.get_agent.timeout = 20.0
917
+ # end
918
+ #
919
+ # # Apply the above configuration only to a new client.
920
+ # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
921
+ # config.timeout = 10.0
922
+ # config.rpcs.get_agent.timeout = 20.0
923
+ # end
879
924
  #
880
925
  # @!attribute [rw] endpoint
881
926
  # The hostname or hostname:port of the service endpoint.
@@ -169,7 +169,9 @@ module Google
169
169
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
170
  metadata: metadata,
171
171
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
172
+
173
+ options.apply_defaults timeout: @config.timeout,
174
+ metadata: @config.metadata,
173
175
  retry_policy: @config.retry_policy
174
176
 
175
177
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -239,7 +241,9 @@ module Google
239
241
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
242
  metadata: metadata,
241
243
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
243
247
  retry_policy: @config.retry_policy
244
248
 
245
249
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -309,7 +313,9 @@ module Google
309
313
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
314
  metadata: metadata,
311
315
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
313
319
  retry_policy: @config.retry_policy
314
320
 
315
321
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -384,7 +390,9 @@ module Google
384
390
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
391
  metadata: metadata,
386
392
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
388
396
  retry_policy: @config.retry_policy
389
397
 
390
398
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -456,7 +464,9 @@ module Google
456
464
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
465
  metadata: metadata,
458
466
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
460
470
  retry_policy: @config.retry_policy
461
471
 
462
472
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +491,21 @@ module Google
481
491
  # Configuration can be applied globally to all clients, or to a single client
482
492
  # on construction.
483
493
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # list_operations to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Longrunning::Operations::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.list_operations.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.list_operations.timeout = 20.0
508
+ # end
500
509
  #
501
510
  # @!attribute [rw] endpoint
502
511
  # The hostname or hostname:port of the service endpoint.
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/answer_record.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'
@@ -11,6 +9,8 @@ require 'google/cloud/dialogflow/v2/participant_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/field_mask_pb'
13
11
  require 'google/protobuf/timestamp_pb'
12
+ require 'google/protobuf'
13
+
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_file("google/cloud/dialogflow/v2/answer_record.proto", :syntax => :proto3) do
16
16
  add_message "google.cloud.dialogflow.v2.AnswerRecord" do
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for managing [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord].
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Dialogflow::V2::AnswerRecords::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all AnswerRecords clients:
47
- #
48
- # ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all AnswerRecords clients
47
+ # ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -99,19 +98,15 @@ module Google
99
98
  ##
100
99
  # Create a new AnswerRecords client object.
101
100
  #
102
- # ## Examples
103
- #
104
- # To create a new AnswerRecords client with the default
105
- # configuration:
106
- #
107
- # client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new
101
+ # @example
108
102
  #
109
- # To create a new AnswerRecords client with a custom
110
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new
111
105
  #
112
- # client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new do |config|
113
- # config.timeout = 10.0
114
- # end
106
+ # # Create a client using a custom configuration
107
+ # client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new do |config|
108
+ # config.timeout = 10.0
109
+ # end
115
110
  #
116
111
  # @yield [config] Configure the AnswerRecords client.
117
112
  # @yieldparam config [Client::Configuration]
@@ -131,10 +126,9 @@ module Google
131
126
 
132
127
  # Create credentials
133
128
  credentials = @config.credentials
134
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
129
+ # Use self-signed JWT if the endpoint is unchanged from default,
135
130
  # but only if the default endpoint does not have a region prefix.
136
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
137
- @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
138
132
  !@config.endpoint.split(".").first.include?("-")
139
133
  credentials ||= Credentials.default scope: @config.scope,
140
134
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -229,7 +223,9 @@ module Google
229
223
  options.apply_defaults timeout: @config.rpcs.list_answer_records.timeout,
230
224
  metadata: metadata,
231
225
  retry_policy: @config.rpcs.list_answer_records.retry_policy
232
- options.apply_defaults metadata: @config.metadata,
226
+
227
+ options.apply_defaults timeout: @config.timeout,
228
+ metadata: @config.metadata,
233
229
  retry_policy: @config.retry_policy
234
230
 
235
231
  @answer_records_stub.call_rpc :list_answer_records, request, options: options do |response, operation|
@@ -298,7 +294,9 @@ module Google
298
294
  options.apply_defaults timeout: @config.rpcs.update_answer_record.timeout,
299
295
  metadata: metadata,
300
296
  retry_policy: @config.rpcs.update_answer_record.retry_policy
301
- options.apply_defaults metadata: @config.metadata,
297
+
298
+ options.apply_defaults timeout: @config.timeout,
299
+ metadata: @config.metadata,
302
300
  retry_policy: @config.retry_policy
303
301
 
304
302
  @answer_records_stub.call_rpc :update_answer_record, request, options: options do |response, operation|
@@ -322,22 +320,21 @@ module Google
322
320
  # Configuration can be applied globally to all clients, or to a single client
323
321
  # on construction.
324
322
  #
325
- # # Examples
326
- #
327
- # To modify the global config, setting the timeout for list_answer_records
328
- # to 20 seconds, and all remaining timeouts to 10 seconds:
329
- #
330
- # ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.configure do |config|
331
- # config.timeout = 10.0
332
- # config.rpcs.list_answer_records.timeout = 20.0
333
- # end
334
- #
335
- # To apply the above configuration only to a new client:
336
- #
337
- # client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new do |config|
338
- # config.timeout = 10.0
339
- # config.rpcs.list_answer_records.timeout = 20.0
340
- # end
323
+ # @example
324
+ #
325
+ # # Modify the global config, setting the timeout for
326
+ # # list_answer_records to 20 seconds,
327
+ # # and all remaining timeouts to 10 seconds.
328
+ # ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.configure do |config|
329
+ # config.timeout = 10.0
330
+ # config.rpcs.list_answer_records.timeout = 20.0
331
+ # end
332
+ #
333
+ # # Apply the above configuration only to a new client.
334
+ # client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new do |config|
335
+ # config.timeout = 10.0
336
+ # config.rpcs.list_answer_records.timeout = 20.0
337
+ # end
341
338
  #
342
339
  # @!attribute [rw] endpoint
343
340
  # The hostname or hostname:port of the service endpoint.
@@ -1,12 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/audio_config.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/protobuf/duration_pb'
7
+ require 'google/protobuf/timestamp_pb'
9
8
  require 'google/api/annotations_pb'
9
+ require 'google/protobuf'
10
+
10
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
12
  add_file("google/cloud/dialogflow/v2/audio_config.proto", :syntax => :proto3) do
12
13
  add_message "google.cloud.dialogflow.v2.SpeechContext" do