google-cloud-dialogflow-v2 0.10.0 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +8 -8
  3. data/README.md +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 +96 -54
  6. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +34 -25
  7. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
  8. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +37 -43
  9. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -0
  10. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
  11. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +49 -47
  12. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
  13. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +46 -46
  14. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
  15. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +46 -46
  16. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +27 -10
  17. data/lib/google/cloud/dialogflow/v2/documents/client.rb +75 -56
  18. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +34 -25
  19. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +45 -1
  20. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +104 -51
  21. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +34 -25
  22. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +7 -7
  23. data/lib/google/cloud/dialogflow/v2/environments/client.rb +69 -56
  24. data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
  25. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +37 -43
  26. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +16 -1
  27. data/lib/google/cloud/dialogflow/v2/intents/client.rb +67 -48
  28. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +34 -25
  29. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
  30. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +46 -46
  31. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
  32. data/lib/google/cloud/dialogflow/v2/participants/client.rb +53 -52
  33. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
  34. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +46 -46
  35. data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
  36. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +1 -1
  37. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +38 -47
  38. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  39. data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
  40. data/lib/google/cloud/dialogflow/v2/versions/client.rb +51 -46
  41. data/proto_docs/google/api/field_behavior.rb +7 -1
  42. data/proto_docs/google/cloud/dialogflow/v2/environment.rb +22 -4
  43. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +4 -3
  44. data/proto_docs/google/cloud/dialogflow/v2/session.rb +3 -0
  45. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
  46. data/proto_docs/google/cloud/dialogflow/v2/version.rb +6 -0
  47. metadata +8 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f9bd8a2a3f32c3ae56627408a739f0e8c29f9973d723af1a982127291c7f12b
4
- data.tar.gz: a71c4834e3b7a9cb9919963644688ce42dd185f43e3905c1ca3aec67ec96fec1
3
+ metadata.gz: b0f1abc85940f021d2a1292d95171e7a2eaf05a094c4276376e3c197968d4b7a
4
+ data.tar.gz: c60dc9c063ba32890680144f8939ccd443e9f70f971e12fb8c7331ad9fe572db
5
5
  SHA512:
6
- metadata.gz: 33d0b96ddd47aecd6c5941f33317c8dadcade2098c513bd3e910ecaa78c1ee74b5d4df06f46ea9d29fe97c8138510020388d1f86b21b7d8c814e637511e9dc7e
7
- data.tar.gz: bbafb336587819afd529cf2e2fc673289ab6a15e7a190634a2a629283f666fd92b50887f5baf0b175f6203259d7cb2364c3b9bfa8729a67b3112851e7fe2b9f7
6
+ metadata.gz: 94db7415e9bc1f54079c0d120b71eb4cccb374ffb4eae860b05b0466dcdec1666429a1a752674e868ec5d7f7cb9a0e5fc39e075dc5fb45605762625fd61603d2
7
+ data.tar.gz: 7c37270cf812836d10acdc405a9ae028859d0ab706a90a3d0fb582085521db8dde9d3ebe1b7764abb97ce2bf01e9397484ed0d5173acdc62e63206f1608e55cc
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-dialogflow-v2
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Dialogflow::V2::Agents::Credentials}):
68
68
 
69
- 1. `DIALOGFLOW_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `DIALOGFLOW_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `DIALOGFLOW_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `DIALOGFLOW_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/dialogflow/v2"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/dialogflow/v2"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/dialogflow/v2"
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
 
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/dialogflow/v2"
34
34
 
35
35
  client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Dialogflow::V2::GetAgentRequest.new # (request fields as keyword arguments...)
37
37
  response = client.get_agent request
38
38
  ```
39
39
 
@@ -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]
@@ -67,10 +66,7 @@ module Google
67
66
 
68
67
  default_config.timeout = 60.0
69
68
  default_config.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [14]
69
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
74
70
  }
75
71
 
76
72
  default_config
@@ -102,19 +98,15 @@ module Google
102
98
  ##
103
99
  # Create a new Agents client object.
104
100
  #
105
- # ## Examples
106
- #
107
- # To create a new Agents client with the default
108
- # configuration:
109
- #
110
- # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
101
+ # @example
111
102
  #
112
- # To create a new Agents client with a custom
113
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
114
105
  #
115
- # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
116
- # config.timeout = 10.0
117
- # 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
118
110
  #
119
111
  # @yield [config] Configure the Agents client.
120
112
  # @yieldparam config [Client::Configuration]
@@ -134,14 +126,13 @@ module Google
134
126
 
135
127
  # Create credentials
136
128
  credentials = @config.credentials
137
- # 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,
138
130
  # but only if the default endpoint does not have a region prefix.
139
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
140
- @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
141
132
  !@config.endpoint.split(".").first.include?("-")
142
133
  credentials ||= Credentials.default scope: @config.scope,
143
134
  enable_self_signed_jwt: enable_self_signed_jwt
144
- if credentials.is_a?(String) || credentials.is_a?(Hash)
135
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
136
  credentials = Credentials.new credentials, scope: @config.scope
146
137
  end
147
138
  @quota_project_id = @config.quota_project
@@ -226,7 +217,9 @@ module Google
226
217
  options.apply_defaults timeout: @config.rpcs.get_agent.timeout,
227
218
  metadata: metadata,
228
219
  retry_policy: @config.rpcs.get_agent.retry_policy
229
- options.apply_defaults metadata: @config.metadata,
220
+
221
+ options.apply_defaults timeout: @config.timeout,
222
+ metadata: @config.metadata,
230
223
  retry_policy: @config.retry_policy
231
224
 
232
225
  @agents_stub.call_rpc :get_agent, request, options: options do |response, operation|
@@ -298,7 +291,9 @@ module Google
298
291
  options.apply_defaults timeout: @config.rpcs.set_agent.timeout,
299
292
  metadata: metadata,
300
293
  retry_policy: @config.rpcs.set_agent.retry_policy
301
- options.apply_defaults metadata: @config.metadata,
294
+
295
+ options.apply_defaults timeout: @config.timeout,
296
+ metadata: @config.metadata,
302
297
  retry_policy: @config.retry_policy
303
298
 
304
299
  @agents_stub.call_rpc :set_agent, request, options: options do |response, operation|
@@ -365,7 +360,9 @@ module Google
365
360
  options.apply_defaults timeout: @config.rpcs.delete_agent.timeout,
366
361
  metadata: metadata,
367
362
  retry_policy: @config.rpcs.delete_agent.retry_policy
368
- options.apply_defaults metadata: @config.metadata,
363
+
364
+ options.apply_defaults timeout: @config.timeout,
365
+ metadata: @config.metadata,
369
366
  retry_policy: @config.retry_policy
370
367
 
371
368
  @agents_stub.call_rpc :delete_agent, request, options: options do |response, operation|
@@ -443,7 +440,9 @@ module Google
443
440
  options.apply_defaults timeout: @config.rpcs.search_agents.timeout,
444
441
  metadata: metadata,
445
442
  retry_policy: @config.rpcs.search_agents.retry_policy
446
- options.apply_defaults metadata: @config.metadata,
443
+
444
+ options.apply_defaults timeout: @config.timeout,
445
+ metadata: @config.metadata,
447
446
  retry_policy: @config.retry_policy
448
447
 
449
448
  @agents_stub.call_rpc :search_agents, request, options: options do |response, operation|
@@ -458,6 +457,14 @@ module Google
458
457
  ##
459
458
  # Trains the specified agent.
460
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)
461
468
  #
462
469
  # Note: You should always train an agent prior to sending it queries. See the
463
470
  # [training
@@ -516,7 +523,9 @@ module Google
516
523
  options.apply_defaults timeout: @config.rpcs.train_agent.timeout,
517
524
  metadata: metadata,
518
525
  retry_policy: @config.rpcs.train_agent.retry_policy
519
- options.apply_defaults metadata: @config.metadata,
526
+
527
+ options.apply_defaults timeout: @config.timeout,
528
+ metadata: @config.metadata,
520
529
  retry_policy: @config.retry_policy
521
530
 
522
531
  @agents_stub.call_rpc :train_agent, request, options: options do |response, operation|
@@ -531,6 +540,14 @@ module Google
531
540
  ##
532
541
  # Exports the specified agent to a ZIP file.
533
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
+ #
534
551
  # @overload export_agent(request, options = nil)
535
552
  # Pass arguments to `export_agent` via a request object, either of type
536
553
  # {::Google::Cloud::Dialogflow::V2::ExportAgentRequest} or an equivalent Hash.
@@ -589,7 +606,9 @@ module Google
589
606
  options.apply_defaults timeout: @config.rpcs.export_agent.timeout,
590
607
  metadata: metadata,
591
608
  retry_policy: @config.rpcs.export_agent.retry_policy
592
- options.apply_defaults metadata: @config.metadata,
609
+
610
+ options.apply_defaults timeout: @config.timeout,
611
+ metadata: @config.metadata,
593
612
  retry_policy: @config.retry_policy
594
613
 
595
614
  @agents_stub.call_rpc :export_agent, request, options: options do |response, operation|
@@ -612,8 +631,17 @@ module Google
612
631
  # call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it returns in order to train
613
632
  # explicitly.
614
633
  #
615
- # An operation which tracks when importing is complete. It only tracks
616
- # 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.
617
645
  #
618
646
  # Note: You should always train an agent prior to sending it queries. See the
619
647
  # [training
@@ -677,7 +705,9 @@ module Google
677
705
  options.apply_defaults timeout: @config.rpcs.import_agent.timeout,
678
706
  metadata: metadata,
679
707
  retry_policy: @config.rpcs.import_agent.retry_policy
680
- options.apply_defaults metadata: @config.metadata,
708
+
709
+ options.apply_defaults timeout: @config.timeout,
710
+ metadata: @config.metadata,
681
711
  retry_policy: @config.retry_policy
682
712
 
683
713
  @agents_stub.call_rpc :import_agent, request, options: options do |response, operation|
@@ -699,8 +729,17 @@ module Google
699
729
  # completed yet. Please call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it
700
730
  # returns in order to train explicitly.
701
731
  #
702
- # An operation which tracks when restoring is complete. It only tracks
703
- # 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.
704
743
  #
705
744
  # Note: You should always train an agent prior to sending it queries. See the
706
745
  # [training
@@ -764,7 +803,9 @@ module Google
764
803
  options.apply_defaults timeout: @config.rpcs.restore_agent.timeout,
765
804
  metadata: metadata,
766
805
  retry_policy: @config.rpcs.restore_agent.retry_policy
767
- options.apply_defaults metadata: @config.metadata,
806
+
807
+ options.apply_defaults timeout: @config.timeout,
808
+ metadata: @config.metadata,
768
809
  retry_policy: @config.retry_policy
769
810
 
770
811
  @agents_stub.call_rpc :restore_agent, request, options: options do |response, operation|
@@ -839,7 +880,9 @@ module Google
839
880
  options.apply_defaults timeout: @config.rpcs.get_validation_result.timeout,
840
881
  metadata: metadata,
841
882
  retry_policy: @config.rpcs.get_validation_result.retry_policy
842
- options.apply_defaults metadata: @config.metadata,
883
+
884
+ options.apply_defaults timeout: @config.timeout,
885
+ metadata: @config.metadata,
843
886
  retry_policy: @config.retry_policy
844
887
 
845
888
  @agents_stub.call_rpc :get_validation_result, request, options: options do |response, operation|
@@ -863,22 +906,21 @@ module Google
863
906
  # Configuration can be applied globally to all clients, or to a single client
864
907
  # on construction.
865
908
  #
866
- # # Examples
867
- #
868
- # To modify the global config, setting the timeout for get_agent
869
- # to 20 seconds, and all remaining timeouts to 10 seconds:
870
- #
871
- # ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
872
- # config.timeout = 10.0
873
- # config.rpcs.get_agent.timeout = 20.0
874
- # end
875
- #
876
- # To apply the above configuration only to a new client:
877
- #
878
- # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
879
- # config.timeout = 10.0
880
- # config.rpcs.get_agent.timeout = 20.0
881
- # 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
882
924
  #
883
925
  # @!attribute [rw] endpoint
884
926
  # The hostname or hostname:port of the service endpoint.
@@ -82,7 +82,7 @@ module Google
82
82
  # Create credentials
83
83
  credentials = @config.credentials
84
84
  credentials ||= Credentials.default scope: @config.scope
85
- if credentials.is_a?(String) || credentials.is_a?(Hash)
85
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
86
86
  credentials = Credentials.new credentials, scope: @config.scope
87
87
  end
88
88
  @quota_project_id = @config.quota_project
@@ -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|
@@ -396,9 +404,9 @@ module Google
396
404
  end
397
405
 
398
406
  ##
399
- # Waits for the specified long-running operation until it is done or reaches
400
- # at most a specified timeout, returning the latest state. If the operation
401
- # is already done, the latest state is immediately returned. If the timeout
407
+ # Waits until the specified long-running operation is done or reaches at most
408
+ # a specified timeout, returning the latest state. If the operation is
409
+ # already done, the latest state is immediately returned. If the timeout
402
410
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
403
411
  # timeout is used. If the server does not support this method, it returns
404
412
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -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.