google-cloud-support 1.2.0 → 1.4.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/README.md +1 -1
- data/lib/google/cloud/support/version.rb +1 -1
- data/lib/google/cloud/support.rb +62 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '009f8add3fcb223214af72135a1fdff8959bbfdb5d7a74ca1b1ec2f6c9118874'
|
|
4
|
+
data.tar.gz: 949903fffc744940c8f49b1fad7591472f172954827dbf0ab2e59b3cb64f0e52
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e3e899e6f947058644482f2eb91a5634d7b920fc557288330b95d228d3a11a00095245c51e52f5e3e1f9a4ac4271b96a6c91e38ceffcd322365b233b2b3c323
|
|
7
|
+
data.tar.gz: b4fcceebb9a04e20949c79614766682b087552ca5caf7df48b58b730aec8727a3a756f640d726694213b44b1bd5556fd4cec0a4d95cabe0dfd0a69e15b0260e9
|
data/README.md
CHANGED
|
@@ -74,7 +74,7 @@ working, try updating the versioned clients in your bundle or installed gems:
|
|
|
74
74
|
|
|
75
75
|
## Supported Ruby Versions
|
|
76
76
|
|
|
77
|
-
This library is supported on Ruby 3.
|
|
77
|
+
This library is supported on Ruby 3.2+.
|
|
78
78
|
|
|
79
79
|
Google provides official support for Ruby versions that are actively supported
|
|
80
80
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
data/lib/google/cloud/support.rb
CHANGED
|
@@ -228,6 +228,67 @@ module Google
|
|
|
228
228
|
false
|
|
229
229
|
end
|
|
230
230
|
|
|
231
|
+
##
|
|
232
|
+
# Create a new client object for SupportEventSubscriptionService.
|
|
233
|
+
#
|
|
234
|
+
# By default, this returns an instance of
|
|
235
|
+
# [Google::Cloud::Support::V2::SupportEventSubscriptionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-support-v2/latest/Google-Cloud-Support-V2-SupportEventSubscriptionService-Client)
|
|
236
|
+
# for a gRPC client for version V2 of the API.
|
|
237
|
+
# However, you can specify a different API version by passing it in the
|
|
238
|
+
# `version` parameter. If the SupportEventSubscriptionService service is
|
|
239
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
240
|
+
# appropriate versioned client will be returned.
|
|
241
|
+
#
|
|
242
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
243
|
+
# given API version does not support the SupportEventSubscriptionService service.
|
|
244
|
+
# You can determine whether the method will succeed by calling
|
|
245
|
+
# {Google::Cloud::Support.support_event_subscription_service_available?}.
|
|
246
|
+
#
|
|
247
|
+
# ## About SupportEventSubscriptionService
|
|
248
|
+
#
|
|
249
|
+
# Service for managing customer support event subscriptions.
|
|
250
|
+
#
|
|
251
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
252
|
+
# Defaults to `:v2`.
|
|
253
|
+
# @return [::Object] A client object for the specified version.
|
|
254
|
+
#
|
|
255
|
+
def self.support_event_subscription_service version: :v2, &block
|
|
256
|
+
require "google/cloud/support/#{version.to_s.downcase}"
|
|
257
|
+
|
|
258
|
+
package_name = Google::Cloud::Support
|
|
259
|
+
.constants
|
|
260
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
261
|
+
.first
|
|
262
|
+
service_module = Google::Cloud::Support.const_get(package_name).const_get(:SupportEventSubscriptionService)
|
|
263
|
+
service_module.const_get(:Client).new(&block)
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
##
|
|
267
|
+
# Determines whether the SupportEventSubscriptionService service is supported by the current client.
|
|
268
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Support.support_event_subscription_service}.
|
|
269
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
270
|
+
# API version does not exist or does not support the SupportEventSubscriptionService service,
|
|
271
|
+
# or if the versioned client gem needs an update to support the SupportEventSubscriptionService service.
|
|
272
|
+
#
|
|
273
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
274
|
+
# Defaults to `:v2`.
|
|
275
|
+
# @return [boolean] Whether the service is available.
|
|
276
|
+
#
|
|
277
|
+
def self.support_event_subscription_service_available? version: :v2
|
|
278
|
+
require "google/cloud/support/#{version.to_s.downcase}"
|
|
279
|
+
package_name = Google::Cloud::Support
|
|
280
|
+
.constants
|
|
281
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
282
|
+
.first
|
|
283
|
+
return false unless package_name
|
|
284
|
+
service_module = Google::Cloud::Support.const_get package_name
|
|
285
|
+
return false unless service_module.const_defined? :SupportEventSubscriptionService
|
|
286
|
+
service_module = service_module.const_get :SupportEventSubscriptionService
|
|
287
|
+
service_module.const_defined? :Client
|
|
288
|
+
rescue ::LoadError
|
|
289
|
+
false
|
|
290
|
+
end
|
|
291
|
+
|
|
231
292
|
##
|
|
232
293
|
# Configure the google-cloud-support library.
|
|
233
294
|
#
|
|
@@ -251,6 +312,7 @@ module Google
|
|
|
251
312
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
252
313
|
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
253
314
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
315
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
254
316
|
# * `:retry_codes` (*type:* `Array<String>`) -
|
|
255
317
|
# The error codes that should trigger a retry.
|
|
256
318
|
#
|