google-cloud-automl 1.5.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ac295115d39303979f27d5e2f21e309096062cdd726e5453f530308981ed5c6
4
- data.tar.gz: ad39d81074324e2b5c92af68e2e15907e0f7b786ddf3ac5695407e67346eb681
3
+ metadata.gz: 66d6d9166678f6e613654b8ea09cac1f725183f074347312a868f85ff344043a
4
+ data.tar.gz: 19cdb13a1eb3628c864d92fe88d71daa2c3f568b5bba1addee39b39887bb4f9e
5
5
  SHA512:
6
- metadata.gz: dfc69bbd140006f893580154340aa40e46c475aa0acb09a76fba3b302e497d046da2a7817391093a89c90e029a7d30ba05283780437ef19b65f6862d96976a34
7
- data.tar.gz: 2a9d74cc086f6bfb21c7629f505a6763448ca7c9208b5651cb5f7a25a473e5fa1f85093dbe45a263b1f5d73c9f90b912560755f8d90299a488dc0acafde5cbd4
6
+ metadata.gz: 73db7c04a5175987043d9f942ab3cf123f10521c508ffcfa31137b5d447d6120a949e603b0823cac4e796799ffe2ef3c67a6e6d29c4d35d4f3816e8c1c4604b5
7
+ data.tar.gz: 48f6fd845ef951d441775192d5920777cc21c0a8ab7f51edf7037f127990025fb330f8247d7d1b6126f594bb412c5f84097615d02531ea5a9eae46cfc5b8786b
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-automl, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-automl-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest),
20
- [google-cloud-automl-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest).
19
+ [google-cloud-automl-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/automl)
23
22
  for more usage information.
@@ -43,9 +42,39 @@ and includes substantial interface changes. Existing code written for earlier
43
42
  versions of this library will likely require updates to use this version.
44
43
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
44
 
45
+ ## Debug Logging
46
+
47
+ This library comes with opt-in Debug Logging that can help you troubleshoot
48
+ your application's integration with the API. When logging is activated, key
49
+ events such as requests and responses, along with data payloads and metadata
50
+ such as headers and client configuration, are logged to the standard error
51
+ stream.
52
+
53
+ **WARNING:** Client Library Debug Logging includes your data payloads in
54
+ plaintext, which could include sensitive data such as PII for yourself or your
55
+ customers, private keys, or other security data that could be compromising if
56
+ leaked. Always practice good data hygiene with your application logs, and follow
57
+ the principle of least access. Google also recommends that Client Library Debug
58
+ Logging be enabled only temporarily during active debugging, and not used
59
+ permanently in production.
60
+
61
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
62
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
63
+ list of client library gem names. This will select the default logging behavior,
64
+ which writes logs to the standard error stream. On a local workstation, this may
65
+ result in logs appearing on the console. When running on a Google Cloud hosting
66
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
67
+ results in logs appearing alongside your application logs in the
68
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
69
+
70
+ Debug logging also requires that the versioned clients for this service be
71
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
72
+ working, try updating the versioned clients in your bundle or installed gems:
73
+ [google-cloud-automl-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest).
74
+
46
75
  ## Supported Ruby Versions
47
76
 
48
- This library is supported on Ruby 2.7+.
77
+ This library is supported on Ruby 3.0+.
49
78
 
50
79
  Google provides official support for Ruby versions that are actively supported
51
80
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module AutoML
23
- VERSION = "1.5.0"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
@@ -58,6 +58,11 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the PredictionService service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::AutoML.prediction_service_available?}.
65
+ #
61
66
  # ## About PredictionService
62
67
  #
63
68
  # AutoML Prediction API.
@@ -82,6 +87,37 @@ module Google
82
87
  service_module.const_get(:Client).new(&block)
83
88
  end
84
89
 
90
+ ##
91
+ # Determines whether the PredictionService service is supported by the current client.
92
+ # If true, you can retrieve a client object by calling {Google::Cloud::AutoML.prediction_service}.
93
+ # If false, that method will raise an exception. This could happen if the given
94
+ # API version does not exist or does not support the PredictionService service,
95
+ # or if the versioned client gem needs an update to support the PredictionService service.
96
+ #
97
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
98
+ # Defaults to `:v1`.
99
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
100
+ # @return [boolean] Whether the service is available.
101
+ #
102
+ def self.prediction_service_available? version: :v1, transport: :grpc
103
+ require "google/cloud/automl/#{version.to_s.downcase}"
104
+ package_name = Google::Cloud::AutoML
105
+ .constants
106
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
107
+ .first
108
+ return false unless package_name
109
+ service_module = Google::Cloud::AutoML.const_get package_name
110
+ return false unless service_module.const_defined? :PredictionService
111
+ service_module = service_module.const_get :PredictionService
112
+ if transport == :rest
113
+ return false unless service_module.const_defined? :Rest
114
+ service_module = service_module.const_get :Rest
115
+ end
116
+ service_module.const_defined? :Client
117
+ rescue ::LoadError
118
+ false
119
+ end
120
+
85
121
  ##
86
122
  # Create a new client object for AutoML.
87
123
  #
@@ -95,6 +131,11 @@ module Google
95
131
  # You can also specify a different transport by passing `:rest` or `:grpc` in
96
132
  # the `transport` parameter.
97
133
  #
134
+ # Raises an exception if the currently installed versioned client gem for the
135
+ # given API version does not support the given transport of the AutoML service.
136
+ # You can determine whether the method will succeed by calling
137
+ # {Google::Cloud::AutoML.automl_available?}.
138
+ #
98
139
  # ## About AutoML
99
140
  #
100
141
  # AutoML Server API.
@@ -129,6 +170,37 @@ module Google
129
170
  service_module.const_get(:Client).new(&block)
130
171
  end
131
172
 
173
+ ##
174
+ # Determines whether the AutoML service is supported by the current client.
175
+ # If true, you can retrieve a client object by calling {Google::Cloud::AutoML.automl}.
176
+ # If false, that method will raise an exception. This could happen if the given
177
+ # API version does not exist or does not support the AutoML service,
178
+ # or if the versioned client gem needs an update to support the AutoML service.
179
+ #
180
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
181
+ # Defaults to `:v1`.
182
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
183
+ # @return [boolean] Whether the service is available.
184
+ #
185
+ def self.automl_available? version: :v1, transport: :grpc
186
+ require "google/cloud/automl/#{version.to_s.downcase}"
187
+ package_name = Google::Cloud::AutoML
188
+ .constants
189
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
190
+ .first
191
+ return false unless package_name
192
+ service_module = Google::Cloud::AutoML.const_get package_name
193
+ return false unless service_module.const_defined? :AutoML
194
+ service_module = service_module.const_get :AutoML
195
+ if transport == :rest
196
+ return false unless service_module.const_defined? :Rest
197
+ service_module = service_module.const_get :Rest
198
+ end
199
+ service_module.const_defined? :Client
200
+ rescue ::LoadError
201
+ false
202
+ end
203
+
132
204
  ##
133
205
  # Configure the google-cloud-automl library.
134
206
  #
metadata CHANGED
@@ -1,55 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-automl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-automl-v1
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0.9'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 2.a
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '0.9'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: 2.a
33
- - !ruby/object:Gem::Dependency
34
- name: google-cloud-automl-v1beta1
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '0.10'
40
- - - "<"
16
+ - - "~>"
41
17
  - !ruby/object:Gem::Version
42
- version: 2.a
18
+ version: '1.2'
43
19
  type: :runtime
44
20
  prerelease: false
45
21
  version_requirements: !ruby/object:Gem::Requirement
46
22
  requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '0.10'
50
- - - "<"
23
+ - - "~>"
51
24
  - !ruby/object:Gem::Version
52
- version: 2.a
25
+ version: '1.2'
53
26
  - !ruby/object:Gem::Dependency
54
27
  name: google-cloud-core
55
28
  requirement: !ruby/object:Gem::Requirement
@@ -87,7 +60,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
87
60
  licenses:
88
61
  - Apache-2.0
89
62
  metadata: {}
90
- post_install_message:
91
63
  rdoc_options: []
92
64
  require_paths:
93
65
  - lib
@@ -95,15 +67,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
67
  requirements:
96
68
  - - ">="
97
69
  - !ruby/object:Gem::Version
98
- version: '2.7'
70
+ version: '3.0'
99
71
  required_rubygems_version: !ruby/object:Gem::Requirement
100
72
  requirements:
101
73
  - - ">="
102
74
  - !ruby/object:Gem::Version
103
75
  version: '0'
104
76
  requirements: []
105
- rubygems_version: 3.5.6
106
- signing_key:
77
+ rubygems_version: 3.6.3
107
78
  specification_version: 4
108
79
  summary: API Client library for the Cloud AutoML API
109
80
  test_files: []