google-cloud-api_hub 0.2.0 → 0.3.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: d64675d9314785d703abf7d8de1a5c756163a376caaea5d0e15501d7ce7b074a
4
- data.tar.gz: 1d7c4114d45f4974adf85f9b48a5e58d56ff99d84fdc112ebd234a08fd509902
3
+ metadata.gz: 9f859dcdabe4328f3c31d4a18b2534bcaebfdbd33279cfce2f38ea77d74af7a5
4
+ data.tar.gz: e625d874e667b85802a880e9b30e177730d079345672e057a14f43bfc3a610dd
5
5
  SHA512:
6
- metadata.gz: 876247a174447416f390c13e25cf1030405c8accd25e8dc4410a350cb20556caa19da5856670740c8854c844bcd199d288ac7a8d654ddf30b91c2b3539ee3128
7
- data.tar.gz: a88571a8d4f01f450394a22076310567f2bd5ea7f1c523496a542468e8ad5df14c05cb0d4cafa80fc0166589821f52de7cec3ff03870f1f4dcbb47ee23aff021
6
+ metadata.gz: 1499b4c308edecadcb3888ceea4d1c2d1fdf9e13a64f9f9b0b659abd0edabe772b6ffc105db6c4b8bf398d4df949721905afc65dbe8286b2fa1fc247566a0b9a
7
+ data.tar.gz: fc68bdedb3826f9ff3392a187cd221dbd9f22e247e8d5787d7333549bc330ef8e43a344b246d1fda1ae18ab703fc00a9fe5d3c7dfbb664fd8cf1b42857b150d2
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/apihub.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-api_hub-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-api_hub-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 ApiHub
23
- VERSION = "0.2.0"
23
+ VERSION = "0.3.0"
24
24
  end
25
25
  end
26
26
  end
@@ -55,6 +55,11 @@ module Google
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
57
  #
58
+ # Raises an exception if the currently installed versioned client gem for the
59
+ # given API version does not support the ApiHub service.
60
+ # You can determine whether the method will succeed by calling
61
+ # {Google::Cloud::ApiHub.api_hub_available?}.
62
+ #
58
63
  # ## About ApiHub
59
64
  #
60
65
  # This service provides all methods related to the API hub.
@@ -74,6 +79,34 @@ module Google
74
79
  service_module.const_get(:Rest).const_get(:Client).new(&block)
75
80
  end
76
81
 
82
+ ##
83
+ # Determines whether the ApiHub service is supported by the current client.
84
+ # If true, you can retrieve a client object by calling {Google::Cloud::ApiHub.api_hub}.
85
+ # If false, that method will raise an exception. This could happen if the given
86
+ # API version does not exist or does not support the ApiHub service,
87
+ # or if the versioned client gem needs an update to support the ApiHub service.
88
+ #
89
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
90
+ # Defaults to `:v1`.
91
+ # @return [boolean] Whether the service is available.
92
+ #
93
+ def self.api_hub_available? version: :v1
94
+ require "google/cloud/api_hub/#{version.to_s.downcase}"
95
+ package_name = Google::Cloud::ApiHub
96
+ .constants
97
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
98
+ .first
99
+ return false unless package_name
100
+ service_module = Google::Cloud::ApiHub.const_get package_name
101
+ return false unless service_module.const_defined? :ApiHub
102
+ service_module = service_module.const_get :ApiHub
103
+ return false unless service_module.const_defined? :Rest
104
+ service_module = service_module.const_get :Rest
105
+ service_module.const_defined? :Client
106
+ rescue ::LoadError
107
+ false
108
+ end
109
+
77
110
  ##
78
111
  # Create a new client object for ApiHubDependencies.
79
112
  #
@@ -85,6 +118,11 @@ module Google
85
118
  # supported by that API version, and the corresponding gem is available, the
86
119
  # appropriate versioned client will be returned.
87
120
  #
121
+ # Raises an exception if the currently installed versioned client gem for the
122
+ # given API version does not support the ApiHubDependencies service.
123
+ # You can determine whether the method will succeed by calling
124
+ # {Google::Cloud::ApiHub.api_hub_dependencies_available?}.
125
+ #
88
126
  # ## About ApiHubDependencies
89
127
  #
90
128
  # This service provides methods for various operations related to a
@@ -105,6 +143,34 @@ module Google
105
143
  service_module.const_get(:Rest).const_get(:Client).new(&block)
106
144
  end
107
145
 
146
+ ##
147
+ # Determines whether the ApiHubDependencies service is supported by the current client.
148
+ # If true, you can retrieve a client object by calling {Google::Cloud::ApiHub.api_hub_dependencies}.
149
+ # If false, that method will raise an exception. This could happen if the given
150
+ # API version does not exist or does not support the ApiHubDependencies service,
151
+ # or if the versioned client gem needs an update to support the ApiHubDependencies service.
152
+ #
153
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
154
+ # Defaults to `:v1`.
155
+ # @return [boolean] Whether the service is available.
156
+ #
157
+ def self.api_hub_dependencies_available? version: :v1
158
+ require "google/cloud/api_hub/#{version.to_s.downcase}"
159
+ package_name = Google::Cloud::ApiHub
160
+ .constants
161
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
162
+ .first
163
+ return false unless package_name
164
+ service_module = Google::Cloud::ApiHub.const_get package_name
165
+ return false unless service_module.const_defined? :ApiHubDependencies
166
+ service_module = service_module.const_get :ApiHubDependencies
167
+ return false unless service_module.const_defined? :Rest
168
+ service_module = service_module.const_get :Rest
169
+ service_module.const_defined? :Client
170
+ rescue ::LoadError
171
+ false
172
+ end
173
+
108
174
  ##
109
175
  # Create a new client object for HostProjectRegistrationService.
110
176
  #
@@ -116,6 +182,11 @@ module Google
116
182
  # supported by that API version, and the corresponding gem is available, the
117
183
  # appropriate versioned client will be returned.
118
184
  #
185
+ # Raises an exception if the currently installed versioned client gem for the
186
+ # given API version does not support the HostProjectRegistrationService service.
187
+ # You can determine whether the method will succeed by calling
188
+ # {Google::Cloud::ApiHub.host_project_registration_service_available?}.
189
+ #
119
190
  # ## About HostProjectRegistrationService
120
191
  #
121
192
  # This service is used for managing the host project registrations.
@@ -135,6 +206,34 @@ module Google
135
206
  service_module.const_get(:Rest).const_get(:Client).new(&block)
136
207
  end
137
208
 
209
+ ##
210
+ # Determines whether the HostProjectRegistrationService service is supported by the current client.
211
+ # If true, you can retrieve a client object by calling {Google::Cloud::ApiHub.host_project_registration_service}.
212
+ # If false, that method will raise an exception. This could happen if the given
213
+ # API version does not exist or does not support the HostProjectRegistrationService service,
214
+ # or if the versioned client gem needs an update to support the HostProjectRegistrationService service.
215
+ #
216
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
217
+ # Defaults to `:v1`.
218
+ # @return [boolean] Whether the service is available.
219
+ #
220
+ def self.host_project_registration_service_available? version: :v1
221
+ require "google/cloud/api_hub/#{version.to_s.downcase}"
222
+ package_name = Google::Cloud::ApiHub
223
+ .constants
224
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
225
+ .first
226
+ return false unless package_name
227
+ service_module = Google::Cloud::ApiHub.const_get package_name
228
+ return false unless service_module.const_defined? :HostProjectRegistrationService
229
+ service_module = service_module.const_get :HostProjectRegistrationService
230
+ return false unless service_module.const_defined? :Rest
231
+ service_module = service_module.const_get :Rest
232
+ service_module.const_defined? :Client
233
+ rescue ::LoadError
234
+ false
235
+ end
236
+
138
237
  ##
139
238
  # Create a new client object for LintingService.
140
239
  #
@@ -146,6 +245,11 @@ module Google
146
245
  # supported by that API version, and the corresponding gem is available, the
147
246
  # appropriate versioned client will be returned.
148
247
  #
248
+ # Raises an exception if the currently installed versioned client gem for the
249
+ # given API version does not support the LintingService service.
250
+ # You can determine whether the method will succeed by calling
251
+ # {Google::Cloud::ApiHub.linting_service_available?}.
252
+ #
149
253
  # ## About LintingService
150
254
  #
151
255
  # This service provides all methods related to the 1p Linter.
@@ -165,6 +269,34 @@ module Google
165
269
  service_module.const_get(:Rest).const_get(:Client).new(&block)
166
270
  end
167
271
 
272
+ ##
273
+ # Determines whether the LintingService service is supported by the current client.
274
+ # If true, you can retrieve a client object by calling {Google::Cloud::ApiHub.linting_service}.
275
+ # If false, that method will raise an exception. This could happen if the given
276
+ # API version does not exist or does not support the LintingService service,
277
+ # or if the versioned client gem needs an update to support the LintingService service.
278
+ #
279
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
280
+ # Defaults to `:v1`.
281
+ # @return [boolean] Whether the service is available.
282
+ #
283
+ def self.linting_service_available? version: :v1
284
+ require "google/cloud/api_hub/#{version.to_s.downcase}"
285
+ package_name = Google::Cloud::ApiHub
286
+ .constants
287
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
288
+ .first
289
+ return false unless package_name
290
+ service_module = Google::Cloud::ApiHub.const_get package_name
291
+ return false unless service_module.const_defined? :LintingService
292
+ service_module = service_module.const_get :LintingService
293
+ return false unless service_module.const_defined? :Rest
294
+ service_module = service_module.const_get :Rest
295
+ service_module.const_defined? :Client
296
+ rescue ::LoadError
297
+ false
298
+ end
299
+
168
300
  ##
169
301
  # Create a new client object for ApiHubPlugin.
170
302
  #
@@ -176,6 +308,11 @@ module Google
176
308
  # supported by that API version, and the corresponding gem is available, the
177
309
  # appropriate versioned client will be returned.
178
310
  #
311
+ # Raises an exception if the currently installed versioned client gem for the
312
+ # given API version does not support the ApiHubPlugin service.
313
+ # You can determine whether the method will succeed by calling
314
+ # {Google::Cloud::ApiHub.api_hub_plugin_available?}.
315
+ #
179
316
  # ## About ApiHubPlugin
180
317
  #
181
318
  # This service is used for managing plugins inside the API Hub.
@@ -195,6 +332,34 @@ module Google
195
332
  service_module.const_get(:Rest).const_get(:Client).new(&block)
196
333
  end
197
334
 
335
+ ##
336
+ # Determines whether the ApiHubPlugin service is supported by the current client.
337
+ # If true, you can retrieve a client object by calling {Google::Cloud::ApiHub.api_hub_plugin}.
338
+ # If false, that method will raise an exception. This could happen if the given
339
+ # API version does not exist or does not support the ApiHubPlugin service,
340
+ # or if the versioned client gem needs an update to support the ApiHubPlugin service.
341
+ #
342
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
343
+ # Defaults to `:v1`.
344
+ # @return [boolean] Whether the service is available.
345
+ #
346
+ def self.api_hub_plugin_available? version: :v1
347
+ require "google/cloud/api_hub/#{version.to_s.downcase}"
348
+ package_name = Google::Cloud::ApiHub
349
+ .constants
350
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
351
+ .first
352
+ return false unless package_name
353
+ service_module = Google::Cloud::ApiHub.const_get package_name
354
+ return false unless service_module.const_defined? :ApiHubPlugin
355
+ service_module = service_module.const_get :ApiHubPlugin
356
+ return false unless service_module.const_defined? :Rest
357
+ service_module = service_module.const_get :Rest
358
+ service_module.const_defined? :Client
359
+ rescue ::LoadError
360
+ false
361
+ end
362
+
198
363
  ##
199
364
  # Create a new client object for Provisioning.
200
365
  #
@@ -206,6 +371,11 @@ module Google
206
371
  # supported by that API version, and the corresponding gem is available, the
207
372
  # appropriate versioned client will be returned.
208
373
  #
374
+ # Raises an exception if the currently installed versioned client gem for the
375
+ # given API version does not support the Provisioning service.
376
+ # You can determine whether the method will succeed by calling
377
+ # {Google::Cloud::ApiHub.provisioning_available?}.
378
+ #
209
379
  # ## About Provisioning
210
380
  #
211
381
  # This service is used for managing the data plane provisioning of the API hub.
@@ -225,6 +395,34 @@ module Google
225
395
  service_module.const_get(:Rest).const_get(:Client).new(&block)
226
396
  end
227
397
 
398
+ ##
399
+ # Determines whether the Provisioning service is supported by the current client.
400
+ # If true, you can retrieve a client object by calling {Google::Cloud::ApiHub.provisioning}.
401
+ # If false, that method will raise an exception. This could happen if the given
402
+ # API version does not exist or does not support the Provisioning service,
403
+ # or if the versioned client gem needs an update to support the Provisioning service.
404
+ #
405
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
406
+ # Defaults to `:v1`.
407
+ # @return [boolean] Whether the service is available.
408
+ #
409
+ def self.provisioning_available? version: :v1
410
+ require "google/cloud/api_hub/#{version.to_s.downcase}"
411
+ package_name = Google::Cloud::ApiHub
412
+ .constants
413
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
414
+ .first
415
+ return false unless package_name
416
+ service_module = Google::Cloud::ApiHub.const_get package_name
417
+ return false unless service_module.const_defined? :Provisioning
418
+ service_module = service_module.const_get :Provisioning
419
+ return false unless service_module.const_defined? :Rest
420
+ service_module = service_module.const_get :Rest
421
+ service_module.const_defined? :Client
422
+ rescue ::LoadError
423
+ false
424
+ end
425
+
228
426
  ##
229
427
  # Create a new client object for RuntimeProjectAttachmentService.
230
428
  #
@@ -236,6 +434,11 @@ module Google
236
434
  # supported by that API version, and the corresponding gem is available, the
237
435
  # appropriate versioned client will be returned.
238
436
  #
437
+ # Raises an exception if the currently installed versioned client gem for the
438
+ # given API version does not support the RuntimeProjectAttachmentService service.
439
+ # You can determine whether the method will succeed by calling
440
+ # {Google::Cloud::ApiHub.runtime_project_attachment_service_available?}.
441
+ #
239
442
  # ## About RuntimeProjectAttachmentService
240
443
  #
241
444
  # This service is used for managing the runtime project attachments.
@@ -255,6 +458,34 @@ module Google
255
458
  service_module.const_get(:Rest).const_get(:Client).new(&block)
256
459
  end
257
460
 
461
+ ##
462
+ # Determines whether the RuntimeProjectAttachmentService service is supported by the current client.
463
+ # If true, you can retrieve a client object by calling {Google::Cloud::ApiHub.runtime_project_attachment_service}.
464
+ # If false, that method will raise an exception. This could happen if the given
465
+ # API version does not exist or does not support the RuntimeProjectAttachmentService service,
466
+ # or if the versioned client gem needs an update to support the RuntimeProjectAttachmentService service.
467
+ #
468
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
469
+ # Defaults to `:v1`.
470
+ # @return [boolean] Whether the service is available.
471
+ #
472
+ def self.runtime_project_attachment_service_available? version: :v1
473
+ require "google/cloud/api_hub/#{version.to_s.downcase}"
474
+ package_name = Google::Cloud::ApiHub
475
+ .constants
476
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
477
+ .first
478
+ return false unless package_name
479
+ service_module = Google::Cloud::ApiHub.const_get package_name
480
+ return false unless service_module.const_defined? :RuntimeProjectAttachmentService
481
+ service_module = service_module.const_get :RuntimeProjectAttachmentService
482
+ return false unless service_module.const_defined? :Rest
483
+ service_module = service_module.const_get :Rest
484
+ service_module.const_defined? :Client
485
+ rescue ::LoadError
486
+ false
487
+ end
488
+
258
489
  ##
259
490
  # Configure the google-cloud-api_hub library.
260
491
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-api_hub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.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-09-18 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-api_hub-v1
@@ -65,7 +64,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
65
64
  licenses:
66
65
  - Apache-2.0
67
66
  metadata: {}
68
- post_install_message:
69
67
  rdoc_options: []
70
68
  require_paths:
71
69
  - lib
@@ -73,15 +71,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
71
  requirements:
74
72
  - - ">="
75
73
  - !ruby/object:Gem::Version
76
- version: '2.7'
74
+ version: '3.0'
77
75
  required_rubygems_version: !ruby/object:Gem::Requirement
78
76
  requirements:
79
77
  - - ">="
80
78
  - !ruby/object:Gem::Version
81
79
  version: '0'
82
80
  requirements: []
83
- rubygems_version: 3.5.6
84
- signing_key:
81
+ rubygems_version: 3.6.2
85
82
  specification_version: 4
86
83
  summary: API Client library for the API hub API
87
84
  test_files: []