google-cloud-discovery_engine 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 708a9e4b0a385f0cb736f43fcce4e8147303acee6ac4e9853c264edf506350f6
4
- data.tar.gz: 91062c97f3c6dfba4cf98a1567a06cdd9283096298de18d468a2eaab83ad1db7
3
+ metadata.gz: 5214eb97b7b69d876f5e536b58dce9390fa9a26626fa8f8ba252adcda692bead
4
+ data.tar.gz: a9a2f3bb62aad4a3ac4a70fcc33c490a41300302712a67b9ef9da283a316dcf7
5
5
  SHA512:
6
- metadata.gz: c474c5aab2ee7a9b9acd79583a82bb82e6816e46d0df63d9ef57d5360ee94ceb519e3dcc932f85cdf5ceb35df715992122747b10d1c62086aa9e0966461cdc0c
7
- data.tar.gz: bcea5286cf771a7cf53697bd5223b5df65f1757039a5cfbcf0ccf9f5d655a3d88b31b03e5b1900ef654800365ce9b273cb6533036db4479452747151b2f22486
6
+ metadata.gz: 5650c85762a407038942d028236f14d01d9793bf38e7b3c894331f5bb127a5817f5873ae637e6388bef8d32f200cb2267b81815855e831a5562ed70f3cbad34e
7
+ data.tar.gz: f0f716416968c40f03b28c4e100f6df5a4eaabb6ddddc7b89d8cd1ae20f7472d6669f3b03437286492a87e6a01a8e3c72a998db601b64aec0d1489e4c5871e1a
data/README.md CHANGED
@@ -15,8 +15,7 @@ for this library, google-cloud-discovery_engine, to see the convenience methods
15
15
  constructing client objects. Reference documentation for the client objects
16
16
  themselves can be found in the client library documentation for the versioned
17
17
  client gems:
18
- [google-cloud-discovery_engine-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest),
19
- [google-cloud-discovery_engine-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest).
18
+ [google-cloud-discovery_engine-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest).
20
19
 
21
20
  See also the [Product Documentation](https://cloud.google.com/generative-ai-app-builder/docs)
22
21
  for more usage information.
@@ -62,8 +61,7 @@ results in logs appearing alongside your application logs in the
62
61
  Debug logging also requires that the versioned clients for this service be
63
62
  sufficiently recent, released after about Dec 10, 2024. If logging is not
64
63
  working, try updating the versioned clients in your bundle or installed gems:
65
- [google-cloud-discovery_engine-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest),
66
- [google-cloud-discovery_engine-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest).
64
+ [google-cloud-discovery_engine-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest).
67
65
 
68
66
  ## Supported Ruby Versions
69
67
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module DiscoveryEngine
23
- VERSION = "1.2.0"
23
+ VERSION = "2.1.0"
24
24
  end
25
25
  end
26
26
  end
@@ -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: 1.2.0
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-01-29 00:00:00.000000000 Z
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
@@ -29,34 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '1.1'
32
+ version: '2.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '1.1'
40
- - !ruby/object:Gem::Dependency
41
- name: google-cloud-discovery_engine-v1beta
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: '0.15'
47
- - - "<"
48
- - !ruby/object:Gem::Version
49
- version: 2.a
50
- type: :runtime
51
- prerelease: false
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: '0.15'
57
- - - "<"
58
- - !ruby/object:Gem::Version
59
- version: 2.a
39
+ version: '2.0'
60
40
  description: Discovery Engine API.
61
41
  email: googleapis-packages@google.com
62
42
  executables: []
@@ -88,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
68
  - !ruby/object:Gem::Version
89
69
  version: '0'
90
70
  requirements: []
91
- rubygems_version: 3.6.2
71
+ rubygems_version: 3.6.5
92
72
  specification_version: 4
93
73
  summary: Discovery Engine API.
94
74
  test_files: []