google-cloud-cloud_quotas 2.1.0 → 2.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 +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/cloud_quotas/version.rb +1 -1
- data/lib/google/cloud/cloud_quotas.rb +76 -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: 30f3b500519bb9e5d6fc45bbefd5d6edcfc8cff33eda57d3ff0e5fa4e6963843
|
|
4
|
+
data.tar.gz: 55741d88d4766ad7d3635dbae979177d7a65b2e83825b19eaf9c57ceb684c9fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4cf5e1504473e1846243fe282ed7536c744de5bd51c3512c2a4ae804eb446f112057d5cf9f49d893f9f5c93f673a15390951c5ac28d1663c4310f181bca78aa1
|
|
7
|
+
data.tar.gz: 7bffd7a623ac4333ebd5dd997f7edb5565ec820c7278356bb02c03d70c79e007de83c677c6089f3a460716963055a84929175cd5c9d9a7fba38d4601b8764521
|
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
|
|
@@ -121,6 +121,81 @@ module Google
|
|
|
121
121
|
false
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
+
##
|
|
125
|
+
# Create a new client object for QuotaAdjusterSettingsManager.
|
|
126
|
+
#
|
|
127
|
+
# By default, this returns an instance of
|
|
128
|
+
# [Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettingsManager::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_quotas-v1/latest/Google-Cloud-CloudQuotas-V1-QuotaAdjusterSettingsManager-Client)
|
|
129
|
+
# for a gRPC client for version V1 of the API.
|
|
130
|
+
# However, you can specify a different API version by passing it in the
|
|
131
|
+
# `version` parameter. If the QuotaAdjusterSettingsManager service is
|
|
132
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
133
|
+
# appropriate versioned client will be returned.
|
|
134
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
135
|
+
# the `transport` parameter.
|
|
136
|
+
#
|
|
137
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
138
|
+
# given API version does not support the given transport of the QuotaAdjusterSettingsManager service.
|
|
139
|
+
# You can determine whether the method will succeed by calling
|
|
140
|
+
# {Google::Cloud::CloudQuotas.quota_adjuster_settings_manager_available?}.
|
|
141
|
+
#
|
|
142
|
+
# ## About QuotaAdjusterSettingsManager
|
|
143
|
+
#
|
|
144
|
+
# The Quotas Adjuster Settings API is an infrastructure service for Google
|
|
145
|
+
# Cloud that lets service consumers view and update their quota adjuster
|
|
146
|
+
# settings.
|
|
147
|
+
#
|
|
148
|
+
# - Update quota adjuster settings.
|
|
149
|
+
# - Get the name of the configurations.
|
|
150
|
+
#
|
|
151
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
152
|
+
# Defaults to `:v1`.
|
|
153
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
154
|
+
# @return [::Object] A client object for the specified version.
|
|
155
|
+
#
|
|
156
|
+
def self.quota_adjuster_settings_manager version: :v1, transport: :grpc, &block
|
|
157
|
+
require "google/cloud/cloud_quotas/#{version.to_s.downcase}"
|
|
158
|
+
|
|
159
|
+
package_name = Google::Cloud::CloudQuotas
|
|
160
|
+
.constants
|
|
161
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
162
|
+
.first
|
|
163
|
+
service_module = Google::Cloud::CloudQuotas.const_get(package_name).const_get(:QuotaAdjusterSettingsManager)
|
|
164
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
165
|
+
service_module.const_get(:Client).new(&block)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
##
|
|
169
|
+
# Determines whether the QuotaAdjusterSettingsManager service is supported by the current client.
|
|
170
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::CloudQuotas.quota_adjuster_settings_manager}.
|
|
171
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
172
|
+
# API version does not exist or does not support the QuotaAdjusterSettingsManager service,
|
|
173
|
+
# or if the versioned client gem needs an update to support the QuotaAdjusterSettingsManager service.
|
|
174
|
+
#
|
|
175
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
176
|
+
# Defaults to `:v1`.
|
|
177
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
178
|
+
# @return [boolean] Whether the service is available.
|
|
179
|
+
#
|
|
180
|
+
def self.quota_adjuster_settings_manager_available? version: :v1, transport: :grpc
|
|
181
|
+
require "google/cloud/cloud_quotas/#{version.to_s.downcase}"
|
|
182
|
+
package_name = Google::Cloud::CloudQuotas
|
|
183
|
+
.constants
|
|
184
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
185
|
+
.first
|
|
186
|
+
return false unless package_name
|
|
187
|
+
service_module = Google::Cloud::CloudQuotas.const_get package_name
|
|
188
|
+
return false unless service_module.const_defined? :QuotaAdjusterSettingsManager
|
|
189
|
+
service_module = service_module.const_get :QuotaAdjusterSettingsManager
|
|
190
|
+
if transport == :rest
|
|
191
|
+
return false unless service_module.const_defined? :Rest
|
|
192
|
+
service_module = service_module.const_get :Rest
|
|
193
|
+
end
|
|
194
|
+
service_module.const_defined? :Client
|
|
195
|
+
rescue ::LoadError
|
|
196
|
+
false
|
|
197
|
+
end
|
|
198
|
+
|
|
124
199
|
##
|
|
125
200
|
# Configure the google-cloud-cloud_quotas library.
|
|
126
201
|
#
|
|
@@ -144,6 +219,7 @@ module Google
|
|
|
144
219
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
145
220
|
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
146
221
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
222
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
147
223
|
# * `:retry_codes` (*type:* `Array<String>`) -
|
|
148
224
|
# The error codes that should trigger a retry.
|
|
149
225
|
#
|