google-cloud-dialogflow 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +0 -26
- data/lib/google/cloud/dialogflow/version.rb +1 -1
- data/lib/google/cloud/dialogflow.rb +183 -109
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cff5672df633ba987c10483e7682ecfcf2489a5f3485c14fcae159dadbee0fc4
|
4
|
+
data.tar.gz: 6c97360e64a828937fefeed70b55b9a5d5018f858bb861f08d1cafa504c9d064
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04dd339fc9138dd20b92c319a985ab51c81d5bd436067ac0bd636ca07b1b44e6b1a7bad42c23c173fa6d857335ebc5898f3b6e0c43e18bcad8431fcc9da7544c
|
7
|
+
data.tar.gz: 51d3d13cd91dd468691bf823c80bccfc835e5ae9aac782ea3566d7c129f75432b8904b97c03d0b0649178edafdfc27b60e528e0b9cfc253a20ed414fb2025c58
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
data/README.md
CHANGED
@@ -42,32 +42,6 @@ and includes substantial interface changes. Existing code written for earlier
|
|
42
42
|
versions of this library will likely require updates to use this version.
|
43
43
|
See the {file:MIGRATING.md MIGRATING.md} document for more information.
|
44
44
|
|
45
|
-
## Enabling Logging
|
46
|
-
|
47
|
-
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
48
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
|
49
|
-
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
50
|
-
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
51
|
-
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
52
|
-
|
53
|
-
Configuring a Ruby stdlib logger:
|
54
|
-
|
55
|
-
```ruby
|
56
|
-
require "logger"
|
57
|
-
|
58
|
-
module MyLogger
|
59
|
-
LOGGER = Logger.new $stderr, level: Logger::WARN
|
60
|
-
def logger
|
61
|
-
LOGGER
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
66
|
-
module GRPC
|
67
|
-
extend MyLogger
|
68
|
-
end
|
69
|
-
```
|
70
|
-
|
71
45
|
## Supported Ruby Versions
|
72
46
|
|
73
47
|
This library is supported on Ruby 2.6+.
|
@@ -49,11 +49,13 @@ module Google
|
|
49
49
|
#
|
50
50
|
# By default, this returns an instance of
|
51
51
|
# [Google::Cloud::Dialogflow::V2::Agents::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Agents/Client.html)
|
52
|
-
# for version V2 of the API.
|
53
|
-
# However, you can specify
|
52
|
+
# for a gRPC client for version V2 of the API.
|
53
|
+
# However, you can specify a different API version by passing it in the
|
54
54
|
# `version` parameter. If the Agents service is
|
55
55
|
# supported by that API version, and the corresponding gem is available, the
|
56
56
|
# appropriate versioned client will be returned.
|
57
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
58
|
+
# the `transport` parameter.
|
57
59
|
#
|
58
60
|
# ## About Agents
|
59
61
|
#
|
@@ -61,17 +63,19 @@ module Google
|
|
61
63
|
#
|
62
64
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
63
65
|
# Defaults to `:v2`.
|
64
|
-
# @
|
66
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
67
|
+
# @return [::Object] A client object for the specified version.
|
65
68
|
#
|
66
|
-
def self.agents version: :v2, &block
|
69
|
+
def self.agents version: :v2, transport: :grpc, &block
|
67
70
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
68
71
|
|
69
72
|
package_name = Google::Cloud::Dialogflow
|
70
73
|
.constants
|
71
74
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
72
75
|
.first
|
73
|
-
|
74
|
-
|
76
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Agents)
|
77
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
78
|
+
service_module.const_get(:Client).new(&block)
|
75
79
|
end
|
76
80
|
|
77
81
|
##
|
@@ -79,11 +83,13 @@ module Google
|
|
79
83
|
#
|
80
84
|
# By default, this returns an instance of
|
81
85
|
# [Google::Cloud::Dialogflow::V2::Contexts::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Contexts/Client.html)
|
82
|
-
# for version V2 of the API.
|
83
|
-
# However, you can specify
|
86
|
+
# for a gRPC client for version V2 of the API.
|
87
|
+
# However, you can specify a different API version by passing it in the
|
84
88
|
# `version` parameter. If the Contexts service is
|
85
89
|
# supported by that API version, and the corresponding gem is available, the
|
86
90
|
# appropriate versioned client will be returned.
|
91
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
92
|
+
# the `transport` parameter.
|
87
93
|
#
|
88
94
|
# ## About Contexts
|
89
95
|
#
|
@@ -91,17 +97,19 @@ module Google
|
|
91
97
|
#
|
92
98
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
93
99
|
# Defaults to `:v2`.
|
94
|
-
# @
|
100
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
101
|
+
# @return [::Object] A client object for the specified version.
|
95
102
|
#
|
96
|
-
def self.contexts version: :v2, &block
|
103
|
+
def self.contexts version: :v2, transport: :grpc, &block
|
97
104
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
98
105
|
|
99
106
|
package_name = Google::Cloud::Dialogflow
|
100
107
|
.constants
|
101
108
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
102
109
|
.first
|
103
|
-
|
104
|
-
|
110
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Contexts)
|
111
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
112
|
+
service_module.const_get(:Client).new(&block)
|
105
113
|
end
|
106
114
|
|
107
115
|
##
|
@@ -109,11 +117,13 @@ module Google
|
|
109
117
|
#
|
110
118
|
# By default, this returns an instance of
|
111
119
|
# [Google::Cloud::Dialogflow::V2::Intents::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Intents/Client.html)
|
112
|
-
# for version V2 of the API.
|
113
|
-
# However, you can specify
|
120
|
+
# for a gRPC client for version V2 of the API.
|
121
|
+
# However, you can specify a different API version by passing it in the
|
114
122
|
# `version` parameter. If the Intents service is
|
115
123
|
# supported by that API version, and the corresponding gem is available, the
|
116
124
|
# appropriate versioned client will be returned.
|
125
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
126
|
+
# the `transport` parameter.
|
117
127
|
#
|
118
128
|
# ## About Intents
|
119
129
|
#
|
@@ -121,17 +131,19 @@ module Google
|
|
121
131
|
#
|
122
132
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
123
133
|
# Defaults to `:v2`.
|
124
|
-
# @
|
134
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
135
|
+
# @return [::Object] A client object for the specified version.
|
125
136
|
#
|
126
|
-
def self.intents version: :v2, &block
|
137
|
+
def self.intents version: :v2, transport: :grpc, &block
|
127
138
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
128
139
|
|
129
140
|
package_name = Google::Cloud::Dialogflow
|
130
141
|
.constants
|
131
142
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
132
143
|
.first
|
133
|
-
|
134
|
-
|
144
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Intents)
|
145
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
146
|
+
service_module.const_get(:Client).new(&block)
|
135
147
|
end
|
136
148
|
|
137
149
|
##
|
@@ -139,11 +151,13 @@ module Google
|
|
139
151
|
#
|
140
152
|
# By default, this returns an instance of
|
141
153
|
# [Google::Cloud::Dialogflow::V2::EntityTypes::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/EntityTypes/Client.html)
|
142
|
-
# for version V2 of the API.
|
143
|
-
# However, you can specify
|
154
|
+
# for a gRPC client for version V2 of the API.
|
155
|
+
# However, you can specify a different API version by passing it in the
|
144
156
|
# `version` parameter. If the EntityTypes service is
|
145
157
|
# supported by that API version, and the corresponding gem is available, the
|
146
158
|
# appropriate versioned client will be returned.
|
159
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
160
|
+
# the `transport` parameter.
|
147
161
|
#
|
148
162
|
# ## About EntityTypes
|
149
163
|
#
|
@@ -151,17 +165,19 @@ module Google
|
|
151
165
|
#
|
152
166
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
153
167
|
# Defaults to `:v2`.
|
154
|
-
# @
|
168
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
169
|
+
# @return [::Object] A client object for the specified version.
|
155
170
|
#
|
156
|
-
def self.entity_types version: :v2, &block
|
171
|
+
def self.entity_types version: :v2, transport: :grpc, &block
|
157
172
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
158
173
|
|
159
174
|
package_name = Google::Cloud::Dialogflow
|
160
175
|
.constants
|
161
176
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
162
177
|
.first
|
163
|
-
|
164
|
-
|
178
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:EntityTypes)
|
179
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
180
|
+
service_module.const_get(:Client).new(&block)
|
165
181
|
end
|
166
182
|
|
167
183
|
##
|
@@ -169,29 +185,34 @@ module Google
|
|
169
185
|
#
|
170
186
|
# By default, this returns an instance of
|
171
187
|
# [Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/SessionEntityTypes/Client.html)
|
172
|
-
# for version V2 of the API.
|
173
|
-
# However, you can specify
|
188
|
+
# for a gRPC client for version V2 of the API.
|
189
|
+
# However, you can specify a different API version by passing it in the
|
174
190
|
# `version` parameter. If the SessionEntityTypes service is
|
175
191
|
# supported by that API version, and the corresponding gem is available, the
|
176
192
|
# appropriate versioned client will be returned.
|
193
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
194
|
+
# the `transport` parameter.
|
177
195
|
#
|
178
196
|
# ## About SessionEntityTypes
|
179
197
|
#
|
180
|
-
# Service for managing
|
198
|
+
# Service for managing
|
199
|
+
# SessionEntityTypes.
|
181
200
|
#
|
182
201
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
183
202
|
# Defaults to `:v2`.
|
184
|
-
# @
|
203
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
204
|
+
# @return [::Object] A client object for the specified version.
|
185
205
|
#
|
186
|
-
def self.session_entity_types version: :v2, &block
|
206
|
+
def self.session_entity_types version: :v2, transport: :grpc, &block
|
187
207
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
188
208
|
|
189
209
|
package_name = Google::Cloud::Dialogflow
|
190
210
|
.constants
|
191
211
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
192
212
|
.first
|
193
|
-
|
194
|
-
|
213
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:SessionEntityTypes)
|
214
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
215
|
+
service_module.const_get(:Client).new(&block)
|
195
216
|
end
|
196
217
|
|
197
218
|
##
|
@@ -199,11 +220,13 @@ module Google
|
|
199
220
|
#
|
200
221
|
# By default, this returns an instance of
|
201
222
|
# [Google::Cloud::Dialogflow::V2::Sessions::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Sessions/Client.html)
|
202
|
-
# for version V2 of the API.
|
203
|
-
# However, you can specify
|
223
|
+
# for a gRPC client for version V2 of the API.
|
224
|
+
# However, you can specify a different API version by passing it in the
|
204
225
|
# `version` parameter. If the Sessions service is
|
205
226
|
# supported by that API version, and the corresponding gem is available, the
|
206
227
|
# appropriate versioned client will be returned.
|
228
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
229
|
+
# the `transport` parameter.
|
207
230
|
#
|
208
231
|
# ## About Sessions
|
209
232
|
#
|
@@ -214,17 +237,19 @@ module Google
|
|
214
237
|
#
|
215
238
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
216
239
|
# Defaults to `:v2`.
|
217
|
-
# @
|
240
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
241
|
+
# @return [::Object] A client object for the specified version.
|
218
242
|
#
|
219
|
-
def self.sessions version: :v2, &block
|
243
|
+
def self.sessions version: :v2, transport: :grpc, &block
|
220
244
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
221
245
|
|
222
246
|
package_name = Google::Cloud::Dialogflow
|
223
247
|
.constants
|
224
248
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
225
249
|
.first
|
226
|
-
|
227
|
-
|
250
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Sessions)
|
251
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
252
|
+
service_module.const_get(:Client).new(&block)
|
228
253
|
end
|
229
254
|
|
230
255
|
##
|
@@ -232,11 +257,13 @@ module Google
|
|
232
257
|
#
|
233
258
|
# By default, this returns an instance of
|
234
259
|
# [Google::Cloud::Dialogflow::V2::Participants::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Participants/Client.html)
|
235
|
-
# for version V2 of the API.
|
236
|
-
# However, you can specify
|
260
|
+
# for a gRPC client for version V2 of the API.
|
261
|
+
# However, you can specify a different API version by passing it in the
|
237
262
|
# `version` parameter. If the Participants service is
|
238
263
|
# supported by that API version, and the corresponding gem is available, the
|
239
264
|
# appropriate versioned client will be returned.
|
265
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
266
|
+
# the `transport` parameter.
|
240
267
|
#
|
241
268
|
# ## About Participants
|
242
269
|
#
|
@@ -244,17 +271,19 @@ module Google
|
|
244
271
|
#
|
245
272
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
246
273
|
# Defaults to `:v2`.
|
247
|
-
# @
|
274
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
275
|
+
# @return [::Object] A client object for the specified version.
|
248
276
|
#
|
249
|
-
def self.participants version: :v2, &block
|
277
|
+
def self.participants version: :v2, transport: :grpc, &block
|
250
278
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
251
279
|
|
252
280
|
package_name = Google::Cloud::Dialogflow
|
253
281
|
.constants
|
254
282
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
255
283
|
.first
|
256
|
-
|
257
|
-
|
284
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Participants)
|
285
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
286
|
+
service_module.const_get(:Client).new(&block)
|
258
287
|
end
|
259
288
|
|
260
289
|
##
|
@@ -262,29 +291,34 @@ module Google
|
|
262
291
|
#
|
263
292
|
# By default, this returns an instance of
|
264
293
|
# [Google::Cloud::Dialogflow::V2::AnswerRecords::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/AnswerRecords/Client.html)
|
265
|
-
# for version V2 of the API.
|
266
|
-
# However, you can specify
|
294
|
+
# for a gRPC client for version V2 of the API.
|
295
|
+
# However, you can specify a different API version by passing it in the
|
267
296
|
# `version` parameter. If the AnswerRecords service is
|
268
297
|
# supported by that API version, and the corresponding gem is available, the
|
269
298
|
# appropriate versioned client will be returned.
|
299
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
300
|
+
# the `transport` parameter.
|
270
301
|
#
|
271
302
|
# ## About AnswerRecords
|
272
303
|
#
|
273
|
-
# Service for managing
|
304
|
+
# Service for managing
|
305
|
+
# AnswerRecords.
|
274
306
|
#
|
275
307
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
276
308
|
# Defaults to `:v2`.
|
277
|
-
# @
|
309
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
310
|
+
# @return [::Object] A client object for the specified version.
|
278
311
|
#
|
279
|
-
def self.answer_records version: :v2, &block
|
312
|
+
def self.answer_records version: :v2, transport: :grpc, &block
|
280
313
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
281
314
|
|
282
315
|
package_name = Google::Cloud::Dialogflow
|
283
316
|
.constants
|
284
317
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
285
318
|
.first
|
286
|
-
|
287
|
-
|
319
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:AnswerRecords)
|
320
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
321
|
+
service_module.const_get(:Client).new(&block)
|
288
322
|
end
|
289
323
|
|
290
324
|
##
|
@@ -292,29 +326,34 @@ module Google
|
|
292
326
|
#
|
293
327
|
# By default, this returns an instance of
|
294
328
|
# [Google::Cloud::Dialogflow::V2::Conversations::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Conversations/Client.html)
|
295
|
-
# for version V2 of the API.
|
296
|
-
# However, you can specify
|
329
|
+
# for a gRPC client for version V2 of the API.
|
330
|
+
# However, you can specify a different API version by passing it in the
|
297
331
|
# `version` parameter. If the Conversations service is
|
298
332
|
# supported by that API version, and the corresponding gem is available, the
|
299
333
|
# appropriate versioned client will be returned.
|
334
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
335
|
+
# the `transport` parameter.
|
300
336
|
#
|
301
337
|
# ## About Conversations
|
302
338
|
#
|
303
|
-
# Service for managing
|
339
|
+
# Service for managing
|
340
|
+
# Conversations.
|
304
341
|
#
|
305
342
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
306
343
|
# Defaults to `:v2`.
|
307
|
-
# @
|
344
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
345
|
+
# @return [::Object] A client object for the specified version.
|
308
346
|
#
|
309
|
-
def self.conversations version: :v2, &block
|
347
|
+
def self.conversations version: :v2, transport: :grpc, &block
|
310
348
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
311
349
|
|
312
350
|
package_name = Google::Cloud::Dialogflow
|
313
351
|
.constants
|
314
352
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
315
353
|
.first
|
316
|
-
|
317
|
-
|
354
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Conversations)
|
355
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
356
|
+
service_module.const_get(:Client).new(&block)
|
318
357
|
end
|
319
358
|
|
320
359
|
##
|
@@ -322,11 +361,13 @@ module Google
|
|
322
361
|
#
|
323
362
|
# By default, this returns an instance of
|
324
363
|
# [Google::Cloud::Dialogflow::V2::ConversationDatasets::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/ConversationDatasets/Client.html)
|
325
|
-
# for version V2 of the API.
|
326
|
-
# However, you can specify
|
364
|
+
# for a gRPC client for version V2 of the API.
|
365
|
+
# However, you can specify a different API version by passing it in the
|
327
366
|
# `version` parameter. If the ConversationDatasets service is
|
328
367
|
# supported by that API version, and the corresponding gem is available, the
|
329
368
|
# appropriate versioned client will be returned.
|
369
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
370
|
+
# the `transport` parameter.
|
330
371
|
#
|
331
372
|
# ## About ConversationDatasets
|
332
373
|
#
|
@@ -337,17 +378,19 @@ module Google
|
|
337
378
|
#
|
338
379
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
339
380
|
# Defaults to `:v2`.
|
340
|
-
# @
|
381
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
382
|
+
# @return [::Object] A client object for the specified version.
|
341
383
|
#
|
342
|
-
def self.conversation_datasets version: :v2, &block
|
384
|
+
def self.conversation_datasets version: :v2, transport: :grpc, &block
|
343
385
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
344
386
|
|
345
387
|
package_name = Google::Cloud::Dialogflow
|
346
388
|
.constants
|
347
389
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
348
390
|
.first
|
349
|
-
|
350
|
-
|
391
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:ConversationDatasets)
|
392
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
393
|
+
service_module.const_get(:Client).new(&block)
|
351
394
|
end
|
352
395
|
|
353
396
|
##
|
@@ -355,11 +398,13 @@ module Google
|
|
355
398
|
#
|
356
399
|
# By default, this returns an instance of
|
357
400
|
# [Google::Cloud::Dialogflow::V2::ConversationModels::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/ConversationModels/Client.html)
|
358
|
-
# for version V2 of the API.
|
359
|
-
# However, you can specify
|
401
|
+
# for a gRPC client for version V2 of the API.
|
402
|
+
# However, you can specify a different API version by passing it in the
|
360
403
|
# `version` parameter. If the ConversationModels service is
|
361
404
|
# supported by that API version, and the corresponding gem is available, the
|
362
405
|
# appropriate versioned client will be returned.
|
406
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
407
|
+
# the `transport` parameter.
|
363
408
|
#
|
364
409
|
# ## About ConversationModels
|
365
410
|
#
|
@@ -367,17 +412,19 @@ module Google
|
|
367
412
|
#
|
368
413
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
369
414
|
# Defaults to `:v2`.
|
370
|
-
# @
|
415
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
416
|
+
# @return [::Object] A client object for the specified version.
|
371
417
|
#
|
372
|
-
def self.conversation_models version: :v2, &block
|
418
|
+
def self.conversation_models version: :v2, transport: :grpc, &block
|
373
419
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
374
420
|
|
375
421
|
package_name = Google::Cloud::Dialogflow
|
376
422
|
.constants
|
377
423
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
378
424
|
.first
|
379
|
-
|
380
|
-
|
425
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:ConversationModels)
|
426
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
427
|
+
service_module.const_get(:Client).new(&block)
|
381
428
|
end
|
382
429
|
|
383
430
|
##
|
@@ -385,29 +432,34 @@ module Google
|
|
385
432
|
#
|
386
433
|
# By default, this returns an instance of
|
387
434
|
# [Google::Cloud::Dialogflow::V2::ConversationProfiles::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/ConversationProfiles/Client.html)
|
388
|
-
# for version V2 of the API.
|
389
|
-
# However, you can specify
|
435
|
+
# for a gRPC client for version V2 of the API.
|
436
|
+
# However, you can specify a different API version by passing it in the
|
390
437
|
# `version` parameter. If the ConversationProfiles service is
|
391
438
|
# supported by that API version, and the corresponding gem is available, the
|
392
439
|
# appropriate versioned client will be returned.
|
440
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
441
|
+
# the `transport` parameter.
|
393
442
|
#
|
394
443
|
# ## About ConversationProfiles
|
395
444
|
#
|
396
|
-
# Service for managing
|
445
|
+
# Service for managing
|
446
|
+
# ConversationProfiles.
|
397
447
|
#
|
398
448
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
399
449
|
# Defaults to `:v2`.
|
400
|
-
# @
|
450
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
451
|
+
# @return [::Object] A client object for the specified version.
|
401
452
|
#
|
402
|
-
def self.conversation_profiles version: :v2, &block
|
453
|
+
def self.conversation_profiles version: :v2, transport: :grpc, &block
|
403
454
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
404
455
|
|
405
456
|
package_name = Google::Cloud::Dialogflow
|
406
457
|
.constants
|
407
458
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
408
459
|
.first
|
409
|
-
|
410
|
-
|
460
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:ConversationProfiles)
|
461
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
462
|
+
service_module.const_get(:Client).new(&block)
|
411
463
|
end
|
412
464
|
|
413
465
|
##
|
@@ -415,29 +467,34 @@ module Google
|
|
415
467
|
#
|
416
468
|
# By default, this returns an instance of
|
417
469
|
# [Google::Cloud::Dialogflow::V2::Documents::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Documents/Client.html)
|
418
|
-
# for version V2 of the API.
|
419
|
-
# However, you can specify
|
470
|
+
# for a gRPC client for version V2 of the API.
|
471
|
+
# However, you can specify a different API version by passing it in the
|
420
472
|
# `version` parameter. If the Documents service is
|
421
473
|
# supported by that API version, and the corresponding gem is available, the
|
422
474
|
# appropriate versioned client will be returned.
|
475
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
476
|
+
# the `transport` parameter.
|
423
477
|
#
|
424
478
|
# ## About Documents
|
425
479
|
#
|
426
|
-
# Service for managing knowledge
|
480
|
+
# Service for managing knowledge
|
481
|
+
# Documents.
|
427
482
|
#
|
428
483
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
429
484
|
# Defaults to `:v2`.
|
430
|
-
# @
|
485
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
486
|
+
# @return [::Object] A client object for the specified version.
|
431
487
|
#
|
432
|
-
def self.documents version: :v2, &block
|
488
|
+
def self.documents version: :v2, transport: :grpc, &block
|
433
489
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
434
490
|
|
435
491
|
package_name = Google::Cloud::Dialogflow
|
436
492
|
.constants
|
437
493
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
438
494
|
.first
|
439
|
-
|
440
|
-
|
495
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Documents)
|
496
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
497
|
+
service_module.const_get(:Client).new(&block)
|
441
498
|
end
|
442
499
|
|
443
500
|
##
|
@@ -445,11 +502,13 @@ module Google
|
|
445
502
|
#
|
446
503
|
# By default, this returns an instance of
|
447
504
|
# [Google::Cloud::Dialogflow::V2::Fulfillments::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Fulfillments/Client.html)
|
448
|
-
# for version V2 of the API.
|
449
|
-
# However, you can specify
|
505
|
+
# for a gRPC client for version V2 of the API.
|
506
|
+
# However, you can specify a different API version by passing it in the
|
450
507
|
# `version` parameter. If the Fulfillments service is
|
451
508
|
# supported by that API version, and the corresponding gem is available, the
|
452
509
|
# appropriate versioned client will be returned.
|
510
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
511
|
+
# the `transport` parameter.
|
453
512
|
#
|
454
513
|
# ## About Fulfillments
|
455
514
|
#
|
@@ -457,17 +516,19 @@ module Google
|
|
457
516
|
#
|
458
517
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
459
518
|
# Defaults to `:v2`.
|
460
|
-
# @
|
519
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
520
|
+
# @return [::Object] A client object for the specified version.
|
461
521
|
#
|
462
|
-
def self.fulfillments version: :v2, &block
|
522
|
+
def self.fulfillments version: :v2, transport: :grpc, &block
|
463
523
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
464
524
|
|
465
525
|
package_name = Google::Cloud::Dialogflow
|
466
526
|
.constants
|
467
527
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
468
528
|
.first
|
469
|
-
|
470
|
-
|
529
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Fulfillments)
|
530
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
531
|
+
service_module.const_get(:Client).new(&block)
|
471
532
|
end
|
472
533
|
|
473
534
|
##
|
@@ -475,11 +536,13 @@ module Google
|
|
475
536
|
#
|
476
537
|
# By default, this returns an instance of
|
477
538
|
# [Google::Cloud::Dialogflow::V2::Environments::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Environments/Client.html)
|
478
|
-
# for version V2 of the API.
|
479
|
-
# However, you can specify
|
539
|
+
# for a gRPC client for version V2 of the API.
|
540
|
+
# However, you can specify a different API version by passing it in the
|
480
541
|
# `version` parameter. If the Environments service is
|
481
542
|
# supported by that API version, and the corresponding gem is available, the
|
482
543
|
# appropriate versioned client will be returned.
|
544
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
545
|
+
# the `transport` parameter.
|
483
546
|
#
|
484
547
|
# ## About Environments
|
485
548
|
#
|
@@ -487,17 +550,19 @@ module Google
|
|
487
550
|
#
|
488
551
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
489
552
|
# Defaults to `:v2`.
|
490
|
-
# @
|
553
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
554
|
+
# @return [::Object] A client object for the specified version.
|
491
555
|
#
|
492
|
-
def self.environments version: :v2, &block
|
556
|
+
def self.environments version: :v2, transport: :grpc, &block
|
493
557
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
494
558
|
|
495
559
|
package_name = Google::Cloud::Dialogflow
|
496
560
|
.constants
|
497
561
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
498
562
|
.first
|
499
|
-
|
500
|
-
|
563
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Environments)
|
564
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
565
|
+
service_module.const_get(:Client).new(&block)
|
501
566
|
end
|
502
567
|
|
503
568
|
##
|
@@ -505,29 +570,34 @@ module Google
|
|
505
570
|
#
|
506
571
|
# By default, this returns an instance of
|
507
572
|
# [Google::Cloud::Dialogflow::V2::KnowledgeBases::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/KnowledgeBases/Client.html)
|
508
|
-
# for version V2 of the API.
|
509
|
-
# However, you can specify
|
573
|
+
# for a gRPC client for version V2 of the API.
|
574
|
+
# However, you can specify a different API version by passing it in the
|
510
575
|
# `version` parameter. If the KnowledgeBases service is
|
511
576
|
# supported by that API version, and the corresponding gem is available, the
|
512
577
|
# appropriate versioned client will be returned.
|
578
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
579
|
+
# the `transport` parameter.
|
513
580
|
#
|
514
581
|
# ## About KnowledgeBases
|
515
582
|
#
|
516
|
-
# Service for managing
|
583
|
+
# Service for managing
|
584
|
+
# KnowledgeBases.
|
517
585
|
#
|
518
586
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
519
587
|
# Defaults to `:v2`.
|
520
|
-
# @
|
588
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
589
|
+
# @return [::Object] A client object for the specified version.
|
521
590
|
#
|
522
|
-
def self.knowledge_bases version: :v2, &block
|
591
|
+
def self.knowledge_bases version: :v2, transport: :grpc, &block
|
523
592
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
524
593
|
|
525
594
|
package_name = Google::Cloud::Dialogflow
|
526
595
|
.constants
|
527
596
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
528
597
|
.first
|
529
|
-
|
530
|
-
|
598
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:KnowledgeBases)
|
599
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
600
|
+
service_module.const_get(:Client).new(&block)
|
531
601
|
end
|
532
602
|
|
533
603
|
##
|
@@ -535,11 +605,13 @@ module Google
|
|
535
605
|
#
|
536
606
|
# By default, this returns an instance of
|
537
607
|
# [Google::Cloud::Dialogflow::V2::Versions::Client](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest/Google/Cloud/Dialogflow/V2/Versions/Client.html)
|
538
|
-
# for version V2 of the API.
|
539
|
-
# However, you can specify
|
608
|
+
# for a gRPC client for version V2 of the API.
|
609
|
+
# However, you can specify a different API version by passing it in the
|
540
610
|
# `version` parameter. If the Versions service is
|
541
611
|
# supported by that API version, and the corresponding gem is available, the
|
542
612
|
# appropriate versioned client will be returned.
|
613
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
614
|
+
# the `transport` parameter.
|
543
615
|
#
|
544
616
|
# ## About Versions
|
545
617
|
#
|
@@ -547,17 +619,19 @@ module Google
|
|
547
619
|
#
|
548
620
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
549
621
|
# Defaults to `:v2`.
|
550
|
-
# @
|
622
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
623
|
+
# @return [::Object] A client object for the specified version.
|
551
624
|
#
|
552
|
-
def self.versions version: :v2, &block
|
625
|
+
def self.versions version: :v2, transport: :grpc, &block
|
553
626
|
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
554
627
|
|
555
628
|
package_name = Google::Cloud::Dialogflow
|
556
629
|
.constants
|
557
630
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
558
631
|
.first
|
559
|
-
|
560
|
-
|
632
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Versions)
|
633
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
634
|
+
service_module.const_get(:Client).new(&block)
|
561
635
|
end
|
562
636
|
|
563
637
|
##
|
@@ -577,7 +651,7 @@ module Google
|
|
577
651
|
# * `timeout` (*type:* `Numeric`) -
|
578
652
|
# Default timeout in seconds.
|
579
653
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) -
|
580
|
-
# Additional
|
654
|
+
# Additional headers to be sent with the call.
|
581
655
|
# * `retry_policy` (*type:* `Hash`) -
|
582
656
|
# The retry policy. The value is a hash with the following keys:
|
583
657
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-dialogflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.23'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 2.a
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
43
|
+
version: '0.23'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.a
|
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
194
|
- !ruby/object:Gem::Version
|
195
195
|
version: '0'
|
196
196
|
requirements: []
|
197
|
-
rubygems_version: 3.
|
197
|
+
rubygems_version: 3.4.2
|
198
198
|
signing_key:
|
199
199
|
specification_version: 4
|
200
200
|
summary: API Client library for the Dialogflow API
|