Module: Google::Cloud::DiscoveryEngine
- Defined in:
- lib/google/cloud/discovery_engine.rb,
lib/google/cloud/discovery_engine/version.rb
Constant Summary collapse
- VERSION =
"2.2.0"
Class Method Summary collapse
-
.cmek_config_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for CmekConfigService.
-
.cmek_config_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the CmekConfigService service is supported by the current client.
-
.completion_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for CompletionService.
-
.completion_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the CompletionService service is supported by the current client.
-
.configure {|::Google::Cloud.configure.discovery_engine| ... } ⇒ ::Google::Cloud::Config
Configure the google-cloud-discovery_engine library.
-
.control_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ControlService.
-
.control_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the ControlService service is supported by the current client.
-
.conversational_search_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ConversationalSearchService.
-
.conversational_search_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the ConversationalSearchService service is supported by the current client.
-
.data_store_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for DataStoreService.
-
.data_store_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the DataStoreService service is supported by the current client.
-
.document_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for DocumentService.
-
.document_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the DocumentService service is supported by the current client.
-
.engine_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for EngineService.
-
.engine_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the EngineService service is supported by the current client.
-
.grounded_generation_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for GroundedGenerationService.
-
.grounded_generation_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the GroundedGenerationService service is supported by the current client.
-
.identity_mapping_store_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for IdentityMappingStoreService.
-
.identity_mapping_store_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the IdentityMappingStoreService service is supported by the current client.
-
.project_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ProjectService.
-
.project_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the ProjectService service is supported by the current client.
-
.rank_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for RankService.
-
.rank_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the RankService service is supported by the current client.
-
.recommendation_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for RecommendationService.
-
.recommendation_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the RecommendationService service is supported by the current client.
-
.schema_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SchemaService.
-
.schema_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the SchemaService service is supported by the current client.
-
.search_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SearchService.
-
.search_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the SearchService service is supported by the current client.
-
.search_tuning_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SearchTuningService.
-
.search_tuning_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the SearchTuningService service is supported by the current client.
-
.serving_config_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ServingConfigService.
-
.serving_config_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the ServingConfigService service is supported by the current client.
-
.site_search_engine_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SiteSearchEngineService.
-
.site_search_engine_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the SiteSearchEngineService service is supported by the current client.
-
.user_event_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for UserEventService.
-
.user_event_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the UserEventService service is supported by the current client.
-
.user_license_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for UserLicenseService.
-
.user_license_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the UserLicenseService service is supported by the current client.
Class Method Details
.cmek_config_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for CmekConfigService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the CmekConfigService 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 CmekConfigService service. You can determine whether the method will succeed by calling cmek_config_service_available?.
About CmekConfigService
Service for managing CMEK related tasks
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/google/cloud/discovery_engine.rb', line 75 def self.cmek_config_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:CmekConfigService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.cmek_config_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the CmekConfigService service is supported by the current client. If true, you can retrieve a client object by calling cmek_config_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 CmekConfigService service, or if the versioned client gem needs an update to support the CmekConfigService service.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/google/cloud/discovery_engine.rb', line 99 def self.cmek_config_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :CmekConfigService service_module = service_module.const_get :CmekConfigService 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 |
.completion_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for CompletionService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::CompletionService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the CompletionService 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 CompletionService service. You can determine whether the method will succeed by calling completion_service_available?.
About CompletionService
Service for Auto-Completion.
145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/google/cloud/discovery_engine.rb', line 145 def self.completion_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:CompletionService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.completion_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the CompletionService service is supported by the current client. If true, you can retrieve a client object by calling completion_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 CompletionService service, or if the versioned client gem needs an update to support the CompletionService service.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/google/cloud/discovery_engine.rb', line 169 def self.completion_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :CompletionService service_module = service_module.const_get :CompletionService 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.discovery_engine| ... } ⇒ ::Google::Cloud::Config
Configure the google-cloud-discovery_engine library.
The following configuration parameters are supported:
credentials(type:String, Hash, Google::Auth::Credentials) - The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object.lib_name(type:String) - The library name as recorded in instrumentation and logging.lib_version(type:String) - The library version as recorded in instrumentation and logging.interceptors(type:Array<GRPC::ClientInterceptor>) - An array of interceptors that are run before calls are executed.timeout(type:Numeric) - Default timeout in seconds.metadata(type:Hash{Symbol=>String}) - Additional headers to be sent with the call.retry_policy(type:Hash) - The retry policy. The value is a hash with the following keys::initial_delay(type:Numeric) - The initial delay in seconds.:max_delay(type:Numeric) - The max delay in seconds.:multiplier(type:Numeric) - The incremental backoff multiplier.:retry_codes(type:Array<String>) - The error codes that should trigger a retry.
1414 1415 1416 1417 1418 |
# File 'lib/google/cloud/discovery_engine.rb', line 1414 def self.configure yield ::Google::Cloud.configure.discovery_engine if block_given? ::Google::Cloud.configure.discovery_engine end |
.control_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ControlService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::ControlService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the ControlService 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 ControlService service. You can determine whether the method will succeed by calling control_service_available?.
About ControlService
Service for performing CRUD operations on Controls. Controls allow for custom logic to be implemented in the serving path. Controls need to be attached to a Serving Config to be considered during a request.
218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/google/cloud/discovery_engine.rb', line 218 def self.control_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:ControlService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.control_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the ControlService service is supported by the current client. If true, you can retrieve a client object by calling control_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 ControlService service, or if the versioned client gem needs an update to support the ControlService service.
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/google/cloud/discovery_engine.rb', line 242 def self.control_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :ControlService service_module = service_module.const_get :ControlService 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 |
.conversational_search_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ConversationalSearchService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the ConversationalSearchService 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 ConversationalSearchService service. You can determine whether the method will succeed by calling conversational_search_service_available?.
About ConversationalSearchService
Service for conversational search.
358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/google/cloud/discovery_engine.rb', line 358 def self.conversational_search_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:ConversationalSearchService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.conversational_search_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the ConversationalSearchService service is supported by the current client. If true, you can retrieve a client object by calling conversational_search_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 ConversationalSearchService service, or if the versioned client gem needs an update to support the ConversationalSearchService service.
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/google/cloud/discovery_engine.rb', line 382 def self.conversational_search_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :ConversationalSearchService service_module = service_module.const_get :ConversationalSearchService 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 |
.data_store_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for DataStoreService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::DataStoreService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the DataStoreService 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 DataStoreService service. You can determine whether the method will succeed by calling data_store_service_available?.
About DataStoreService
Service for managing DataStore configuration.
429 430 431 432 433 434 435 436 437 438 439 |
# File 'lib/google/cloud/discovery_engine.rb', line 429 def self.data_store_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:DataStoreService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.data_store_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the DataStoreService service is supported by the current client. If true, you can retrieve a client object by calling data_store_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 DataStoreService service, or if the versioned client gem needs an update to support the DataStoreService service.
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/google/cloud/discovery_engine.rb', line 453 def self.data_store_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :DataStoreService service_module = service_module.const_get :DataStoreService 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 |
.document_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for DocumentService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::DocumentService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the DocumentService 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 DocumentService service. You can determine whether the method will succeed by calling document_service_available?.
About DocumentService
Service for ingesting Document information of the customer's website.
500 501 502 503 504 505 506 507 508 509 510 |
# File 'lib/google/cloud/discovery_engine.rb', line 500 def self.document_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:DocumentService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.document_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the DocumentService service is supported by the current client. If true, you can retrieve a client object by calling document_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 DocumentService service, or if the versioned client gem needs an update to support the DocumentService service.
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 |
# File 'lib/google/cloud/discovery_engine.rb', line 524 def self.document_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :DocumentService service_module = service_module.const_get :DocumentService 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 |
.engine_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for EngineService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::EngineService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the EngineService 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 EngineService service. You can determine whether the method will succeed by calling engine_service_available?.
About EngineService
Service for managing Engine configuration.
571 572 573 574 575 576 577 578 579 580 581 |
# File 'lib/google/cloud/discovery_engine.rb', line 571 def self.engine_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:EngineService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.engine_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the EngineService service is supported by the current client. If true, you can retrieve a client object by calling engine_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 EngineService service, or if the versioned client gem needs an update to support the EngineService service.
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 |
# File 'lib/google/cloud/discovery_engine.rb', line 595 def self.engine_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :EngineService service_module = service_module.const_get :EngineService 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 |
.grounded_generation_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for GroundedGenerationService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::GroundedGenerationService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the GroundedGenerationService 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 GroundedGenerationService service. You can determine whether the method will succeed by calling grounded_generation_service_available?.
About GroundedGenerationService
Service for grounded generation.
641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/google/cloud/discovery_engine.rb', line 641 def self.grounded_generation_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:GroundedGenerationService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.grounded_generation_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the GroundedGenerationService service is supported by the current client. If true, you can retrieve a client object by calling grounded_generation_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 GroundedGenerationService service, or if the versioned client gem needs an update to support the GroundedGenerationService service.
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 |
# File 'lib/google/cloud/discovery_engine.rb', line 665 def self.grounded_generation_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :GroundedGenerationService service_module = service_module.const_get :GroundedGenerationService 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 |
.identity_mapping_store_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for IdentityMappingStoreService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the IdentityMappingStoreService 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 IdentityMappingStoreService service. You can determine whether the method will succeed by calling identity_mapping_store_service_available?.
About IdentityMappingStoreService
Service for managing Identity Mapping Stores.
711 712 713 714 715 716 717 718 719 720 721 |
# File 'lib/google/cloud/discovery_engine.rb', line 711 def self.identity_mapping_store_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:IdentityMappingStoreService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.identity_mapping_store_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the IdentityMappingStoreService service is supported by the current client. If true, you can retrieve a client object by calling identity_mapping_store_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 IdentityMappingStoreService service, or if the versioned client gem needs an update to support the IdentityMappingStoreService service.
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 |
# File 'lib/google/cloud/discovery_engine.rb', line 735 def self.identity_mapping_store_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :IdentityMappingStoreService service_module = service_module.const_get :IdentityMappingStoreService 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 |
.project_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ProjectService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::ProjectService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the ProjectService 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 ProjectService service. You can determine whether the method will succeed by calling project_service_available?.
About ProjectService
Service for operations on the Project.
782 783 784 785 786 787 788 789 790 791 792 |
# File 'lib/google/cloud/discovery_engine.rb', line 782 def self.project_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:ProjectService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.project_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the ProjectService service is supported by the current client. If true, you can retrieve a client object by calling project_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 ProjectService service, or if the versioned client gem needs an update to support the ProjectService service.
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 |
# File 'lib/google/cloud/discovery_engine.rb', line 806 def self.project_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :ProjectService service_module = service_module.const_get :ProjectService 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 |
.rank_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for RankService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::RankService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the RankService 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 RankService service. You can determine whether the method will succeed by calling rank_service_available?.
About RankService
Service for ranking text records.
852 853 854 855 856 857 858 859 860 861 862 |
# File 'lib/google/cloud/discovery_engine.rb', line 852 def self.rank_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:RankService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.rank_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the RankService service is supported by the current client. If true, you can retrieve a client object by calling rank_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 RankService service, or if the versioned client gem needs an update to support the RankService service.
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
# File 'lib/google/cloud/discovery_engine.rb', line 876 def self.rank_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :RankService service_module = service_module.const_get :RankService 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 |
.recommendation_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for RecommendationService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::RecommendationService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the RecommendationService 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 RecommendationService service. You can determine whether the method will succeed by calling recommendation_service_available?.
About RecommendationService
Service for making recommendations.
922 923 924 925 926 927 928 929 930 931 932 |
# File 'lib/google/cloud/discovery_engine.rb', line 922 def self.recommendation_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:RecommendationService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.recommendation_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the RecommendationService service is supported by the current client. If true, you can retrieve a client object by calling recommendation_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 RecommendationService service, or if the versioned client gem needs an update to support the RecommendationService service.
946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 |
# File 'lib/google/cloud/discovery_engine.rb', line 946 def self.recommendation_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :RecommendationService service_module = service_module.const_get :RecommendationService 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 |
.schema_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SchemaService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::SchemaService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the SchemaService 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 SchemaService service. You can determine whether the method will succeed by calling schema_service_available?.
About SchemaService
Service for managing Schemas.
992 993 994 995 996 997 998 999 1000 1001 1002 |
# File 'lib/google/cloud/discovery_engine.rb', line 992 def self.schema_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:SchemaService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.schema_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the SchemaService service is supported by the current client. If true, you can retrieve a client object by calling schema_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 SchemaService service, or if the versioned client gem needs an update to support the SchemaService service.
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 |
# File 'lib/google/cloud/discovery_engine.rb', line 1016 def self.schema_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :SchemaService service_module = service_module.const_get :SchemaService 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 |
.search_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SearchService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::SearchService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the SearchService 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 SearchService service. You can determine whether the method will succeed by calling search_service_available?.
About SearchService
Service for search.
288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/google/cloud/discovery_engine.rb', line 288 def self.search_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:SearchService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.search_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the SearchService service is supported by the current client. If true, you can retrieve a client object by calling search_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 SearchService service, or if the versioned client gem needs an update to support the SearchService service.
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/google/cloud/discovery_engine.rb', line 312 def self.search_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :SearchService service_module = service_module.const_get :SearchService 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 |
.search_tuning_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SearchTuningService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::SearchTuningService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the SearchTuningService 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 SearchTuningService service. You can determine whether the method will succeed by calling search_tuning_service_available?.
About SearchTuningService
Service for search tuning.
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 |
# File 'lib/google/cloud/discovery_engine.rb', line 1062 def self.search_tuning_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:SearchTuningService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.search_tuning_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the SearchTuningService service is supported by the current client. If true, you can retrieve a client object by calling search_tuning_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 SearchTuningService service, or if the versioned client gem needs an update to support the SearchTuningService service.
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
# File 'lib/google/cloud/discovery_engine.rb', line 1086 def self.search_tuning_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :SearchTuningService service_module = service_module.const_get :SearchTuningService 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 |
.serving_config_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for ServingConfigService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::ServingConfigService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the ServingConfigService 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 ServingConfigService service. You can determine whether the method will succeed by calling serving_config_service_available?.
About ServingConfigService
Service for operations related to ServingConfig.
1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 |
# File 'lib/google/cloud/discovery_engine.rb', line 1133 def self.serving_config_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:ServingConfigService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.serving_config_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the ServingConfigService service is supported by the current client. If true, you can retrieve a client object by calling serving_config_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 ServingConfigService service, or if the versioned client gem needs an update to support the ServingConfigService service.
1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 |
# File 'lib/google/cloud/discovery_engine.rb', line 1157 def self.serving_config_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :ServingConfigService service_module = service_module.const_get :ServingConfigService 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 |
.site_search_engine_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for SiteSearchEngineService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the SiteSearchEngineService 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 SiteSearchEngineService service. You can determine whether the method will succeed by calling site_search_engine_service_available?.
About SiteSearchEngineService
Service for managing site search related resources.
1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 |
# File 'lib/google/cloud/discovery_engine.rb', line 1203 def self.site_search_engine_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:SiteSearchEngineService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.site_search_engine_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the SiteSearchEngineService service is supported by the current client. If true, you can retrieve a client object by calling site_search_engine_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 SiteSearchEngineService service, or if the versioned client gem needs an update to support the SiteSearchEngineService service.
1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 |
# File 'lib/google/cloud/discovery_engine.rb', line 1227 def self.site_search_engine_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :SiteSearchEngineService service_module = service_module.const_get :SiteSearchEngineService 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 |
.user_event_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for UserEventService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::UserEventService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the UserEventService 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 UserEventService service. You can determine whether the method will succeed by calling user_event_service_available?.
About UserEventService
Service for ingesting end user actions on a website to Discovery Engine API.
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 |
# File 'lib/google/cloud/discovery_engine.rb', line 1273 def self.user_event_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:UserEventService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.user_event_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the UserEventService service is supported by the current client. If true, you can retrieve a client object by calling user_event_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 UserEventService service, or if the versioned client gem needs an update to support the UserEventService service.
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 |
# File 'lib/google/cloud/discovery_engine.rb', line 1297 def self.user_event_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :UserEventService service_module = service_module.const_get :UserEventService 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 |
.user_license_service(version: :v1, transport: :grpc, &block) ⇒ ::Object
Create a new client object for UserLicenseService.
By default, this returns an instance of
Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the UserLicenseService 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 UserLicenseService service. You can determine whether the method will succeed by calling user_license_service_available?.
About UserLicenseService
Service for managing User Licenses.
1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 |
# File 'lib/google/cloud/discovery_engine.rb', line 1343 def self.user_license_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:UserLicenseService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end |
.user_license_service_available?(version: :v1, transport: :grpc) ⇒ boolean
Determines whether the UserLicenseService service is supported by the current client. If true, you can retrieve a client object by calling user_license_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 UserLicenseService service, or if the versioned client gem needs an update to support the UserLicenseService service.
1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 |
# File 'lib/google/cloud/discovery_engine.rb', line 1367 def self.user_license_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name return false unless service_module.const_defined? :UserLicenseService service_module = service_module.const_get :UserLicenseService 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 |