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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +2 -2
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +39 -5
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +96 -54
- 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/audio_config_pb.rb +1 -0
- 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 +27 -10
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +75 -56
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +45 -1
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +104 -51
- 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/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 +16 -1
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +67 -48
- 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 +22 -4
- 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 +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0f1abc85940f021d2a1292d95171e7a2eaf05a094c4276376e3c197968d4b7a
|
4
|
+
data.tar.gz: c60dc9c063ba32890680144f8939ccd443e9f70f971e12fb8c7331ad9fe572db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
@@ -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 =
|
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
|
@@ -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
|
-
#
|
74
|
-
#
|
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
|
-
#
|
90
|
-
#
|
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
|
-
#
|
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|
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
#
|
616
|
-
#
|
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
|
-
|
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
|
-
#
|
703
|
-
#
|
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
|
-
|
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
|
-
|
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
|
-
#
|
867
|
-
#
|
868
|
-
#
|
869
|
-
# to 20 seconds,
|
870
|
-
#
|
871
|
-
#
|
872
|
-
#
|
873
|
-
#
|
874
|
-
#
|
875
|
-
#
|
876
|
-
#
|
877
|
-
#
|
878
|
-
#
|
879
|
-
#
|
880
|
-
#
|
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
|
-
|
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.
|