google-cloud-cloud_quotas-v1 2.4.0 → 2.6.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.
@@ -0,0 +1,234 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/api/cloudquotas/v1/quota_adjuster_settings_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module CloudQuotas
24
+ module V1
25
+ module QuotaAdjusterSettingsManager
26
+ module Rest
27
+ ##
28
+ # REST service stub for the QuotaAdjusterSettingsManager service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
47
+ end
48
+
49
+ ##
50
+ # The effective universe domain
51
+ #
52
+ # @return [String]
53
+ #
54
+ def universe_domain
55
+ @client_stub.universe_domain
56
+ end
57
+
58
+ ##
59
+ # The effective endpoint
60
+ #
61
+ # @return [String]
62
+ #
63
+ def endpoint
64
+ @client_stub.endpoint
65
+ end
66
+
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
76
+ ##
77
+ # Baseline implementation for the update_quota_adjuster_settings REST call
78
+ #
79
+ # @param request_pb [::Google::Cloud::CloudQuotas::V1::UpdateQuotaAdjusterSettingsRequest]
80
+ # A request object representing the call parameters. Required.
81
+ # @param options [::Gapic::CallOptions]
82
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
83
+ #
84
+ # @yield [result, operation] Access the result along with the TransportOperation object
85
+ # @yieldparam result [::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettings]
86
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
87
+ #
88
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettings]
89
+ # A result object deserialized from the server's reply
90
+ def update_quota_adjuster_settings request_pb, options = nil
91
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
92
+
93
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_quota_adjuster_settings_request request_pb
94
+ query_string_params = if query_string_params.any?
95
+ query_string_params.to_h { |p| p.split "=", 2 }
96
+ else
97
+ {}
98
+ end
99
+
100
+ response = @client_stub.make_http_request(
101
+ verb,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "update_quota_adjuster_settings",
106
+ options: options
107
+ )
108
+ operation = ::Gapic::Rest::TransportOperation.new response
109
+ result = ::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettings.decode_json response.body, ignore_unknown_fields: true
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
114
+ end
115
+
116
+ ##
117
+ # Baseline implementation for the get_quota_adjuster_settings REST call
118
+ #
119
+ # @param request_pb [::Google::Cloud::CloudQuotas::V1::GetQuotaAdjusterSettingsRequest]
120
+ # A request object representing the call parameters. Required.
121
+ # @param options [::Gapic::CallOptions]
122
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
123
+ #
124
+ # @yield [result, operation] Access the result along with the TransportOperation object
125
+ # @yieldparam result [::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettings]
126
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
127
+ #
128
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettings]
129
+ # A result object deserialized from the server's reply
130
+ def get_quota_adjuster_settings request_pb, options = nil
131
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
132
+
133
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_quota_adjuster_settings_request request_pb
134
+ query_string_params = if query_string_params.any?
135
+ query_string_params.to_h { |p| p.split "=", 2 }
136
+ else
137
+ {}
138
+ end
139
+
140
+ response = @client_stub.make_http_request(
141
+ verb,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "get_quota_adjuster_settings",
146
+ options: options
147
+ )
148
+ operation = ::Gapic::Rest::TransportOperation.new response
149
+ result = ::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettings.decode_json response.body, ignore_unknown_fields: true
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
154
+ end
155
+
156
+ ##
157
+ # @private
158
+ #
159
+ # GRPC transcoding helper method for the update_quota_adjuster_settings REST call
160
+ #
161
+ # @param request_pb [::Google::Cloud::CloudQuotas::V1::UpdateQuotaAdjusterSettingsRequest]
162
+ # A request object representing the call parameters. Required.
163
+ # @return [Array(String, [String, nil], Hash{String => String})]
164
+ # Uri, Body, Query string parameters
165
+ def self.transcode_update_quota_adjuster_settings_request request_pb
166
+ transcoder = Gapic::Rest::GrpcTranscoder.new
167
+ .with_bindings(
168
+ uri_method: :patch,
169
+ uri_template: "/v1/{quota_adjuster_settings.name}",
170
+ body: "quota_adjuster_settings",
171
+ matches: [
172
+ ["quota_adjuster_settings.name", %r{^projects/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false]
173
+ ]
174
+ )
175
+ .with_bindings(
176
+ uri_method: :patch,
177
+ uri_template: "/v1/{quota_adjuster_settings.name}",
178
+ body: "quota_adjuster_settings",
179
+ matches: [
180
+ ["quota_adjuster_settings.name", %r{^folders/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false]
181
+ ]
182
+ )
183
+ .with_bindings(
184
+ uri_method: :patch,
185
+ uri_template: "/v1/{quota_adjuster_settings.name}",
186
+ body: "quota_adjuster_settings",
187
+ matches: [
188
+ ["quota_adjuster_settings.name", %r{^organizations/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false]
189
+ ]
190
+ )
191
+ transcoder.transcode request_pb
192
+ end
193
+
194
+ ##
195
+ # @private
196
+ #
197
+ # GRPC transcoding helper method for the get_quota_adjuster_settings REST call
198
+ #
199
+ # @param request_pb [::Google::Cloud::CloudQuotas::V1::GetQuotaAdjusterSettingsRequest]
200
+ # A request object representing the call parameters. Required.
201
+ # @return [Array(String, [String, nil], Hash{String => String})]
202
+ # Uri, Body, Query string parameters
203
+ def self.transcode_get_quota_adjuster_settings_request request_pb
204
+ transcoder = Gapic::Rest::GrpcTranscoder.new
205
+ .with_bindings(
206
+ uri_method: :get,
207
+ uri_template: "/v1/{name}",
208
+ matches: [
209
+ ["name", %r{^projects/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false]
210
+ ]
211
+ )
212
+ .with_bindings(
213
+ uri_method: :get,
214
+ uri_template: "/v1/{name}",
215
+ matches: [
216
+ ["name", %r{^folders/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false]
217
+ ]
218
+ )
219
+ .with_bindings(
220
+ uri_method: :get,
221
+ uri_template: "/v1/{name}",
222
+ matches: [
223
+ ["name", %r{^organizations/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false]
224
+ ]
225
+ )
226
+ transcoder.transcode request_pb
227
+ end
228
+ end
229
+ end
230
+ end
231
+ end
232
+ end
233
+ end
234
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/cloud_quotas/v1/version"
24
+
25
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/credentials"
26
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/paths"
27
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module CloudQuotas
32
+ module V1
33
+ ##
34
+ # The Quotas Adjuster Settings API is an infrastructure service for Google
35
+ # Cloud that lets service consumers view and update their quota adjuster
36
+ # settings.
37
+ #
38
+ # - Update quota adjuster settings.
39
+ # - Get the name of the configurations.
40
+ #
41
+ # To load this service and instantiate a REST client:
42
+ #
43
+ # require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/rest"
44
+ # client = ::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettingsManager::Rest::Client.new
45
+ #
46
+ module QuotaAdjusterSettingsManager
47
+ # Client for the REST transport
48
+ module Rest
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
57
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/cloud_quotas/v1/version"
24
+
25
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/credentials"
26
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/paths"
27
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/client"
28
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/rest"
29
+
30
+ module Google
31
+ module Cloud
32
+ module CloudQuotas
33
+ module V1
34
+ ##
35
+ # The Quotas Adjuster Settings API is an infrastructure service for Google
36
+ # Cloud that lets service consumers view and update their quota adjuster
37
+ # settings.
38
+ #
39
+ # - Update quota adjuster settings.
40
+ # - Get the name of the configurations.
41
+ #
42
+ # @example Load this service and instantiate a gRPC client
43
+ #
44
+ # require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager"
45
+ # client = ::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettingsManager::Client.new
46
+ #
47
+ # @example Load this service and instantiate a REST client
48
+ #
49
+ # require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/rest"
50
+ # client = ::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettingsManager::Rest::Client.new
51
+ #
52
+ module QuotaAdjusterSettingsManager
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+
59
+ helper_path = ::File.join __dir__, "quota_adjuster_settings_manager", "helpers.rb"
60
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/helpers" if ::File.file? helper_path
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/cloud_quotas/v1/cloud_quotas/rest"
20
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager/rest"
20
21
  require "google/cloud/cloud_quotas/v1/version"
21
22
 
22
23
  module Google
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module CloudQuotas
23
23
  module V1
24
- VERSION = "2.4.0"
24
+ VERSION = "2.6.0"
25
25
  end
26
26
  end
27
27
  end
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/cloud_quotas/v1/cloud_quotas"
20
+ require "google/cloud/cloud_quotas/v1/quota_adjuster_settings_manager"
20
21
  require "google/cloud/cloud_quotas/v1/version"
21
22
 
22
23
  module Google
@@ -31,6 +31,8 @@ module Google
31
31
  # @!attribute [rw] selective_gapic_generation
32
32
  # @return [::Google::Api::SelectiveGapicGeneration]
33
33
  # Configuration for which RPCs should be generated in the GAPIC client.
34
+ #
35
+ # Note: This field should not be used in most cases.
34
36
  class CommonLanguageSettings
35
37
  include ::Google::Protobuf::MessageExts
36
38
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -441,6 +443,8 @@ module Google
441
443
 
442
444
  # This message is used to configure the generation of a subset of the RPCs in
443
445
  # a service for client libraries.
446
+ #
447
+ # Note: This feature should not be used in most cases.
444
448
  # @!attribute [rw] methods
445
449
  # @return [::Array<::String>]
446
450
  # An allowlist of the fully qualified names of RPCs that should be included
@@ -24,7 +24,7 @@ module Google
24
24
  # Message for requesting list of QuotaInfos
25
25
  # @!attribute [rw] parent
26
26
  # @return [::String]
27
- # Required. Parent value of QuotaInfo resources.
27
+ # Required. Identifier. Parent value of QuotaInfo resources.
28
28
  # Listing across different resource containers (such as 'projects/-') is not
29
29
  # allowed.
30
30
  #
@@ -60,7 +60,7 @@ module Google
60
60
  # Message for getting a QuotaInfo
61
61
  # @!attribute [rw] name
62
62
  # @return [::String]
63
- # Required. The resource name of the quota info.
63
+ # Required. Identifier. The resource name of the quota info.
64
64
  #
65
65
  # An example name:
66
66
  # `projects/123/locations/global/services/compute.googleapis.com/quotaInfos/CpusPerProjectPerRegion`
@@ -72,7 +72,7 @@ module Google
72
72
  # Message for requesting list of QuotaPreferences
73
73
  # @!attribute [rw] parent
74
74
  # @return [::String]
75
- # Required. Parent value of QuotaPreference resources.
75
+ # Required. Identifier. Parent value of QuotaPreference resources.
76
76
  # Listing across different resource containers (such as 'projects/-') is not
77
77
  # allowed.
78
78
  #
@@ -129,7 +129,7 @@ module Google
129
129
  # Message for getting a QuotaPreference
130
130
  # @!attribute [rw] name
131
131
  # @return [::String]
132
- # Required. Name of the resource
132
+ # Required. Identifier. Name of the resource
133
133
  #
134
134
  # Example name:
135
135
  # `projects/123/locations/global/quota_preferences/my-config-for-us-east1`
@@ -141,7 +141,7 @@ module Google
141
141
  # Message for creating a QuotaPreference
142
142
  # @!attribute [rw] parent
143
143
  # @return [::String]
144
- # Required. Value for parent.
144
+ # Required. Identifier. Value for parent.
145
145
  #
146
146
  # Example:
147
147
  # `projects/123/locations/global`
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module CloudQuotas
23
+ module V1
24
+ # Request for getting QuotaAdjusterSettings
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Required. Identifier. Name of the `quotaAdjusterSettings` configuration.
28
+ # Only a single setting per project is supported.
29
+ class GetQuotaAdjusterSettingsRequest
30
+ include ::Google::Protobuf::MessageExts
31
+ extend ::Google::Protobuf::MessageExts::ClassMethods
32
+ end
33
+
34
+ # Request for updating QuotaAdjusterSettings
35
+ # @!attribute [rw] quota_adjuster_settings
36
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettings]
37
+ # Required. The QuotaAdjusterSettings to update.
38
+ # @!attribute [rw] update_mask
39
+ # @return [::Google::Protobuf::FieldMask]
40
+ # Optional. The list of fields to update.
41
+ # @!attribute [rw] validate_only
42
+ # @return [::Boolean]
43
+ # Optional. If set to true, checks the syntax of the request but doesn't
44
+ # update the quota adjuster settings value. Note that although a request can
45
+ # be valid, that doesn't guarantee that the request will be fulfilled.
46
+ class UpdateQuotaAdjusterSettingsRequest
47
+ include ::Google::Protobuf::MessageExts
48
+ extend ::Google::Protobuf::MessageExts::ClassMethods
49
+ end
50
+
51
+ # The QuotaAdjusterSettings resource defines the settings for the Quota
52
+ # Adjuster.
53
+ # @!attribute [rw] name
54
+ # @return [::String]
55
+ # Identifier. Name of the configuration, in the formats below:
56
+ #
57
+ # * For a project:
58
+ # projects/PROJECT_NUMBER/locations/global/quotaAdjusterSettings
59
+ # * For a folder:
60
+ # folders/FOLDER_NUMBER/locations/global/quotaAdjusterSettings
61
+ # * For an organization:
62
+ # organizations/ORGANIZATION_NUMBER/locations/global/quotaAdjusterSettings
63
+ # @!attribute [rw] enablement
64
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaAdjusterSettings::Enablement]
65
+ # Optional. The configured value of the enablement at the given resource.
66
+ # @!attribute [r] update_time
67
+ # @return [::Google::Protobuf::Timestamp]
68
+ # Output only. The timestamp when the QuotaAdjusterSettings resource was last
69
+ # updated.
70
+ # @!attribute [rw] etag
71
+ # @return [::String]
72
+ # Optional. The current ETag of the QuotaAdjusterSettings. If an ETag is
73
+ # provided on update and does not match the current server's ETag in the
74
+ # QuotaAdjusterSettings, the request is blocked and returns an ABORTED error.
75
+ # See https://google.aip.dev/134#etags for more details on ETags.
76
+ # @!attribute [rw] inherited
77
+ # @return [::Boolean]
78
+ # Optional. Indicates whether the setting is inherited or explicitly
79
+ # specified.
80
+ # @!attribute [r] inherited_from
81
+ # @return [::String]
82
+ # Output only. The resource container from which the setting is inherited.
83
+ # This refers to the nearest ancestor with enablement set (either ENABLED or
84
+ # DISABLED). The value can be an organizations/\\{organization_id},
85
+ # folders/\\{folder_id}, or can be 'default' if no ancestor exists with
86
+ # enablement set. The value will be empty when enablement is directly set on
87
+ # this container.
88
+ class QuotaAdjusterSettings
89
+ include ::Google::Protobuf::MessageExts
90
+ extend ::Google::Protobuf::MessageExts::ClassMethods
91
+
92
+ # The enablement status of the quota adjuster.
93
+ module Enablement
94
+ # The quota adjuster is in an unknown state.
95
+ ENABLEMENT_UNSPECIFIED = 0
96
+
97
+ # The quota adjuster is enabled.
98
+ ENABLED = 2
99
+
100
+ # The quota adjuster is disabled.
101
+ DISABLED = 3
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end