google-cloud-dialogflow-v2 0.9.0 → 0.11.1
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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +17 -6
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +74 -55
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +37 -43
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +49 -47
- data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +49 -47
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +29 -8
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +89 -58
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +7 -7
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +69 -56
- data/lib/google/cloud/dialogflow/v2/environments/paths.rb +41 -0
- data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +37 -43
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +21 -3
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +72 -50
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +53 -52
- data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +38 -47
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +51 -46
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +21 -3
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +4 -3
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +3 -0
- data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/version.rb +6 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4d2b29e726ce9b67ccde9f362e7ea72c2853e473e66c9044c46fcdc95ab3cd6
|
4
|
+
data.tar.gz: 10bea396d32d2e0c8d1fbbe12fe7e2bcc2102717f7e62303665247dce3981f0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59cc1ea02ae7620404dae8eed7eb51ee8c1922a905af1f893651cd63d4be95107f0750ffd112cda7df5a006c07849ac18b8192a2d1827e178c56a0151921f4ce
|
7
|
+
data.tar.gz: 4c48335d9393de2f5743c74a44877196af1c941201bf664b7fc8bb9b6b8ee382a6b9b54059485a07fc4a411f6d3b9451f8e98e564e36298e2aa7a6dbb6b71c63
|
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
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
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
|
86
|
-
environment
|
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
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/dialogflow/v2"
|
data/README.md
CHANGED
@@ -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 =
|
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
|
30
|
+
include GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -36,6 +36,10 @@ module Google
|
|
36
36
|
# Retrieves the specified agent.
|
37
37
|
rpc :GetAgent, ::Google::Cloud::Dialogflow::V2::GetAgentRequest, ::Google::Cloud::Dialogflow::V2::Agent
|
38
38
|
# Creates/updates the specified agent.
|
39
|
+
#
|
40
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
41
|
+
# [training
|
42
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
39
43
|
rpc :SetAgent, ::Google::Cloud::Dialogflow::V2::SetAgentRequest, ::Google::Cloud::Dialogflow::V2::Agent
|
40
44
|
# Deletes the specified agent.
|
41
45
|
rpc :DeleteAgent, ::Google::Cloud::Dialogflow::V2::DeleteAgentRequest, ::Google::Protobuf::Empty
|
@@ -49,11 +53,12 @@ module Google
|
|
49
53
|
rpc :SearchAgents, ::Google::Cloud::Dialogflow::V2::SearchAgentsRequest, ::Google::Cloud::Dialogflow::V2::SearchAgentsResponse
|
50
54
|
# Trains the specified agent.
|
51
55
|
#
|
52
|
-
#
|
56
|
+
#
|
57
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
58
|
+
# [training
|
59
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
53
60
|
rpc :TrainAgent, ::Google::Cloud::Dialogflow::V2::TrainAgentRequest, ::Google::Longrunning::Operation
|
54
61
|
# Exports the specified agent to a ZIP file.
|
55
|
-
#
|
56
|
-
# Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
|
57
62
|
rpc :ExportAgent, ::Google::Cloud::Dialogflow::V2::ExportAgentRequest, ::Google::Longrunning::Operation
|
58
63
|
# Imports the specified agent from a ZIP file.
|
59
64
|
#
|
@@ -65,9 +70,12 @@ module Google
|
|
65
70
|
# call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train
|
66
71
|
# explicitly.
|
67
72
|
#
|
68
|
-
# Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
69
73
|
# An operation which tracks when importing is complete. It only tracks
|
70
74
|
# when the draft agent is updated not when it is done training.
|
75
|
+
#
|
76
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
77
|
+
# [training
|
78
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
71
79
|
rpc :ImportAgent, ::Google::Cloud::Dialogflow::V2::ImportAgentRequest, ::Google::Longrunning::Operation
|
72
80
|
# Restores the specified agent from a ZIP file.
|
73
81
|
#
|
@@ -78,9 +86,12 @@ module Google
|
|
78
86
|
# completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it
|
79
87
|
# returns in order to train explicitly.
|
80
88
|
#
|
81
|
-
# Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
82
89
|
# An operation which tracks when restoring is complete. It only tracks
|
83
90
|
# when the draft agent is updated not when it is done training.
|
91
|
+
#
|
92
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
93
|
+
# [training
|
94
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
84
95
|
rpc :RestoreAgent, ::Google::Cloud::Dialogflow::V2::RestoreAgentRequest, ::Google::Longrunning::Operation
|
85
96
|
# Gets agent validation result. Agent validation is performed during
|
86
97
|
# training time and is updated automatically when training is completed.
|
@@ -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
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
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
|
-
#
|
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
|
-
#
|
113
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
114
105
|
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
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
|
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.
|
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
|
-
|
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|
|
@@ -240,6 +233,10 @@ module Google
|
|
240
233
|
##
|
241
234
|
# Creates/updates the specified agent.
|
242
235
|
#
|
236
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
237
|
+
# [training
|
238
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
239
|
+
#
|
243
240
|
# @overload set_agent(request, options = nil)
|
244
241
|
# Pass arguments to `set_agent` via a request object, either of type
|
245
242
|
# {::Google::Cloud::Dialogflow::V2::SetAgentRequest} or an equivalent Hash.
|
@@ -294,7 +291,9 @@ module Google
|
|
294
291
|
options.apply_defaults timeout: @config.rpcs.set_agent.timeout,
|
295
292
|
metadata: metadata,
|
296
293
|
retry_policy: @config.rpcs.set_agent.retry_policy
|
297
|
-
|
294
|
+
|
295
|
+
options.apply_defaults timeout: @config.timeout,
|
296
|
+
metadata: @config.metadata,
|
298
297
|
retry_policy: @config.retry_policy
|
299
298
|
|
300
299
|
@agents_stub.call_rpc :set_agent, request, options: options do |response, operation|
|
@@ -361,7 +360,9 @@ module Google
|
|
361
360
|
options.apply_defaults timeout: @config.rpcs.delete_agent.timeout,
|
362
361
|
metadata: metadata,
|
363
362
|
retry_policy: @config.rpcs.delete_agent.retry_policy
|
364
|
-
|
363
|
+
|
364
|
+
options.apply_defaults timeout: @config.timeout,
|
365
|
+
metadata: @config.metadata,
|
365
366
|
retry_policy: @config.retry_policy
|
366
367
|
|
367
368
|
@agents_stub.call_rpc :delete_agent, request, options: options do |response, operation|
|
@@ -439,7 +440,9 @@ module Google
|
|
439
440
|
options.apply_defaults timeout: @config.rpcs.search_agents.timeout,
|
440
441
|
metadata: metadata,
|
441
442
|
retry_policy: @config.rpcs.search_agents.retry_policy
|
442
|
-
|
443
|
+
|
444
|
+
options.apply_defaults timeout: @config.timeout,
|
445
|
+
metadata: @config.metadata,
|
443
446
|
retry_policy: @config.retry_policy
|
444
447
|
|
445
448
|
@agents_stub.call_rpc :search_agents, request, options: options do |response, operation|
|
@@ -454,7 +457,10 @@ module Google
|
|
454
457
|
##
|
455
458
|
# Trains the specified agent.
|
456
459
|
#
|
457
|
-
#
|
460
|
+
#
|
461
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
462
|
+
# [training
|
463
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
458
464
|
#
|
459
465
|
# @overload train_agent(request, options = nil)
|
460
466
|
# Pass arguments to `train_agent` via a request object, either of type
|
@@ -509,7 +515,9 @@ module Google
|
|
509
515
|
options.apply_defaults timeout: @config.rpcs.train_agent.timeout,
|
510
516
|
metadata: metadata,
|
511
517
|
retry_policy: @config.rpcs.train_agent.retry_policy
|
512
|
-
|
518
|
+
|
519
|
+
options.apply_defaults timeout: @config.timeout,
|
520
|
+
metadata: @config.metadata,
|
513
521
|
retry_policy: @config.retry_policy
|
514
522
|
|
515
523
|
@agents_stub.call_rpc :train_agent, request, options: options do |response, operation|
|
@@ -524,8 +532,6 @@ module Google
|
|
524
532
|
##
|
525
533
|
# Exports the specified agent to a ZIP file.
|
526
534
|
#
|
527
|
-
# Operation <response: {::Google::Cloud::Dialogflow::V2::ExportAgentResponse ExportAgentResponse}>
|
528
|
-
#
|
529
535
|
# @overload export_agent(request, options = nil)
|
530
536
|
# Pass arguments to `export_agent` via a request object, either of type
|
531
537
|
# {::Google::Cloud::Dialogflow::V2::ExportAgentRequest} or an equivalent Hash.
|
@@ -584,7 +590,9 @@ module Google
|
|
584
590
|
options.apply_defaults timeout: @config.rpcs.export_agent.timeout,
|
585
591
|
metadata: metadata,
|
586
592
|
retry_policy: @config.rpcs.export_agent.retry_policy
|
587
|
-
|
593
|
+
|
594
|
+
options.apply_defaults timeout: @config.timeout,
|
595
|
+
metadata: @config.metadata,
|
588
596
|
retry_policy: @config.retry_policy
|
589
597
|
|
590
598
|
@agents_stub.call_rpc :export_agent, request, options: options do |response, operation|
|
@@ -607,10 +615,13 @@ module Google
|
|
607
615
|
# call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it returns in order to train
|
608
616
|
# explicitly.
|
609
617
|
#
|
610
|
-
# Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
|
611
618
|
# An operation which tracks when importing is complete. It only tracks
|
612
619
|
# when the draft agent is updated not when it is done training.
|
613
620
|
#
|
621
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
622
|
+
# [training
|
623
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
624
|
+
#
|
614
625
|
# @overload import_agent(request, options = nil)
|
615
626
|
# Pass arguments to `import_agent` via a request object, either of type
|
616
627
|
# {::Google::Cloud::Dialogflow::V2::ImportAgentRequest} or an equivalent Hash.
|
@@ -669,7 +680,9 @@ module Google
|
|
669
680
|
options.apply_defaults timeout: @config.rpcs.import_agent.timeout,
|
670
681
|
metadata: metadata,
|
671
682
|
retry_policy: @config.rpcs.import_agent.retry_policy
|
672
|
-
|
683
|
+
|
684
|
+
options.apply_defaults timeout: @config.timeout,
|
685
|
+
metadata: @config.metadata,
|
673
686
|
retry_policy: @config.retry_policy
|
674
687
|
|
675
688
|
@agents_stub.call_rpc :import_agent, request, options: options do |response, operation|
|
@@ -691,10 +704,13 @@ module Google
|
|
691
704
|
# completed yet. Please call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it
|
692
705
|
# returns in order to train explicitly.
|
693
706
|
#
|
694
|
-
# Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
|
695
707
|
# An operation which tracks when restoring is complete. It only tracks
|
696
708
|
# when the draft agent is updated not when it is done training.
|
697
709
|
#
|
710
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
711
|
+
# [training
|
712
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
713
|
+
#
|
698
714
|
# @overload restore_agent(request, options = nil)
|
699
715
|
# Pass arguments to `restore_agent` via a request object, either of type
|
700
716
|
# {::Google::Cloud::Dialogflow::V2::RestoreAgentRequest} or an equivalent Hash.
|
@@ -753,7 +769,9 @@ module Google
|
|
753
769
|
options.apply_defaults timeout: @config.rpcs.restore_agent.timeout,
|
754
770
|
metadata: metadata,
|
755
771
|
retry_policy: @config.rpcs.restore_agent.retry_policy
|
756
|
-
|
772
|
+
|
773
|
+
options.apply_defaults timeout: @config.timeout,
|
774
|
+
metadata: @config.metadata,
|
757
775
|
retry_policy: @config.retry_policy
|
758
776
|
|
759
777
|
@agents_stub.call_rpc :restore_agent, request, options: options do |response, operation|
|
@@ -828,7 +846,9 @@ module Google
|
|
828
846
|
options.apply_defaults timeout: @config.rpcs.get_validation_result.timeout,
|
829
847
|
metadata: metadata,
|
830
848
|
retry_policy: @config.rpcs.get_validation_result.retry_policy
|
831
|
-
|
849
|
+
|
850
|
+
options.apply_defaults timeout: @config.timeout,
|
851
|
+
metadata: @config.metadata,
|
832
852
|
retry_policy: @config.retry_policy
|
833
853
|
|
834
854
|
@agents_stub.call_rpc :get_validation_result, request, options: options do |response, operation|
|
@@ -852,22 +872,21 @@ module Google
|
|
852
872
|
# Configuration can be applied globally to all clients, or to a single client
|
853
873
|
# on construction.
|
854
874
|
#
|
855
|
-
#
|
856
|
-
#
|
857
|
-
#
|
858
|
-
# to 20 seconds,
|
859
|
-
#
|
860
|
-
#
|
861
|
-
#
|
862
|
-
#
|
863
|
-
#
|
864
|
-
#
|
865
|
-
#
|
866
|
-
#
|
867
|
-
#
|
868
|
-
#
|
869
|
-
#
|
870
|
-
# end
|
875
|
+
# @example
|
876
|
+
#
|
877
|
+
# # Modify the global config, setting the timeout for
|
878
|
+
# # get_agent to 20 seconds,
|
879
|
+
# # and all remaining timeouts to 10 seconds.
|
880
|
+
# ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
|
881
|
+
# config.timeout = 10.0
|
882
|
+
# config.rpcs.get_agent.timeout = 20.0
|
883
|
+
# end
|
884
|
+
#
|
885
|
+
# # Apply the above configuration only to a new client.
|
886
|
+
# client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
|
887
|
+
# config.timeout = 10.0
|
888
|
+
# config.rpcs.get_agent.timeout = 20.0
|
889
|
+
# end
|
871
890
|
#
|
872
891
|
# @!attribute [rw] endpoint
|
873
892
|
# 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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
400
|
-
#
|
401
|
-
#
|
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
|
-
|
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
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
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.
|