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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30f4b7891139d779e0115b2a97452e86a0c14b2b4715ae5ea7aad498cd6279e8
4
- data.tar.gz: 9b975ee7c1e7b1a4756fc37e2ac5cdc1c15e67f38a6b351eb1ef27161564c48e
3
+ metadata.gz: '009f8add3fcb223214af72135a1fdff8959bbfdb5d7a74ca1b1ec2f6c9118874'
4
+ data.tar.gz: 949903fffc744940c8f49b1fad7591472f172954827dbf0ab2e59b3cb64f0e52
5
5
  SHA512:
6
- metadata.gz: fbe5b32ca87827923a1566cf7dc8a06dbc5e83cdd465885503b6b4d1463ad34eead943afc1c2955fe3e6f4c8781c5de2fd25de19558cc15b0af928266474f0b7
7
- data.tar.gz: 3da850d1d1d0d73ce7c79558a1dddfb1f5a0d8cff17e27dcfde72817011bd364bc36f534a9b4b9e8e2da60a3ebc36bf1b984911f20c394d394303d1c568b5389
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.0+.
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
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Support
23
- VERSION = "1.2.0"
23
+ VERSION = "1.4.0"
24
24
  end
25
25
  end
26
26
  end
@@ -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
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC