Module: Google::Cloud::Dialogflow

Defined in:
lib/google/cloud/dialogflow.rb,
lib/google/cloud/dialogflow/version.rb

Constant Summary collapse

VERSION =
"1.15.0".freeze

Class Method Summary collapse

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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Agents service. You can determine whether the method will succeed by calling agents_available?.

About Agents

Service for managing Agents.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



75
76
77
78
79
80
81
82
83
84
85
# File 'lib/google/cloud/dialogflow.rb', line 75

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

.agents_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Agents service is supported by the current client. If true, you can retrieve a client object by calling agents. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Agents service, or if the versioned client gem needs an update to support the Agents service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/google/cloud/dialogflow.rb', line 99

def self.agents_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Agents
  service_module = service_module.const_get :Agents
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the AnswerRecords service. You can determine whether the method will succeed by calling answer_records_available?.

About AnswerRecords

Service for managing AnswerRecords.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



716
717
718
719
720
721
722
723
724
725
726
# File 'lib/google/cloud/dialogflow.rb', line 716

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

.answer_records_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the AnswerRecords service is supported by the current client. If true, you can retrieve a client object by calling answer_records. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the AnswerRecords service, or if the versioned client gem needs an update to support the AnswerRecords service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
# File 'lib/google/cloud/dialogflow.rb', line 740

def self.answer_records_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :AnswerRecords
  service_module = service_module.const_get :AnswerRecords
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.
    • :jitter (type: Numeric) - The jitter in seconds. Default: 1.0.
    • :retry_codes (type: Array<String>) - The error codes that should trigger a retry.

Yields:

Returns:

  • (::Google::Cloud::Config)

    The default configuration used by this library



1635
1636
1637
1638
1639
# File 'lib/google/cloud/dialogflow.rb', line 1635

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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Contexts service. You can determine whether the method will succeed by calling contexts_available?.

About Contexts

Service for managing Contexts.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



291
292
293
294
295
296
297
298
299
300
301
# File 'lib/google/cloud/dialogflow.rb', line 291

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

.contexts_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Contexts service is supported by the current client. If true, you can retrieve a client object by calling contexts. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Contexts service, or if the versioned client gem needs an update to support the Contexts service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# File 'lib/google/cloud/dialogflow.rb', line 315

def self.contexts_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Contexts
  service_module = service_module.const_get :Contexts
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the ConversationDatasets service. You can determine whether the method will succeed by calling conversation_datasets_available?.

About ConversationDatasets

Conversation datasets.

Conversation datasets contain raw conversation files and their customizable metadata that can be used for model training.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



931
932
933
934
935
936
937
938
939
940
941
# File 'lib/google/cloud/dialogflow.rb', line 931

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_datasets_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the ConversationDatasets service is supported by the current client. If true, you can retrieve a client object by calling conversation_datasets. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the ConversationDatasets service, or if the versioned client gem needs an update to support the ConversationDatasets service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
# File 'lib/google/cloud/dialogflow.rb', line 955

def self.conversation_datasets_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :ConversationDatasets
  service_module = service_module.const_get :ConversationDatasets
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the ConversationModels service. You can determine whether the method will succeed by calling conversation_models_available?.

About ConversationModels

Manages a collection of models for human agent assistant.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
# File 'lib/google/cloud/dialogflow.rb', line 1001

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_models_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the ConversationModels service is supported by the current client. If true, you can retrieve a client object by calling conversation_models. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the ConversationModels service, or if the versioned client gem needs an update to support the ConversationModels service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
# File 'lib/google/cloud/dialogflow.rb', line 1025

def self.conversation_models_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :ConversationModels
  service_module = service_module.const_get :ConversationModels
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the ConversationProfiles service. You can determine whether the method will succeed by calling conversation_profiles_available?.

About ConversationProfiles

Service for managing ConversationProfiles.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



787
788
789
790
791
792
793
794
795
796
797
# File 'lib/google/cloud/dialogflow.rb', line 787

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

.conversation_profiles_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the ConversationProfiles service is supported by the current client. If true, you can retrieve a client object by calling conversation_profiles. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the ConversationProfiles service, or if the versioned client gem needs an update to support the ConversationProfiles service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
# File 'lib/google/cloud/dialogflow.rb', line 811

def self.conversation_profiles_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :ConversationProfiles
  service_module = service_module.const_get :ConversationProfiles
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Conversations service. You can determine whether the method will succeed by calling conversations_available?.

About Conversations

Service for managing Conversations.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



858
859
860
861
862
863
864
865
866
867
868
# File 'lib/google/cloud/dialogflow.rb', line 858

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

.conversations_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Conversations service is supported by the current client. If true, you can retrieve a client object by calling conversations. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Conversations service, or if the versioned client gem needs an update to support the Conversations service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
# File 'lib/google/cloud/dialogflow.rb', line 882

def self.conversations_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Conversations
  service_module = service_module.const_get :Conversations
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Documents service. You can determine whether the method will succeed by calling documents_available?.

About Documents

Service for managing knowledge Documents.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
# File 'lib/google/cloud/dialogflow.rb', line 1072

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

.documents_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Documents service is supported by the current client. If true, you can retrieve a client object by calling documents. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Documents service, or if the versioned client gem needs an update to support the Documents service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
# File 'lib/google/cloud/dialogflow.rb', line 1096

def self.documents_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Documents
  service_module = service_module.const_get :Documents
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the EncryptionSpecService service. You can determine whether the method will succeed by calling encryption_spec_service_available?.

About EncryptionSpecService

Manages encryption spec settings for Dialogflow and Agent Assist.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
# File 'lib/google/cloud/dialogflow.rb', line 1142

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

.encryption_spec_service_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the EncryptionSpecService service is supported by the current client. If true, you can retrieve a client object by calling encryption_spec_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the EncryptionSpecService service, or if the versioned client gem needs an update to support the EncryptionSpecService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
# File 'lib/google/cloud/dialogflow.rb', line 1166

def self.encryption_spec_service_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :EncryptionSpecService
  service_module = service_module.const_get :EncryptionSpecService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the EntityTypes service. You can determine whether the method will succeed by calling entity_types_available?.

About EntityTypes

Service for managing EntityTypes.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



431
432
433
434
435
436
437
438
439
440
441
# File 'lib/google/cloud/dialogflow.rb', line 431

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

.entity_types_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the EntityTypes service is supported by the current client. If true, you can retrieve a client object by calling entity_types. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the EntityTypes service, or if the versioned client gem needs an update to support the EntityTypes service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
# File 'lib/google/cloud/dialogflow.rb', line 455

def self.entity_types_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :EntityTypes
  service_module = service_module.const_get :EntityTypes
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Environments service. You can determine whether the method will succeed by calling environments_available?.

About Environments

Service for managing Environments.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
# File 'lib/google/cloud/dialogflow.rb', line 1282

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

.environments_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Environments service is supported by the current client. If true, you can retrieve a client object by calling environments. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Environments service, or if the versioned client gem needs an update to support the Environments service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
# File 'lib/google/cloud/dialogflow.rb', line 1306

def self.environments_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Environments
  service_module = service_module.const_get :Environments
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Fulfillments service. You can determine whether the method will succeed by calling fulfillments_available?.

About Fulfillments

Service for managing Fulfillments.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
# File 'lib/google/cloud/dialogflow.rb', line 1212

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

.fulfillments_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Fulfillments service is supported by the current client. If true, you can retrieve a client object by calling fulfillments. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Fulfillments service, or if the versioned client gem needs an update to support the Fulfillments service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File 'lib/google/cloud/dialogflow.rb', line 1236

def self.fulfillments_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Fulfillments
  service_module = service_module.const_get :Fulfillments
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.generator_evaluations(version: :v2, transport: :grpc, &block) ⇒ ::Object

Create a new client object for GeneratorEvaluations.

By default, this returns an instance of Google::Cloud::Dialogflow::V2::GeneratorEvaluations::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 GeneratorEvaluations 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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the GeneratorEvaluations service. You can determine whether the method will succeed by calling generator_evaluations_available?.

About GeneratorEvaluations

Service for managing generator evaluations.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
# File 'lib/google/cloud/dialogflow.rb', line 1352

def self.generator_evaluations 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(:GeneratorEvaluations)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.generator_evaluations_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the GeneratorEvaluations service is supported by the current client. If true, you can retrieve a client object by calling generator_evaluations. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the GeneratorEvaluations service, or if the versioned client gem needs an update to support the GeneratorEvaluations service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
# File 'lib/google/cloud/dialogflow.rb', line 1376

def self.generator_evaluations_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :GeneratorEvaluations
  service_module = service_module.const_get :GeneratorEvaluations
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Generators service. You can determine whether the method will succeed by calling generators_available?.

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.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



221
222
223
224
225
226
227
228
229
230
231
# File 'lib/google/cloud/dialogflow.rb', line 221

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

.generators_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Generators service is supported by the current client. If true, you can retrieve a client object by calling generators. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Generators service, or if the versioned client gem needs an update to support the Generators service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/google/cloud/dialogflow.rb', line 245

def self.generators_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Generators
  service_module = service_module.const_get :Generators
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Intents service. You can determine whether the method will succeed by calling intents_available?.

About Intents

Service for managing Intents.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



361
362
363
364
365
366
367
368
369
370
371
# File 'lib/google/cloud/dialogflow.rb', line 361

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

.intents_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Intents service is supported by the current client. If true, you can retrieve a client object by calling intents. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Intents service, or if the versioned client gem needs an update to support the Intents service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'lib/google/cloud/dialogflow.rb', line 385

def self.intents_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Intents
  service_module = service_module.const_get :Intents
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the KnowledgeBases service. You can determine whether the method will succeed by calling knowledge_bases_available?.

About KnowledgeBases

Service for managing KnowledgeBases.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
# File 'lib/google/cloud/dialogflow.rb', line 1423

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

.knowledge_bases_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the KnowledgeBases service is supported by the current client. If true, you can retrieve a client object by calling knowledge_bases. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the KnowledgeBases service, or if the versioned client gem needs an update to support the KnowledgeBases service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
# File 'lib/google/cloud/dialogflow.rb', line 1447

def self.knowledge_bases_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :KnowledgeBases
  service_module = service_module.const_get :KnowledgeBases
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Participants service. You can determine whether the method will succeed by calling participants_available?.

About Participants

Service for managing Participants.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



645
646
647
648
649
650
651
652
653
654
655
# File 'lib/google/cloud/dialogflow.rb', line 645

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

.participants_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Participants service is supported by the current client. If true, you can retrieve a client object by calling participants. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Participants service, or if the versioned client gem needs an update to support the Participants service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
# File 'lib/google/cloud/dialogflow.rb', line 669

def self.participants_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Participants
  service_module = service_module.const_get :Participants
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the SessionEntityTypes service. You can determine whether the method will succeed by calling session_entity_types_available?.

About SessionEntityTypes

Service for managing SessionEntityTypes.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



502
503
504
505
506
507
508
509
510
511
512
# File 'lib/google/cloud/dialogflow.rb', line 502

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

.session_entity_types_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the SessionEntityTypes service is supported by the current client. If true, you can retrieve a client object by calling session_entity_types. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the SessionEntityTypes service, or if the versioned client gem needs an update to support the SessionEntityTypes service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'lib/google/cloud/dialogflow.rb', line 526

def self.session_entity_types_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :SessionEntityTypes
  service_module = service_module.const_get :SessionEntityTypes
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Sessions service. You can determine whether the method will succeed by calling sessions_available?.

About Sessions

A service used for session interactions.

For more information, see the API interactions guide.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



575
576
577
578
579
580
581
582
583
584
585
# File 'lib/google/cloud/dialogflow.rb', line 575

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

.sessions_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Sessions service is supported by the current client. If true, you can retrieve a client object by calling sessions. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Sessions service, or if the versioned client gem needs an update to support the Sessions service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
# File 'lib/google/cloud/dialogflow.rb', line 599

def self.sessions_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Sessions
  service_module = service_module.const_get :Sessions
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.sip_trunks(version: :v2, transport: :grpc, &block) ⇒ ::Object

Create a new client object for SipTrunks.

By default, this returns an instance of Google::Cloud::Dialogflow::V2::SipTrunks::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 SipTrunks 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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the SipTrunks service. You can determine whether the method will succeed by calling sip_trunks_available?.

About SipTrunks

Service for managing SipTrunks.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
# File 'lib/google/cloud/dialogflow.rb', line 1493

def self.sip_trunks 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(:SipTrunks)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.sip_trunks_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the SipTrunks service is supported by the current client. If true, you can retrieve a client object by calling sip_trunks. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the SipTrunks service, or if the versioned client gem needs an update to support the SipTrunks service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
# File 'lib/google/cloud/dialogflow.rb', line 1517

def self.sip_trunks_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :SipTrunks
  service_module = service_module.const_get :SipTrunks
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.tools(version: :v2, transport: :grpc, &block) ⇒ ::Object

Create a new client object for Tools.

By default, this returns an instance of Google::Cloud::Dialogflow::V2::Tools::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 Tools 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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Tools service. You can determine whether the method will succeed by calling tools_available?.

About Tools

Tool Service for LLM powered Agent Assist. Tools can be used to interact with remote APIs (e.g. fetching orders) to retrieve additional information as input to LLM.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



147
148
149
150
151
152
153
154
155
156
157
# File 'lib/google/cloud/dialogflow.rb', line 147

def self.tools 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(:Tools)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.tools_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Tools service is supported by the current client. If true, you can retrieve a client object by calling tools. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Tools service, or if the versioned client gem needs an update to support the Tools service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/google/cloud/dialogflow.rb', line 171

def self.tools_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Tools
  service_module = service_module.const_get :Tools
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
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.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the Versions service. You can determine whether the method will succeed by calling versions_available?.

About Versions

Service for managing Versions.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
# File 'lib/google/cloud/dialogflow.rb', line 1563

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

.versions_available?(version: :v2, transport: :grpc) ⇒ boolean

Determines whether the Versions service is supported by the current client. If true, you can retrieve a client object by calling versions. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the Versions service, or if the versioned client gem needs an update to support the Versions service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v2)

    The API version to connect to. Optional. Defaults to :v2.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
# File 'lib/google/cloud/dialogflow.rb', line 1587

def self.versions_available? version: :v2, transport: :grpc
  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
  return false unless package_name
  service_module = Google::Cloud::Dialogflow.const_get package_name
  return false unless service_module.const_defined? :Versions
  service_module = service_module.const_get :Versions
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end