google-cloud-vision_ai 0.1.1 → 1.0.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: b983882e98362956b45248be51722e2aebd3a5dfcbc47b90129f71c654c1d56a
4
- data.tar.gz: 4b6a53a649650fc377f35dd4b6d6a85d7a8e8e06a4ab60fdead3d43da62932bb
3
+ metadata.gz: 4901f280856b4914cade3fea4f01062e21b99cc72c201f09cc20e0f08e203b2f
4
+ data.tar.gz: 0bc537def14548df011df0e7a53780751be5031fe16665e4ae355ce10ea74b1d
5
5
  SHA512:
6
- metadata.gz: 19f6daa198023f073974efb4ceda4beda16a9d56296421261b4577ce64bbfc8580404d5525967a3d317c31190a6768df42b783dc7184f9f1a1b9f86a3451e131
7
- data.tar.gz: b57102ba9f7f2ee146eb68b746ae0effa97133cd62fb8fdcb57a161fefd487c61a58e1ab851422bb3db5b687869e4c39156ac53abd8a48e77faf36b0b19a1758
6
+ metadata.gz: f6980c5206146a229977311cbc386e3bfe4e801c757a89b0acf273b4d612ef16c7e7b8c0efd027b29c8f1aa2d491e8436ab0bb5fa1e33b5333e192b00494a118
7
+ data.tar.gz: d32d3735f718949049dd9f37a1e2c8f1316b059f86022c6dadc8d21b09e0f538cf75c146d4c4f33c8a62455eb2bdced10df9ed91190527bfe57e6b77c0224732
data/README.md CHANGED
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/visionai.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-cloud-vision_ai-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest).
66
+
37
67
  ## Supported Ruby Versions
38
68
 
39
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
40
70
 
41
71
  Google provides official support for Ruby versions that are actively supported
42
72
  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 VisionAI
23
- VERSION = "0.1.1"
23
+ VERSION = "1.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 LiveVideoAnalytics service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::VisionAI.live_video_analytics_available?}.
65
+ #
61
66
  # ## About LiveVideoAnalytics
62
67
  #
63
68
  # Service describing handlers for resources. The service enables clients to run
@@ -80,6 +85,37 @@ module Google
80
85
  service_module.const_get(:Client).new(&block)
81
86
  end
82
87
 
88
+ ##
89
+ # Determines whether the LiveVideoAnalytics service is supported by the current client.
90
+ # If true, you can retrieve a client object by calling {Google::Cloud::VisionAI.live_video_analytics}.
91
+ # If false, that method will raise an exception. This could happen if the given
92
+ # API version does not exist or does not support the LiveVideoAnalytics service,
93
+ # or if the versioned client gem needs an update to support the LiveVideoAnalytics service.
94
+ #
95
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
96
+ # Defaults to `:v1`.
97
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
98
+ # @return [boolean] Whether the service is available.
99
+ #
100
+ def self.live_video_analytics_available? version: :v1, transport: :grpc
101
+ require "google/cloud/vision_ai/#{version.to_s.downcase}"
102
+ package_name = Google::Cloud::VisionAI
103
+ .constants
104
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
105
+ .first
106
+ return false unless package_name
107
+ service_module = Google::Cloud::VisionAI.const_get package_name
108
+ return false unless service_module.const_defined? :LiveVideoAnalytics
109
+ service_module = service_module.const_get :LiveVideoAnalytics
110
+ if transport == :rest
111
+ return false unless service_module.const_defined? :Rest
112
+ service_module = service_module.const_get :Rest
113
+ end
114
+ service_module.const_defined? :Client
115
+ rescue ::LoadError
116
+ false
117
+ end
118
+
83
119
  ##
84
120
  # Create a new client object for AppPlatform.
85
121
  #
@@ -93,6 +129,11 @@ module Google
93
129
  # You can also specify a different transport by passing `:rest` or `:grpc` in
94
130
  # the `transport` parameter.
95
131
  #
132
+ # Raises an exception if the currently installed versioned client gem for the
133
+ # given API version does not support the given transport of the AppPlatform service.
134
+ # You can determine whether the method will succeed by calling
135
+ # {Google::Cloud::VisionAI.app_platform_available?}.
136
+ #
96
137
  # ## About AppPlatform
97
138
  #
98
139
  # Service describing handlers for resources
@@ -114,6 +155,37 @@ module Google
114
155
  service_module.const_get(:Client).new(&block)
115
156
  end
116
157
 
158
+ ##
159
+ # Determines whether the AppPlatform service is supported by the current client.
160
+ # If true, you can retrieve a client object by calling {Google::Cloud::VisionAI.app_platform}.
161
+ # If false, that method will raise an exception. This could happen if the given
162
+ # API version does not exist or does not support the AppPlatform service,
163
+ # or if the versioned client gem needs an update to support the AppPlatform service.
164
+ #
165
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
166
+ # Defaults to `:v1`.
167
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
168
+ # @return [boolean] Whether the service is available.
169
+ #
170
+ def self.app_platform_available? version: :v1, transport: :grpc
171
+ require "google/cloud/vision_ai/#{version.to_s.downcase}"
172
+ package_name = Google::Cloud::VisionAI
173
+ .constants
174
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
175
+ .first
176
+ return false unless package_name
177
+ service_module = Google::Cloud::VisionAI.const_get package_name
178
+ return false unless service_module.const_defined? :AppPlatform
179
+ service_module = service_module.const_get :AppPlatform
180
+ if transport == :rest
181
+ return false unless service_module.const_defined? :Rest
182
+ service_module = service_module.const_get :Rest
183
+ end
184
+ service_module.const_defined? :Client
185
+ rescue ::LoadError
186
+ false
187
+ end
188
+
117
189
  ##
118
190
  # Create a new client object for StreamingService.
119
191
  #
@@ -127,6 +199,11 @@ module Google
127
199
  # You can also specify a different transport by passing `:rest` or `:grpc` in
128
200
  # the `transport` parameter.
129
201
  #
202
+ # Raises an exception if the currently installed versioned client gem for the
203
+ # given API version does not support the given transport of the StreamingService service.
204
+ # You can determine whether the method will succeed by calling
205
+ # {Google::Cloud::VisionAI.streaming_service_available?}.
206
+ #
130
207
  # ## About StreamingService
131
208
  #
132
209
  # Streaming service for receiving and sending packets.
@@ -148,6 +225,37 @@ module Google
148
225
  service_module.const_get(:Client).new(&block)
149
226
  end
150
227
 
228
+ ##
229
+ # Determines whether the StreamingService service is supported by the current client.
230
+ # If true, you can retrieve a client object by calling {Google::Cloud::VisionAI.streaming_service}.
231
+ # If false, that method will raise an exception. This could happen if the given
232
+ # API version does not exist or does not support the StreamingService service,
233
+ # or if the versioned client gem needs an update to support the StreamingService service.
234
+ #
235
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
236
+ # Defaults to `:v1`.
237
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
238
+ # @return [boolean] Whether the service is available.
239
+ #
240
+ def self.streaming_service_available? version: :v1, transport: :grpc
241
+ require "google/cloud/vision_ai/#{version.to_s.downcase}"
242
+ package_name = Google::Cloud::VisionAI
243
+ .constants
244
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
245
+ .first
246
+ return false unless package_name
247
+ service_module = Google::Cloud::VisionAI.const_get package_name
248
+ return false unless service_module.const_defined? :StreamingService
249
+ service_module = service_module.const_get :StreamingService
250
+ if transport == :rest
251
+ return false unless service_module.const_defined? :Rest
252
+ service_module = service_module.const_get :Rest
253
+ end
254
+ service_module.const_defined? :Client
255
+ rescue ::LoadError
256
+ false
257
+ end
258
+
151
259
  ##
152
260
  # Create a new client object for StreamsService.
153
261
  #
@@ -161,6 +269,11 @@ module Google
161
269
  # You can also specify a different transport by passing `:rest` or `:grpc` in
162
270
  # the `transport` parameter.
163
271
  #
272
+ # Raises an exception if the currently installed versioned client gem for the
273
+ # given API version does not support the given transport of the StreamsService service.
274
+ # You can determine whether the method will succeed by calling
275
+ # {Google::Cloud::VisionAI.streams_service_available?}.
276
+ #
164
277
  # ## About StreamsService
165
278
  #
166
279
  # Service describing handlers for resources.
@@ -185,6 +298,37 @@ module Google
185
298
  service_module.const_get(:Client).new(&block)
186
299
  end
187
300
 
301
+ ##
302
+ # Determines whether the StreamsService service is supported by the current client.
303
+ # If true, you can retrieve a client object by calling {Google::Cloud::VisionAI.streams_service}.
304
+ # If false, that method will raise an exception. This could happen if the given
305
+ # API version does not exist or does not support the StreamsService service,
306
+ # or if the versioned client gem needs an update to support the StreamsService service.
307
+ #
308
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
309
+ # Defaults to `:v1`.
310
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
311
+ # @return [boolean] Whether the service is available.
312
+ #
313
+ def self.streams_service_available? version: :v1, transport: :grpc
314
+ require "google/cloud/vision_ai/#{version.to_s.downcase}"
315
+ package_name = Google::Cloud::VisionAI
316
+ .constants
317
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
318
+ .first
319
+ return false unless package_name
320
+ service_module = Google::Cloud::VisionAI.const_get package_name
321
+ return false unless service_module.const_defined? :StreamsService
322
+ service_module = service_module.const_get :StreamsService
323
+ if transport == :rest
324
+ return false unless service_module.const_defined? :Rest
325
+ service_module = service_module.const_get :Rest
326
+ end
327
+ service_module.const_defined? :Client
328
+ rescue ::LoadError
329
+ false
330
+ end
331
+
188
332
  ##
189
333
  # Create a new client object for Warehouse.
190
334
  #
@@ -198,6 +342,11 @@ module Google
198
342
  # You can also specify a different transport by passing `:rest` or `:grpc` in
199
343
  # the `transport` parameter.
200
344
  #
345
+ # Raises an exception if the currently installed versioned client gem for the
346
+ # given API version does not support the given transport of the Warehouse service.
347
+ # You can determine whether the method will succeed by calling
348
+ # {Google::Cloud::VisionAI.warehouse_available?}.
349
+ #
201
350
  # ## About Warehouse
202
351
  #
203
352
  # Service that manages media content + metadata for streaming.
@@ -219,6 +368,37 @@ module Google
219
368
  service_module.const_get(:Client).new(&block)
220
369
  end
221
370
 
371
+ ##
372
+ # Determines whether the Warehouse service is supported by the current client.
373
+ # If true, you can retrieve a client object by calling {Google::Cloud::VisionAI.warehouse}.
374
+ # If false, that method will raise an exception. This could happen if the given
375
+ # API version does not exist or does not support the Warehouse service,
376
+ # or if the versioned client gem needs an update to support the Warehouse service.
377
+ #
378
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
379
+ # Defaults to `:v1`.
380
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
381
+ # @return [boolean] Whether the service is available.
382
+ #
383
+ def self.warehouse_available? version: :v1, transport: :grpc
384
+ require "google/cloud/vision_ai/#{version.to_s.downcase}"
385
+ package_name = Google::Cloud::VisionAI
386
+ .constants
387
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
388
+ .first
389
+ return false unless package_name
390
+ service_module = Google::Cloud::VisionAI.const_get package_name
391
+ return false unless service_module.const_defined? :Warehouse
392
+ service_module = service_module.const_get :Warehouse
393
+ if transport == :rest
394
+ return false unless service_module.const_defined? :Rest
395
+ service_module = service_module.const_get :Rest
396
+ end
397
+ service_module.const_defined? :Client
398
+ rescue ::LoadError
399
+ false
400
+ end
401
+
222
402
  ##
223
403
  # Create a new client object for HealthCheckService.
224
404
  #
@@ -232,6 +412,11 @@ module Google
232
412
  # You can also specify a different transport by passing `:rest` or `:grpc` in
233
413
  # the `transport` parameter.
234
414
  #
415
+ # Raises an exception if the currently installed versioned client gem for the
416
+ # given API version does not support the given transport of the HealthCheckService service.
417
+ # You can determine whether the method will succeed by calling
418
+ # {Google::Cloud::VisionAI.health_check_service_available?}.
419
+ #
235
420
  # ## About HealthCheckService
236
421
  #
237
422
  # HealthCheckService provides an interface for Vertex AI Vision Cluster Health
@@ -254,6 +439,37 @@ module Google
254
439
  service_module.const_get(:Client).new(&block)
255
440
  end
256
441
 
442
+ ##
443
+ # Determines whether the HealthCheckService service is supported by the current client.
444
+ # If true, you can retrieve a client object by calling {Google::Cloud::VisionAI.health_check_service}.
445
+ # If false, that method will raise an exception. This could happen if the given
446
+ # API version does not exist or does not support the HealthCheckService service,
447
+ # or if the versioned client gem needs an update to support the HealthCheckService service.
448
+ #
449
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
450
+ # Defaults to `:v1`.
451
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
452
+ # @return [boolean] Whether the service is available.
453
+ #
454
+ def self.health_check_service_available? version: :v1, transport: :grpc
455
+ require "google/cloud/vision_ai/#{version.to_s.downcase}"
456
+ package_name = Google::Cloud::VisionAI
457
+ .constants
458
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
459
+ .first
460
+ return false unless package_name
461
+ service_module = Google::Cloud::VisionAI.const_get package_name
462
+ return false unless service_module.const_defined? :HealthCheckService
463
+ service_module = service_module.const_get :HealthCheckService
464
+ if transport == :rest
465
+ return false unless service_module.const_defined? :Rest
466
+ service_module = service_module.const_get :Rest
467
+ end
468
+ service_module.const_defined? :Client
469
+ rescue ::LoadError
470
+ false
471
+ end
472
+
257
473
  ##
258
474
  # Configure the google-cloud-vision_ai library.
259
475
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-vision_ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.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-08-08 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-core
@@ -28,22 +27,16 @@ dependencies:
28
27
  name: google-cloud-vision_ai-v1
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0.0'
34
- - - "<"
30
+ - - "~>"
35
31
  - !ruby/object:Gem::Version
36
- version: 2.a
32
+ version: '1.0'
37
33
  type: :runtime
38
34
  prerelease: false
39
35
  version_requirements: !ruby/object:Gem::Requirement
40
36
  requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '0.0'
44
- - - "<"
37
+ - - "~>"
45
38
  - !ruby/object:Gem::Version
46
- version: 2.a
39
+ version: '1.0'
47
40
  description: google-cloud-vision_ai is the official client library for the Vision
48
41
  AI API.
49
42
  email: googleapis-packages@google.com
@@ -62,7 +55,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
62
55
  licenses:
63
56
  - Apache-2.0
64
57
  metadata: {}
65
- post_install_message:
66
58
  rdoc_options: []
67
59
  require_paths:
68
60
  - lib
@@ -70,15 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
62
  requirements:
71
63
  - - ">="
72
64
  - !ruby/object:Gem::Version
73
- version: '2.7'
65
+ version: '3.0'
74
66
  required_rubygems_version: !ruby/object:Gem::Requirement
75
67
  requirements:
76
68
  - - ">="
77
69
  - !ruby/object:Gem::Version
78
70
  version: '0'
79
71
  requirements: []
80
- rubygems_version: 3.5.6
81
- signing_key:
72
+ rubygems_version: 3.6.3
82
73
  specification_version: 4
83
74
  summary: API Client library for the Vision AI API
84
75
  test_files: []