google-cloud-cloud_quotas-v1 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/api/cloudquotas/v1/cloudquotas_pb.rb +58 -0
  6. data/lib/google/api/cloudquotas/v1/cloudquotas_services_pb.rb +62 -0
  7. data/lib/google/api/cloudquotas/v1/resources_pb.rb +58 -0
  8. data/lib/google/cloud/cloud_quotas/v1/cloud_quotas/client.rb +979 -0
  9. data/lib/google/cloud/cloud_quotas/v1/cloud_quotas/credentials.rb +47 -0
  10. data/lib/google/cloud/cloud_quotas/v1/cloud_quotas/paths.rb +265 -0
  11. data/lib/google/cloud/cloud_quotas/v1/cloud_quotas/rest/client.rb +907 -0
  12. data/lib/google/cloud/cloud_quotas/v1/cloud_quotas/rest/service_stub.rb +492 -0
  13. data/lib/google/cloud/cloud_quotas/v1/cloud_quotas/rest.rb +58 -0
  14. data/lib/google/cloud/cloud_quotas/v1/cloud_quotas.rb +61 -0
  15. data/lib/google/cloud/cloud_quotas/v1/rest.rb +37 -0
  16. data/lib/google/cloud/cloud_quotas/v1/version.rb +7 -2
  17. data/lib/google/cloud/cloud_quotas/v1.rb +45 -0
  18. data/lib/google-cloud-cloud_quotas-v1.rb +21 -0
  19. data/proto_docs/README.md +4 -0
  20. data/proto_docs/google/api/client.rb +394 -0
  21. data/proto_docs/google/api/cloudquotas/v1/cloudquotas.rb +196 -0
  22. data/proto_docs/google/api/cloudquotas/v1/resources.rb +332 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/api/resource.rb +222 -0
  26. data/proto_docs/google/protobuf/duration.rb +98 -0
  27. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  28. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  29. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  30. metadata +184 -10
@@ -0,0 +1,332 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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
+ # QuotaInfo represents information about a particular quota for a given
25
+ # project, folder or organization.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Resource name of this QuotaInfo.
29
+ # The ID component following "locations/" must be "global".
30
+ # Example:
31
+ # `projects/123/locations/global/services/compute.googleapis.com/quotaInfos/CpusPerProjectPerRegion`
32
+ # @!attribute [rw] quota_id
33
+ # @return [::String]
34
+ # The id of the quota, which is unquie within the service.
35
+ # Example: `CpusPerProjectPerRegion`
36
+ # @!attribute [rw] metric
37
+ # @return [::String]
38
+ # The metric of the quota. It specifies the resources consumption the quota
39
+ # is defined for.
40
+ # Example: `compute.googleapis.com/cpus`
41
+ # @!attribute [rw] service
42
+ # @return [::String]
43
+ # The name of the service in which the quota is defined.
44
+ # Example: `compute.googleapis.com`
45
+ # @!attribute [rw] is_precise
46
+ # @return [::Boolean]
47
+ # Whether this is a precise quota. A precise quota is tracked with absolute
48
+ # precision. In contrast, an imprecise quota is not tracked with precision.
49
+ # @!attribute [rw] refresh_interval
50
+ # @return [::String]
51
+ # The reset time interval for the quota. Refresh interval applies to rate
52
+ # quota only.
53
+ # Example: "minute" for per minute, "day" for per day, or "10 seconds" for
54
+ # every 10 seconds.
55
+ # @!attribute [rw] container_type
56
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaInfo::ContainerType]
57
+ # The container type of the QuotaInfo.
58
+ # @!attribute [rw] dimensions
59
+ # @return [::Array<::String>]
60
+ # The dimensions the quota is defined on.
61
+ # @!attribute [rw] metric_display_name
62
+ # @return [::String]
63
+ # The display name of the quota metric
64
+ # @!attribute [rw] quota_display_name
65
+ # @return [::String]
66
+ # The display name of the quota.
67
+ # @!attribute [rw] metric_unit
68
+ # @return [::String]
69
+ # The unit in which the metric value is reported, e.g., "MByte".
70
+ # @!attribute [rw] quota_increase_eligibility
71
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaIncreaseEligibility]
72
+ # Whether it is eligible to request a higher quota value for this quota.
73
+ # @!attribute [rw] is_fixed
74
+ # @return [::Boolean]
75
+ # Whether the quota value is fixed or adjustable
76
+ # @!attribute [rw] dimensions_infos
77
+ # @return [::Array<::Google::Cloud::CloudQuotas::V1::DimensionsInfo>]
78
+ # The collection of dimensions info ordered by their dimensions from more
79
+ # specific ones to less specific ones.
80
+ # @!attribute [rw] is_concurrent
81
+ # @return [::Boolean]
82
+ # Whether the quota is a concurrent quota. Concurrent quotas are enforced
83
+ # on the total number of concurrent operations in flight at any given time.
84
+ # @!attribute [rw] service_request_quota_uri
85
+ # @return [::String]
86
+ # URI to the page where the user can request more quotas for the cloud
87
+ # service, such as
88
+ # https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=\\{email}&entry_1=\\{id}.
89
+ # Google Developers Console UI replace \\{email} with the current
90
+ # user's e-mail, \\{id} with the current project number, or organization ID
91
+ # with "organizations/" prefix. For example,
92
+ # https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=25463754,
93
+ # or
94
+ # https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=organizations/26474422.
95
+ class QuotaInfo
96
+ include ::Google::Protobuf::MessageExts
97
+ extend ::Google::Protobuf::MessageExts::ClassMethods
98
+
99
+ # The enumeration of the types of a cloud resource container.
100
+ module ContainerType
101
+ # Unspecified container type.
102
+ CONTAINER_TYPE_UNSPECIFIED = 0
103
+
104
+ # consumer project
105
+ PROJECT = 1
106
+
107
+ # folder
108
+ FOLDER = 2
109
+
110
+ # organization
111
+ ORGANIZATION = 3
112
+ end
113
+ end
114
+
115
+ # Eligibility information regarding requesting increase adjustment of a quota.
116
+ # @!attribute [rw] is_eligible
117
+ # @return [::Boolean]
118
+ # Whether a higher quota value can be requested for the quota.
119
+ # @!attribute [rw] ineligibility_reason
120
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaIncreaseEligibility::IneligibilityReason]
121
+ # The reason of why it is ineligible to request increased value of the quota.
122
+ # If the is_eligible field is true, it defaults to
123
+ # INELIGIBILITY_REASON_UNSPECIFIED.
124
+ class QuotaIncreaseEligibility
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+
128
+ # The enumeration of reasons when it is ineligible to request increase
129
+ # adjustment.
130
+ module IneligibilityReason
131
+ # Default value when is_eligible is true.
132
+ INELIGIBILITY_REASON_UNSPECIFIED = 0
133
+
134
+ # The container is not linked with a valid billing account.
135
+ NO_VALID_BILLING_ACCOUNT = 1
136
+
137
+ # Other reasons.
138
+ OTHER = 2
139
+ end
140
+ end
141
+
142
+ # QuotaPreference represents the preferred quota configuration specified for
143
+ # a project, folder or organization. There is only one QuotaPreference
144
+ # resource for a quota value targeting a unique set of dimensions.
145
+ # @!attribute [rw] name
146
+ # @return [::String]
147
+ # Required except in the CREATE requests.
148
+ # The resource name of the quota preference.
149
+ # The ID component following "locations/" must be "global".
150
+ # Example:
151
+ # `projects/123/locations/global/quotaPreferences/my-config-for-us-east1`
152
+ # @!attribute [rw] dimensions
153
+ # @return [::Google::Protobuf::Map{::String => ::String}]
154
+ # The dimensions that this quota preference applies to. The key of the map
155
+ # entry is the name of a dimension, such as "region", "zone", "network_id",
156
+ # and the value of the map entry is the dimension value.
157
+ #
158
+ # If a dimension is missing from the map of dimensions, the quota preference
159
+ # applies to all the dimension values except for those that have other quota
160
+ # preferences configured for the specific value.
161
+ #
162
+ # NOTE: QuotaPreferences can only be applied across all values of "user" and
163
+ # "resource" dimension. Do not set values for "user" or "resource" in the
164
+ # dimension map.
165
+ #
166
+ # Example: \\{"provider", "Foo Inc"} where "provider" is a service specific
167
+ # dimension.
168
+ # @!attribute [rw] quota_config
169
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaConfig]
170
+ # Required. Preferred quota configuration.
171
+ # @!attribute [rw] etag
172
+ # @return [::String]
173
+ # Optional. The current etag of the quota preference. If an etag is provided
174
+ # on update and does not match the current server's etag of the quota
175
+ # preference, the request will be blocked and an ABORTED error will be
176
+ # returned. See https://google.aip.dev/134#etags for more details on etags.
177
+ # @!attribute [r] create_time
178
+ # @return [::Google::Protobuf::Timestamp]
179
+ # Output only. Create time stamp
180
+ # @!attribute [r] update_time
181
+ # @return [::Google::Protobuf::Timestamp]
182
+ # Output only. Update time stamp
183
+ # @!attribute [rw] service
184
+ # @return [::String]
185
+ # Required. The name of the service to which the quota preference is applied.
186
+ # @!attribute [rw] quota_id
187
+ # @return [::String]
188
+ # Required. The id of the quota to which the quota preference is applied. A
189
+ # quota name is unique in the service. Example: `CpusPerProjectPerRegion`
190
+ # @!attribute [r] reconciling
191
+ # @return [::Boolean]
192
+ # Output only. Is the quota preference pending Google Cloud approval and
193
+ # fulfillment.
194
+ # @!attribute [rw] justification
195
+ # @return [::String]
196
+ # The reason / justification for this quota preference.
197
+ # @!attribute [rw] contact_email
198
+ # @return [::String]
199
+ # Required. Input only. An email address that can be used for quota related
200
+ # communication between the Google Cloud and the user in case the Google
201
+ # Cloud needs further information to make a decision on whether the user
202
+ # preferred quota can be granted.
203
+ #
204
+ # The Google account for the email address must have quota update permission
205
+ # for the project, folder or organization this quota preference is for.
206
+ class QuotaPreference
207
+ include ::Google::Protobuf::MessageExts
208
+ extend ::Google::Protobuf::MessageExts::ClassMethods
209
+
210
+ # @!attribute [rw] key
211
+ # @return [::String]
212
+ # @!attribute [rw] value
213
+ # @return [::String]
214
+ class DimensionsEntry
215
+ include ::Google::Protobuf::MessageExts
216
+ extend ::Google::Protobuf::MessageExts::ClassMethods
217
+ end
218
+ end
219
+
220
+ # The preferred quota configuration.
221
+ # @!attribute [rw] preferred_value
222
+ # @return [::Integer]
223
+ # Required. The preferred value. Must be greater than or equal to -1. If set
224
+ # to -1, it means the value is "unlimited".
225
+ # @!attribute [r] state_detail
226
+ # @return [::String]
227
+ # Output only. Optional details about the state of this quota preference.
228
+ # @!attribute [r] granted_value
229
+ # @return [::Google::Protobuf::Int64Value]
230
+ # Output only. Granted quota value.
231
+ # @!attribute [r] trace_id
232
+ # @return [::String]
233
+ # Output only. The trace id that the Google Cloud uses to provision the
234
+ # requested quota. This trace id may be used by the client to contact Cloud
235
+ # support to track the state of a quota preference request. The trace id is
236
+ # only produced for increase requests and is unique for each request. The
237
+ # quota decrease requests do not have a trace id.
238
+ # @!attribute [rw] annotations
239
+ # @return [::Google::Protobuf::Map{::String => ::String}]
240
+ # The annotations map for clients to store small amounts of arbitrary data.
241
+ # Do not put PII or other sensitive information here.
242
+ # See https://google.aip.dev/128#annotations
243
+ # @!attribute [r] request_origin
244
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaConfig::Origin]
245
+ # Output only. The origin of the quota preference request.
246
+ class QuotaConfig
247
+ include ::Google::Protobuf::MessageExts
248
+ extend ::Google::Protobuf::MessageExts::ClassMethods
249
+
250
+ # @!attribute [rw] key
251
+ # @return [::String]
252
+ # @!attribute [rw] value
253
+ # @return [::String]
254
+ class AnnotationsEntry
255
+ include ::Google::Protobuf::MessageExts
256
+ extend ::Google::Protobuf::MessageExts::ClassMethods
257
+ end
258
+
259
+ # The enumeration of the origins of quota preference requests.
260
+ module Origin
261
+ # The unspecified value.
262
+ ORIGIN_UNSPECIFIED = 0
263
+
264
+ # Created through Cloud Console.
265
+ CLOUD_CONSOLE = 1
266
+
267
+ # Generated by automatic quota adjustment.
268
+ AUTO_ADJUSTER = 2
269
+ end
270
+ end
271
+
272
+ # The detailed quota information such as effective quota value for a
273
+ # combination of dimensions.
274
+ # @!attribute [rw] dimensions
275
+ # @return [::Google::Protobuf::Map{::String => ::String}]
276
+ # The map of dimensions for this dimensions info. The key of a map entry
277
+ # is "region", "zone" or the name of a service specific dimension, and the
278
+ # value of a map entry is the value of the dimension. If a dimension does
279
+ # not appear in the map of dimensions, the dimensions info applies to all
280
+ # the dimension values except for those that have another DimenisonInfo
281
+ # instance configured for the specific value.
282
+ # Example: \\{"provider" : "Foo Inc"} where "provider" is a service specific
283
+ # dimension of a quota.
284
+ # @!attribute [rw] details
285
+ # @return [::Google::Cloud::CloudQuotas::V1::QuotaDetails]
286
+ # Quota details for the specified dimensions.
287
+ # @!attribute [rw] applicable_locations
288
+ # @return [::Array<::String>]
289
+ # The applicable regions or zones of this dimensions info. The field will be
290
+ # set to ['global'] for quotas that are not per region or per zone.
291
+ # Otherwise, it will be set to the list of locations this dimension info is
292
+ # applicable to.
293
+ class DimensionsInfo
294
+ include ::Google::Protobuf::MessageExts
295
+ extend ::Google::Protobuf::MessageExts::ClassMethods
296
+
297
+ # @!attribute [rw] key
298
+ # @return [::String]
299
+ # @!attribute [rw] value
300
+ # @return [::String]
301
+ class DimensionsEntry
302
+ include ::Google::Protobuf::MessageExts
303
+ extend ::Google::Protobuf::MessageExts::ClassMethods
304
+ end
305
+ end
306
+
307
+ # The quota details for a map of dimensions.
308
+ # @!attribute [rw] value
309
+ # @return [::Integer]
310
+ # The value currently in effect and being enforced.
311
+ class QuotaDetails
312
+ include ::Google::Protobuf::MessageExts
313
+ extend ::Google::Protobuf::MessageExts::ClassMethods
314
+ end
315
+
316
+ # Enumerations of quota safety checks.
317
+ module QuotaSafetyCheck
318
+ # Unspecified quota safety check.
319
+ QUOTA_SAFETY_CHECK_UNSPECIFIED = 0
320
+
321
+ # Validates that a quota mutation would not cause the consumer's effective
322
+ # limit to be lower than the consumer's quota usage.
323
+ QUOTA_DECREASE_BELOW_USAGE = 1
324
+
325
+ # Validates that a quota mutation would not cause the consumer's effective
326
+ # limit to decrease by more than 10 percent.
327
+ QUOTA_DECREASE_PERCENTAGE_TOO_HIGH = 2
328
+ end
329
+ end
330
+ end
331
+ end
332
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 Api
22
+ # An indicator of the behavior of a given field (for example, that a field
23
+ # is required in requests, or given as output but ignored as input).
24
+ # This **does not** change the behavior in protocol buffers itself; it only
25
+ # denotes the behavior and may affect how API tooling handles the field.
26
+ #
27
+ # Note: This enum **may** receive new values in the future.
28
+ module FieldBehavior
29
+ # Conventional default for enums. Do not use this.
30
+ FIELD_BEHAVIOR_UNSPECIFIED = 0
31
+
32
+ # Specifically denotes a field as optional.
33
+ # While all fields in protocol buffers are optional, this may be specified
34
+ # for emphasis if appropriate.
35
+ OPTIONAL = 1
36
+
37
+ # Denotes a field as required.
38
+ # This indicates that the field **must** be provided as part of the request,
39
+ # and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
40
+ REQUIRED = 2
41
+
42
+ # Denotes a field as output only.
43
+ # This indicates that the field is provided in responses, but including the
44
+ # field in a request does nothing (the server *must* ignore it and
45
+ # *must not* throw an error as a result of the field's presence).
46
+ OUTPUT_ONLY = 3
47
+
48
+ # Denotes a field as input only.
49
+ # This indicates that the field is provided in requests, and the
50
+ # corresponding field is not included in output.
51
+ INPUT_ONLY = 4
52
+
53
+ # Denotes a field as immutable.
54
+ # This indicates that the field may be set once in a request to create a
55
+ # resource, but may not be changed thereafter.
56
+ IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 Api
22
+ # The launch stage as defined by [Google Cloud Platform
23
+ # Launch Stages](https://cloud.google.com/terms/launch-stages).
24
+ module LaunchStage
25
+ # Do not use this default value.
26
+ LAUNCH_STAGE_UNSPECIFIED = 0
27
+
28
+ # The feature is not yet implemented. Users can not use it.
29
+ UNIMPLEMENTED = 6
30
+
31
+ # Prelaunch features are hidden from users and are only visible internally.
32
+ PRELAUNCH = 7
33
+
34
+ # Early Access features are limited to a closed group of testers. To use
35
+ # these features, you must sign up in advance and sign a Trusted Tester
36
+ # agreement (which includes confidentiality provisions). These features may
37
+ # be unstable, changed in backward-incompatible ways, and are not
38
+ # guaranteed to be released.
39
+ EARLY_ACCESS = 1
40
+
41
+ # Alpha is a limited availability test for releases before they are cleared
42
+ # for widespread use. By Alpha, all significant design issues are resolved
43
+ # and we are in the process of verifying functionality. Alpha customers
44
+ # need to apply for access, agree to applicable terms, and have their
45
+ # projects allowlisted. Alpha releases don't have to be feature complete,
46
+ # no SLAs are provided, and there are no technical support obligations, but
47
+ # they will be far enough along that customers can actually use them in
48
+ # test environments or for limited-use tests -- just like they would in
49
+ # normal production cases.
50
+ ALPHA = 2
51
+
52
+ # Beta is the point at which we are ready to open a release for any
53
+ # customer to use. There are no SLA or technical support obligations in a
54
+ # Beta release. Products will be complete from a feature perspective, but
55
+ # may have some open outstanding issues. Beta releases are suitable for
56
+ # limited production use cases.
57
+ BETA = 3
58
+
59
+ # GA features are open to all developers and are considered stable and
60
+ # fully qualified for production use.
61
+ GA = 4
62
+
63
+ # Deprecated features are scheduled to be shut down and removed. For more
64
+ # information, see the "Deprecation Policy" section of our [Terms of
65
+ # Service](https://cloud.google.com/terms/)
66
+ # and the [Google Cloud Platform Subject to the Deprecation
67
+ # Policy](https://cloud.google.com/terms/deprecation) documentation.
68
+ DEPRECATED = 5
69
+ end
70
+ end
71
+ end