googleapis-common-protos-types 1.0.2 → 1.18.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.
Files changed (64) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +173 -0
  3. data/README.md +19 -0
  4. data/lib/google/api/annotations_pb.rb +63 -1
  5. data/lib/google/api/auth_pb.rb +271 -30
  6. data/lib/google/api/backend_pb.rb +216 -11
  7. data/lib/google/api/billing_pb.rb +107 -11
  8. data/lib/google/api/client_pb.rb +534 -0
  9. data/lib/google/api/config_change_pb.rb +115 -19
  10. data/lib/google/api/consumer_pb.rb +113 -18
  11. data/lib/google/api/context_pb.rb +122 -10
  12. data/lib/google/api/control_pb.rb +73 -4
  13. data/lib/google/api/distribution_pb.rb +250 -38
  14. data/lib/google/api/documentation_pb.rb +199 -20
  15. data/lib/google/api/endpoint_pb.rb +98 -9
  16. data/lib/google/api/error_reason_pb.rb +663 -0
  17. data/lib/google/api/field_behavior_pb.rb +147 -0
  18. data/lib/google/api/field_info_pb.rb +151 -0
  19. data/lib/google/api/http_pb.rb +401 -23
  20. data/lib/google/api/httpbody_pb.rb +111 -6
  21. data/lib/google/api/label_pb.rb +78 -12
  22. data/lib/google/api/launch_stage_pb.rb +113 -0
  23. data/lib/google/api/log_pb.rb +85 -7
  24. data/lib/google/api/logging_pb.rb +111 -11
  25. data/lib/google/api/metric_pb.rb +326 -33
  26. data/lib/google/api/monitored_resource_pb.rb +165 -18
  27. data/lib/google/api/monitoring_pb.rb +137 -11
  28. data/lib/google/api/policy_pb.rb +127 -0
  29. data/lib/google/api/quota_pb.rb +215 -24
  30. data/lib/google/api/resource_pb.rb +289 -0
  31. data/lib/google/api/routing_pb.rb +505 -0
  32. data/lib/google/api/service_pb.rb +243 -33
  33. data/lib/google/api/source_info_pb.rb +62 -4
  34. data/lib/google/api/system_parameter_pb.rb +127 -15
  35. data/lib/google/api/usage_pb.rb +126 -13
  36. data/lib/google/api/visibility_pb.rb +157 -0
  37. data/lib/google/logging/type/http_request_pb.rb +136 -19
  38. data/lib/google/logging/type/log_severity_pb.rb +110 -13
  39. data/lib/google/longrunning/operations_pb.rb +288 -33
  40. data/lib/google/rpc/code_pb.rb +215 -20
  41. data/lib/google/rpc/context/attribute_context_pb.rb +403 -0
  42. data/lib/google/rpc/context/audit_context_pb.rb +94 -0
  43. data/lib/google/rpc/error_details_pb.rb +342 -63
  44. data/lib/google/rpc/http_pb.rb +107 -0
  45. data/lib/google/rpc/status_pb.rb +80 -6
  46. data/lib/google/type/calendar_period_pb.rb +97 -0
  47. data/lib/google/type/color_pb.rb +205 -7
  48. data/lib/google/type/date_pb.rb +81 -6
  49. data/lib/google/type/datetime_pb.rb +149 -0
  50. data/lib/google/type/dayofweek_pb.rb +79 -11
  51. data/lib/google/type/decimal_pb.rb +136 -0
  52. data/lib/google/type/expr_pb.rb +114 -0
  53. data/lib/google/type/fraction_pb.rb +74 -0
  54. data/lib/google/type/interval_pb.rb +90 -0
  55. data/lib/google/type/latlng_pb.rb +66 -5
  56. data/lib/google/type/localized_text_pb.rb +77 -0
  57. data/lib/google/type/money_pb.rb +71 -6
  58. data/lib/google/type/month_pb.rb +106 -0
  59. data/lib/google/type/phone_number_pb.rb +155 -0
  60. data/lib/google/type/postal_address_pb.rb +163 -14
  61. data/lib/google/type/quaternion_pb.rb +135 -0
  62. data/lib/google/type/timeofday_pb.rb +73 -7
  63. data/lib/googleapis/common/protos/types/version.rb +23 -0
  64. metadata +43 -43
@@ -1,50 +1,305 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/longrunning/operations.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
7
9
  require 'google/protobuf/any_pb'
10
+ require 'google/protobuf/descriptor_pb'
11
+ require 'google/protobuf/duration_pb'
8
12
  require 'google/protobuf/empty_pb'
9
13
  require 'google/rpc/status_pb'
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_message "google.longrunning.Operation" do
12
- optional :name, :string, 1
13
- optional :metadata, :message, 2, "google.protobuf.Any"
14
- optional :done, :bool, 3
15
- oneof :result do
16
- optional :error, :message, 4, "google.rpc.Status"
17
- optional :response, :message, 5, "google.protobuf.Any"
14
+
15
+
16
+ descriptor_data = "\n#google/longrunning/operations.proto\x12\x12google.longrunning\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x19google/protobuf/any.proto\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto\"\xa8\x01\n\tOperation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x08metadata\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x0c\n\x04\x64one\x18\x03 \x01(\x08\x12#\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12(\n\x08response\x18\x05 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x42\x08\n\x06result\"#\n\x13GetOperationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\\\n\x15ListOperationsRequest\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"d\n\x16ListOperationsResponse\x12\x31\n\noperations\x18\x01 \x03(\x0b\x32\x1d.google.longrunning.Operation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"&\n\x16\x43\x61ncelOperationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"&\n\x16\x44\x65leteOperationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"P\n\x14WaitOperationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12*\n\x07timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"=\n\rOperationInfo\x12\x15\n\rresponse_type\x18\x01 \x01(\t\x12\x15\n\rmetadata_type\x18\x02 \x01(\t2\xaa\x05\n\nOperations\x12\x94\x01\n\x0eListOperations\x12).google.longrunning.ListOperationsRequest\x1a*.google.longrunning.ListOperationsResponse\"+\xda\x41\x0bname,filter\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=operations}\x12\x7f\n\x0cGetOperation\x12\'.google.longrunning.GetOperationRequest\x1a\x1d.google.longrunning.Operation\"\'\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1a\x12\x18/v1/{name=operations/**}\x12~\n\x0f\x44\x65leteOperation\x12*.google.longrunning.DeleteOperationRequest\x1a\x16.google.protobuf.Empty\"\'\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1a*\x18/v1/{name=operations/**}\x12\x88\x01\n\x0f\x43\x61ncelOperation\x12*.google.longrunning.CancelOperationRequest\x1a\x16.google.protobuf.Empty\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\"\x1f/v1/{name=operations/**}:cancel:\x01*\x12Z\n\rWaitOperation\x12(.google.longrunning.WaitOperationRequest\x1a\x1d.google.longrunning.Operation\"\x00\x1a\x1d\xca\x41\x1alongrunning.googleapis.com:Z\n\x0eoperation_info\x12\x1e.google.protobuf.MethodOptions\x18\x99\x08 \x01(\x0b\x32!.google.longrunning.OperationInfoB\xa5\x01\n\x16\x63om.google.longrunningB\x0fOperationsProtoP\x01ZCcloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb\xf8\x01\x01\xa2\x02\x05GLRUN\xaa\x02\x12Google.LongRunning\xca\x02\x12Google\\LongRunningb\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.protobuf.Any", "google/protobuf/any.proto"],
32
+ ["google.rpc.Status", "google/rpc/status.proto"],
33
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
34
+ ]
35
+ imports.each do |type_name, expected_filename|
36
+ import_file = pool.lookup(type_name).file_descriptor
37
+ if import_file.name != expected_filename
38
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
18
39
  end
19
40
  end
20
- add_message "google.longrunning.GetOperationRequest" do
21
- optional :name, :string, 1
22
- end
23
- add_message "google.longrunning.ListOperationsRequest" do
24
- optional :name, :string, 4
25
- optional :filter, :string, 1
26
- optional :page_size, :int32, 2
27
- optional :page_token, :string, 3
28
- end
29
- add_message "google.longrunning.ListOperationsResponse" do
30
- repeated :operations, :message, 1, "google.longrunning.Operation"
31
- optional :next_page_token, :string, 2
32
- end
33
- add_message "google.longrunning.CancelOperationRequest" do
34
- optional :name, :string, 1
35
- end
36
- add_message "google.longrunning.DeleteOperationRequest" do
37
- optional :name, :string, 1
38
- end
41
+ warn "Each proto file must use a consistent fully-qualified name."
42
+ warn "This will become an error in the next major version."
39
43
  end
40
44
 
41
45
  module Google
42
46
  module Longrunning
43
- Operation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.Operation").msgclass
44
- GetOperationRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.GetOperationRequest").msgclass
45
- ListOperationsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.ListOperationsRequest").msgclass
46
- ListOperationsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.ListOperationsResponse").msgclass
47
- CancelOperationRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.CancelOperationRequest").msgclass
48
- DeleteOperationRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.DeleteOperationRequest").msgclass
47
+ Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.Operation").msgclass
48
+ GetOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.GetOperationRequest").msgclass
49
+ ListOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.ListOperationsRequest").msgclass
50
+ ListOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.ListOperationsResponse").msgclass
51
+ CancelOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.CancelOperationRequest").msgclass
52
+ DeleteOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.DeleteOperationRequest").msgclass
53
+ WaitOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.WaitOperationRequest").msgclass
54
+ OperationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.longrunning.OperationInfo").msgclass
49
55
  end
50
56
  end
57
+
58
+ #### Source proto file: google/longrunning/operations.proto ####
59
+ #
60
+ # // Copyright 2024 Google LLC
61
+ # //
62
+ # // Licensed under the Apache License, Version 2.0 (the "License");
63
+ # // you may not use this file except in compliance with the License.
64
+ # // You may obtain a copy of the License at
65
+ # //
66
+ # // http://www.apache.org/licenses/LICENSE-2.0
67
+ # //
68
+ # // Unless required by applicable law or agreed to in writing, software
69
+ # // distributed under the License is distributed on an "AS IS" BASIS,
70
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71
+ # // See the License for the specific language governing permissions and
72
+ # // limitations under the License.
73
+ #
74
+ # syntax = "proto3";
75
+ #
76
+ # package google.longrunning;
77
+ #
78
+ # import "google/api/annotations.proto";
79
+ # import "google/api/client.proto";
80
+ # import "google/protobuf/any.proto";
81
+ # import "google/protobuf/descriptor.proto";
82
+ # import "google/protobuf/duration.proto";
83
+ # import "google/protobuf/empty.proto";
84
+ # import "google/rpc/status.proto";
85
+ #
86
+ # option cc_enable_arenas = true;
87
+ # option csharp_namespace = "Google.LongRunning";
88
+ # option go_package = "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb";
89
+ # option java_multiple_files = true;
90
+ # option java_outer_classname = "OperationsProto";
91
+ # option java_package = "com.google.longrunning";
92
+ # option objc_class_prefix = "GLRUN";
93
+ # option php_namespace = "Google\\LongRunning";
94
+ #
95
+ # extend google.protobuf.MethodOptions {
96
+ # // Additional information regarding long-running operations.
97
+ # // In particular, this specifies the types that are returned from
98
+ # // long-running operations.
99
+ # //
100
+ # // Required for methods that return `google.longrunning.Operation`; invalid
101
+ # // otherwise.
102
+ # google.longrunning.OperationInfo operation_info = 1049;
103
+ # }
104
+ #
105
+ # // Manages long-running operations with an API service.
106
+ # //
107
+ # // When an API method normally takes long time to complete, it can be designed
108
+ # // to return [Operation][google.longrunning.Operation] to the client, and the
109
+ # // client can use this interface to receive the real response asynchronously by
110
+ # // polling the operation resource, or pass the operation resource to another API
111
+ # // (such as Pub/Sub API) to receive the response. Any API service that returns
112
+ # // long-running operations should implement the `Operations` interface so
113
+ # // developers can have a consistent client experience.
114
+ # service Operations {
115
+ # option (google.api.default_host) = "longrunning.googleapis.com";
116
+ #
117
+ # // Lists operations that match the specified filter in the request. If the
118
+ # // server doesn't support this method, it returns `UNIMPLEMENTED`.
119
+ # rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) {
120
+ # option (google.api.http) = {
121
+ # get: "/v1/{name=operations}"
122
+ # };
123
+ # option (google.api.method_signature) = "name,filter";
124
+ # }
125
+ #
126
+ # // Gets the latest state of a long-running operation. Clients can use this
127
+ # // method to poll the operation result at intervals as recommended by the API
128
+ # // service.
129
+ # rpc GetOperation(GetOperationRequest) returns (Operation) {
130
+ # option (google.api.http) = {
131
+ # get: "/v1/{name=operations/**}"
132
+ # };
133
+ # option (google.api.method_signature) = "name";
134
+ # }
135
+ #
136
+ # // Deletes a long-running operation. This method indicates that the client is
137
+ # // no longer interested in the operation result. It does not cancel the
138
+ # // operation. If the server doesn't support this method, it returns
139
+ # // `google.rpc.Code.UNIMPLEMENTED`.
140
+ # rpc DeleteOperation(DeleteOperationRequest) returns (google.protobuf.Empty) {
141
+ # option (google.api.http) = {
142
+ # delete: "/v1/{name=operations/**}"
143
+ # };
144
+ # option (google.api.method_signature) = "name";
145
+ # }
146
+ #
147
+ # // Starts asynchronous cancellation on a long-running operation. The server
148
+ # // makes a best effort to cancel the operation, but success is not
149
+ # // guaranteed. If the server doesn't support this method, it returns
150
+ # // `google.rpc.Code.UNIMPLEMENTED`. Clients can use
151
+ # // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
152
+ # // other methods to check whether the cancellation succeeded or whether the
153
+ # // operation completed despite cancellation. On successful cancellation,
154
+ # // the operation is not deleted; instead, it becomes an operation with
155
+ # // an [Operation.error][google.longrunning.Operation.error] value with a
156
+ # // [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to
157
+ # // `Code.CANCELLED`.
158
+ # rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) {
159
+ # option (google.api.http) = {
160
+ # post: "/v1/{name=operations/**}:cancel"
161
+ # body: "*"
162
+ # };
163
+ # option (google.api.method_signature) = "name";
164
+ # }
165
+ #
166
+ # // Waits until the specified long-running operation is done or reaches at most
167
+ # // a specified timeout, returning the latest state. If the operation is
168
+ # // already done, the latest state is immediately returned. If the timeout
169
+ # // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
170
+ # // timeout is used. If the server does not support this method, it returns
171
+ # // `google.rpc.Code.UNIMPLEMENTED`.
172
+ # // Note that this method is on a best-effort basis. It may return the latest
173
+ # // state before the specified timeout (including immediately), meaning even an
174
+ # // immediate response is no guarantee that the operation is done.
175
+ # rpc WaitOperation(WaitOperationRequest) returns (Operation) {}
176
+ # }
177
+ #
178
+ # // This resource represents a long-running operation that is the result of a
179
+ # // network API call.
180
+ # message Operation {
181
+ # // The server-assigned name, which is only unique within the same service that
182
+ # // originally returns it. If you use the default HTTP mapping, the
183
+ # // `name` should be a resource name ending with `operations/{unique_id}`.
184
+ # string name = 1;
185
+ #
186
+ # // Service-specific metadata associated with the operation. It typically
187
+ # // contains progress information and common metadata such as create time.
188
+ # // Some services might not provide such metadata. Any method that returns a
189
+ # // long-running operation should document the metadata type, if any.
190
+ # google.protobuf.Any metadata = 2;
191
+ #
192
+ # // If the value is `false`, it means the operation is still in progress.
193
+ # // If `true`, the operation is completed, and either `error` or `response` is
194
+ # // available.
195
+ # bool done = 3;
196
+ #
197
+ # // The operation result, which can be either an `error` or a valid `response`.
198
+ # // If `done` == `false`, neither `error` nor `response` is set.
199
+ # // If `done` == `true`, exactly one of `error` or `response` can be set.
200
+ # // Some services might not provide the result.
201
+ # oneof result {
202
+ # // The error result of the operation in case of failure or cancellation.
203
+ # google.rpc.Status error = 4;
204
+ #
205
+ # // The normal, successful response of the operation. If the original
206
+ # // method returns no data on success, such as `Delete`, the response is
207
+ # // `google.protobuf.Empty`. If the original method is standard
208
+ # // `Get`/`Create`/`Update`, the response should be the resource. For other
209
+ # // methods, the response should have the type `XxxResponse`, where `Xxx`
210
+ # // is the original method name. For example, if the original method name
211
+ # // is `TakeSnapshot()`, the inferred response type is
212
+ # // `TakeSnapshotResponse`.
213
+ # google.protobuf.Any response = 5;
214
+ # }
215
+ # }
216
+ #
217
+ # // The request message for
218
+ # // [Operations.GetOperation][google.longrunning.Operations.GetOperation].
219
+ # message GetOperationRequest {
220
+ # // The name of the operation resource.
221
+ # string name = 1;
222
+ # }
223
+ #
224
+ # // The request message for
225
+ # // [Operations.ListOperations][google.longrunning.Operations.ListOperations].
226
+ # message ListOperationsRequest {
227
+ # // The name of the operation's parent resource.
228
+ # string name = 4;
229
+ #
230
+ # // The standard list filter.
231
+ # string filter = 1;
232
+ #
233
+ # // The standard list page size.
234
+ # int32 page_size = 2;
235
+ #
236
+ # // The standard list page token.
237
+ # string page_token = 3;
238
+ # }
239
+ #
240
+ # // The response message for
241
+ # // [Operations.ListOperations][google.longrunning.Operations.ListOperations].
242
+ # message ListOperationsResponse {
243
+ # // A list of operations that matches the specified filter in the request.
244
+ # repeated Operation operations = 1;
245
+ #
246
+ # // The standard List next-page token.
247
+ # string next_page_token = 2;
248
+ # }
249
+ #
250
+ # // The request message for
251
+ # // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
252
+ # message CancelOperationRequest {
253
+ # // The name of the operation resource to be cancelled.
254
+ # string name = 1;
255
+ # }
256
+ #
257
+ # // The request message for
258
+ # // [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
259
+ # message DeleteOperationRequest {
260
+ # // The name of the operation resource to be deleted.
261
+ # string name = 1;
262
+ # }
263
+ #
264
+ # // The request message for
265
+ # // [Operations.WaitOperation][google.longrunning.Operations.WaitOperation].
266
+ # message WaitOperationRequest {
267
+ # // The name of the operation resource to wait on.
268
+ # string name = 1;
269
+ #
270
+ # // The maximum duration to wait before timing out. If left blank, the wait
271
+ # // will be at most the time permitted by the underlying HTTP/RPC protocol.
272
+ # // If RPC context deadline is also specified, the shorter one will be used.
273
+ # google.protobuf.Duration timeout = 2;
274
+ # }
275
+ #
276
+ # // A message representing the message types used by a long-running operation.
277
+ # //
278
+ # // Example:
279
+ # //
280
+ # // rpc Export(ExportRequest) returns (google.longrunning.Operation) {
281
+ # // option (google.longrunning.operation_info) = {
282
+ # // response_type: "ExportResponse"
283
+ # // metadata_type: "ExportMetadata"
284
+ # // };
285
+ # // }
286
+ # message OperationInfo {
287
+ # // Required. The message name of the primary return type for this
288
+ # // long-running operation.
289
+ # // This type will be used to deserialize the LRO's response.
290
+ # //
291
+ # // If the response is in a different package from the rpc, a fully-qualified
292
+ # // message name must be used (e.g. `google.protobuf.Struct`).
293
+ # //
294
+ # // Note: Altering this value constitutes a breaking change.
295
+ # string response_type = 1;
296
+ #
297
+ # // Required. The message name of the metadata type for this long-running
298
+ # // operation.
299
+ # //
300
+ # // If the response is in a different package from the rpc, a fully-qualified
301
+ # // message name must be used (e.g. `google.protobuf.Struct`).
302
+ # //
303
+ # // Note: Altering this value constitutes a breaking change.
304
+ # string metadata_type = 2;
305
+ # }
@@ -1,32 +1,227 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/rpc/code.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_enum "google.rpc.Code" do
8
- value :OK, 0
9
- value :CANCELLED, 1
10
- value :UNKNOWN, 2
11
- value :INVALID_ARGUMENT, 3
12
- value :DEADLINE_EXCEEDED, 4
13
- value :NOT_FOUND, 5
14
- value :ALREADY_EXISTS, 6
15
- value :PERMISSION_DENIED, 7
16
- value :UNAUTHENTICATED, 16
17
- value :RESOURCE_EXHAUSTED, 8
18
- value :FAILED_PRECONDITION, 9
19
- value :ABORTED, 10
20
- value :OUT_OF_RANGE, 11
21
- value :UNIMPLEMENTED, 12
22
- value :INTERNAL, 13
23
- value :UNAVAILABLE, 14
24
- value :DATA_LOSS, 15
7
+
8
+ descriptor_data = "\n\x15google/rpc/code.proto\x12\ngoogle.rpc*\xb7\x02\n\x04\x43ode\x12\x06\n\x02OK\x10\x00\x12\r\n\tCANCELLED\x10\x01\x12\x0b\n\x07UNKNOWN\x10\x02\x12\x14\n\x10INVALID_ARGUMENT\x10\x03\x12\x15\n\x11\x44\x45\x41\x44LINE_EXCEEDED\x10\x04\x12\r\n\tNOT_FOUND\x10\x05\x12\x12\n\x0e\x41LREADY_EXISTS\x10\x06\x12\x15\n\x11PERMISSION_DENIED\x10\x07\x12\x13\n\x0fUNAUTHENTICATED\x10\x10\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x08\x12\x17\n\x13\x46\x41ILED_PRECONDITION\x10\t\x12\x0b\n\x07\x41\x42ORTED\x10\n\x12\x10\n\x0cOUT_OF_RANGE\x10\x0b\x12\x11\n\rUNIMPLEMENTED\x10\x0c\x12\x0c\n\x08INTERNAL\x10\r\x12\x0f\n\x0bUNAVAILABLE\x10\x0e\x12\r\n\tDATA_LOSS\x10\x0f\x42X\n\x0e\x63om.google.rpcB\tCodeProtoP\x01Z3google.golang.org/genproto/googleapis/rpc/code;code\xa2\x02\x03RPCb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
+ end
25
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
26
32
  end
27
33
 
28
34
  module Google
29
35
  module Rpc
30
- Code = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.rpc.Code").enummodule
36
+ Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.rpc.Code").enummodule
31
37
  end
32
38
  end
39
+
40
+ #### Source proto file: google/rpc/code.proto ####
41
+ #
42
+ # // Copyright 2024 Google LLC
43
+ # //
44
+ # // Licensed under the Apache License, Version 2.0 (the "License");
45
+ # // you may not use this file except in compliance with the License.
46
+ # // You may obtain a copy of the License at
47
+ # //
48
+ # // http://www.apache.org/licenses/LICENSE-2.0
49
+ # //
50
+ # // Unless required by applicable law or agreed to in writing, software
51
+ # // distributed under the License is distributed on an "AS IS" BASIS,
52
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53
+ # // See the License for the specific language governing permissions and
54
+ # // limitations under the License.
55
+ #
56
+ # syntax = "proto3";
57
+ #
58
+ # package google.rpc;
59
+ #
60
+ # option go_package = "google.golang.org/genproto/googleapis/rpc/code;code";
61
+ # option java_multiple_files = true;
62
+ # option java_outer_classname = "CodeProto";
63
+ # option java_package = "com.google.rpc";
64
+ # option objc_class_prefix = "RPC";
65
+ #
66
+ # // The canonical error codes for gRPC APIs.
67
+ # //
68
+ # //
69
+ # // Sometimes multiple error codes may apply. Services should return
70
+ # // the most specific error code that applies. For example, prefer
71
+ # // `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
72
+ # // Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
73
+ # enum Code {
74
+ # // Not an error; returned on success.
75
+ # //
76
+ # // HTTP Mapping: 200 OK
77
+ # OK = 0;
78
+ #
79
+ # // The operation was cancelled, typically by the caller.
80
+ # //
81
+ # // HTTP Mapping: 499 Client Closed Request
82
+ # CANCELLED = 1;
83
+ #
84
+ # // Unknown error. For example, this error may be returned when
85
+ # // a `Status` value received from another address space belongs to
86
+ # // an error space that is not known in this address space. Also
87
+ # // errors raised by APIs that do not return enough error information
88
+ # // may be converted to this error.
89
+ # //
90
+ # // HTTP Mapping: 500 Internal Server Error
91
+ # UNKNOWN = 2;
92
+ #
93
+ # // The client specified an invalid argument. Note that this differs
94
+ # // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
95
+ # // that are problematic regardless of the state of the system
96
+ # // (e.g., a malformed file name).
97
+ # //
98
+ # // HTTP Mapping: 400 Bad Request
99
+ # INVALID_ARGUMENT = 3;
100
+ #
101
+ # // The deadline expired before the operation could complete. For operations
102
+ # // that change the state of the system, this error may be returned
103
+ # // even if the operation has completed successfully. For example, a
104
+ # // successful response from a server could have been delayed long
105
+ # // enough for the deadline to expire.
106
+ # //
107
+ # // HTTP Mapping: 504 Gateway Timeout
108
+ # DEADLINE_EXCEEDED = 4;
109
+ #
110
+ # // Some requested entity (e.g., file or directory) was not found.
111
+ # //
112
+ # // Note to server developers: if a request is denied for an entire class
113
+ # // of users, such as gradual feature rollout or undocumented allowlist,
114
+ # // `NOT_FOUND` may be used. If a request is denied for some users within
115
+ # // a class of users, such as user-based access control, `PERMISSION_DENIED`
116
+ # // must be used.
117
+ # //
118
+ # // HTTP Mapping: 404 Not Found
119
+ # NOT_FOUND = 5;
120
+ #
121
+ # // The entity that a client attempted to create (e.g., file or directory)
122
+ # // already exists.
123
+ # //
124
+ # // HTTP Mapping: 409 Conflict
125
+ # ALREADY_EXISTS = 6;
126
+ #
127
+ # // The caller does not have permission to execute the specified
128
+ # // operation. `PERMISSION_DENIED` must not be used for rejections
129
+ # // caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
130
+ # // instead for those errors). `PERMISSION_DENIED` must not be
131
+ # // used if the caller can not be identified (use `UNAUTHENTICATED`
132
+ # // instead for those errors). This error code does not imply the
133
+ # // request is valid or the requested entity exists or satisfies
134
+ # // other pre-conditions.
135
+ # //
136
+ # // HTTP Mapping: 403 Forbidden
137
+ # PERMISSION_DENIED = 7;
138
+ #
139
+ # // The request does not have valid authentication credentials for the
140
+ # // operation.
141
+ # //
142
+ # // HTTP Mapping: 401 Unauthorized
143
+ # UNAUTHENTICATED = 16;
144
+ #
145
+ # // Some resource has been exhausted, perhaps a per-user quota, or
146
+ # // perhaps the entire file system is out of space.
147
+ # //
148
+ # // HTTP Mapping: 429 Too Many Requests
149
+ # RESOURCE_EXHAUSTED = 8;
150
+ #
151
+ # // The operation was rejected because the system is not in a state
152
+ # // required for the operation's execution. For example, the directory
153
+ # // to be deleted is non-empty, an rmdir operation is applied to
154
+ # // a non-directory, etc.
155
+ # //
156
+ # // Service implementors can use the following guidelines to decide
157
+ # // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
158
+ # // (a) Use `UNAVAILABLE` if the client can retry just the failing call.
159
+ # // (b) Use `ABORTED` if the client should retry at a higher level. For
160
+ # // example, when a client-specified test-and-set fails, indicating the
161
+ # // client should restart a read-modify-write sequence.
162
+ # // (c) Use `FAILED_PRECONDITION` if the client should not retry until
163
+ # // the system state has been explicitly fixed. For example, if an "rmdir"
164
+ # // fails because the directory is non-empty, `FAILED_PRECONDITION`
165
+ # // should be returned since the client should not retry unless
166
+ # // the files are deleted from the directory.
167
+ # //
168
+ # // HTTP Mapping: 400 Bad Request
169
+ # FAILED_PRECONDITION = 9;
170
+ #
171
+ # // The operation was aborted, typically due to a concurrency issue such as
172
+ # // a sequencer check failure or transaction abort.
173
+ # //
174
+ # // See the guidelines above for deciding between `FAILED_PRECONDITION`,
175
+ # // `ABORTED`, and `UNAVAILABLE`.
176
+ # //
177
+ # // HTTP Mapping: 409 Conflict
178
+ # ABORTED = 10;
179
+ #
180
+ # // The operation was attempted past the valid range. E.g., seeking or
181
+ # // reading past end-of-file.
182
+ # //
183
+ # // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
184
+ # // be fixed if the system state changes. For example, a 32-bit file
185
+ # // system will generate `INVALID_ARGUMENT` if asked to read at an
186
+ # // offset that is not in the range [0,2^32-1], but it will generate
187
+ # // `OUT_OF_RANGE` if asked to read from an offset past the current
188
+ # // file size.
189
+ # //
190
+ # // There is a fair bit of overlap between `FAILED_PRECONDITION` and
191
+ # // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
192
+ # // error) when it applies so that callers who are iterating through
193
+ # // a space can easily look for an `OUT_OF_RANGE` error to detect when
194
+ # // they are done.
195
+ # //
196
+ # // HTTP Mapping: 400 Bad Request
197
+ # OUT_OF_RANGE = 11;
198
+ #
199
+ # // The operation is not implemented or is not supported/enabled in this
200
+ # // service.
201
+ # //
202
+ # // HTTP Mapping: 501 Not Implemented
203
+ # UNIMPLEMENTED = 12;
204
+ #
205
+ # // Internal errors. This means that some invariants expected by the
206
+ # // underlying system have been broken. This error code is reserved
207
+ # // for serious errors.
208
+ # //
209
+ # // HTTP Mapping: 500 Internal Server Error
210
+ # INTERNAL = 13;
211
+ #
212
+ # // The service is currently unavailable. This is most likely a
213
+ # // transient condition, which can be corrected by retrying with
214
+ # // a backoff. Note that it is not always safe to retry
215
+ # // non-idempotent operations.
216
+ # //
217
+ # // See the guidelines above for deciding between `FAILED_PRECONDITION`,
218
+ # // `ABORTED`, and `UNAVAILABLE`.
219
+ # //
220
+ # // HTTP Mapping: 503 Service Unavailable
221
+ # UNAVAILABLE = 14;
222
+ #
223
+ # // Unrecoverable data loss or corruption.
224
+ # //
225
+ # // HTTP Mapping: 500 Internal Server Error
226
+ # DATA_LOSS = 15;
227
+ # }