Module: Google::Cloud::Dialogflow
- Defined in:
- lib/google/cloud/dialogflow.rb,
lib/google/cloud/dialogflow/version.rb
Constant Summary collapse
- VERSION =
"1.9.1".freeze
Class Method Summary collapse
-
.agents(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Agents.
-
.answer_records(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for AnswerRecords.
-
.configure {|::Google::Cloud.configure.dialogflow| ... } ⇒ ::Google::Cloud::Config
Configure the google-cloud-dialogflow library.
-
.contexts(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Contexts.
-
.conversation_datasets(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ConversationDatasets.
-
.conversation_models(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ConversationModels.
-
.conversation_profiles(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ConversationProfiles.
-
.conversations(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Conversations.
-
.documents(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Documents.
-
.encryption_spec_service(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for EncryptionSpecService.
-
.entity_types(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for EntityTypes.
-
.environments(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Environments.
-
.fulfillments(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Fulfillments.
-
.generators(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Generators.
-
.intents(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Intents.
-
.knowledge_bases(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for KnowledgeBases.
-
.participants(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Participants.
-
.session_entity_types(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SessionEntityTypes.
-
.sessions(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Sessions.
-
.versions(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Versions.
Class Method Details
.agents(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Agents.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Agents::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Agents service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Agents
Service for managing Agents.
70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/google/cloud/dialogflow.rb', line 70 def self.agents version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Agents) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.answer_records(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for AnswerRecords.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::AnswerRecords::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the AnswerRecords service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About AnswerRecords
Service for managing AnswerRecords.
313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/google/cloud/dialogflow.rb', line 313 def self.answer_records version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:AnswerRecords) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.configure {|::Google::Cloud.configure.dialogflow| ... } ⇒ ::Google::Cloud::Config
Configure the google-cloud-dialogflow library.
The following configuration parameters are supported:
credentials
(type:String, Hash, Google::Auth::Credentials
) - The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object.lib_name
(type:String
) - The library name as recorded in instrumentation and logging.lib_version
(type:String
) - The library version as recorded in instrumentation and logging.interceptors
(type:Array<GRPC::ClientInterceptor>
) - An array of interceptors that are run before calls are executed.timeout
(type:Numeric
) - Default timeout in seconds.metadata
(type:Hash{Symbol=>String}
) - Additional headers to be sent with the call.retry_policy
(type:Hash
) - The retry policy. The value is a hash with the following keys::initial_delay
(type:Numeric
) - The initial delay in seconds.:max_delay
(type:Numeric
) - The max delay in seconds.:multiplier
(type:Numeric
) - The incremental backoff multiplier.:retry_codes
(type:Array<String>
) - The error codes that should trigger a retry.
738 739 740 741 742 |
# File 'lib/google/cloud/dialogflow.rb', line 738 def self.configure yield ::Google::Cloud.configure.dialogflow if block_given? ::Google::Cloud.configure.dialogflow end |
.contexts(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Contexts.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Contexts::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Contexts service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Contexts
Service for managing Contexts.
104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/google/cloud/dialogflow.rb', line 104 def self.contexts version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Contexts) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.conversation_datasets(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ConversationDatasets.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::ConversationDatasets::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the ConversationDatasets service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About ConversationDatasets
Conversation datasets.
Conversation datasets contain raw conversation files and their customizable metadata that can be used for model training.
458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/google/cloud/dialogflow.rb', line 458 def self.conversation_datasets version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:ConversationDatasets) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.conversation_models(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ConversationModels.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::ConversationModels::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the ConversationModels service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About ConversationModels
Manages a collection of models for human agent assistant.
492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/google/cloud/dialogflow.rb', line 492 def self.conversation_models version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:ConversationModels) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.conversation_profiles(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ConversationProfiles.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::ConversationProfiles::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the ConversationProfiles service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About ConversationProfiles
Service for managing ConversationProfiles.
348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/google/cloud/dialogflow.rb', line 348 def self.conversation_profiles version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:ConversationProfiles) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.conversations(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Conversations.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Conversations::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Conversations service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Conversations
Service for managing Conversations.
421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/google/cloud/dialogflow.rb', line 421 def self.conversations version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Conversations) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.documents(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Documents.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Documents::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Documents service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Documents
Service for managing knowledge Documents.
527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/google/cloud/dialogflow.rb', line 527 def self.documents version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Documents) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.encryption_spec_service(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for EncryptionSpecService.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::EncryptionSpecService::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the EncryptionSpecService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About EncryptionSpecService
Manages encryption spec settings for Dialogflow and Agent Assist.
561 562 563 564 565 566 567 568 569 570 571 |
# File 'lib/google/cloud/dialogflow.rb', line 561 def self.encryption_spec_service version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:EncryptionSpecService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.entity_types(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for EntityTypes.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::EntityTypes::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the EntityTypes service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About EntityTypes
Service for managing EntityTypes.
172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/google/cloud/dialogflow.rb', line 172 def self.entity_types version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:EntityTypes) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.environments(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Environments.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Environments::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Environments service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Environments
Service for managing Environments.
629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/google/cloud/dialogflow.rb', line 629 def self.environments version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Environments) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.fulfillments(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Fulfillments.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Fulfillments::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Fulfillments service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Fulfillments
Service for managing Fulfillments.
595 596 597 598 599 600 601 602 603 604 605 |
# File 'lib/google/cloud/dialogflow.rb', line 595 def self.fulfillments version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Fulfillments) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.generators(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Generators.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Generators::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Generators service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Generators
Generator Service for LLM powered Agent Assist. This service manages the configurations of user owned Generators, such as description, context and instruction, input/output format, etc. The generator resources will be used inside a conversation and will be triggered by TriggerEvent to query LLM for answers.
386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/google/cloud/dialogflow.rb', line 386 def self.generators version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Generators) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.intents(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Intents.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Intents::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Intents service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Intents
Service for managing Intents.
138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/google/cloud/dialogflow.rb', line 138 def self.intents version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Intents) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.knowledge_bases(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for KnowledgeBases.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::KnowledgeBases::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the KnowledgeBases service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About KnowledgeBases
Service for managing KnowledgeBases.
664 665 666 667 668 669 670 671 672 673 674 |
# File 'lib/google/cloud/dialogflow.rb', line 664 def self.knowledge_bases version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:KnowledgeBases) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.participants(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Participants.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Participants::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Participants service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Participants
Service for managing Participants.
278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/google/cloud/dialogflow.rb', line 278 def self.participants version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Participants) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.session_entity_types(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SessionEntityTypes.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the SessionEntityTypes service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About SessionEntityTypes
Service for managing SessionEntityTypes.
207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/google/cloud/dialogflow.rb', line 207 def self.session_entity_types version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:SessionEntityTypes) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.sessions(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Sessions.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Sessions::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Sessions service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Sessions
A service used for session interactions.
For more information, see the API interactions guide.
244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/google/cloud/dialogflow.rb', line 244 def self.sessions version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Sessions) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.versions(version: :v2, transport: :grpc, &block) ⇒ ::Object
Create a new client object for Versions.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Versions::Client
for a gRPC client for version V2 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the Versions service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest
or :grpc
in
the transport
parameter.
About Versions
Service for managing Versions.
698 699 700 701 702 703 704 705 706 707 708 |
# File 'lib/google/cloud/dialogflow.rb', line 698 def self.versions version: :v2, transport: :grpc, &block require "google/cloud/dialogflow/#{version.to_s.downcase}" package_name = Google::Cloud::Dialogflow .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:Versions) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |