google-cloud-discovery_engine 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/version.rb +1 -1
- data/lib/google/cloud/discovery_engine.rb +71 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5214eb97b7b69d876f5e536b58dce9390fa9a26626fa8f8ba252adcda692bead
|
4
|
+
data.tar.gz: a9a2f3bb62aad4a3ac4a70fcc33c490a41300302712a67b9ef9da283a316dcf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5650c85762a407038942d028236f14d01d9793bf38e7b3c894331f5bb127a5817f5873ae637e6388bef8d32f200cb2267b81815855e831a5562ed70f3cbad34e
|
7
|
+
data.tar.gz: f0f716416968c40f03b28c4e100f6df5a4eaabb6ddddc7b89d8cd1ae20f7472d6669f3b03437286492a87e6a01a8e3c72a998db601b64aec0d1489e4c5871e1a
|
@@ -962,6 +962,77 @@ module Google
|
|
962
962
|
false
|
963
963
|
end
|
964
964
|
|
965
|
+
##
|
966
|
+
# Create a new client object for ServingConfigService.
|
967
|
+
#
|
968
|
+
# By default, this returns an instance of
|
969
|
+
# [Google::Cloud::DiscoveryEngine::V1::ServingConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-ServingConfigService-Client)
|
970
|
+
# for a gRPC client for version V1 of the API.
|
971
|
+
# However, you can specify a different API version by passing it in the
|
972
|
+
# `version` parameter. If the ServingConfigService service is
|
973
|
+
# supported by that API version, and the corresponding gem is available, the
|
974
|
+
# appropriate versioned client will be returned.
|
975
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
976
|
+
# the `transport` parameter.
|
977
|
+
#
|
978
|
+
# Raises an exception if the currently installed versioned client gem for the
|
979
|
+
# given API version does not support the given transport of the ServingConfigService service.
|
980
|
+
# You can determine whether the method will succeed by calling
|
981
|
+
# {Google::Cloud::DiscoveryEngine.serving_config_service_available?}.
|
982
|
+
#
|
983
|
+
# ## About ServingConfigService
|
984
|
+
#
|
985
|
+
# Service for operations related to
|
986
|
+
# ServingConfig.
|
987
|
+
#
|
988
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
989
|
+
# Defaults to `:v1`.
|
990
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
991
|
+
# @return [::Object] A client object for the specified version.
|
992
|
+
#
|
993
|
+
def self.serving_config_service version: :v1, transport: :grpc, &block
|
994
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
995
|
+
|
996
|
+
package_name = Google::Cloud::DiscoveryEngine
|
997
|
+
.constants
|
998
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
999
|
+
.first
|
1000
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:ServingConfigService)
|
1001
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
1002
|
+
service_module.const_get(:Client).new(&block)
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
##
|
1006
|
+
# Determines whether the ServingConfigService service is supported by the current client.
|
1007
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.serving_config_service}.
|
1008
|
+
# If false, that method will raise an exception. This could happen if the given
|
1009
|
+
# API version does not exist or does not support the ServingConfigService service,
|
1010
|
+
# or if the versioned client gem needs an update to support the ServingConfigService service.
|
1011
|
+
#
|
1012
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1013
|
+
# Defaults to `:v1`.
|
1014
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1015
|
+
# @return [boolean] Whether the service is available.
|
1016
|
+
#
|
1017
|
+
def self.serving_config_service_available? version: :v1, transport: :grpc
|
1018
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
1019
|
+
package_name = Google::Cloud::DiscoveryEngine
|
1020
|
+
.constants
|
1021
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1022
|
+
.first
|
1023
|
+
return false unless package_name
|
1024
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get package_name
|
1025
|
+
return false unless service_module.const_defined? :ServingConfigService
|
1026
|
+
service_module = service_module.const_get :ServingConfigService
|
1027
|
+
if transport == :rest
|
1028
|
+
return false unless service_module.const_defined? :Rest
|
1029
|
+
service_module = service_module.const_get :Rest
|
1030
|
+
end
|
1031
|
+
service_module.const_defined? :Client
|
1032
|
+
rescue ::LoadError
|
1033
|
+
false
|
1034
|
+
end
|
1035
|
+
|
965
1036
|
##
|
966
1037
|
# Create a new client object for SiteSearchEngineService.
|
967
1038
|
#
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-discovery_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-03-28 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: google-cloud-core
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.6.
|
71
|
+
rubygems_version: 3.6.5
|
72
72
|
specification_version: 4
|
73
73
|
summary: Discovery Engine API.
|
74
74
|
test_files: []
|