google-cloud-dialogflow-cx 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +32 -2
- data/lib/google/cloud/dialogflow/cx/version.rb +1 -1
- data/lib/google/cloud/dialogflow/cx.rb +612 -0
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 425d3d292ac691f9a39d215377fca6f62957ec9cb1a6fe3f693baee1d5a54066
|
4
|
+
data.tar.gz: 8f779589cdddc7a1633261031fd5bbd805b0cfeff3af7a38c52729d8bf52fef3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4a5d7d9a4184492aae65a3a783abec3c3a40fe7dc301ae1544759bff595a652cac63abe4f4adec78293d1361d84d442084d789bc350692a52d45fccb367defe
|
7
|
+
data.tar.gz: 1657dfc360b1c4ba4c2011c4159883d63a83c55260b142b11a7eeb663e172ba75b840a72eca5be26ffb757940434bdbaa8367542f9e770136455d40f127f9dda
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Dialogflow is an end-to-end, build-once deploy-everywhere development suite for
|
|
7
7
|
Actual client classes for the various versions of this API are defined in
|
8
8
|
_versioned_ client gems, with names of the form `google-cloud-dialogflow-cx-v*`.
|
9
9
|
The gem `google-cloud-dialogflow-cx` is the main client library that brings the
|
10
|
-
|
10
|
+
versioned gems in as dependencies, and provides high-level methods for
|
11
11
|
constructing clients. More information on versioned clients can be found below
|
12
12
|
in the section titled *Which client should I use?*.
|
13
13
|
|
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
|
|
34
34
|
1. [Enable the API.](https://console.cloud.google.com/apis/library/dialogflow.googleapis.com)
|
35
35
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
36
36
|
|
37
|
+
## Debug Logging
|
38
|
+
|
39
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
40
|
+
your application's integration with the API. When logging is activated, key
|
41
|
+
events such as requests and responses, along with data payloads and metadata
|
42
|
+
such as headers and client configuration, are logged to the standard error
|
43
|
+
stream.
|
44
|
+
|
45
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
46
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
47
|
+
customers, private keys, or other security data that could be compromising if
|
48
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
49
|
+
the principle of least access. Google also recommends that Client Library Debug
|
50
|
+
Logging be enabled only temporarily during active debugging, and not used
|
51
|
+
permanently in production.
|
52
|
+
|
53
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
54
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
55
|
+
list of client library gem names. This will select the default logging behavior,
|
56
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
57
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
58
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
59
|
+
results in logs appearing alongside your application logs in the
|
60
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
61
|
+
|
62
|
+
Debug logging also requires that the versioned clients for this service be
|
63
|
+
sufficiently recent, released after about Dec 10, 2024. If logging is not
|
64
|
+
working, try updating the versioned clients in your bundle or installed gems:
|
65
|
+
[google-cloud-dialogflow-cx-v3](https://cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest).
|
66
|
+
|
37
67
|
## Supported Ruby Versions
|
38
68
|
|
39
|
-
This library is supported on Ruby
|
69
|
+
This library is supported on Ruby 3.0+.
|
40
70
|
|
41
71
|
Google provides official support for Ruby versions that are actively supported
|
42
72
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -59,6 +59,11 @@ module Google
|
|
59
59
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
60
60
|
# the `transport` parameter.
|
61
61
|
#
|
62
|
+
# Raises an exception if the currently installed versioned client gem for the
|
63
|
+
# given API version does not support the given transport of the Pages service.
|
64
|
+
# You can determine whether the method will succeed by calling
|
65
|
+
# {Google::Cloud::Dialogflow::CX.pages_available?}.
|
66
|
+
#
|
62
67
|
# ## About Pages
|
63
68
|
#
|
64
69
|
# Service for managing Pages.
|
@@ -80,6 +85,37 @@ module Google
|
|
80
85
|
service_module.const_get(:Client).new(&block)
|
81
86
|
end
|
82
87
|
|
88
|
+
##
|
89
|
+
# Determines whether the Pages service is supported by the current client.
|
90
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.pages}.
|
91
|
+
# If false, that method will raise an exception. This could happen if the given
|
92
|
+
# API version does not exist or does not support the Pages service,
|
93
|
+
# or if the versioned client gem needs an update to support the Pages service.
|
94
|
+
#
|
95
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
96
|
+
# Defaults to `:v3`.
|
97
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
98
|
+
# @return [boolean] Whether the service is available.
|
99
|
+
#
|
100
|
+
def self.pages_available? version: :v3, transport: :grpc
|
101
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
102
|
+
package_name = Google::Cloud::Dialogflow::CX
|
103
|
+
.constants
|
104
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
105
|
+
.first
|
106
|
+
return false unless package_name
|
107
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
108
|
+
return false unless service_module.const_defined? :Pages
|
109
|
+
service_module = service_module.const_get :Pages
|
110
|
+
if transport == :rest
|
111
|
+
return false unless service_module.const_defined? :Rest
|
112
|
+
service_module = service_module.const_get :Rest
|
113
|
+
end
|
114
|
+
service_module.const_defined? :Client
|
115
|
+
rescue ::LoadError
|
116
|
+
false
|
117
|
+
end
|
118
|
+
|
83
119
|
##
|
84
120
|
# Create a new client object for Flows.
|
85
121
|
#
|
@@ -93,6 +129,11 @@ module Google
|
|
93
129
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
94
130
|
# the `transport` parameter.
|
95
131
|
#
|
132
|
+
# Raises an exception if the currently installed versioned client gem for the
|
133
|
+
# given API version does not support the given transport of the Flows service.
|
134
|
+
# You can determine whether the method will succeed by calling
|
135
|
+
# {Google::Cloud::Dialogflow::CX.flows_available?}.
|
136
|
+
#
|
96
137
|
# ## About Flows
|
97
138
|
#
|
98
139
|
# Service for managing Flows.
|
@@ -114,6 +155,37 @@ module Google
|
|
114
155
|
service_module.const_get(:Client).new(&block)
|
115
156
|
end
|
116
157
|
|
158
|
+
##
|
159
|
+
# Determines whether the Flows service is supported by the current client.
|
160
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.flows}.
|
161
|
+
# If false, that method will raise an exception. This could happen if the given
|
162
|
+
# API version does not exist or does not support the Flows service,
|
163
|
+
# or if the versioned client gem needs an update to support the Flows service.
|
164
|
+
#
|
165
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
166
|
+
# Defaults to `:v3`.
|
167
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
168
|
+
# @return [boolean] Whether the service is available.
|
169
|
+
#
|
170
|
+
def self.flows_available? version: :v3, transport: :grpc
|
171
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
172
|
+
package_name = Google::Cloud::Dialogflow::CX
|
173
|
+
.constants
|
174
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
175
|
+
.first
|
176
|
+
return false unless package_name
|
177
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
178
|
+
return false unless service_module.const_defined? :Flows
|
179
|
+
service_module = service_module.const_get :Flows
|
180
|
+
if transport == :rest
|
181
|
+
return false unless service_module.const_defined? :Rest
|
182
|
+
service_module = service_module.const_get :Rest
|
183
|
+
end
|
184
|
+
service_module.const_defined? :Client
|
185
|
+
rescue ::LoadError
|
186
|
+
false
|
187
|
+
end
|
188
|
+
|
117
189
|
##
|
118
190
|
# Create a new client object for Agents.
|
119
191
|
#
|
@@ -127,6 +199,11 @@ module Google
|
|
127
199
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
128
200
|
# the `transport` parameter.
|
129
201
|
#
|
202
|
+
# Raises an exception if the currently installed versioned client gem for the
|
203
|
+
# given API version does not support the given transport of the Agents service.
|
204
|
+
# You can determine whether the method will succeed by calling
|
205
|
+
# {Google::Cloud::Dialogflow::CX.agents_available?}.
|
206
|
+
#
|
130
207
|
# ## About Agents
|
131
208
|
#
|
132
209
|
# Service for managing Agents.
|
@@ -148,6 +225,37 @@ module Google
|
|
148
225
|
service_module.const_get(:Client).new(&block)
|
149
226
|
end
|
150
227
|
|
228
|
+
##
|
229
|
+
# Determines whether the Agents service is supported by the current client.
|
230
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.agents}.
|
231
|
+
# If false, that method will raise an exception. This could happen if the given
|
232
|
+
# API version does not exist or does not support the Agents service,
|
233
|
+
# or if the versioned client gem needs an update to support the Agents service.
|
234
|
+
#
|
235
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
236
|
+
# Defaults to `:v3`.
|
237
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
238
|
+
# @return [boolean] Whether the service is available.
|
239
|
+
#
|
240
|
+
def self.agents_available? version: :v3, transport: :grpc
|
241
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
242
|
+
package_name = Google::Cloud::Dialogflow::CX
|
243
|
+
.constants
|
244
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
245
|
+
.first
|
246
|
+
return false unless package_name
|
247
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
248
|
+
return false unless service_module.const_defined? :Agents
|
249
|
+
service_module = service_module.const_get :Agents
|
250
|
+
if transport == :rest
|
251
|
+
return false unless service_module.const_defined? :Rest
|
252
|
+
service_module = service_module.const_get :Rest
|
253
|
+
end
|
254
|
+
service_module.const_defined? :Client
|
255
|
+
rescue ::LoadError
|
256
|
+
false
|
257
|
+
end
|
258
|
+
|
151
259
|
##
|
152
260
|
# Create a new client object for Changelogs.
|
153
261
|
#
|
@@ -161,6 +269,11 @@ module Google
|
|
161
269
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
162
270
|
# the `transport` parameter.
|
163
271
|
#
|
272
|
+
# Raises an exception if the currently installed versioned client gem for the
|
273
|
+
# given API version does not support the given transport of the Changelogs service.
|
274
|
+
# You can determine whether the method will succeed by calling
|
275
|
+
# {Google::Cloud::Dialogflow::CX.changelogs_available?}.
|
276
|
+
#
|
164
277
|
# ## About Changelogs
|
165
278
|
#
|
166
279
|
# Service for managing Changelogs.
|
@@ -182,6 +295,37 @@ module Google
|
|
182
295
|
service_module.const_get(:Client).new(&block)
|
183
296
|
end
|
184
297
|
|
298
|
+
##
|
299
|
+
# Determines whether the Changelogs service is supported by the current client.
|
300
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.changelogs}.
|
301
|
+
# If false, that method will raise an exception. This could happen if the given
|
302
|
+
# API version does not exist or does not support the Changelogs service,
|
303
|
+
# or if the versioned client gem needs an update to support the Changelogs service.
|
304
|
+
#
|
305
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
306
|
+
# Defaults to `:v3`.
|
307
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
308
|
+
# @return [boolean] Whether the service is available.
|
309
|
+
#
|
310
|
+
def self.changelogs_available? version: :v3, transport: :grpc
|
311
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
312
|
+
package_name = Google::Cloud::Dialogflow::CX
|
313
|
+
.constants
|
314
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
315
|
+
.first
|
316
|
+
return false unless package_name
|
317
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
318
|
+
return false unless service_module.const_defined? :Changelogs
|
319
|
+
service_module = service_module.const_get :Changelogs
|
320
|
+
if transport == :rest
|
321
|
+
return false unless service_module.const_defined? :Rest
|
322
|
+
service_module = service_module.const_get :Rest
|
323
|
+
end
|
324
|
+
service_module.const_defined? :Client
|
325
|
+
rescue ::LoadError
|
326
|
+
false
|
327
|
+
end
|
328
|
+
|
185
329
|
##
|
186
330
|
# Create a new client object for Deployments.
|
187
331
|
#
|
@@ -195,6 +339,11 @@ module Google
|
|
195
339
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
196
340
|
# the `transport` parameter.
|
197
341
|
#
|
342
|
+
# Raises an exception if the currently installed versioned client gem for the
|
343
|
+
# given API version does not support the given transport of the Deployments service.
|
344
|
+
# You can determine whether the method will succeed by calling
|
345
|
+
# {Google::Cloud::Dialogflow::CX.deployments_available?}.
|
346
|
+
#
|
198
347
|
# ## About Deployments
|
199
348
|
#
|
200
349
|
# Service for managing Deployments.
|
@@ -216,6 +365,37 @@ module Google
|
|
216
365
|
service_module.const_get(:Client).new(&block)
|
217
366
|
end
|
218
367
|
|
368
|
+
##
|
369
|
+
# Determines whether the Deployments service is supported by the current client.
|
370
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.deployments}.
|
371
|
+
# If false, that method will raise an exception. This could happen if the given
|
372
|
+
# API version does not exist or does not support the Deployments service,
|
373
|
+
# or if the versioned client gem needs an update to support the Deployments service.
|
374
|
+
#
|
375
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
376
|
+
# Defaults to `:v3`.
|
377
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
378
|
+
# @return [boolean] Whether the service is available.
|
379
|
+
#
|
380
|
+
def self.deployments_available? version: :v3, transport: :grpc
|
381
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
382
|
+
package_name = Google::Cloud::Dialogflow::CX
|
383
|
+
.constants
|
384
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
385
|
+
.first
|
386
|
+
return false unless package_name
|
387
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
388
|
+
return false unless service_module.const_defined? :Deployments
|
389
|
+
service_module = service_module.const_get :Deployments
|
390
|
+
if transport == :rest
|
391
|
+
return false unless service_module.const_defined? :Rest
|
392
|
+
service_module = service_module.const_get :Rest
|
393
|
+
end
|
394
|
+
service_module.const_defined? :Client
|
395
|
+
rescue ::LoadError
|
396
|
+
false
|
397
|
+
end
|
398
|
+
|
219
399
|
##
|
220
400
|
# Create a new client object for EntityTypes.
|
221
401
|
#
|
@@ -229,6 +409,11 @@ module Google
|
|
229
409
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
230
410
|
# the `transport` parameter.
|
231
411
|
#
|
412
|
+
# Raises an exception if the currently installed versioned client gem for the
|
413
|
+
# given API version does not support the given transport of the EntityTypes service.
|
414
|
+
# You can determine whether the method will succeed by calling
|
415
|
+
# {Google::Cloud::Dialogflow::CX.entity_types_available?}.
|
416
|
+
#
|
232
417
|
# ## About EntityTypes
|
233
418
|
#
|
234
419
|
# Service for managing EntityTypes.
|
@@ -250,6 +435,37 @@ module Google
|
|
250
435
|
service_module.const_get(:Client).new(&block)
|
251
436
|
end
|
252
437
|
|
438
|
+
##
|
439
|
+
# Determines whether the EntityTypes service is supported by the current client.
|
440
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.entity_types}.
|
441
|
+
# If false, that method will raise an exception. This could happen if the given
|
442
|
+
# API version does not exist or does not support the EntityTypes service,
|
443
|
+
# or if the versioned client gem needs an update to support the EntityTypes service.
|
444
|
+
#
|
445
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
446
|
+
# Defaults to `:v3`.
|
447
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
448
|
+
# @return [boolean] Whether the service is available.
|
449
|
+
#
|
450
|
+
def self.entity_types_available? version: :v3, transport: :grpc
|
451
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
452
|
+
package_name = Google::Cloud::Dialogflow::CX
|
453
|
+
.constants
|
454
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
455
|
+
.first
|
456
|
+
return false unless package_name
|
457
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
458
|
+
return false unless service_module.const_defined? :EntityTypes
|
459
|
+
service_module = service_module.const_get :EntityTypes
|
460
|
+
if transport == :rest
|
461
|
+
return false unless service_module.const_defined? :Rest
|
462
|
+
service_module = service_module.const_get :Rest
|
463
|
+
end
|
464
|
+
service_module.const_defined? :Client
|
465
|
+
rescue ::LoadError
|
466
|
+
false
|
467
|
+
end
|
468
|
+
|
253
469
|
##
|
254
470
|
# Create a new client object for Intents.
|
255
471
|
#
|
@@ -263,6 +479,11 @@ module Google
|
|
263
479
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
264
480
|
# the `transport` parameter.
|
265
481
|
#
|
482
|
+
# Raises an exception if the currently installed versioned client gem for the
|
483
|
+
# given API version does not support the given transport of the Intents service.
|
484
|
+
# You can determine whether the method will succeed by calling
|
485
|
+
# {Google::Cloud::Dialogflow::CX.intents_available?}.
|
486
|
+
#
|
266
487
|
# ## About Intents
|
267
488
|
#
|
268
489
|
# Service for managing Intents.
|
@@ -284,6 +505,37 @@ module Google
|
|
284
505
|
service_module.const_get(:Client).new(&block)
|
285
506
|
end
|
286
507
|
|
508
|
+
##
|
509
|
+
# Determines whether the Intents service is supported by the current client.
|
510
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.intents}.
|
511
|
+
# If false, that method will raise an exception. This could happen if the given
|
512
|
+
# API version does not exist or does not support the Intents service,
|
513
|
+
# or if the versioned client gem needs an update to support the Intents service.
|
514
|
+
#
|
515
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
516
|
+
# Defaults to `:v3`.
|
517
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
518
|
+
# @return [boolean] Whether the service is available.
|
519
|
+
#
|
520
|
+
def self.intents_available? version: :v3, transport: :grpc
|
521
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
522
|
+
package_name = Google::Cloud::Dialogflow::CX
|
523
|
+
.constants
|
524
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
525
|
+
.first
|
526
|
+
return false unless package_name
|
527
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
528
|
+
return false unless service_module.const_defined? :Intents
|
529
|
+
service_module = service_module.const_get :Intents
|
530
|
+
if transport == :rest
|
531
|
+
return false unless service_module.const_defined? :Rest
|
532
|
+
service_module = service_module.const_get :Rest
|
533
|
+
end
|
534
|
+
service_module.const_defined? :Client
|
535
|
+
rescue ::LoadError
|
536
|
+
false
|
537
|
+
end
|
538
|
+
|
287
539
|
##
|
288
540
|
# Create a new client object for SessionEntityTypes.
|
289
541
|
#
|
@@ -297,6 +549,11 @@ module Google
|
|
297
549
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
298
550
|
# the `transport` parameter.
|
299
551
|
#
|
552
|
+
# Raises an exception if the currently installed versioned client gem for the
|
553
|
+
# given API version does not support the given transport of the SessionEntityTypes service.
|
554
|
+
# You can determine whether the method will succeed by calling
|
555
|
+
# {Google::Cloud::Dialogflow::CX.session_entity_types_available?}.
|
556
|
+
#
|
300
557
|
# ## About SessionEntityTypes
|
301
558
|
#
|
302
559
|
# Service for managing
|
@@ -319,6 +576,37 @@ module Google
|
|
319
576
|
service_module.const_get(:Client).new(&block)
|
320
577
|
end
|
321
578
|
|
579
|
+
##
|
580
|
+
# Determines whether the SessionEntityTypes service is supported by the current client.
|
581
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.session_entity_types}.
|
582
|
+
# If false, that method will raise an exception. This could happen if the given
|
583
|
+
# API version does not exist or does not support the SessionEntityTypes service,
|
584
|
+
# or if the versioned client gem needs an update to support the SessionEntityTypes service.
|
585
|
+
#
|
586
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
587
|
+
# Defaults to `:v3`.
|
588
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
589
|
+
# @return [boolean] Whether the service is available.
|
590
|
+
#
|
591
|
+
def self.session_entity_types_available? version: :v3, transport: :grpc
|
592
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
593
|
+
package_name = Google::Cloud::Dialogflow::CX
|
594
|
+
.constants
|
595
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
596
|
+
.first
|
597
|
+
return false unless package_name
|
598
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
599
|
+
return false unless service_module.const_defined? :SessionEntityTypes
|
600
|
+
service_module = service_module.const_get :SessionEntityTypes
|
601
|
+
if transport == :rest
|
602
|
+
return false unless service_module.const_defined? :Rest
|
603
|
+
service_module = service_module.const_get :Rest
|
604
|
+
end
|
605
|
+
service_module.const_defined? :Client
|
606
|
+
rescue ::LoadError
|
607
|
+
false
|
608
|
+
end
|
609
|
+
|
322
610
|
##
|
323
611
|
# Create a new client object for Sessions.
|
324
612
|
#
|
@@ -332,6 +620,11 @@ module Google
|
|
332
620
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
333
621
|
# the `transport` parameter.
|
334
622
|
#
|
623
|
+
# Raises an exception if the currently installed versioned client gem for the
|
624
|
+
# given API version does not support the given transport of the Sessions service.
|
625
|
+
# You can determine whether the method will succeed by calling
|
626
|
+
# {Google::Cloud::Dialogflow::CX.sessions_available?}.
|
627
|
+
#
|
335
628
|
# ## About Sessions
|
336
629
|
#
|
337
630
|
# A session represents an interaction with a user. You retrieve user input
|
@@ -356,6 +649,37 @@ module Google
|
|
356
649
|
service_module.const_get(:Client).new(&block)
|
357
650
|
end
|
358
651
|
|
652
|
+
##
|
653
|
+
# Determines whether the Sessions service is supported by the current client.
|
654
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.sessions}.
|
655
|
+
# If false, that method will raise an exception. This could happen if the given
|
656
|
+
# API version does not exist or does not support the Sessions service,
|
657
|
+
# or if the versioned client gem needs an update to support the Sessions service.
|
658
|
+
#
|
659
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
660
|
+
# Defaults to `:v3`.
|
661
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
662
|
+
# @return [boolean] Whether the service is available.
|
663
|
+
#
|
664
|
+
def self.sessions_available? version: :v3, transport: :grpc
|
665
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
666
|
+
package_name = Google::Cloud::Dialogflow::CX
|
667
|
+
.constants
|
668
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
669
|
+
.first
|
670
|
+
return false unless package_name
|
671
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
672
|
+
return false unless service_module.const_defined? :Sessions
|
673
|
+
service_module = service_module.const_get :Sessions
|
674
|
+
if transport == :rest
|
675
|
+
return false unless service_module.const_defined? :Rest
|
676
|
+
service_module = service_module.const_get :Rest
|
677
|
+
end
|
678
|
+
service_module.const_defined? :Client
|
679
|
+
rescue ::LoadError
|
680
|
+
false
|
681
|
+
end
|
682
|
+
|
359
683
|
##
|
360
684
|
# Create a new client object for TransitionRouteGroups.
|
361
685
|
#
|
@@ -369,6 +693,11 @@ module Google
|
|
369
693
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
370
694
|
# the `transport` parameter.
|
371
695
|
#
|
696
|
+
# Raises an exception if the currently installed versioned client gem for the
|
697
|
+
# given API version does not support the given transport of the TransitionRouteGroups service.
|
698
|
+
# You can determine whether the method will succeed by calling
|
699
|
+
# {Google::Cloud::Dialogflow::CX.transition_route_groups_available?}.
|
700
|
+
#
|
372
701
|
# ## About TransitionRouteGroups
|
373
702
|
#
|
374
703
|
# Service for managing
|
@@ -391,6 +720,37 @@ module Google
|
|
391
720
|
service_module.const_get(:Client).new(&block)
|
392
721
|
end
|
393
722
|
|
723
|
+
##
|
724
|
+
# Determines whether the TransitionRouteGroups service is supported by the current client.
|
725
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.transition_route_groups}.
|
726
|
+
# If false, that method will raise an exception. This could happen if the given
|
727
|
+
# API version does not exist or does not support the TransitionRouteGroups service,
|
728
|
+
# or if the versioned client gem needs an update to support the TransitionRouteGroups service.
|
729
|
+
#
|
730
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
731
|
+
# Defaults to `:v3`.
|
732
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
733
|
+
# @return [boolean] Whether the service is available.
|
734
|
+
#
|
735
|
+
def self.transition_route_groups_available? version: :v3, transport: :grpc
|
736
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
737
|
+
package_name = Google::Cloud::Dialogflow::CX
|
738
|
+
.constants
|
739
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
740
|
+
.first
|
741
|
+
return false unless package_name
|
742
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
743
|
+
return false unless service_module.const_defined? :TransitionRouteGroups
|
744
|
+
service_module = service_module.const_get :TransitionRouteGroups
|
745
|
+
if transport == :rest
|
746
|
+
return false unless service_module.const_defined? :Rest
|
747
|
+
service_module = service_module.const_get :Rest
|
748
|
+
end
|
749
|
+
service_module.const_defined? :Client
|
750
|
+
rescue ::LoadError
|
751
|
+
false
|
752
|
+
end
|
753
|
+
|
394
754
|
##
|
395
755
|
# Create a new client object for TestCases.
|
396
756
|
#
|
@@ -404,6 +764,11 @@ module Google
|
|
404
764
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
405
765
|
# the `transport` parameter.
|
406
766
|
#
|
767
|
+
# Raises an exception if the currently installed versioned client gem for the
|
768
|
+
# given API version does not support the given transport of the TestCases service.
|
769
|
+
# You can determine whether the method will succeed by calling
|
770
|
+
# {Google::Cloud::Dialogflow::CX.test_cases_available?}.
|
771
|
+
#
|
407
772
|
# ## About TestCases
|
408
773
|
#
|
409
774
|
# Service for managing Test Cases and
|
@@ -426,6 +791,37 @@ module Google
|
|
426
791
|
service_module.const_get(:Client).new(&block)
|
427
792
|
end
|
428
793
|
|
794
|
+
##
|
795
|
+
# Determines whether the TestCases service is supported by the current client.
|
796
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.test_cases}.
|
797
|
+
# If false, that method will raise an exception. This could happen if the given
|
798
|
+
# API version does not exist or does not support the TestCases service,
|
799
|
+
# or if the versioned client gem needs an update to support the TestCases service.
|
800
|
+
#
|
801
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
802
|
+
# Defaults to `:v3`.
|
803
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
804
|
+
# @return [boolean] Whether the service is available.
|
805
|
+
#
|
806
|
+
def self.test_cases_available? version: :v3, transport: :grpc
|
807
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
808
|
+
package_name = Google::Cloud::Dialogflow::CX
|
809
|
+
.constants
|
810
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
811
|
+
.first
|
812
|
+
return false unless package_name
|
813
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
814
|
+
return false unless service_module.const_defined? :TestCases
|
815
|
+
service_module = service_module.const_get :TestCases
|
816
|
+
if transport == :rest
|
817
|
+
return false unless service_module.const_defined? :Rest
|
818
|
+
service_module = service_module.const_get :Rest
|
819
|
+
end
|
820
|
+
service_module.const_defined? :Client
|
821
|
+
rescue ::LoadError
|
822
|
+
false
|
823
|
+
end
|
824
|
+
|
429
825
|
##
|
430
826
|
# Create a new client object for Webhooks.
|
431
827
|
#
|
@@ -439,6 +835,11 @@ module Google
|
|
439
835
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
440
836
|
# the `transport` parameter.
|
441
837
|
#
|
838
|
+
# Raises an exception if the currently installed versioned client gem for the
|
839
|
+
# given API version does not support the given transport of the Webhooks service.
|
840
|
+
# You can determine whether the method will succeed by calling
|
841
|
+
# {Google::Cloud::Dialogflow::CX.webhooks_available?}.
|
842
|
+
#
|
442
843
|
# ## About Webhooks
|
443
844
|
#
|
444
845
|
# Service for managing Webhooks.
|
@@ -460,6 +861,37 @@ module Google
|
|
460
861
|
service_module.const_get(:Client).new(&block)
|
461
862
|
end
|
462
863
|
|
864
|
+
##
|
865
|
+
# Determines whether the Webhooks service is supported by the current client.
|
866
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.webhooks}.
|
867
|
+
# If false, that method will raise an exception. This could happen if the given
|
868
|
+
# API version does not exist or does not support the Webhooks service,
|
869
|
+
# or if the versioned client gem needs an update to support the Webhooks service.
|
870
|
+
#
|
871
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
872
|
+
# Defaults to `:v3`.
|
873
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
874
|
+
# @return [boolean] Whether the service is available.
|
875
|
+
#
|
876
|
+
def self.webhooks_available? version: :v3, transport: :grpc
|
877
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
878
|
+
package_name = Google::Cloud::Dialogflow::CX
|
879
|
+
.constants
|
880
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
881
|
+
.first
|
882
|
+
return false unless package_name
|
883
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
884
|
+
return false unless service_module.const_defined? :Webhooks
|
885
|
+
service_module = service_module.const_get :Webhooks
|
886
|
+
if transport == :rest
|
887
|
+
return false unless service_module.const_defined? :Rest
|
888
|
+
service_module = service_module.const_get :Rest
|
889
|
+
end
|
890
|
+
service_module.const_defined? :Client
|
891
|
+
rescue ::LoadError
|
892
|
+
false
|
893
|
+
end
|
894
|
+
|
463
895
|
##
|
464
896
|
# Create a new client object for Environments.
|
465
897
|
#
|
@@ -473,6 +905,11 @@ module Google
|
|
473
905
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
474
906
|
# the `transport` parameter.
|
475
907
|
#
|
908
|
+
# Raises an exception if the currently installed versioned client gem for the
|
909
|
+
# given API version does not support the given transport of the Environments service.
|
910
|
+
# You can determine whether the method will succeed by calling
|
911
|
+
# {Google::Cloud::Dialogflow::CX.environments_available?}.
|
912
|
+
#
|
476
913
|
# ## About Environments
|
477
914
|
#
|
478
915
|
# Service for managing
|
@@ -495,6 +932,37 @@ module Google
|
|
495
932
|
service_module.const_get(:Client).new(&block)
|
496
933
|
end
|
497
934
|
|
935
|
+
##
|
936
|
+
# Determines whether the Environments service is supported by the current client.
|
937
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.environments}.
|
938
|
+
# If false, that method will raise an exception. This could happen if the given
|
939
|
+
# API version does not exist or does not support the Environments service,
|
940
|
+
# or if the versioned client gem needs an update to support the Environments service.
|
941
|
+
#
|
942
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
943
|
+
# Defaults to `:v3`.
|
944
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
945
|
+
# @return [boolean] Whether the service is available.
|
946
|
+
#
|
947
|
+
def self.environments_available? version: :v3, transport: :grpc
|
948
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
949
|
+
package_name = Google::Cloud::Dialogflow::CX
|
950
|
+
.constants
|
951
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
952
|
+
.first
|
953
|
+
return false unless package_name
|
954
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
955
|
+
return false unless service_module.const_defined? :Environments
|
956
|
+
service_module = service_module.const_get :Environments
|
957
|
+
if transport == :rest
|
958
|
+
return false unless service_module.const_defined? :Rest
|
959
|
+
service_module = service_module.const_get :Rest
|
960
|
+
end
|
961
|
+
service_module.const_defined? :Client
|
962
|
+
rescue ::LoadError
|
963
|
+
false
|
964
|
+
end
|
965
|
+
|
498
966
|
##
|
499
967
|
# Create a new client object for Experiments.
|
500
968
|
#
|
@@ -508,6 +976,11 @@ module Google
|
|
508
976
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
509
977
|
# the `transport` parameter.
|
510
978
|
#
|
979
|
+
# Raises an exception if the currently installed versioned client gem for the
|
980
|
+
# given API version does not support the given transport of the Experiments service.
|
981
|
+
# You can determine whether the method will succeed by calling
|
982
|
+
# {Google::Cloud::Dialogflow::CX.experiments_available?}.
|
983
|
+
#
|
511
984
|
# ## About Experiments
|
512
985
|
#
|
513
986
|
# Service for managing Experiments.
|
@@ -529,6 +1002,37 @@ module Google
|
|
529
1002
|
service_module.const_get(:Client).new(&block)
|
530
1003
|
end
|
531
1004
|
|
1005
|
+
##
|
1006
|
+
# Determines whether the Experiments service is supported by the current client.
|
1007
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.experiments}.
|
1008
|
+
# If false, that method will raise an exception. This could happen if the given
|
1009
|
+
# API version does not exist or does not support the Experiments service,
|
1010
|
+
# or if the versioned client gem needs an update to support the Experiments service.
|
1011
|
+
#
|
1012
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1013
|
+
# Defaults to `:v3`.
|
1014
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1015
|
+
# @return [boolean] Whether the service is available.
|
1016
|
+
#
|
1017
|
+
def self.experiments_available? version: :v3, transport: :grpc
|
1018
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
1019
|
+
package_name = Google::Cloud::Dialogflow::CX
|
1020
|
+
.constants
|
1021
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1022
|
+
.first
|
1023
|
+
return false unless package_name
|
1024
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
1025
|
+
return false unless service_module.const_defined? :Experiments
|
1026
|
+
service_module = service_module.const_get :Experiments
|
1027
|
+
if transport == :rest
|
1028
|
+
return false unless service_module.const_defined? :Rest
|
1029
|
+
service_module = service_module.const_get :Rest
|
1030
|
+
end
|
1031
|
+
service_module.const_defined? :Client
|
1032
|
+
rescue ::LoadError
|
1033
|
+
false
|
1034
|
+
end
|
1035
|
+
|
532
1036
|
##
|
533
1037
|
# Create a new client object for Generators.
|
534
1038
|
#
|
@@ -542,6 +1046,11 @@ module Google
|
|
542
1046
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
543
1047
|
# the `transport` parameter.
|
544
1048
|
#
|
1049
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1050
|
+
# given API version does not support the given transport of the Generators service.
|
1051
|
+
# You can determine whether the method will succeed by calling
|
1052
|
+
# {Google::Cloud::Dialogflow::CX.generators_available?}.
|
1053
|
+
#
|
545
1054
|
# ## About Generators
|
546
1055
|
#
|
547
1056
|
# Service for managing Generators
|
@@ -563,6 +1072,37 @@ module Google
|
|
563
1072
|
service_module.const_get(:Client).new(&block)
|
564
1073
|
end
|
565
1074
|
|
1075
|
+
##
|
1076
|
+
# Determines whether the Generators service is supported by the current client.
|
1077
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.generators}.
|
1078
|
+
# If false, that method will raise an exception. This could happen if the given
|
1079
|
+
# API version does not exist or does not support the Generators service,
|
1080
|
+
# or if the versioned client gem needs an update to support the Generators service.
|
1081
|
+
#
|
1082
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1083
|
+
# Defaults to `:v3`.
|
1084
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1085
|
+
# @return [boolean] Whether the service is available.
|
1086
|
+
#
|
1087
|
+
def self.generators_available? version: :v3, transport: :grpc
|
1088
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
1089
|
+
package_name = Google::Cloud::Dialogflow::CX
|
1090
|
+
.constants
|
1091
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1092
|
+
.first
|
1093
|
+
return false unless package_name
|
1094
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
1095
|
+
return false unless service_module.const_defined? :Generators
|
1096
|
+
service_module = service_module.const_get :Generators
|
1097
|
+
if transport == :rest
|
1098
|
+
return false unless service_module.const_defined? :Rest
|
1099
|
+
service_module = service_module.const_get :Rest
|
1100
|
+
end
|
1101
|
+
service_module.const_defined? :Client
|
1102
|
+
rescue ::LoadError
|
1103
|
+
false
|
1104
|
+
end
|
1105
|
+
|
566
1106
|
##
|
567
1107
|
# Create a new client object for SecuritySettingsService.
|
568
1108
|
#
|
@@ -576,6 +1116,11 @@ module Google
|
|
576
1116
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
577
1117
|
# the `transport` parameter.
|
578
1118
|
#
|
1119
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1120
|
+
# given API version does not support the given transport of the SecuritySettingsService service.
|
1121
|
+
# You can determine whether the method will succeed by calling
|
1122
|
+
# {Google::Cloud::Dialogflow::CX.security_settings_service_available?}.
|
1123
|
+
#
|
579
1124
|
# ## About SecuritySettingsService
|
580
1125
|
#
|
581
1126
|
# Service for managing security settings for Dialogflow.
|
@@ -597,6 +1142,37 @@ module Google
|
|
597
1142
|
service_module.const_get(:Client).new(&block)
|
598
1143
|
end
|
599
1144
|
|
1145
|
+
##
|
1146
|
+
# Determines whether the SecuritySettingsService service is supported by the current client.
|
1147
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.security_settings_service}.
|
1148
|
+
# If false, that method will raise an exception. This could happen if the given
|
1149
|
+
# API version does not exist or does not support the SecuritySettingsService service,
|
1150
|
+
# or if the versioned client gem needs an update to support the SecuritySettingsService service.
|
1151
|
+
#
|
1152
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1153
|
+
# Defaults to `:v3`.
|
1154
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1155
|
+
# @return [boolean] Whether the service is available.
|
1156
|
+
#
|
1157
|
+
def self.security_settings_service_available? version: :v3, transport: :grpc
|
1158
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
1159
|
+
package_name = Google::Cloud::Dialogflow::CX
|
1160
|
+
.constants
|
1161
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1162
|
+
.first
|
1163
|
+
return false unless package_name
|
1164
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
1165
|
+
return false unless service_module.const_defined? :SecuritySettingsService
|
1166
|
+
service_module = service_module.const_get :SecuritySettingsService
|
1167
|
+
if transport == :rest
|
1168
|
+
return false unless service_module.const_defined? :Rest
|
1169
|
+
service_module = service_module.const_get :Rest
|
1170
|
+
end
|
1171
|
+
service_module.const_defined? :Client
|
1172
|
+
rescue ::LoadError
|
1173
|
+
false
|
1174
|
+
end
|
1175
|
+
|
600
1176
|
##
|
601
1177
|
# Create a new client object for Versions.
|
602
1178
|
#
|
@@ -610,6 +1186,11 @@ module Google
|
|
610
1186
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
611
1187
|
# the `transport` parameter.
|
612
1188
|
#
|
1189
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1190
|
+
# given API version does not support the given transport of the Versions service.
|
1191
|
+
# You can determine whether the method will succeed by calling
|
1192
|
+
# {Google::Cloud::Dialogflow::CX.versions_available?}.
|
1193
|
+
#
|
613
1194
|
# ## About Versions
|
614
1195
|
#
|
615
1196
|
# Service for managing Versions.
|
@@ -631,6 +1212,37 @@ module Google
|
|
631
1212
|
service_module.const_get(:Client).new(&block)
|
632
1213
|
end
|
633
1214
|
|
1215
|
+
##
|
1216
|
+
# Determines whether the Versions service is supported by the current client.
|
1217
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow::CX.versions}.
|
1218
|
+
# If false, that method will raise an exception. This could happen if the given
|
1219
|
+
# API version does not exist or does not support the Versions service,
|
1220
|
+
# or if the versioned client gem needs an update to support the Versions service.
|
1221
|
+
#
|
1222
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1223
|
+
# Defaults to `:v3`.
|
1224
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1225
|
+
# @return [boolean] Whether the service is available.
|
1226
|
+
#
|
1227
|
+
def self.versions_available? version: :v3, transport: :grpc
|
1228
|
+
require "google/cloud/dialogflow/cx/#{version.to_s.downcase}"
|
1229
|
+
package_name = Google::Cloud::Dialogflow::CX
|
1230
|
+
.constants
|
1231
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1232
|
+
.first
|
1233
|
+
return false unless package_name
|
1234
|
+
service_module = Google::Cloud::Dialogflow::CX.const_get package_name
|
1235
|
+
return false unless service_module.const_defined? :Versions
|
1236
|
+
service_module = service_module.const_get :Versions
|
1237
|
+
if transport == :rest
|
1238
|
+
return false unless service_module.const_defined? :Rest
|
1239
|
+
service_module = service_module.const_get :Rest
|
1240
|
+
end
|
1241
|
+
service_module.const_defined? :Client
|
1242
|
+
rescue ::LoadError
|
1243
|
+
false
|
1244
|
+
end
|
1245
|
+
|
634
1246
|
##
|
635
1247
|
# Configure the google-cloud-dialogflow-cx library.
|
636
1248
|
#
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-dialogflow-cx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-cloud-core
|
@@ -66,7 +65,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
66
65
|
licenses:
|
67
66
|
- Apache-2.0
|
68
67
|
metadata: {}
|
69
|
-
post_install_message:
|
70
68
|
rdoc_options: []
|
71
69
|
require_paths:
|
72
70
|
- lib
|
@@ -74,15 +72,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
72
|
requirements:
|
75
73
|
- - ">="
|
76
74
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
75
|
+
version: '3.0'
|
78
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
77
|
requirements:
|
80
78
|
- - ">="
|
81
79
|
- !ruby/object:Gem::Version
|
82
80
|
version: '0'
|
83
81
|
requirements: []
|
84
|
-
rubygems_version: 3.
|
85
|
-
signing_key:
|
82
|
+
rubygems_version: 3.6.8
|
86
83
|
specification_version: 4
|
87
84
|
summary: API Client library for the Dialogflow CX API
|
88
85
|
test_files: []
|