google-cloud-dialogflow-v2 0.5.0 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +5 -1
- data/lib/google/cloud/dialogflow/v2.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +1 -28
- data/lib/google/cloud/dialogflow/v2/agents.rb +2 -29
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +209 -231
- data/lib/google/cloud/dialogflow/v2/agents/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +109 -103
- data/lib/google/cloud/dialogflow/v2/agents/paths.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/contexts.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +148 -143
- data/lib/google/cloud/dialogflow/v2/contexts/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +14 -14
- data/lib/google/cloud/dialogflow/v2/entity_types.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +238 -233
- data/lib/google/cloud/dialogflow/v2/entity_types/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +109 -103
- data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +64 -59
- data/lib/google/cloud/dialogflow/v2/environments/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/environments/paths.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/intents.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +183 -178
- data/lib/google/cloud/dialogflow/v2/intents/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +109 -103
- data/lib/google/cloud/dialogflow/v2/intents/paths.rb +11 -11
- data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +130 -125
- data/lib/google/cloud/dialogflow/v2/session_entity_types/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +14 -14
- data/lib/google/cloud/dialogflow/v2/sessions.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +86 -81
- data/lib/google/cloud/dialogflow/v2/sessions/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +22 -22
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +79 -70
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +45 -44
- data/proto_docs/google/cloud/dialogflow/v2/context.rb +38 -38
- data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +86 -86
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +19 -19
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +251 -250
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +114 -106
- data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +35 -35
- data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +8 -8
- data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +27 -27
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/duration.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/struct.rb +18 -18
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/rpc/status.rb +6 -6
- data/proto_docs/google/type/latlng.rb +4 -4
- metadata +33 -6
- data/lib/google/cloud/common_resources_pb.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 227ba605ed46edb194150bc6c6ba18b49f9a2d16662a7c80009fc43c67f77246
|
4
|
+
data.tar.gz: c707125ab5bf9bdf188274ca11f2cb04c3071dada48eba1c0dd1a5b95e76308f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f520cffa54536227b057fb57484c3c3fcf97e773764170bd5b093a42edf569da7bf620068e11e746a86501738a1af276fa23e5d53759beaee4c26937e7b122e
|
7
|
+
data.tar.gz: df8537e7e988377a99e8ba1eba3d1816341035f266587e99772f0a50b24988c6aa782b9f0843831e1ee9fb3086c8dcc9840c66429e77ef3f0c60149468c36f96
|
data/AUTHENTICATION.md
CHANGED
@@ -27,7 +27,7 @@ export DIALOGFLOW_CREDENTIALS=path/to/keyfile.json
|
|
27
27
|
```ruby
|
28
28
|
require "google/cloud/dialogflow/v2"
|
29
29
|
|
30
|
-
client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
30
|
+
client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
31
31
|
```
|
32
32
|
|
33
33
|
## Credential Lookup
|
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-dialogflow-v2
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
{Google::Cloud::Dialogflow::V2::Agents::Credentials}):
|
67
|
+
{::Google::Cloud::Dialogflow::V2::Agents::Credentials}):
|
68
68
|
|
69
69
|
1. `DIALOGFLOW_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
2. `DIALOGFLOW_KEYFILE` - Path to JSON file, or JSON contents
|
@@ -77,7 +77,7 @@ require "google/cloud/dialogflow/v2"
|
|
77
77
|
|
78
78
|
ENV["DIALOGFLOW_CREDENTIALS"] = "path/to/keyfile.json"
|
79
79
|
|
80
|
-
client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
80
|
+
client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
81
81
|
```
|
82
82
|
|
83
83
|
### Configuration
|
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/dialogflow/v2"
|
90
90
|
|
91
|
-
client = Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
|
91
|
+
client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
|
92
92
|
config.credentials = "path/to/keyfile.json"
|
93
93
|
end
|
94
94
|
```
|
@@ -98,11 +98,11 @@ Or configured globally for all clients:
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/dialogflow/v2"
|
100
100
|
|
101
|
-
Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
|
101
|
+
::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
103
103
|
end
|
104
104
|
|
105
|
-
client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
105
|
+
client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
106
106
|
```
|
107
107
|
|
108
108
|
### Cloud SDK
|
data/README.md
CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
|
|
18
18
|
|
19
19
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
20
20
|
1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
21
|
+
1. [Enable the API.](https://console.cloud.google.com/apis/library/dialogflow.googleapis.com)
|
21
22
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
22
23
|
|
23
24
|
## Quick Start
|
@@ -25,7 +26,7 @@ In order to use this library, you first need to go through the following steps:
|
|
25
26
|
```ruby
|
26
27
|
require "google/cloud/dialogflow/v2"
|
27
28
|
|
28
|
-
client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
29
|
+
client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
29
30
|
request = my_create_request
|
30
31
|
response = client.get_agent request
|
31
32
|
```
|
@@ -33,6 +34,9 @@ response = client.get_agent request
|
|
33
34
|
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest)
|
34
35
|
for class and method documentation.
|
35
36
|
|
37
|
+
See also the [Product Documentation](https://cloud.google.com/dialogflow)
|
38
|
+
for general usage information.
|
39
|
+
|
36
40
|
## Enabling Logging
|
37
41
|
|
38
42
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
@@ -32,7 +32,7 @@ module Google
|
|
32
32
|
# To load this package, including all its services, and instantiate a client:
|
33
33
|
#
|
34
34
|
# require "google/cloud/dialogflow/v2"
|
35
|
-
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
35
|
+
# client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
36
36
|
#
|
37
37
|
module V2
|
38
38
|
end
|
@@ -24,34 +24,7 @@ module Google
|
|
24
24
|
module Dialogflow
|
25
25
|
module V2
|
26
26
|
module Agents
|
27
|
-
#
|
28
|
-
# that transform user requests into actionable data. You can include agents
|
29
|
-
# in your app, product, or service to determine user intent and respond to the
|
30
|
-
# user in a natural way.
|
31
|
-
#
|
32
|
-
# After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
|
33
|
-
# [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
|
34
|
-
# manage the flow of a conversation and match user input to predefined intents
|
35
|
-
# and actions.
|
36
|
-
#
|
37
|
-
# You can create an agent using both Dialogflow Standard Edition and
|
38
|
-
# Dialogflow Enterprise Edition. For details, see
|
39
|
-
# [Dialogflow
|
40
|
-
# Editions](https://cloud.google.com/dialogflow/docs/editions).
|
41
|
-
#
|
42
|
-
# You can save your agent for backup or versioning by exporting the agent by
|
43
|
-
# using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
|
44
|
-
# agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
|
45
|
-
#
|
46
|
-
# Dialogflow provides several
|
47
|
-
# [prebuilt
|
48
|
-
# agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt)
|
49
|
-
# for common conversation scenarios such as determining a date and time,
|
50
|
-
# converting currency, and so on.
|
51
|
-
#
|
52
|
-
# For more information about agents, see the
|
53
|
-
# [Dialogflow
|
54
|
-
# documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
|
27
|
+
# Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
|
55
28
|
class Service
|
56
29
|
|
57
30
|
include GRPC::GenericService
|
@@ -32,39 +32,12 @@ module Google
|
|
32
32
|
module Dialogflow
|
33
33
|
module V2
|
34
34
|
##
|
35
|
-
#
|
36
|
-
# that transform user requests into actionable data. You can include agents
|
37
|
-
# in your app, product, or service to determine user intent and respond to the
|
38
|
-
# user in a natural way.
|
39
|
-
#
|
40
|
-
# After you create an agent, you can add {Google::Cloud::Dialogflow::V2::Intents::Client Intents}, {Google::Cloud::Dialogflow::V2::Contexts::Client Contexts},
|
41
|
-
# {Google::Cloud::Dialogflow::V2::EntityTypes::Client Entity Types}, {Google::Cloud::Dialogflow::V2::WebhookRequest Webhooks}, and so on to
|
42
|
-
# manage the flow of a conversation and match user input to predefined intents
|
43
|
-
# and actions.
|
44
|
-
#
|
45
|
-
# You can create an agent using both Dialogflow Standard Edition and
|
46
|
-
# Dialogflow Enterprise Edition. For details, see
|
47
|
-
# [Dialogflow
|
48
|
-
# Editions](https://cloud.google.com/dialogflow/docs/editions).
|
49
|
-
#
|
50
|
-
# You can save your agent for backup or versioning by exporting the agent by
|
51
|
-
# using the {Google::Cloud::Dialogflow::V2::Agents::Client#export_agent ExportAgent} method. You can import a saved
|
52
|
-
# agent by using the {Google::Cloud::Dialogflow::V2::Agents::Client#import_agent ImportAgent} method.
|
53
|
-
#
|
54
|
-
# Dialogflow provides several
|
55
|
-
# [prebuilt
|
56
|
-
# agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt)
|
57
|
-
# for common conversation scenarios such as determining a date and time,
|
58
|
-
# converting currency, and so on.
|
59
|
-
#
|
60
|
-
# For more information about agents, see the
|
61
|
-
# [Dialogflow
|
62
|
-
# documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
|
35
|
+
# Service for managing {::Google::Cloud::Dialogflow::V2::Agent Agents}.
|
63
36
|
#
|
64
37
|
# To load this service and instantiate a client:
|
65
38
|
#
|
66
39
|
# require "google/cloud/dialogflow/v2/agents"
|
67
|
-
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
40
|
+
# client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
68
41
|
#
|
69
42
|
module Agents
|
70
43
|
end
|
@@ -27,34 +27,7 @@ module Google
|
|
27
27
|
##
|
28
28
|
# Client for the Agents service.
|
29
29
|
#
|
30
|
-
#
|
31
|
-
# that transform user requests into actionable data. You can include agents
|
32
|
-
# in your app, product, or service to determine user intent and respond to the
|
33
|
-
# user in a natural way.
|
34
|
-
#
|
35
|
-
# After you create an agent, you can add {Google::Cloud::Dialogflow::V2::Intents::Client Intents}, {Google::Cloud::Dialogflow::V2::Contexts::Client Contexts},
|
36
|
-
# {Google::Cloud::Dialogflow::V2::EntityTypes::Client Entity Types}, {Google::Cloud::Dialogflow::V2::WebhookRequest Webhooks}, and so on to
|
37
|
-
# manage the flow of a conversation and match user input to predefined intents
|
38
|
-
# and actions.
|
39
|
-
#
|
40
|
-
# You can create an agent using both Dialogflow Standard Edition and
|
41
|
-
# Dialogflow Enterprise Edition. For details, see
|
42
|
-
# [Dialogflow
|
43
|
-
# Editions](https://cloud.google.com/dialogflow/docs/editions).
|
44
|
-
#
|
45
|
-
# You can save your agent for backup or versioning by exporting the agent by
|
46
|
-
# using the {Google::Cloud::Dialogflow::V2::Agents::Client#export_agent ExportAgent} method. You can import a saved
|
47
|
-
# agent by using the {Google::Cloud::Dialogflow::V2::Agents::Client#import_agent ImportAgent} method.
|
48
|
-
#
|
49
|
-
# Dialogflow provides several
|
50
|
-
# [prebuilt
|
51
|
-
# agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt)
|
52
|
-
# for common conversation scenarios such as determining a date and time,
|
53
|
-
# converting currency, and so on.
|
54
|
-
#
|
55
|
-
# For more information about agents, see the
|
56
|
-
# [Dialogflow
|
57
|
-
# documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
|
30
|
+
# Service for managing {::Google::Cloud::Dialogflow::V2::Agent Agents}.
|
58
31
|
#
|
59
32
|
class Client
|
60
33
|
include Paths
|
@@ -65,15 +38,15 @@ module Google
|
|
65
38
|
##
|
66
39
|
# Configure the Agents Client class.
|
67
40
|
#
|
68
|
-
# See {Google::Cloud::Dialogflow::V2::Agents::Client::Configuration}
|
41
|
+
# See {::Google::Cloud::Dialogflow::V2::Agents::Client::Configuration}
|
69
42
|
# for a description of the configuration fields.
|
70
43
|
#
|
71
44
|
# ## Example
|
72
45
|
#
|
73
46
|
# To modify the configuration for all Agents clients:
|
74
47
|
#
|
75
|
-
# Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
|
76
|
-
# config.timeout =
|
48
|
+
# ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
77
50
|
# end
|
78
51
|
#
|
79
52
|
# @yield [config] Configure the Client client.
|
@@ -163,7 +136,7 @@ module Google
|
|
163
136
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
164
137
|
# should be made on {Client.configure}.
|
165
138
|
#
|
166
|
-
# See {Google::Cloud::Dialogflow::V2::Agents::Client::Configuration}
|
139
|
+
# See {::Google::Cloud::Dialogflow::V2::Agents::Client::Configuration}
|
167
140
|
# for a description of the configuration fields.
|
168
141
|
#
|
169
142
|
# @yield [config] Configure the Client client.
|
@@ -184,13 +157,13 @@ module Google
|
|
184
157
|
# To create a new Agents client with the default
|
185
158
|
# configuration:
|
186
159
|
#
|
187
|
-
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
160
|
+
# client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
188
161
|
#
|
189
162
|
# To create a new Agents client with a custom
|
190
163
|
# configuration:
|
191
164
|
#
|
192
|
-
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
|
193
|
-
# config.timeout =
|
165
|
+
# client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
|
166
|
+
# config.timeout = 10.0
|
194
167
|
# end
|
195
168
|
#
|
196
169
|
# @yield [config] Configure the Agents client.
|
@@ -215,15 +188,16 @@ module Google
|
|
215
188
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
216
189
|
credentials = Credentials.new credentials, scope: @config.scope
|
217
190
|
end
|
218
|
-
@quota_project_id =
|
191
|
+
@quota_project_id = @config.quota_project
|
192
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
219
193
|
|
220
194
|
@operations_client = Operations.new do |config|
|
221
195
|
config.credentials = credentials
|
222
196
|
config.endpoint = @config.endpoint
|
223
197
|
end
|
224
198
|
|
225
|
-
@agents_stub = Gapic::ServiceStub.new(
|
226
|
-
Google::Cloud::Dialogflow::V2::Agents::Stub,
|
199
|
+
@agents_stub = ::Gapic::ServiceStub.new(
|
200
|
+
::Google::Cloud::Dialogflow::V2::Agents::Stub,
|
227
201
|
credentials: credentials,
|
228
202
|
endpoint: @config.endpoint,
|
229
203
|
channel_args: @config.channel_args,
|
@@ -234,7 +208,7 @@ module Google
|
|
234
208
|
##
|
235
209
|
# Get the associated client for long-running operations.
|
236
210
|
#
|
237
|
-
# @return [Google::Cloud::Dialogflow::V2::Agents::Operations]
|
211
|
+
# @return [::Google::Cloud::Dialogflow::V2::Agents::Operations]
|
238
212
|
#
|
239
213
|
attr_reader :operations_client
|
240
214
|
|
@@ -245,12 +219,12 @@ module Google
|
|
245
219
|
#
|
246
220
|
# @overload get_agent(request, options = nil)
|
247
221
|
# Pass arguments to `get_agent` via a request object, either of type
|
248
|
-
# {Google::Cloud::Dialogflow::V2::GetAgentRequest} or an equivalent Hash.
|
222
|
+
# {::Google::Cloud::Dialogflow::V2::GetAgentRequest} or an equivalent Hash.
|
249
223
|
#
|
250
|
-
# @param request [Google::Cloud::Dialogflow::V2::GetAgentRequest, Hash]
|
224
|
+
# @param request [::Google::Cloud::Dialogflow::V2::GetAgentRequest, ::Hash]
|
251
225
|
# A request object representing the call parameters. Required. To specify no
|
252
226
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
253
|
-
# @param options [Gapic::CallOptions, Hash]
|
227
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
254
228
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
255
229
|
#
|
256
230
|
# @overload get_agent(parent: nil)
|
@@ -258,31 +232,31 @@ module Google
|
|
258
232
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
259
233
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
260
234
|
#
|
261
|
-
# @param parent [String]
|
235
|
+
# @param parent [::String]
|
262
236
|
# Required. The project that the agent to fetch is associated with.
|
263
237
|
# Format: `projects/<Project ID>`.
|
264
238
|
#
|
265
239
|
# @yield [response, operation] Access the result along with the RPC operation
|
266
|
-
# @yieldparam response [Google::Cloud::Dialogflow::V2::Agent]
|
267
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
240
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::Agent]
|
241
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
268
242
|
#
|
269
|
-
# @return [Google::Cloud::Dialogflow::V2::Agent]
|
243
|
+
# @return [::Google::Cloud::Dialogflow::V2::Agent]
|
270
244
|
#
|
271
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
245
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
272
246
|
#
|
273
247
|
def get_agent request, options = nil
|
274
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
248
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
275
249
|
|
276
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::GetAgentRequest
|
250
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetAgentRequest
|
277
251
|
|
278
252
|
# Converts hash and nil to an options object
|
279
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
253
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
280
254
|
|
281
255
|
# Customize the options with defaults
|
282
256
|
metadata = @config.rpcs.get_agent.metadata.to_h
|
283
257
|
|
284
258
|
# Set x-goog-api-client and x-goog-user-project headers
|
285
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
259
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
286
260
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
287
261
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
288
262
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -303,8 +277,8 @@ module Google
|
|
303
277
|
yield response, operation if block_given?
|
304
278
|
return response
|
305
279
|
end
|
306
|
-
rescue GRPC::BadStatus => e
|
307
|
-
raise Google::Cloud::Error.from_error(e)
|
280
|
+
rescue ::GRPC::BadStatus => e
|
281
|
+
raise ::Google::Cloud::Error.from_error(e)
|
308
282
|
end
|
309
283
|
|
310
284
|
##
|
@@ -312,12 +286,12 @@ module Google
|
|
312
286
|
#
|
313
287
|
# @overload set_agent(request, options = nil)
|
314
288
|
# Pass arguments to `set_agent` via a request object, either of type
|
315
|
-
# {Google::Cloud::Dialogflow::V2::SetAgentRequest} or an equivalent Hash.
|
289
|
+
# {::Google::Cloud::Dialogflow::V2::SetAgentRequest} or an equivalent Hash.
|
316
290
|
#
|
317
|
-
# @param request [Google::Cloud::Dialogflow::V2::SetAgentRequest, Hash]
|
291
|
+
# @param request [::Google::Cloud::Dialogflow::V2::SetAgentRequest, ::Hash]
|
318
292
|
# A request object representing the call parameters. Required. To specify no
|
319
293
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
320
|
-
# @param options [Gapic::CallOptions, Hash]
|
294
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
321
295
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
322
296
|
#
|
323
297
|
# @overload set_agent(agent: nil, update_mask: nil)
|
@@ -325,32 +299,32 @@ module Google
|
|
325
299
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
326
300
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
327
301
|
#
|
328
|
-
# @param agent [Google::Cloud::Dialogflow::V2::Agent, Hash]
|
302
|
+
# @param agent [::Google::Cloud::Dialogflow::V2::Agent, ::Hash]
|
329
303
|
# Required. The agent to update.
|
330
|
-
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
304
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
331
305
|
# Optional. The mask to control which fields get updated.
|
332
306
|
#
|
333
307
|
# @yield [response, operation] Access the result along with the RPC operation
|
334
|
-
# @yieldparam response [Google::Cloud::Dialogflow::V2::Agent]
|
335
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
308
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::Agent]
|
309
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
336
310
|
#
|
337
|
-
# @return [Google::Cloud::Dialogflow::V2::Agent]
|
311
|
+
# @return [::Google::Cloud::Dialogflow::V2::Agent]
|
338
312
|
#
|
339
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
313
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
340
314
|
#
|
341
315
|
def set_agent request, options = nil
|
342
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
316
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
343
317
|
|
344
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::SetAgentRequest
|
318
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SetAgentRequest
|
345
319
|
|
346
320
|
# Converts hash and nil to an options object
|
347
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
321
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
348
322
|
|
349
323
|
# Customize the options with defaults
|
350
324
|
metadata = @config.rpcs.set_agent.metadata.to_h
|
351
325
|
|
352
326
|
# Set x-goog-api-client and x-goog-user-project headers
|
353
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
327
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
354
328
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
355
329
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
356
330
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -371,8 +345,8 @@ module Google
|
|
371
345
|
yield response, operation if block_given?
|
372
346
|
return response
|
373
347
|
end
|
374
|
-
rescue GRPC::BadStatus => e
|
375
|
-
raise Google::Cloud::Error.from_error(e)
|
348
|
+
rescue ::GRPC::BadStatus => e
|
349
|
+
raise ::Google::Cloud::Error.from_error(e)
|
376
350
|
end
|
377
351
|
|
378
352
|
##
|
@@ -380,12 +354,12 @@ module Google
|
|
380
354
|
#
|
381
355
|
# @overload delete_agent(request, options = nil)
|
382
356
|
# Pass arguments to `delete_agent` via a request object, either of type
|
383
|
-
# {Google::Cloud::Dialogflow::V2::DeleteAgentRequest} or an equivalent Hash.
|
357
|
+
# {::Google::Cloud::Dialogflow::V2::DeleteAgentRequest} or an equivalent Hash.
|
384
358
|
#
|
385
|
-
# @param request [Google::Cloud::Dialogflow::V2::DeleteAgentRequest, Hash]
|
359
|
+
# @param request [::Google::Cloud::Dialogflow::V2::DeleteAgentRequest, ::Hash]
|
386
360
|
# A request object representing the call parameters. Required. To specify no
|
387
361
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
388
|
-
# @param options [Gapic::CallOptions, Hash]
|
362
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
389
363
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
390
364
|
#
|
391
365
|
# @overload delete_agent(parent: nil)
|
@@ -393,31 +367,31 @@ module Google
|
|
393
367
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
394
368
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
395
369
|
#
|
396
|
-
# @param parent [String]
|
370
|
+
# @param parent [::String]
|
397
371
|
# Required. The project that the agent to delete is associated with.
|
398
372
|
# Format: `projects/<Project ID>`.
|
399
373
|
#
|
400
374
|
# @yield [response, operation] Access the result along with the RPC operation
|
401
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
402
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
375
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
376
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
403
377
|
#
|
404
|
-
# @return [Google::Protobuf::Empty]
|
378
|
+
# @return [::Google::Protobuf::Empty]
|
405
379
|
#
|
406
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
380
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
407
381
|
#
|
408
382
|
def delete_agent request, options = nil
|
409
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
383
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
410
384
|
|
411
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::DeleteAgentRequest
|
385
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DeleteAgentRequest
|
412
386
|
|
413
387
|
# Converts hash and nil to an options object
|
414
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
388
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
415
389
|
|
416
390
|
# Customize the options with defaults
|
417
391
|
metadata = @config.rpcs.delete_agent.metadata.to_h
|
418
392
|
|
419
393
|
# Set x-goog-api-client and x-goog-user-project headers
|
420
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
394
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
421
395
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
422
396
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
423
397
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -438,8 +412,8 @@ module Google
|
|
438
412
|
yield response, operation if block_given?
|
439
413
|
return response
|
440
414
|
end
|
441
|
-
rescue GRPC::BadStatus => e
|
442
|
-
raise Google::Cloud::Error.from_error(e)
|
415
|
+
rescue ::GRPC::BadStatus => e
|
416
|
+
raise ::Google::Cloud::Error.from_error(e)
|
443
417
|
end
|
444
418
|
|
445
419
|
##
|
@@ -453,12 +427,12 @@ module Google
|
|
453
427
|
#
|
454
428
|
# @overload search_agents(request, options = nil)
|
455
429
|
# Pass arguments to `search_agents` via a request object, either of type
|
456
|
-
# {Google::Cloud::Dialogflow::V2::SearchAgentsRequest} or an equivalent Hash.
|
430
|
+
# {::Google::Cloud::Dialogflow::V2::SearchAgentsRequest} or an equivalent Hash.
|
457
431
|
#
|
458
|
-
# @param request [Google::Cloud::Dialogflow::V2::SearchAgentsRequest, Hash]
|
432
|
+
# @param request [::Google::Cloud::Dialogflow::V2::SearchAgentsRequest, ::Hash]
|
459
433
|
# A request object representing the call parameters. Required. To specify no
|
460
434
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
461
|
-
# @param options [Gapic::CallOptions, Hash]
|
435
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
462
436
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
463
437
|
#
|
464
438
|
# @overload search_agents(parent: nil, page_size: nil, page_token: nil)
|
@@ -466,36 +440,36 @@ module Google
|
|
466
440
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
467
441
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
468
442
|
#
|
469
|
-
# @param parent [String]
|
443
|
+
# @param parent [::String]
|
470
444
|
# Required. The project to list agents from.
|
471
445
|
# Format: `projects/<Project ID or '-'>`.
|
472
|
-
# @param page_size [Integer]
|
446
|
+
# @param page_size [::Integer]
|
473
447
|
# Optional. The maximum number of items to return in a single page. By
|
474
448
|
# default 100 and at most 1000.
|
475
|
-
# @param page_token [String]
|
449
|
+
# @param page_token [::String]
|
476
450
|
# The next_page_token value returned from a previous list request.
|
477
451
|
#
|
478
452
|
# @yield [response, operation] Access the result along with the RPC operation
|
479
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
480
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
453
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Agent>]
|
454
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
481
455
|
#
|
482
|
-
# @return [Gapic::PagedEnumerable
|
456
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Agent>]
|
483
457
|
#
|
484
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
458
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
485
459
|
#
|
486
460
|
def search_agents request, options = nil
|
487
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
461
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
488
462
|
|
489
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::SearchAgentsRequest
|
463
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SearchAgentsRequest
|
490
464
|
|
491
465
|
# Converts hash and nil to an options object
|
492
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
466
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
493
467
|
|
494
468
|
# Customize the options with defaults
|
495
469
|
metadata = @config.rpcs.search_agents.metadata.to_h
|
496
470
|
|
497
471
|
# Set x-goog-api-client and x-goog-user-project headers
|
498
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
472
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
499
473
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
500
474
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
501
475
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -513,27 +487,27 @@ module Google
|
|
513
487
|
retry_policy: @config.retry_policy
|
514
488
|
|
515
489
|
@agents_stub.call_rpc :search_agents, request, options: options do |response, operation|
|
516
|
-
response = Gapic::PagedEnumerable.new @agents_stub, :search_agents, request, response, operation, options
|
490
|
+
response = ::Gapic::PagedEnumerable.new @agents_stub, :search_agents, request, response, operation, options
|
517
491
|
yield response, operation if block_given?
|
518
492
|
return response
|
519
493
|
end
|
520
|
-
rescue GRPC::BadStatus => e
|
521
|
-
raise Google::Cloud::Error.from_error(e)
|
494
|
+
rescue ::GRPC::BadStatus => e
|
495
|
+
raise ::Google::Cloud::Error.from_error(e)
|
522
496
|
end
|
523
497
|
|
524
498
|
##
|
525
499
|
# Trains the specified agent.
|
526
500
|
#
|
527
|
-
# Operation <response: {Google::Protobuf::Empty google.protobuf.Empty}>
|
501
|
+
# Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
|
528
502
|
#
|
529
503
|
# @overload train_agent(request, options = nil)
|
530
504
|
# Pass arguments to `train_agent` via a request object, either of type
|
531
|
-
# {Google::Cloud::Dialogflow::V2::TrainAgentRequest} or an equivalent Hash.
|
505
|
+
# {::Google::Cloud::Dialogflow::V2::TrainAgentRequest} or an equivalent Hash.
|
532
506
|
#
|
533
|
-
# @param request [Google::Cloud::Dialogflow::V2::TrainAgentRequest, Hash]
|
507
|
+
# @param request [::Google::Cloud::Dialogflow::V2::TrainAgentRequest, ::Hash]
|
534
508
|
# A request object representing the call parameters. Required. To specify no
|
535
509
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
536
|
-
# @param options [Gapic::CallOptions, Hash]
|
510
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
537
511
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
538
512
|
#
|
539
513
|
# @overload train_agent(parent: nil)
|
@@ -541,31 +515,31 @@ module Google
|
|
541
515
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
542
516
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
543
517
|
#
|
544
|
-
# @param parent [String]
|
518
|
+
# @param parent [::String]
|
545
519
|
# Required. The project that the agent to train is associated with.
|
546
520
|
# Format: `projects/<Project ID>`.
|
547
521
|
#
|
548
522
|
# @yield [response, operation] Access the result along with the RPC operation
|
549
|
-
# @yieldparam response [Gapic::Operation]
|
550
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
523
|
+
# @yieldparam response [::Gapic::Operation]
|
524
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
551
525
|
#
|
552
|
-
# @return [Gapic::Operation]
|
526
|
+
# @return [::Gapic::Operation]
|
553
527
|
#
|
554
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
528
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
555
529
|
#
|
556
530
|
def train_agent request, options = nil
|
557
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
531
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
558
532
|
|
559
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::TrainAgentRequest
|
533
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::TrainAgentRequest
|
560
534
|
|
561
535
|
# Converts hash and nil to an options object
|
562
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
536
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
563
537
|
|
564
538
|
# Customize the options with defaults
|
565
539
|
metadata = @config.rpcs.train_agent.metadata.to_h
|
566
540
|
|
567
541
|
# Set x-goog-api-client and x-goog-user-project headers
|
568
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
542
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
569
543
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
570
544
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
571
545
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -583,27 +557,27 @@ module Google
|
|
583
557
|
retry_policy: @config.retry_policy
|
584
558
|
|
585
559
|
@agents_stub.call_rpc :train_agent, request, options: options do |response, operation|
|
586
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
560
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
587
561
|
yield response, operation if block_given?
|
588
562
|
return response
|
589
563
|
end
|
590
|
-
rescue GRPC::BadStatus => e
|
591
|
-
raise Google::Cloud::Error.from_error(e)
|
564
|
+
rescue ::GRPC::BadStatus => e
|
565
|
+
raise ::Google::Cloud::Error.from_error(e)
|
592
566
|
end
|
593
567
|
|
594
568
|
##
|
595
569
|
# Exports the specified agent to a ZIP file.
|
596
570
|
#
|
597
|
-
# Operation <response: {Google::Cloud::Dialogflow::V2::ExportAgentResponse ExportAgentResponse}>
|
571
|
+
# Operation <response: {::Google::Cloud::Dialogflow::V2::ExportAgentResponse ExportAgentResponse}>
|
598
572
|
#
|
599
573
|
# @overload export_agent(request, options = nil)
|
600
574
|
# Pass arguments to `export_agent` via a request object, either of type
|
601
|
-
# {Google::Cloud::Dialogflow::V2::ExportAgentRequest} or an equivalent Hash.
|
575
|
+
# {::Google::Cloud::Dialogflow::V2::ExportAgentRequest} or an equivalent Hash.
|
602
576
|
#
|
603
|
-
# @param request [Google::Cloud::Dialogflow::V2::ExportAgentRequest, Hash]
|
577
|
+
# @param request [::Google::Cloud::Dialogflow::V2::ExportAgentRequest, ::Hash]
|
604
578
|
# A request object representing the call parameters. Required. To specify no
|
605
579
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
606
|
-
# @param options [Gapic::CallOptions, Hash]
|
580
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
607
581
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
608
582
|
#
|
609
583
|
# @overload export_agent(parent: nil, agent_uri: nil)
|
@@ -611,36 +585,36 @@ module Google
|
|
611
585
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
612
586
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
613
587
|
#
|
614
|
-
# @param parent [String]
|
588
|
+
# @param parent [::String]
|
615
589
|
# Required. The project that the agent to export is associated with.
|
616
590
|
# Format: `projects/<Project ID>`.
|
617
|
-
# @param agent_uri [String]
|
591
|
+
# @param agent_uri [::String]
|
618
592
|
# Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/)
|
619
593
|
# URI to export the agent to.
|
620
594
|
# The format of this URI must be `gs://<bucket-name>/<object-name>`.
|
621
595
|
# If left unspecified, the serialized agent is returned inline.
|
622
596
|
#
|
623
597
|
# @yield [response, operation] Access the result along with the RPC operation
|
624
|
-
# @yieldparam response [Gapic::Operation]
|
625
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
598
|
+
# @yieldparam response [::Gapic::Operation]
|
599
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
626
600
|
#
|
627
|
-
# @return [Gapic::Operation]
|
601
|
+
# @return [::Gapic::Operation]
|
628
602
|
#
|
629
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
603
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
630
604
|
#
|
631
605
|
def export_agent request, options = nil
|
632
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
606
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
633
607
|
|
634
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::ExportAgentRequest
|
608
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ExportAgentRequest
|
635
609
|
|
636
610
|
# Converts hash and nil to an options object
|
637
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
611
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
638
612
|
|
639
613
|
# Customize the options with defaults
|
640
614
|
metadata = @config.rpcs.export_agent.metadata.to_h
|
641
615
|
|
642
616
|
# Set x-goog-api-client and x-goog-user-project headers
|
643
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
617
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
644
618
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
645
619
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
646
620
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -658,12 +632,12 @@ module Google
|
|
658
632
|
retry_policy: @config.retry_policy
|
659
633
|
|
660
634
|
@agents_stub.call_rpc :export_agent, request, options: options do |response, operation|
|
661
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
635
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
662
636
|
yield response, operation if block_given?
|
663
637
|
return response
|
664
638
|
end
|
665
|
-
rescue GRPC::BadStatus => e
|
666
|
-
raise Google::Cloud::Error.from_error(e)
|
639
|
+
rescue ::GRPC::BadStatus => e
|
640
|
+
raise ::Google::Cloud::Error.from_error(e)
|
667
641
|
end
|
668
642
|
|
669
643
|
##
|
@@ -673,16 +647,16 @@ module Google
|
|
673
647
|
# Intents and entity types with the same name are replaced with the new
|
674
648
|
# versions from ImportAgentRequest.
|
675
649
|
#
|
676
|
-
# Operation <response: {Google::Protobuf::Empty google.protobuf.Empty}>
|
650
|
+
# Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
|
677
651
|
#
|
678
652
|
# @overload import_agent(request, options = nil)
|
679
653
|
# Pass arguments to `import_agent` via a request object, either of type
|
680
|
-
# {Google::Cloud::Dialogflow::V2::ImportAgentRequest} or an equivalent Hash.
|
654
|
+
# {::Google::Cloud::Dialogflow::V2::ImportAgentRequest} or an equivalent Hash.
|
681
655
|
#
|
682
|
-
# @param request [Google::Cloud::Dialogflow::V2::ImportAgentRequest, Hash]
|
656
|
+
# @param request [::Google::Cloud::Dialogflow::V2::ImportAgentRequest, ::Hash]
|
683
657
|
# A request object representing the call parameters. Required. To specify no
|
684
658
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
685
|
-
# @param options [Gapic::CallOptions, Hash]
|
659
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
686
660
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
687
661
|
#
|
688
662
|
# @overload import_agent(parent: nil, agent_uri: nil, agent_content: nil)
|
@@ -690,36 +664,36 @@ module Google
|
|
690
664
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
691
665
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
692
666
|
#
|
693
|
-
# @param parent [String]
|
667
|
+
# @param parent [::String]
|
694
668
|
# Required. The project that the agent to import is associated with.
|
695
669
|
# Format: `projects/<Project ID>`.
|
696
|
-
# @param agent_uri [String]
|
670
|
+
# @param agent_uri [::String]
|
697
671
|
# The URI to a Google Cloud Storage file containing the agent to import.
|
698
672
|
# Note: The URI must start with "gs://".
|
699
|
-
# @param agent_content [String]
|
673
|
+
# @param agent_content [::String]
|
700
674
|
# Zip compressed raw byte content for agent.
|
701
675
|
#
|
702
676
|
# @yield [response, operation] Access the result along with the RPC operation
|
703
|
-
# @yieldparam response [Gapic::Operation]
|
704
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
677
|
+
# @yieldparam response [::Gapic::Operation]
|
678
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
705
679
|
#
|
706
|
-
# @return [Gapic::Operation]
|
680
|
+
# @return [::Gapic::Operation]
|
707
681
|
#
|
708
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
682
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
709
683
|
#
|
710
684
|
def import_agent request, options = nil
|
711
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
685
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
712
686
|
|
713
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::ImportAgentRequest
|
687
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ImportAgentRequest
|
714
688
|
|
715
689
|
# Converts hash and nil to an options object
|
716
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
690
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
717
691
|
|
718
692
|
# Customize the options with defaults
|
719
693
|
metadata = @config.rpcs.import_agent.metadata.to_h
|
720
694
|
|
721
695
|
# Set x-goog-api-client and x-goog-user-project headers
|
722
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
696
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
723
697
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
724
698
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
725
699
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -737,12 +711,12 @@ module Google
|
|
737
711
|
retry_policy: @config.retry_policy
|
738
712
|
|
739
713
|
@agents_stub.call_rpc :import_agent, request, options: options do |response, operation|
|
740
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
714
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
741
715
|
yield response, operation if block_given?
|
742
716
|
return response
|
743
717
|
end
|
744
|
-
rescue GRPC::BadStatus => e
|
745
|
-
raise Google::Cloud::Error.from_error(e)
|
718
|
+
rescue ::GRPC::BadStatus => e
|
719
|
+
raise ::Google::Cloud::Error.from_error(e)
|
746
720
|
end
|
747
721
|
|
748
722
|
##
|
@@ -751,16 +725,16 @@ module Google
|
|
751
725
|
# Replaces the current agent version with a new one. All the intents and
|
752
726
|
# entity types in the older version are deleted.
|
753
727
|
#
|
754
|
-
# Operation <response: {Google::Protobuf::Empty google.protobuf.Empty}>
|
728
|
+
# Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
|
755
729
|
#
|
756
730
|
# @overload restore_agent(request, options = nil)
|
757
731
|
# Pass arguments to `restore_agent` via a request object, either of type
|
758
|
-
# {Google::Cloud::Dialogflow::V2::RestoreAgentRequest} or an equivalent Hash.
|
732
|
+
# {::Google::Cloud::Dialogflow::V2::RestoreAgentRequest} or an equivalent Hash.
|
759
733
|
#
|
760
|
-
# @param request [Google::Cloud::Dialogflow::V2::RestoreAgentRequest, Hash]
|
734
|
+
# @param request [::Google::Cloud::Dialogflow::V2::RestoreAgentRequest, ::Hash]
|
761
735
|
# A request object representing the call parameters. Required. To specify no
|
762
736
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
763
|
-
# @param options [Gapic::CallOptions, Hash]
|
737
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
764
738
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
765
739
|
#
|
766
740
|
# @overload restore_agent(parent: nil, agent_uri: nil, agent_content: nil)
|
@@ -768,36 +742,36 @@ module Google
|
|
768
742
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
769
743
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
770
744
|
#
|
771
|
-
# @param parent [String]
|
745
|
+
# @param parent [::String]
|
772
746
|
# Required. The project that the agent to restore is associated with.
|
773
747
|
# Format: `projects/<Project ID>`.
|
774
|
-
# @param agent_uri [String]
|
748
|
+
# @param agent_uri [::String]
|
775
749
|
# The URI to a Google Cloud Storage file containing the agent to restore.
|
776
750
|
# Note: The URI must start with "gs://".
|
777
|
-
# @param agent_content [String]
|
751
|
+
# @param agent_content [::String]
|
778
752
|
# Zip compressed raw byte content for agent.
|
779
753
|
#
|
780
754
|
# @yield [response, operation] Access the result along with the RPC operation
|
781
|
-
# @yieldparam response [Gapic::Operation]
|
782
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
755
|
+
# @yieldparam response [::Gapic::Operation]
|
756
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
783
757
|
#
|
784
|
-
# @return [Gapic::Operation]
|
758
|
+
# @return [::Gapic::Operation]
|
785
759
|
#
|
786
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
760
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
787
761
|
#
|
788
762
|
def restore_agent request, options = nil
|
789
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
763
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
790
764
|
|
791
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::RestoreAgentRequest
|
765
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::RestoreAgentRequest
|
792
766
|
|
793
767
|
# Converts hash and nil to an options object
|
794
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
768
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
795
769
|
|
796
770
|
# Customize the options with defaults
|
797
771
|
metadata = @config.rpcs.restore_agent.metadata.to_h
|
798
772
|
|
799
773
|
# Set x-goog-api-client and x-goog-user-project headers
|
800
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
774
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
801
775
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
802
776
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
803
777
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -815,12 +789,12 @@ module Google
|
|
815
789
|
retry_policy: @config.retry_policy
|
816
790
|
|
817
791
|
@agents_stub.call_rpc :restore_agent, request, options: options do |response, operation|
|
818
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
792
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
819
793
|
yield response, operation if block_given?
|
820
794
|
return response
|
821
795
|
end
|
822
|
-
rescue GRPC::BadStatus => e
|
823
|
-
raise Google::Cloud::Error.from_error(e)
|
796
|
+
rescue ::GRPC::BadStatus => e
|
797
|
+
raise ::Google::Cloud::Error.from_error(e)
|
824
798
|
end
|
825
799
|
|
826
800
|
##
|
@@ -829,12 +803,12 @@ module Google
|
|
829
803
|
#
|
830
804
|
# @overload get_validation_result(request, options = nil)
|
831
805
|
# Pass arguments to `get_validation_result` via a request object, either of type
|
832
|
-
# {Google::Cloud::Dialogflow::V2::GetValidationResultRequest} or an equivalent Hash.
|
806
|
+
# {::Google::Cloud::Dialogflow::V2::GetValidationResultRequest} or an equivalent Hash.
|
833
807
|
#
|
834
|
-
# @param request [Google::Cloud::Dialogflow::V2::GetValidationResultRequest, Hash]
|
808
|
+
# @param request [::Google::Cloud::Dialogflow::V2::GetValidationResultRequest, ::Hash]
|
835
809
|
# A request object representing the call parameters. Required. To specify no
|
836
810
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
837
|
-
# @param options [Gapic::CallOptions, Hash]
|
811
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
838
812
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
839
813
|
#
|
840
814
|
# @overload get_validation_result(parent: nil, language_code: nil)
|
@@ -842,10 +816,10 @@ module Google
|
|
842
816
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
843
817
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
844
818
|
#
|
845
|
-
# @param parent [String]
|
819
|
+
# @param parent [::String]
|
846
820
|
# Required. The project that the agent is associated with.
|
847
821
|
# Format: `projects/<Project ID>`.
|
848
|
-
# @param language_code [String]
|
822
|
+
# @param language_code [::String]
|
849
823
|
# Optional. The language for which you want a validation result. If not
|
850
824
|
# specified, the agent's default language is used. [Many
|
851
825
|
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
@@ -853,26 +827,26 @@ module Google
|
|
853
827
|
# be used.
|
854
828
|
#
|
855
829
|
# @yield [response, operation] Access the result along with the RPC operation
|
856
|
-
# @yieldparam response [Google::Cloud::Dialogflow::V2::ValidationResult]
|
857
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
830
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::ValidationResult]
|
831
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
858
832
|
#
|
859
|
-
# @return [Google::Cloud::Dialogflow::V2::ValidationResult]
|
833
|
+
# @return [::Google::Cloud::Dialogflow::V2::ValidationResult]
|
860
834
|
#
|
861
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
835
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
862
836
|
#
|
863
837
|
def get_validation_result request, options = nil
|
864
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
838
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
865
839
|
|
866
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::GetValidationResultRequest
|
840
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetValidationResultRequest
|
867
841
|
|
868
842
|
# Converts hash and nil to an options object
|
869
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
843
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
870
844
|
|
871
845
|
# Customize the options with defaults
|
872
846
|
metadata = @config.rpcs.get_validation_result.metadata.to_h
|
873
847
|
|
874
848
|
# Set x-goog-api-client and x-goog-user-project headers
|
875
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
849
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
876
850
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
877
851
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
878
852
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -893,8 +867,8 @@ module Google
|
|
893
867
|
yield response, operation if block_given?
|
894
868
|
return response
|
895
869
|
end
|
896
|
-
rescue GRPC::BadStatus => e
|
897
|
-
raise Google::Cloud::Error.from_error(e)
|
870
|
+
rescue ::GRPC::BadStatus => e
|
871
|
+
raise ::Google::Cloud::Error.from_error(e)
|
898
872
|
end
|
899
873
|
|
900
874
|
##
|
@@ -904,7 +878,7 @@ module Google
|
|
904
878
|
# providing control over timeouts, retry behavior, logging, transport
|
905
879
|
# parameters, and other low-level controls. Certain parameters can also be
|
906
880
|
# applied individually to specific RPCs. See
|
907
|
-
# {Google::Cloud::Dialogflow::V2::Agents::Client::Configuration::Rpcs}
|
881
|
+
# {::Google::Cloud::Dialogflow::V2::Agents::Client::Configuration::Rpcs}
|
908
882
|
# for a list of RPCs that can be configured independently.
|
909
883
|
#
|
910
884
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -915,22 +889,22 @@ module Google
|
|
915
889
|
# To modify the global config, setting the timeout for get_agent
|
916
890
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
917
891
|
#
|
918
|
-
# Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
|
919
|
-
# config.timeout =
|
920
|
-
# config.rpcs.get_agent.timeout =
|
892
|
+
# ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
|
893
|
+
# config.timeout = 10.0
|
894
|
+
# config.rpcs.get_agent.timeout = 20.0
|
921
895
|
# end
|
922
896
|
#
|
923
897
|
# To apply the above configuration only to a new client:
|
924
898
|
#
|
925
|
-
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
|
926
|
-
# config.timeout =
|
927
|
-
# config.rpcs.get_agent.timeout =
|
899
|
+
# client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
|
900
|
+
# config.timeout = 10.0
|
901
|
+
# config.rpcs.get_agent.timeout = 20.0
|
928
902
|
# end
|
929
903
|
#
|
930
904
|
# @!attribute [rw] endpoint
|
931
905
|
# The hostname or hostname:port of the service endpoint.
|
932
906
|
# Defaults to `"dialogflow.googleapis.com"`.
|
933
|
-
# @return [String]
|
907
|
+
# @return [::String]
|
934
908
|
# @!attribute [rw] credentials
|
935
909
|
# Credentials to send with calls. You may provide any of the following types:
|
936
910
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -942,29 +916,29 @@ module Google
|
|
942
916
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
943
917
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
944
918
|
# * (`nil`) indicating no credentials
|
945
|
-
# @return [Object]
|
919
|
+
# @return [::Object]
|
946
920
|
# @!attribute [rw] scope
|
947
921
|
# The OAuth scopes
|
948
|
-
# @return [Array
|
922
|
+
# @return [::Array<::String>]
|
949
923
|
# @!attribute [rw] lib_name
|
950
924
|
# The library name as recorded in instrumentation and logging
|
951
|
-
# @return [String]
|
925
|
+
# @return [::String]
|
952
926
|
# @!attribute [rw] lib_version
|
953
927
|
# The library version as recorded in instrumentation and logging
|
954
|
-
# @return [String]
|
928
|
+
# @return [::String]
|
955
929
|
# @!attribute [rw] channel_args
|
956
930
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
957
931
|
# `GRPC::Core::Channel` object is provided as the credential.
|
958
|
-
# @return [Hash]
|
932
|
+
# @return [::Hash]
|
959
933
|
# @!attribute [rw] interceptors
|
960
934
|
# An array of interceptors that are run before calls are executed.
|
961
|
-
# @return [Array
|
935
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
962
936
|
# @!attribute [rw] timeout
|
963
|
-
# The call timeout in
|
964
|
-
# @return [Numeric]
|
937
|
+
# The call timeout in seconds.
|
938
|
+
# @return [::Numeric]
|
965
939
|
# @!attribute [rw] metadata
|
966
940
|
# Additional gRPC headers to be sent with the call.
|
967
|
-
# @return [Hash{Symbol
|
941
|
+
# @return [::Hash{::Symbol=>::String}]
|
968
942
|
# @!attribute [rw] retry_policy
|
969
943
|
# The retry policy. The value is a hash with the following keys:
|
970
944
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -972,25 +946,29 @@ module Google
|
|
972
946
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
973
947
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
974
948
|
# trigger a retry.
|
975
|
-
# @return [Hash]
|
949
|
+
# @return [::Hash]
|
950
|
+
# @!attribute [rw] quota_project
|
951
|
+
# A separate project against which to charge quota.
|
952
|
+
# @return [::String]
|
976
953
|
#
|
977
954
|
class Configuration
|
978
|
-
extend Gapic::Config
|
955
|
+
extend ::Gapic::Config
|
979
956
|
|
980
|
-
config_attr :endpoint,
|
981
|
-
config_attr :credentials,
|
957
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
958
|
+
config_attr :credentials, nil do |value|
|
982
959
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
983
960
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
984
961
|
allowed.any? { |klass| klass === value }
|
985
962
|
end
|
986
|
-
config_attr :scope,
|
987
|
-
config_attr :lib_name,
|
988
|
-
config_attr :lib_version,
|
989
|
-
config_attr(:channel_args,
|
990
|
-
config_attr :interceptors,
|
991
|
-
config_attr :timeout,
|
992
|
-
config_attr :metadata,
|
993
|
-
config_attr :retry_policy,
|
963
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
964
|
+
config_attr :lib_name, nil, ::String, nil
|
965
|
+
config_attr :lib_version, nil, ::String, nil
|
966
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
967
|
+
config_attr :interceptors, nil, ::Array, nil
|
968
|
+
config_attr :timeout, nil, ::Numeric, nil
|
969
|
+
config_attr :metadata, nil, ::Hash, nil
|
970
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
971
|
+
config_attr :quota_project, nil, ::String, nil
|
994
972
|
|
995
973
|
# @private
|
996
974
|
def initialize parent_config = nil
|
@@ -1006,7 +984,7 @@ module Google
|
|
1006
984
|
def rpcs
|
1007
985
|
@rpcs ||= begin
|
1008
986
|
parent_rpcs = nil
|
1009
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
987
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
1010
988
|
Rpcs.new parent_rpcs
|
1011
989
|
end
|
1012
990
|
end
|
@@ -1031,70 +1009,70 @@ module Google
|
|
1031
1009
|
class Rpcs
|
1032
1010
|
##
|
1033
1011
|
# RPC-specific configuration for `get_agent`
|
1034
|
-
# @return [Gapic::Config::Method]
|
1012
|
+
# @return [::Gapic::Config::Method]
|
1035
1013
|
#
|
1036
1014
|
attr_reader :get_agent
|
1037
1015
|
##
|
1038
1016
|
# RPC-specific configuration for `set_agent`
|
1039
|
-
# @return [Gapic::Config::Method]
|
1017
|
+
# @return [::Gapic::Config::Method]
|
1040
1018
|
#
|
1041
1019
|
attr_reader :set_agent
|
1042
1020
|
##
|
1043
1021
|
# RPC-specific configuration for `delete_agent`
|
1044
|
-
# @return [Gapic::Config::Method]
|
1022
|
+
# @return [::Gapic::Config::Method]
|
1045
1023
|
#
|
1046
1024
|
attr_reader :delete_agent
|
1047
1025
|
##
|
1048
1026
|
# RPC-specific configuration for `search_agents`
|
1049
|
-
# @return [Gapic::Config::Method]
|
1027
|
+
# @return [::Gapic::Config::Method]
|
1050
1028
|
#
|
1051
1029
|
attr_reader :search_agents
|
1052
1030
|
##
|
1053
1031
|
# RPC-specific configuration for `train_agent`
|
1054
|
-
# @return [Gapic::Config::Method]
|
1032
|
+
# @return [::Gapic::Config::Method]
|
1055
1033
|
#
|
1056
1034
|
attr_reader :train_agent
|
1057
1035
|
##
|
1058
1036
|
# RPC-specific configuration for `export_agent`
|
1059
|
-
# @return [Gapic::Config::Method]
|
1037
|
+
# @return [::Gapic::Config::Method]
|
1060
1038
|
#
|
1061
1039
|
attr_reader :export_agent
|
1062
1040
|
##
|
1063
1041
|
# RPC-specific configuration for `import_agent`
|
1064
|
-
# @return [Gapic::Config::Method]
|
1042
|
+
# @return [::Gapic::Config::Method]
|
1065
1043
|
#
|
1066
1044
|
attr_reader :import_agent
|
1067
1045
|
##
|
1068
1046
|
# RPC-specific configuration for `restore_agent`
|
1069
|
-
# @return [Gapic::Config::Method]
|
1047
|
+
# @return [::Gapic::Config::Method]
|
1070
1048
|
#
|
1071
1049
|
attr_reader :restore_agent
|
1072
1050
|
##
|
1073
1051
|
# RPC-specific configuration for `get_validation_result`
|
1074
|
-
# @return [Gapic::Config::Method]
|
1052
|
+
# @return [::Gapic::Config::Method]
|
1075
1053
|
#
|
1076
1054
|
attr_reader :get_validation_result
|
1077
1055
|
|
1078
1056
|
# @private
|
1079
1057
|
def initialize parent_rpcs = nil
|
1080
1058
|
get_agent_config = parent_rpcs&.get_agent if parent_rpcs&.respond_to? :get_agent
|
1081
|
-
@get_agent = Gapic::Config::Method.new get_agent_config
|
1059
|
+
@get_agent = ::Gapic::Config::Method.new get_agent_config
|
1082
1060
|
set_agent_config = parent_rpcs&.set_agent if parent_rpcs&.respond_to? :set_agent
|
1083
|
-
@set_agent = Gapic::Config::Method.new set_agent_config
|
1061
|
+
@set_agent = ::Gapic::Config::Method.new set_agent_config
|
1084
1062
|
delete_agent_config = parent_rpcs&.delete_agent if parent_rpcs&.respond_to? :delete_agent
|
1085
|
-
@delete_agent = Gapic::Config::Method.new delete_agent_config
|
1063
|
+
@delete_agent = ::Gapic::Config::Method.new delete_agent_config
|
1086
1064
|
search_agents_config = parent_rpcs&.search_agents if parent_rpcs&.respond_to? :search_agents
|
1087
|
-
@search_agents = Gapic::Config::Method.new search_agents_config
|
1065
|
+
@search_agents = ::Gapic::Config::Method.new search_agents_config
|
1088
1066
|
train_agent_config = parent_rpcs&.train_agent if parent_rpcs&.respond_to? :train_agent
|
1089
|
-
@train_agent = Gapic::Config::Method.new train_agent_config
|
1067
|
+
@train_agent = ::Gapic::Config::Method.new train_agent_config
|
1090
1068
|
export_agent_config = parent_rpcs&.export_agent if parent_rpcs&.respond_to? :export_agent
|
1091
|
-
@export_agent = Gapic::Config::Method.new export_agent_config
|
1069
|
+
@export_agent = ::Gapic::Config::Method.new export_agent_config
|
1092
1070
|
import_agent_config = parent_rpcs&.import_agent if parent_rpcs&.respond_to? :import_agent
|
1093
|
-
@import_agent = Gapic::Config::Method.new import_agent_config
|
1071
|
+
@import_agent = ::Gapic::Config::Method.new import_agent_config
|
1094
1072
|
restore_agent_config = parent_rpcs&.restore_agent if parent_rpcs&.respond_to? :restore_agent
|
1095
|
-
@restore_agent = Gapic::Config::Method.new restore_agent_config
|
1073
|
+
@restore_agent = ::Gapic::Config::Method.new restore_agent_config
|
1096
1074
|
get_validation_result_config = parent_rpcs&.get_validation_result if parent_rpcs&.respond_to? :get_validation_result
|
1097
|
-
@get_validation_result = Gapic::Config::Method.new get_validation_result_config
|
1075
|
+
@get_validation_result = ::Gapic::Config::Method.new get_validation_result_config
|
1098
1076
|
|
1099
1077
|
yield self if block_given?
|
1100
1078
|
end
|