googleapis-common-protos-types 1.7.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/google/api/annotations_pb.rb +60 -2
- data/lib/google/api/auth_pb.rb +264 -34
- data/lib/google/api/backend_pb.rb +212 -23
- data/lib/google/api/billing_pb.rb +104 -8
- data/lib/google/api/client_pb.rb +422 -86
- data/lib/google/api/config_change_pb.rb +111 -17
- data/lib/google/api/consumer_pb.rb +109 -16
- data/lib/google/api/context_pb.rb +117 -11
- data/lib/google/api/control_pb.rb +71 -4
- data/lib/google/api/distribution_pb.rb +242 -39
- data/lib/google/api/documentation_pb.rb +195 -19
- data/lib/google/api/endpoint_pb.rb +100 -7
- data/lib/google/api/error_reason_pb.rb +597 -33
- data/lib/google/api/field_behavior_pb.rb +131 -11
- data/lib/google/api/http_pb.rb +406 -23
- data/lib/google/api/httpbody_pb.rb +109 -6
- data/lib/google/api/label_pb.rb +75 -11
- data/lib/google/api/launch_stage_pb.rb +99 -11
- data/lib/google/api/log_pb.rb +82 -7
- data/lib/google/api/logging_pb.rb +108 -9
- data/lib/google/api/metric_pb.rb +297 -38
- data/lib/google/api/monitored_resource_pb.rb +159 -17
- data/lib/google/api/monitoring_pb.rb +134 -9
- data/lib/google/api/policy_pb.rb +129 -0
- data/lib/google/api/quota_pb.rb +211 -21
- data/lib/google/api/resource_pb.rb +265 -23
- data/lib/google/api/routing_pb.rb +488 -8
- data/lib/google/api/service_pb.rb +239 -29
- data/lib/google/api/source_info_pb.rb +59 -4
- data/lib/google/api/system_parameter_pb.rb +123 -13
- data/lib/google/api/usage_pb.rb +123 -11
- data/lib/google/api/visibility_pb.rb +140 -8
- data/lib/google/logging/type/http_request_pb.rb +123 -18
- data/lib/google/logging/type/log_severity_pb.rb +98 -12
- data/lib/google/longrunning/operations_pb.rb +277 -37
- data/lib/google/rpc/code_pb.rb +213 -20
- data/lib/google/rpc/context/attribute_context_pb.rb +375 -66
- data/lib/google/rpc/context/audit_context_pb.rb +77 -8
- data/lib/google/rpc/error_details_pb.rb +313 -56
- data/lib/google/rpc/http_pb.rb +91 -17
- data/lib/google/rpc/status_pb.rb +77 -6
- data/lib/google/type/calendar_period_pb.rb +83 -11
- data/lib/google/type/color_pb.rb +202 -7
- data/lib/google/type/date_pb.rb +79 -6
- data/lib/google/type/datetime_pb.rb +132 -18
- data/lib/google/type/dayofweek_pb.rb +77 -11
- data/lib/google/type/decimal_pb.rb +122 -4
- data/lib/google/type/expr_pb.rb +100 -7
- data/lib/google/type/fraction_pb.rb +60 -5
- data/lib/google/type/interval_pb.rb +74 -5
- data/lib/google/type/latlng_pb.rb +64 -5
- data/lib/google/type/localized_text_pb.rb +63 -5
- data/lib/google/type/money_pb.rb +69 -6
- data/lib/google/type/month_pb.rb +92 -16
- data/lib/google/type/phone_number_pb.rb +140 -12
- data/lib/google/type/postal_address_pb.rb +161 -14
- data/lib/google/type/quaternion_pb.rb +121 -7
- data/lib/google/type/timeofday_pb.rb +71 -7
- data/lib/googleapis/common/protos/types/version.rb +1 -1
- metadata +6 -5
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/rpc/error_details.proto
|
3
4
|
|
@@ -5,64 +6,32 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/protobuf/duration_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
repeated :violations, :message, 1, "google.rpc.PreconditionFailure.Violation"
|
31
|
-
end
|
32
|
-
add_message "google.rpc.PreconditionFailure.Violation" do
|
33
|
-
optional :type, :string, 1
|
34
|
-
optional :subject, :string, 2
|
35
|
-
optional :description, :string, 3
|
36
|
-
end
|
37
|
-
add_message "google.rpc.BadRequest" do
|
38
|
-
repeated :field_violations, :message, 1, "google.rpc.BadRequest.FieldViolation"
|
39
|
-
end
|
40
|
-
add_message "google.rpc.BadRequest.FieldViolation" do
|
41
|
-
optional :field, :string, 1
|
42
|
-
optional :description, :string, 2
|
43
|
-
end
|
44
|
-
add_message "google.rpc.RequestInfo" do
|
45
|
-
optional :request_id, :string, 1
|
46
|
-
optional :serving_data, :string, 2
|
47
|
-
end
|
48
|
-
add_message "google.rpc.ResourceInfo" do
|
49
|
-
optional :resource_type, :string, 1
|
50
|
-
optional :resource_name, :string, 2
|
51
|
-
optional :owner, :string, 3
|
52
|
-
optional :description, :string, 4
|
53
|
-
end
|
54
|
-
add_message "google.rpc.Help" do
|
55
|
-
repeated :links, :message, 1, "google.rpc.Help.Link"
|
56
|
-
end
|
57
|
-
add_message "google.rpc.Help.Link" do
|
58
|
-
optional :description, :string, 1
|
59
|
-
optional :url, :string, 2
|
60
|
-
end
|
61
|
-
add_message "google.rpc.LocalizedMessage" do
|
62
|
-
optional :locale, :string, 1
|
63
|
-
optional :message, :string, 2
|
9
|
+
|
10
|
+
descriptor_data = "\n\x1egoogle/rpc/error_details.proto\x12\ngoogle.rpc\x1a\x1egoogle/protobuf/duration.proto\"\x93\x01\n\tErrorInfo\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x0e\n\x06\x64omain\x18\x02 \x01(\t\x12\x35\n\x08metadata\x18\x03 \x03(\x0b\x32#.google.rpc.ErrorInfo.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\";\n\tRetryInfo\x12.\n\x0bretry_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"2\n\tDebugInfo\x12\x15\n\rstack_entries\x18\x01 \x03(\t\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\"y\n\x0cQuotaFailure\x12\x36\n\nviolations\x18\x01 \x03(\x0b\x32\".google.rpc.QuotaFailure.Violation\x1a\x31\n\tViolation\x12\x0f\n\x07subject\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"\x95\x01\n\x13PreconditionFailure\x12=\n\nviolations\x18\x01 \x03(\x0b\x32).google.rpc.PreconditionFailure.Violation\x1a?\n\tViolation\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07subject\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\x83\x01\n\nBadRequest\x12?\n\x10\x66ield_violations\x18\x01 \x03(\x0b\x32%.google.rpc.BadRequest.FieldViolation\x1a\x34\n\x0e\x46ieldViolation\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"7\n\x0bRequestInfo\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x14\n\x0cserving_data\x18\x02 \x01(\t\"`\n\x0cResourceInfo\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x15\n\rresource_name\x18\x02 \x01(\t\x12\r\n\x05owner\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\"V\n\x04Help\x12$\n\x05links\x18\x01 \x03(\x0b\x32\x15.google.rpc.Help.Link\x1a(\n\x04Link\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"3\n\x10LocalizedMessage\x12\x0e\n\x06locale\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\tBl\n\x0e\x63om.google.rpcB\x11\x45rrorDetailsProtoP\x01Z?google.golang.org/genproto/googleapis/rpc/errdetails;errdetails\xa2\x02\x03RPCb\x06proto3"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError => e
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
64
31
|
end
|
65
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
66
35
|
end
|
67
36
|
|
68
37
|
module Google
|
@@ -83,3 +52,291 @@ module Google
|
|
83
52
|
LocalizedMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.rpc.LocalizedMessage").msgclass
|
84
53
|
end
|
85
54
|
end
|
55
|
+
|
56
|
+
#### Source proto file: google/rpc/error_details.proto ####
|
57
|
+
#
|
58
|
+
# // Copyright 2022 Google LLC
|
59
|
+
# //
|
60
|
+
# // Licensed under the Apache License, Version 2.0 (the "License");
|
61
|
+
# // you may not use this file except in compliance with the License.
|
62
|
+
# // You may obtain a copy of the License at
|
63
|
+
# //
|
64
|
+
# // http://www.apache.org/licenses/LICENSE-2.0
|
65
|
+
# //
|
66
|
+
# // Unless required by applicable law or agreed to in writing, software
|
67
|
+
# // distributed under the License is distributed on an "AS IS" BASIS,
|
68
|
+
# // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
69
|
+
# // See the License for the specific language governing permissions and
|
70
|
+
# // limitations under the License.
|
71
|
+
#
|
72
|
+
# syntax = "proto3";
|
73
|
+
#
|
74
|
+
# package google.rpc;
|
75
|
+
#
|
76
|
+
# import "google/protobuf/duration.proto";
|
77
|
+
#
|
78
|
+
# option go_package = "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails";
|
79
|
+
# option java_multiple_files = true;
|
80
|
+
# option java_outer_classname = "ErrorDetailsProto";
|
81
|
+
# option java_package = "com.google.rpc";
|
82
|
+
# option objc_class_prefix = "RPC";
|
83
|
+
#
|
84
|
+
# // Describes the cause of the error with structured details.
|
85
|
+
# //
|
86
|
+
# // Example of an error when contacting the "pubsub.googleapis.com" API when it
|
87
|
+
# // is not enabled:
|
88
|
+
# //
|
89
|
+
# // { "reason": "API_DISABLED"
|
90
|
+
# // "domain": "googleapis.com"
|
91
|
+
# // "metadata": {
|
92
|
+
# // "resource": "projects/123",
|
93
|
+
# // "service": "pubsub.googleapis.com"
|
94
|
+
# // }
|
95
|
+
# // }
|
96
|
+
# //
|
97
|
+
# // This response indicates that the pubsub.googleapis.com API is not enabled.
|
98
|
+
# //
|
99
|
+
# // Example of an error that is returned when attempting to create a Spanner
|
100
|
+
# // instance in a region that is out of stock:
|
101
|
+
# //
|
102
|
+
# // { "reason": "STOCKOUT"
|
103
|
+
# // "domain": "spanner.googleapis.com",
|
104
|
+
# // "metadata": {
|
105
|
+
# // "availableRegions": "us-central1,us-east2"
|
106
|
+
# // }
|
107
|
+
# // }
|
108
|
+
# message ErrorInfo {
|
109
|
+
# // The reason of the error. This is a constant value that identifies the
|
110
|
+
# // proximate cause of the error. Error reasons are unique within a particular
|
111
|
+
# // domain of errors. This should be at most 63 characters and match a
|
112
|
+
# // regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
|
113
|
+
# // UPPER_SNAKE_CASE.
|
114
|
+
# string reason = 1;
|
115
|
+
#
|
116
|
+
# // The logical grouping to which the "reason" belongs. The error domain
|
117
|
+
# // is typically the registered service name of the tool or product that
|
118
|
+
# // generates the error. Example: "pubsub.googleapis.com". If the error is
|
119
|
+
# // generated by some common infrastructure, the error domain must be a
|
120
|
+
# // globally unique value that identifies the infrastructure. For Google API
|
121
|
+
# // infrastructure, the error domain is "googleapis.com".
|
122
|
+
# string domain = 2;
|
123
|
+
#
|
124
|
+
# // Additional structured details about this error.
|
125
|
+
# //
|
126
|
+
# // Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in
|
127
|
+
# // length. When identifying the current value of an exceeded limit, the units
|
128
|
+
# // should be contained in the key, not the value. For example, rather than
|
129
|
+
# // {"instanceLimit": "100/request"}, should be returned as,
|
130
|
+
# // {"instanceLimitPerRequest": "100"}, if the client exceeds the number of
|
131
|
+
# // instances that can be created in a single (batch) request.
|
132
|
+
# map<string, string> metadata = 3;
|
133
|
+
# }
|
134
|
+
#
|
135
|
+
# // Describes when the clients can retry a failed request. Clients could ignore
|
136
|
+
# // the recommendation here or retry when this information is missing from error
|
137
|
+
# // responses.
|
138
|
+
# //
|
139
|
+
# // It's always recommended that clients should use exponential backoff when
|
140
|
+
# // retrying.
|
141
|
+
# //
|
142
|
+
# // Clients should wait until `retry_delay` amount of time has passed since
|
143
|
+
# // receiving the error response before retrying. If retrying requests also
|
144
|
+
# // fail, clients should use an exponential backoff scheme to gradually increase
|
145
|
+
# // the delay between retries based on `retry_delay`, until either a maximum
|
146
|
+
# // number of retries have been reached or a maximum retry delay cap has been
|
147
|
+
# // reached.
|
148
|
+
# message RetryInfo {
|
149
|
+
# // Clients should wait at least this long between retrying the same request.
|
150
|
+
# google.protobuf.Duration retry_delay = 1;
|
151
|
+
# }
|
152
|
+
#
|
153
|
+
# // Describes additional debugging info.
|
154
|
+
# message DebugInfo {
|
155
|
+
# // The stack trace entries indicating where the error occurred.
|
156
|
+
# repeated string stack_entries = 1;
|
157
|
+
#
|
158
|
+
# // Additional debugging information provided by the server.
|
159
|
+
# string detail = 2;
|
160
|
+
# }
|
161
|
+
#
|
162
|
+
# // Describes how a quota check failed.
|
163
|
+
# //
|
164
|
+
# // For example if a daily limit was exceeded for the calling project,
|
165
|
+
# // a service could respond with a QuotaFailure detail containing the project
|
166
|
+
# // id and the description of the quota limit that was exceeded. If the
|
167
|
+
# // calling project hasn't enabled the service in the developer console, then
|
168
|
+
# // a service could respond with the project id and set `service_disabled`
|
169
|
+
# // to true.
|
170
|
+
# //
|
171
|
+
# // Also see RetryInfo and Help types for other details about handling a
|
172
|
+
# // quota failure.
|
173
|
+
# message QuotaFailure {
|
174
|
+
# // A message type used to describe a single quota violation. For example, a
|
175
|
+
# // daily quota or a custom quota that was exceeded.
|
176
|
+
# message Violation {
|
177
|
+
# // The subject on which the quota check failed.
|
178
|
+
# // For example, "clientip:<ip address of client>" or "project:<Google
|
179
|
+
# // developer project id>".
|
180
|
+
# string subject = 1;
|
181
|
+
#
|
182
|
+
# // A description of how the quota check failed. Clients can use this
|
183
|
+
# // description to find more about the quota configuration in the service's
|
184
|
+
# // public documentation, or find the relevant quota limit to adjust through
|
185
|
+
# // developer console.
|
186
|
+
# //
|
187
|
+
# // For example: "Service disabled" or "Daily Limit for read operations
|
188
|
+
# // exceeded".
|
189
|
+
# string description = 2;
|
190
|
+
# }
|
191
|
+
#
|
192
|
+
# // Describes all quota violations.
|
193
|
+
# repeated Violation violations = 1;
|
194
|
+
# }
|
195
|
+
#
|
196
|
+
# // Describes what preconditions have failed.
|
197
|
+
# //
|
198
|
+
# // For example, if an RPC failed because it required the Terms of Service to be
|
199
|
+
# // acknowledged, it could list the terms of service violation in the
|
200
|
+
# // PreconditionFailure message.
|
201
|
+
# message PreconditionFailure {
|
202
|
+
# // A message type used to describe a single precondition failure.
|
203
|
+
# message Violation {
|
204
|
+
# // The type of PreconditionFailure. We recommend using a service-specific
|
205
|
+
# // enum type to define the supported precondition violation subjects. For
|
206
|
+
# // example, "TOS" for "Terms of Service violation".
|
207
|
+
# string type = 1;
|
208
|
+
#
|
209
|
+
# // The subject, relative to the type, that failed.
|
210
|
+
# // For example, "google.com/cloud" relative to the "TOS" type would indicate
|
211
|
+
# // which terms of service is being referenced.
|
212
|
+
# string subject = 2;
|
213
|
+
#
|
214
|
+
# // A description of how the precondition failed. Developers can use this
|
215
|
+
# // description to understand how to fix the failure.
|
216
|
+
# //
|
217
|
+
# // For example: "Terms of service not accepted".
|
218
|
+
# string description = 3;
|
219
|
+
# }
|
220
|
+
#
|
221
|
+
# // Describes all precondition violations.
|
222
|
+
# repeated Violation violations = 1;
|
223
|
+
# }
|
224
|
+
#
|
225
|
+
# // Describes violations in a client request. This error type focuses on the
|
226
|
+
# // syntactic aspects of the request.
|
227
|
+
# message BadRequest {
|
228
|
+
# // A message type used to describe a single bad request field.
|
229
|
+
# message FieldViolation {
|
230
|
+
# // A path that leads to a field in the request body. The value will be a
|
231
|
+
# // sequence of dot-separated identifiers that identify a protocol buffer
|
232
|
+
# // field.
|
233
|
+
# //
|
234
|
+
# // Consider the following:
|
235
|
+
# //
|
236
|
+
# // message CreateContactRequest {
|
237
|
+
# // message EmailAddress {
|
238
|
+
# // enum Type {
|
239
|
+
# // TYPE_UNSPECIFIED = 0;
|
240
|
+
# // HOME = 1;
|
241
|
+
# // WORK = 2;
|
242
|
+
# // }
|
243
|
+
# //
|
244
|
+
# // optional string email = 1;
|
245
|
+
# // repeated EmailType type = 2;
|
246
|
+
# // }
|
247
|
+
# //
|
248
|
+
# // string full_name = 1;
|
249
|
+
# // repeated EmailAddress email_addresses = 2;
|
250
|
+
# // }
|
251
|
+
# //
|
252
|
+
# // In this example, in proto `field` could take one of the following values:
|
253
|
+
# //
|
254
|
+
# // * `full_name` for a violation in the `full_name` value
|
255
|
+
# // * `email_addresses[1].email` for a violation in the `email` field of the
|
256
|
+
# // first `email_addresses` message
|
257
|
+
# // * `email_addresses[3].type[2]` for a violation in the second `type`
|
258
|
+
# // value in the third `email_addresses` message.
|
259
|
+
# //
|
260
|
+
# // In JSON, the same values are represented as:
|
261
|
+
# //
|
262
|
+
# // * `fullName` for a violation in the `fullName` value
|
263
|
+
# // * `emailAddresses[1].email` for a violation in the `email` field of the
|
264
|
+
# // first `emailAddresses` message
|
265
|
+
# // * `emailAddresses[3].type[2]` for a violation in the second `type`
|
266
|
+
# // value in the third `emailAddresses` message.
|
267
|
+
# string field = 1;
|
268
|
+
#
|
269
|
+
# // A description of why the request element is bad.
|
270
|
+
# string description = 2;
|
271
|
+
# }
|
272
|
+
#
|
273
|
+
# // Describes all violations in a client request.
|
274
|
+
# repeated FieldViolation field_violations = 1;
|
275
|
+
# }
|
276
|
+
#
|
277
|
+
# // Contains metadata about the request that clients can attach when filing a bug
|
278
|
+
# // or providing other forms of feedback.
|
279
|
+
# message RequestInfo {
|
280
|
+
# // An opaque string that should only be interpreted by the service generating
|
281
|
+
# // it. For example, it can be used to identify requests in the service's logs.
|
282
|
+
# string request_id = 1;
|
283
|
+
#
|
284
|
+
# // Any data that was used to serve this request. For example, an encrypted
|
285
|
+
# // stack trace that can be sent back to the service provider for debugging.
|
286
|
+
# string serving_data = 2;
|
287
|
+
# }
|
288
|
+
#
|
289
|
+
# // Describes the resource that is being accessed.
|
290
|
+
# message ResourceInfo {
|
291
|
+
# // A name for the type of resource being accessed, e.g. "sql table",
|
292
|
+
# // "cloud storage bucket", "file", "Google calendar"; or the type URL
|
293
|
+
# // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
|
294
|
+
# string resource_type = 1;
|
295
|
+
#
|
296
|
+
# // The name of the resource being accessed. For example, a shared calendar
|
297
|
+
# // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
|
298
|
+
# // error is
|
299
|
+
# // [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
|
300
|
+
# string resource_name = 2;
|
301
|
+
#
|
302
|
+
# // The owner of the resource (optional).
|
303
|
+
# // For example, "user:<owner email>" or "project:<Google developer project
|
304
|
+
# // id>".
|
305
|
+
# string owner = 3;
|
306
|
+
#
|
307
|
+
# // Describes what error is encountered when accessing this resource.
|
308
|
+
# // For example, updating a cloud project may require the `writer` permission
|
309
|
+
# // on the developer console project.
|
310
|
+
# string description = 4;
|
311
|
+
# }
|
312
|
+
#
|
313
|
+
# // Provides links to documentation or for performing an out of band action.
|
314
|
+
# //
|
315
|
+
# // For example, if a quota check failed with an error indicating the calling
|
316
|
+
# // project hasn't enabled the accessed service, this can contain a URL pointing
|
317
|
+
# // directly to the right place in the developer console to flip the bit.
|
318
|
+
# message Help {
|
319
|
+
# // Describes a URL link.
|
320
|
+
# message Link {
|
321
|
+
# // Describes what the link offers.
|
322
|
+
# string description = 1;
|
323
|
+
#
|
324
|
+
# // The URL of the link.
|
325
|
+
# string url = 2;
|
326
|
+
# }
|
327
|
+
#
|
328
|
+
# // URL(s) pointing to additional information on handling the current error.
|
329
|
+
# repeated Link links = 1;
|
330
|
+
# }
|
331
|
+
#
|
332
|
+
# // Provides a localized error message that is safe to return to the user
|
333
|
+
# // which can be attached to an RPC error.
|
334
|
+
# message LocalizedMessage {
|
335
|
+
# // The locale used following the specification defined at
|
336
|
+
# // https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
|
337
|
+
# // Examples are: "en-US", "fr-CH", "es-MX"
|
338
|
+
# string locale = 1;
|
339
|
+
#
|
340
|
+
# // The localized error message in the above locale.
|
341
|
+
# string message = 2;
|
342
|
+
# }
|
data/lib/google/rpc/http_pb.rb
CHANGED
@@ -1,27 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/rpc/http.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n\x15google/rpc/http.proto\x12\ngoogle.rpc\"a\n\x0bHttpRequest\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\'\n\x07headers\x18\x03 \x03(\x0b\x32\x16.google.rpc.HttpHeader\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\"e\n\x0cHttpResponse\x12\x0e\n\x06status\x18\x01 \x01(\x05\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\'\n\x07headers\x18\x03 \x03(\x0b\x32\x16.google.rpc.HttpHeader\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\"(\n\nHttpHeader\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tBX\n\x0e\x63om.google.rpcB\tHttpProtoP\x01Z3google.golang.org/genproto/googleapis/rpc/http;http\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 => e
|
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}"
|
23
28
|
end
|
24
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."
|
25
32
|
end
|
26
33
|
|
27
34
|
module Google
|
@@ -31,3 +38,70 @@ module Google
|
|
31
38
|
HttpHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.rpc.HttpHeader").msgclass
|
32
39
|
end
|
33
40
|
end
|
41
|
+
|
42
|
+
#### Source proto file: google/rpc/http.proto ####
|
43
|
+
#
|
44
|
+
# // Copyright 2022 Google LLC
|
45
|
+
# //
|
46
|
+
# // Licensed under the Apache License, Version 2.0 (the "License");
|
47
|
+
# // you may not use this file except in compliance with the License.
|
48
|
+
# // You may obtain a copy of the License at
|
49
|
+
# //
|
50
|
+
# // http://www.apache.org/licenses/LICENSE-2.0
|
51
|
+
# //
|
52
|
+
# // Unless required by applicable law or agreed to in writing, software
|
53
|
+
# // distributed under the License is distributed on an "AS IS" BASIS,
|
54
|
+
# // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
55
|
+
# // See the License for the specific language governing permissions and
|
56
|
+
# // limitations under the License.
|
57
|
+
#
|
58
|
+
# syntax = "proto3";
|
59
|
+
#
|
60
|
+
# package google.rpc;
|
61
|
+
#
|
62
|
+
# option go_package = "google.golang.org/genproto/googleapis/rpc/http;http";
|
63
|
+
# option java_multiple_files = true;
|
64
|
+
# option java_outer_classname = "HttpProto";
|
65
|
+
# option java_package = "com.google.rpc";
|
66
|
+
# option objc_class_prefix = "RPC";
|
67
|
+
#
|
68
|
+
# // Represents an HTTP request.
|
69
|
+
# message HttpRequest {
|
70
|
+
# // The HTTP request method.
|
71
|
+
# string method = 1;
|
72
|
+
#
|
73
|
+
# // The HTTP request URI.
|
74
|
+
# string uri = 2;
|
75
|
+
#
|
76
|
+
# // The HTTP request headers. The ordering of the headers is significant.
|
77
|
+
# // Multiple headers with the same key may present for the request.
|
78
|
+
# repeated HttpHeader headers = 3;
|
79
|
+
#
|
80
|
+
# // The HTTP request body. If the body is not expected, it should be empty.
|
81
|
+
# bytes body = 4;
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# // Represents an HTTP response.
|
85
|
+
# message HttpResponse {
|
86
|
+
# // The HTTP status code, such as 200 or 404.
|
87
|
+
# int32 status = 1;
|
88
|
+
#
|
89
|
+
# // The HTTP reason phrase, such as "OK" or "Not Found".
|
90
|
+
# string reason = 2;
|
91
|
+
#
|
92
|
+
# // The HTTP response headers. The ordering of the headers is significant.
|
93
|
+
# // Multiple headers with the same key may present for the response.
|
94
|
+
# repeated HttpHeader headers = 3;
|
95
|
+
#
|
96
|
+
# // The HTTP response body. If the body is not expected, it should be empty.
|
97
|
+
# bytes body = 4;
|
98
|
+
# }
|
99
|
+
#
|
100
|
+
# // Represents an HTTP header.
|
101
|
+
# message HttpHeader {
|
102
|
+
# // The HTTP header key. It is case insensitive.
|
103
|
+
# string key = 1;
|
104
|
+
#
|
105
|
+
# // The HTTP header value.
|
106
|
+
# string value = 2;
|
107
|
+
# }
|
data/lib/google/rpc/status_pb.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/rpc/status.proto
|
3
4
|
|
@@ -5,14 +6,32 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/protobuf/any_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
|
10
|
+
descriptor_data = "\n\x17google/rpc/status.proto\x12\ngoogle.rpc\x1a\x19google/protobuf/any.proto\"N\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\x12%\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyBa\n\x0e\x63om.google.rpcB\x0bStatusProtoP\x01Z7google.golang.org/genproto/googleapis/rpc/status;status\xf8\x01\x01\xa2\x02\x03RPCb\x06proto3"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError => e
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
["google.protobuf.Any", "google/protobuf/any.proto"],
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
14
31
|
end
|
15
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
16
35
|
end
|
17
36
|
|
18
37
|
module Google
|
@@ -20,3 +39,55 @@ module Google
|
|
20
39
|
Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.rpc.Status").msgclass
|
21
40
|
end
|
22
41
|
end
|
42
|
+
|
43
|
+
#### Source proto file: google/rpc/status.proto ####
|
44
|
+
#
|
45
|
+
# // Copyright 2022 Google LLC
|
46
|
+
# //
|
47
|
+
# // Licensed under the Apache License, Version 2.0 (the "License");
|
48
|
+
# // you may not use this file except in compliance with the License.
|
49
|
+
# // You may obtain a copy of the License at
|
50
|
+
# //
|
51
|
+
# // http://www.apache.org/licenses/LICENSE-2.0
|
52
|
+
# //
|
53
|
+
# // Unless required by applicable law or agreed to in writing, software
|
54
|
+
# // distributed under the License is distributed on an "AS IS" BASIS,
|
55
|
+
# // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
56
|
+
# // See the License for the specific language governing permissions and
|
57
|
+
# // limitations under the License.
|
58
|
+
#
|
59
|
+
# syntax = "proto3";
|
60
|
+
#
|
61
|
+
# package google.rpc;
|
62
|
+
#
|
63
|
+
# import "google/protobuf/any.proto";
|
64
|
+
#
|
65
|
+
# option cc_enable_arenas = true;
|
66
|
+
# option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
|
67
|
+
# option java_multiple_files = true;
|
68
|
+
# option java_outer_classname = "StatusProto";
|
69
|
+
# option java_package = "com.google.rpc";
|
70
|
+
# option objc_class_prefix = "RPC";
|
71
|
+
#
|
72
|
+
# // The `Status` type defines a logical error model that is suitable for
|
73
|
+
# // different programming environments, including REST APIs and RPC APIs. It is
|
74
|
+
# // used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
75
|
+
# // three pieces of data: error code, error message, and error details.
|
76
|
+
# //
|
77
|
+
# // You can find out more about this error model and how to work with it in the
|
78
|
+
# // [API Design Guide](https://cloud.google.com/apis/design/errors).
|
79
|
+
# message Status {
|
80
|
+
# // The status code, which should be an enum value of
|
81
|
+
# // [google.rpc.Code][google.rpc.Code].
|
82
|
+
# int32 code = 1;
|
83
|
+
#
|
84
|
+
# // A developer-facing error message, which should be in English. Any
|
85
|
+
# // user-facing error message should be localized and sent in the
|
86
|
+
# // [google.rpc.Status.details][google.rpc.Status.details] field, or localized
|
87
|
+
# // by the client.
|
88
|
+
# string message = 2;
|
89
|
+
#
|
90
|
+
# // A list of messages that carry the error details. There is a common set of
|
91
|
+
# // message types for APIs to use.
|
92
|
+
# repeated google.protobuf.Any details = 3;
|
93
|
+
# }
|