Module: Google::Cloud::Dialogflow
- Defined in:
- lib/google/cloud/dialogflow.rb,
lib/google/cloud/dialogflow/version.rb
Constant Summary collapse
- VERSION =
"1.3.4".freeze
Class Method Summary collapse
-
.agents(version: :v2, &block) ⇒ Agents::Client
Create a new client object for Agents.
-
.answer_records(version: :v2, &block) ⇒ AnswerRecords::Client
Create a new client object for AnswerRecords.
-
.configure {|::Google::Cloud.configure.dialogflow| ... } ⇒ ::Google::Cloud::Config
Configure the google-cloud-dialogflow library.
-
.contexts(version: :v2, &block) ⇒ Contexts::Client
Create a new client object for Contexts.
-
.conversation_profiles(version: :v2, &block) ⇒ ConversationProfiles::Client
Create a new client object for ConversationProfiles.
-
.conversations(version: :v2, &block) ⇒ Conversations::Client
Create a new client object for Conversations.
-
.documents(version: :v2, &block) ⇒ Documents::Client
Create a new client object for Documents.
-
.entity_types(version: :v2, &block) ⇒ EntityTypes::Client
Create a new client object for EntityTypes.
-
.environments(version: :v2, &block) ⇒ Environments::Client
Create a new client object for Environments.
-
.fulfillments(version: :v2, &block) ⇒ Fulfillments::Client
Create a new client object for Fulfillments.
-
.intents(version: :v2, &block) ⇒ Intents::Client
Create a new client object for Intents.
-
.knowledge_bases(version: :v2, &block) ⇒ KnowledgeBases::Client
Create a new client object for KnowledgeBases.
-
.participants(version: :v2, &block) ⇒ Participants::Client
Create a new client object for Participants.
-
.session_entity_types(version: :v2, &block) ⇒ SessionEntityTypes::Client
Create a new client object for SessionEntityTypes.
-
.sessions(version: :v2, &block) ⇒ Sessions::Client
Create a new client object for Sessions.
-
.versions(version: :v2, &block) ⇒ Versions::Client
Create a new client object for Versions.
Class Method Details
.agents(version: :v2, &block) ⇒ Agents::Client
Create a new client object for Agents.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Agents::Client
for version V2 of the API.
However, you can specify 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.
About Agents
Service for managing Agents.
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/google/cloud/dialogflow.rb', line 66 def self.agents version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Agents).const_get(:Client).new(&block) end |
.answer_records(version: :v2, &block) ⇒ AnswerRecords::Client
Create a new client object for AnswerRecords.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::AnswerRecords::Client
for version V2 of the API.
However, you can specify 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.
About AnswerRecords
Service for managing AnswerRecords.
279 280 281 282 283 284 285 286 287 288 |
# File 'lib/google/cloud/dialogflow.rb', line 279 def self.answer_records version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:AnswerRecords).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 gRPC 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.
528 529 530 531 532 |
# File 'lib/google/cloud/dialogflow.rb', line 528 def self.configure yield ::Google::Cloud.configure.dialogflow if block_given? ::Google::Cloud.configure.dialogflow end |
.contexts(version: :v2, &block) ⇒ Contexts::Client
Create a new client object for Contexts.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Contexts::Client
for version V2 of the API.
However, you can specify 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.
About Contexts
Service for managing Contexts.
96 97 98 99 100 101 102 103 104 105 |
# File 'lib/google/cloud/dialogflow.rb', line 96 def self.contexts version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Contexts).const_get(:Client).new(&block) end |
.conversation_profiles(version: :v2, &block) ⇒ ConversationProfiles::Client
Create a new client object for ConversationProfiles.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::ConversationProfiles::Client
for version V2 of the API.
However, you can specify 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.
About ConversationProfiles
Service for managing ConversationProfiles.
339 340 341 342 343 344 345 346 347 348 |
# File 'lib/google/cloud/dialogflow.rb', line 339 def self.conversation_profiles version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:ConversationProfiles).const_get(:Client).new(&block) end |
.conversations(version: :v2, &block) ⇒ Conversations::Client
Create a new client object for Conversations.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Conversations::Client
for version V2 of the API.
However, you can specify 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.
About Conversations
Service for managing Conversations.
309 310 311 312 313 314 315 316 317 318 |
# File 'lib/google/cloud/dialogflow.rb', line 309 def self.conversations version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Conversations).const_get(:Client).new(&block) end |
.documents(version: :v2, &block) ⇒ Documents::Client
Create a new client object for Documents.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Documents::Client
for version V2 of the API.
However, you can specify 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.
About Documents
Service for managing knowledge Documents.
369 370 371 372 373 374 375 376 377 378 |
# File 'lib/google/cloud/dialogflow.rb', line 369 def self.documents version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Documents).const_get(:Client).new(&block) end |
.entity_types(version: :v2, &block) ⇒ EntityTypes::Client
Create a new client object for EntityTypes.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::EntityTypes::Client
for version V2 of the API.
However, you can specify 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.
About EntityTypes
Service for managing EntityTypes.
156 157 158 159 160 161 162 163 164 165 |
# File 'lib/google/cloud/dialogflow.rb', line 156 def self.entity_types version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:EntityTypes).const_get(:Client).new(&block) end |
.environments(version: :v2, &block) ⇒ Environments::Client
Create a new client object for Environments.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Environments::Client
for version V2 of the API.
However, you can specify 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.
About Environments
Service for managing Environments.
429 430 431 432 433 434 435 436 437 438 |
# File 'lib/google/cloud/dialogflow.rb', line 429 def self.environments version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Environments).const_get(:Client).new(&block) end |
.fulfillments(version: :v2, &block) ⇒ Fulfillments::Client
Create a new client object for Fulfillments.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Fulfillments::Client
for version V2 of the API.
However, you can specify 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.
About Fulfillments
Service for managing Fulfillments.
399 400 401 402 403 404 405 406 407 408 |
# File 'lib/google/cloud/dialogflow.rb', line 399 def self.fulfillments version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Fulfillments).const_get(:Client).new(&block) end |
.intents(version: :v2, &block) ⇒ Intents::Client
Create a new client object for Intents.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Intents::Client
for version V2 of the API.
However, you can specify 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.
About Intents
Service for managing Intents.
126 127 128 129 130 131 132 133 134 135 |
# File 'lib/google/cloud/dialogflow.rb', line 126 def self.intents version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Intents).const_get(:Client).new(&block) end |
.knowledge_bases(version: :v2, &block) ⇒ KnowledgeBases::Client
Create a new client object for KnowledgeBases.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::KnowledgeBases::Client
for version V2 of the API.
However, you can specify 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.
About KnowledgeBases
Service for managing KnowledgeBases.
459 460 461 462 463 464 465 466 467 468 |
# File 'lib/google/cloud/dialogflow.rb', line 459 def self.knowledge_bases version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:KnowledgeBases).const_get(:Client).new(&block) end |
.participants(version: :v2, &block) ⇒ Participants::Client
Create a new client object for Participants.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Participants::Client
for version V2 of the API.
However, you can specify 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.
About Participants
Service for managing Participants.
249 250 251 252 253 254 255 256 257 258 |
# File 'lib/google/cloud/dialogflow.rb', line 249 def self.participants version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Participants).const_get(:Client).new(&block) end |
.session_entity_types(version: :v2, &block) ⇒ SessionEntityTypes::Client
Create a new client object for SessionEntityTypes.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client
for version V2 of the API.
However, you can specify 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.
About SessionEntityTypes
Service for managing SessionEntityTypes.
186 187 188 189 190 191 192 193 194 195 |
# File 'lib/google/cloud/dialogflow.rb', line 186 def self.session_entity_types version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:SessionEntityTypes).const_get(:Client).new(&block) end |
.sessions(version: :v2, &block) ⇒ Sessions::Client
Create a new client object for Sessions.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Sessions::Client
for version V2 of the API.
However, you can specify 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.
About Sessions
A service used for session interactions.
For more information, see the API interactions guide.
219 220 221 222 223 224 225 226 227 228 |
# File 'lib/google/cloud/dialogflow.rb', line 219 def self.sessions version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Sessions).const_get(:Client).new(&block) end |
.versions(version: :v2, &block) ⇒ Versions::Client
Create a new client object for Versions.
By default, this returns an instance of
Google::Cloud::Dialogflow::V2::Versions::Client
for version V2 of the API.
However, you can specify 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.
About Versions
Service for managing Versions.
489 490 491 492 493 494 495 496 497 498 |
# File 'lib/google/cloud/dialogflow.rb', line 489 def self.versions version: :v2, &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 package_module = Google::Cloud::Dialogflow.const_get package_name package_module.const_get(:Versions).const_get(:Client).new(&block) end |