googleapis-common-protos-types 1.5.0 → 1.18.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 +95 -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 -22
- data/lib/google/api/billing_pb.rb +104 -8
- data/lib/google/api/client_pb.rb +502 -77
- 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 +119 -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 +96 -7
- data/lib/google/api/error_reason_pb.rb +649 -31
- data/lib/google/api/field_behavior_pb.rb +131 -11
- data/lib/google/api/field_info_pb.rb +151 -0
- data/lib/google/api/http_pb.rb +398 -23
- data/lib/google/api/httpbody_pb.rb +108 -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 +317 -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 +127 -0
- data/lib/google/api/quota_pb.rb +211 -21
- data/lib/google/api/resource_pb.rb +270 -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 -38
- data/lib/google/rpc/code_pb.rb +213 -20
- data/lib/google/rpc/context/attribute_context_pb.rb +403 -0
- data/lib/google/rpc/context/audit_context_pb.rb +94 -0
- data/lib/google/rpc/error_details_pb.rb +326 -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 +18 -11
data/lib/google/api/http_pb.rb
CHANGED
@@ -1,33 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/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
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
optional :kind, :string, 1
|
28
|
-
optional :path, :string, 2
|
7
|
+
|
8
|
+
descriptor_data = "\n\x15google/api/http.proto\x12\ngoogle.api\"T\n\x04Http\x12#\n\x05rules\x18\x01 \x03(\x0b\x32\x14.google.api.HttpRule\x12\'\n\x1f\x66ully_decode_reserved_expansion\x18\x02 \x01(\x08\"\x81\x02\n\x08HttpRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\r\n\x03get\x18\x02 \x01(\tH\x00\x12\r\n\x03put\x18\x03 \x01(\tH\x00\x12\x0e\n\x04post\x18\x04 \x01(\tH\x00\x12\x10\n\x06\x64\x65lete\x18\x05 \x01(\tH\x00\x12\x0f\n\x05patch\x18\x06 \x01(\tH\x00\x12/\n\x06\x63ustom\x18\x08 \x01(\x0b\x32\x1d.google.api.CustomHttpPatternH\x00\x12\x0c\n\x04\x62ody\x18\x07 \x01(\t\x12\x15\n\rresponse_body\x18\x0c \x01(\t\x12\x31\n\x13\x61\x64\x64itional_bindings\x18\x0b \x03(\x0b\x32\x14.google.api.HttpRuleB\t\n\x07pattern\"/\n\x11\x43ustomHttpPattern\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\tBj\n\x0e\x63om.google.apiB\tHttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xf8\x01\x01\xa2\x02\x04GAPIb\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}"
|
29
28
|
end
|
30
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."
|
31
32
|
end
|
32
33
|
|
33
34
|
module Google
|
@@ -37,3 +38,377 @@ module Google
|
|
37
38
|
CustomHttpPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.CustomHttpPattern").msgclass
|
38
39
|
end
|
39
40
|
end
|
41
|
+
|
42
|
+
#### Source proto file: google/api/http.proto ####
|
43
|
+
#
|
44
|
+
# // Copyright 2024 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.api;
|
61
|
+
#
|
62
|
+
# option cc_enable_arenas = true;
|
63
|
+
# option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
|
64
|
+
# option java_multiple_files = true;
|
65
|
+
# option java_outer_classname = "HttpProto";
|
66
|
+
# option java_package = "com.google.api";
|
67
|
+
# option objc_class_prefix = "GAPI";
|
68
|
+
#
|
69
|
+
# // Defines the HTTP configuration for an API service. It contains a list of
|
70
|
+
# // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
|
71
|
+
# // to one or more HTTP REST API methods.
|
72
|
+
# message Http {
|
73
|
+
# // A list of HTTP configuration rules that apply to individual API methods.
|
74
|
+
# //
|
75
|
+
# // **NOTE:** All service configuration rules follow "last one wins" order.
|
76
|
+
# repeated HttpRule rules = 1;
|
77
|
+
#
|
78
|
+
# // When set to true, URL path parameters will be fully URI-decoded except in
|
79
|
+
# // cases of single segment matches in reserved expansion, where "%2F" will be
|
80
|
+
# // left encoded.
|
81
|
+
# //
|
82
|
+
# // The default behavior is to not decode RFC 6570 reserved characters in multi
|
83
|
+
# // segment matches.
|
84
|
+
# bool fully_decode_reserved_expansion = 2;
|
85
|
+
# }
|
86
|
+
#
|
87
|
+
# // gRPC Transcoding
|
88
|
+
# //
|
89
|
+
# // gRPC Transcoding is a feature for mapping between a gRPC method and one or
|
90
|
+
# // more HTTP REST endpoints. It allows developers to build a single API service
|
91
|
+
# // that supports both gRPC APIs and REST APIs. Many systems, including [Google
|
92
|
+
# // APIs](https://github.com/googleapis/googleapis),
|
93
|
+
# // [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
|
94
|
+
# // Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
|
95
|
+
# // and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
|
96
|
+
# // and use it for large scale production services.
|
97
|
+
# //
|
98
|
+
# // `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
|
99
|
+
# // how different portions of the gRPC request message are mapped to the URL
|
100
|
+
# // path, URL query parameters, and HTTP request body. It also controls how the
|
101
|
+
# // gRPC response message is mapped to the HTTP response body. `HttpRule` is
|
102
|
+
# // typically specified as an `google.api.http` annotation on the gRPC method.
|
103
|
+
# //
|
104
|
+
# // Each mapping specifies a URL path template and an HTTP method. The path
|
105
|
+
# // template may refer to one or more fields in the gRPC request message, as long
|
106
|
+
# // as each field is a non-repeated field with a primitive (non-message) type.
|
107
|
+
# // The path template controls how fields of the request message are mapped to
|
108
|
+
# // the URL path.
|
109
|
+
# //
|
110
|
+
# // Example:
|
111
|
+
# //
|
112
|
+
# // service Messaging {
|
113
|
+
# // rpc GetMessage(GetMessageRequest) returns (Message) {
|
114
|
+
# // option (google.api.http) = {
|
115
|
+
# // get: "/v1/{name=messages/*}"
|
116
|
+
# // };
|
117
|
+
# // }
|
118
|
+
# // }
|
119
|
+
# // message GetMessageRequest {
|
120
|
+
# // string name = 1; // Mapped to URL path.
|
121
|
+
# // }
|
122
|
+
# // message Message {
|
123
|
+
# // string text = 1; // The resource content.
|
124
|
+
# // }
|
125
|
+
# //
|
126
|
+
# // This enables an HTTP REST to gRPC mapping as below:
|
127
|
+
# //
|
128
|
+
# // - HTTP: `GET /v1/messages/123456`
|
129
|
+
# // - gRPC: `GetMessage(name: "messages/123456")`
|
130
|
+
# //
|
131
|
+
# // Any fields in the request message which are not bound by the path template
|
132
|
+
# // automatically become HTTP query parameters if there is no HTTP request body.
|
133
|
+
# // For example:
|
134
|
+
# //
|
135
|
+
# // service Messaging {
|
136
|
+
# // rpc GetMessage(GetMessageRequest) returns (Message) {
|
137
|
+
# // option (google.api.http) = {
|
138
|
+
# // get:"/v1/messages/{message_id}"
|
139
|
+
# // };
|
140
|
+
# // }
|
141
|
+
# // }
|
142
|
+
# // message GetMessageRequest {
|
143
|
+
# // message SubMessage {
|
144
|
+
# // string subfield = 1;
|
145
|
+
# // }
|
146
|
+
# // string message_id = 1; // Mapped to URL path.
|
147
|
+
# // int64 revision = 2; // Mapped to URL query parameter `revision`.
|
148
|
+
# // SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
|
149
|
+
# // }
|
150
|
+
# //
|
151
|
+
# // This enables a HTTP JSON to RPC mapping as below:
|
152
|
+
# //
|
153
|
+
# // - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
|
154
|
+
# // - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
|
155
|
+
# // SubMessage(subfield: "foo"))`
|
156
|
+
# //
|
157
|
+
# // Note that fields which are mapped to URL query parameters must have a
|
158
|
+
# // primitive type or a repeated primitive type or a non-repeated message type.
|
159
|
+
# // In the case of a repeated type, the parameter can be repeated in the URL
|
160
|
+
# // as `...?param=A¶m=B`. In the case of a message type, each field of the
|
161
|
+
# // message is mapped to a separate parameter, such as
|
162
|
+
# // `...?foo.a=A&foo.b=B&foo.c=C`.
|
163
|
+
# //
|
164
|
+
# // For HTTP methods that allow a request body, the `body` field
|
165
|
+
# // specifies the mapping. Consider a REST update method on the
|
166
|
+
# // message resource collection:
|
167
|
+
# //
|
168
|
+
# // service Messaging {
|
169
|
+
# // rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
|
170
|
+
# // option (google.api.http) = {
|
171
|
+
# // patch: "/v1/messages/{message_id}"
|
172
|
+
# // body: "message"
|
173
|
+
# // };
|
174
|
+
# // }
|
175
|
+
# // }
|
176
|
+
# // message UpdateMessageRequest {
|
177
|
+
# // string message_id = 1; // mapped to the URL
|
178
|
+
# // Message message = 2; // mapped to the body
|
179
|
+
# // }
|
180
|
+
# //
|
181
|
+
# // The following HTTP JSON to RPC mapping is enabled, where the
|
182
|
+
# // representation of the JSON in the request body is determined by
|
183
|
+
# // protos JSON encoding:
|
184
|
+
# //
|
185
|
+
# // - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
|
186
|
+
# // - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
|
187
|
+
# //
|
188
|
+
# // The special name `*` can be used in the body mapping to define that
|
189
|
+
# // every field not bound by the path template should be mapped to the
|
190
|
+
# // request body. This enables the following alternative definition of
|
191
|
+
# // the update method:
|
192
|
+
# //
|
193
|
+
# // service Messaging {
|
194
|
+
# // rpc UpdateMessage(Message) returns (Message) {
|
195
|
+
# // option (google.api.http) = {
|
196
|
+
# // patch: "/v1/messages/{message_id}"
|
197
|
+
# // body: "*"
|
198
|
+
# // };
|
199
|
+
# // }
|
200
|
+
# // }
|
201
|
+
# // message Message {
|
202
|
+
# // string message_id = 1;
|
203
|
+
# // string text = 2;
|
204
|
+
# // }
|
205
|
+
# //
|
206
|
+
# //
|
207
|
+
# // The following HTTP JSON to RPC mapping is enabled:
|
208
|
+
# //
|
209
|
+
# // - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
|
210
|
+
# // - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
|
211
|
+
# //
|
212
|
+
# // Note that when using `*` in the body mapping, it is not possible to
|
213
|
+
# // have HTTP parameters, as all fields not bound by the path end in
|
214
|
+
# // the body. This makes this option more rarely used in practice when
|
215
|
+
# // defining REST APIs. The common usage of `*` is in custom methods
|
216
|
+
# // which don't use the URL at all for transferring data.
|
217
|
+
# //
|
218
|
+
# // It is possible to define multiple HTTP methods for one RPC by using
|
219
|
+
# // the `additional_bindings` option. Example:
|
220
|
+
# //
|
221
|
+
# // service Messaging {
|
222
|
+
# // rpc GetMessage(GetMessageRequest) returns (Message) {
|
223
|
+
# // option (google.api.http) = {
|
224
|
+
# // get: "/v1/messages/{message_id}"
|
225
|
+
# // additional_bindings {
|
226
|
+
# // get: "/v1/users/{user_id}/messages/{message_id}"
|
227
|
+
# // }
|
228
|
+
# // };
|
229
|
+
# // }
|
230
|
+
# // }
|
231
|
+
# // message GetMessageRequest {
|
232
|
+
# // string message_id = 1;
|
233
|
+
# // string user_id = 2;
|
234
|
+
# // }
|
235
|
+
# //
|
236
|
+
# // This enables the following two alternative HTTP JSON to RPC mappings:
|
237
|
+
# //
|
238
|
+
# // - HTTP: `GET /v1/messages/123456`
|
239
|
+
# // - gRPC: `GetMessage(message_id: "123456")`
|
240
|
+
# //
|
241
|
+
# // - HTTP: `GET /v1/users/me/messages/123456`
|
242
|
+
# // - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
|
243
|
+
# //
|
244
|
+
# // Rules for HTTP mapping
|
245
|
+
# //
|
246
|
+
# // 1. Leaf request fields (recursive expansion nested messages in the request
|
247
|
+
# // message) are classified into three categories:
|
248
|
+
# // - Fields referred by the path template. They are passed via the URL path.
|
249
|
+
# // - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
|
250
|
+
# // are passed via the HTTP
|
251
|
+
# // request body.
|
252
|
+
# // - All other fields are passed via the URL query parameters, and the
|
253
|
+
# // parameter name is the field path in the request message. A repeated
|
254
|
+
# // field can be represented as multiple query parameters under the same
|
255
|
+
# // name.
|
256
|
+
# // 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
|
257
|
+
# // query parameter, all fields
|
258
|
+
# // are passed via URL path and HTTP request body.
|
259
|
+
# // 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
|
260
|
+
# // request body, all
|
261
|
+
# // fields are passed via URL path and URL query parameters.
|
262
|
+
# //
|
263
|
+
# // Path template syntax
|
264
|
+
# //
|
265
|
+
# // Template = "/" Segments [ Verb ] ;
|
266
|
+
# // Segments = Segment { "/" Segment } ;
|
267
|
+
# // Segment = "*" | "**" | LITERAL | Variable ;
|
268
|
+
# // Variable = "{" FieldPath [ "=" Segments ] "}" ;
|
269
|
+
# // FieldPath = IDENT { "." IDENT } ;
|
270
|
+
# // Verb = ":" LITERAL ;
|
271
|
+
# //
|
272
|
+
# // The syntax `*` matches a single URL path segment. The syntax `**` matches
|
273
|
+
# // zero or more URL path segments, which must be the last part of the URL path
|
274
|
+
# // except the `Verb`.
|
275
|
+
# //
|
276
|
+
# // The syntax `Variable` matches part of the URL path as specified by its
|
277
|
+
# // template. A variable template must not contain other variables. If a variable
|
278
|
+
# // matches a single path segment, its template may be omitted, e.g. `{var}`
|
279
|
+
# // is equivalent to `{var=*}`.
|
280
|
+
# //
|
281
|
+
# // The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
|
282
|
+
# // contains any reserved character, such characters should be percent-encoded
|
283
|
+
# // before the matching.
|
284
|
+
# //
|
285
|
+
# // If a variable contains exactly one path segment, such as `"{var}"` or
|
286
|
+
# // `"{var=*}"`, when such a variable is expanded into a URL path on the client
|
287
|
+
# // side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
|
288
|
+
# // server side does the reverse decoding. Such variables show up in the
|
289
|
+
# // [Discovery
|
290
|
+
# // Document](https://developers.google.com/discovery/v1/reference/apis) as
|
291
|
+
# // `{var}`.
|
292
|
+
# //
|
293
|
+
# // If a variable contains multiple path segments, such as `"{var=foo/*}"`
|
294
|
+
# // or `"{var=**}"`, when such a variable is expanded into a URL path on the
|
295
|
+
# // client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
|
296
|
+
# // The server side does the reverse decoding, except "%2F" and "%2f" are left
|
297
|
+
# // unchanged. Such variables show up in the
|
298
|
+
# // [Discovery
|
299
|
+
# // Document](https://developers.google.com/discovery/v1/reference/apis) as
|
300
|
+
# // `{+var}`.
|
301
|
+
# //
|
302
|
+
# // Using gRPC API Service Configuration
|
303
|
+
# //
|
304
|
+
# // gRPC API Service Configuration (service config) is a configuration language
|
305
|
+
# // for configuring a gRPC service to become a user-facing product. The
|
306
|
+
# // service config is simply the YAML representation of the `google.api.Service`
|
307
|
+
# // proto message.
|
308
|
+
# //
|
309
|
+
# // As an alternative to annotating your proto file, you can configure gRPC
|
310
|
+
# // transcoding in your service config YAML files. You do this by specifying a
|
311
|
+
# // `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
|
312
|
+
# // effect as the proto annotation. This can be particularly useful if you
|
313
|
+
# // have a proto that is reused in multiple services. Note that any transcoding
|
314
|
+
# // specified in the service config will override any matching transcoding
|
315
|
+
# // configuration in the proto.
|
316
|
+
# //
|
317
|
+
# // The following example selects a gRPC method and applies an `HttpRule` to it:
|
318
|
+
# //
|
319
|
+
# // http:
|
320
|
+
# // rules:
|
321
|
+
# // - selector: example.v1.Messaging.GetMessage
|
322
|
+
# // get: /v1/messages/{message_id}/{sub.subfield}
|
323
|
+
# //
|
324
|
+
# // Special notes
|
325
|
+
# //
|
326
|
+
# // When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
|
327
|
+
# // proto to JSON conversion must follow the [proto3
|
328
|
+
# // specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
|
329
|
+
# //
|
330
|
+
# // While the single segment variable follows the semantics of
|
331
|
+
# // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
|
332
|
+
# // Expansion, the multi segment variable **does not** follow RFC 6570 Section
|
333
|
+
# // 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
|
334
|
+
# // does not expand special characters like `?` and `#`, which would lead
|
335
|
+
# // to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
|
336
|
+
# // for multi segment variables.
|
337
|
+
# //
|
338
|
+
# // The path variables **must not** refer to any repeated or mapped field,
|
339
|
+
# // because client libraries are not capable of handling such variable expansion.
|
340
|
+
# //
|
341
|
+
# // The path variables **must not** capture the leading "/" character. The reason
|
342
|
+
# // is that the most common use case "{var}" does not capture the leading "/"
|
343
|
+
# // character. For consistency, all path variables must share the same behavior.
|
344
|
+
# //
|
345
|
+
# // Repeated message fields must not be mapped to URL query parameters, because
|
346
|
+
# // no client library can support such complicated mapping.
|
347
|
+
# //
|
348
|
+
# // If an API needs to use a JSON array for request or response body, it can map
|
349
|
+
# // the request or response body to a repeated field. However, some gRPC
|
350
|
+
# // Transcoding implementations may not support this feature.
|
351
|
+
# message HttpRule {
|
352
|
+
# // Selects a method to which this rule applies.
|
353
|
+
# //
|
354
|
+
# // Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
355
|
+
# // details.
|
356
|
+
# string selector = 1;
|
357
|
+
#
|
358
|
+
# // Determines the URL pattern is matched by this rules. This pattern can be
|
359
|
+
# // used with any of the {get|put|post|delete|patch} methods. A custom method
|
360
|
+
# // can be defined using the 'custom' field.
|
361
|
+
# oneof pattern {
|
362
|
+
# // Maps to HTTP GET. Used for listing and getting information about
|
363
|
+
# // resources.
|
364
|
+
# string get = 2;
|
365
|
+
#
|
366
|
+
# // Maps to HTTP PUT. Used for replacing a resource.
|
367
|
+
# string put = 3;
|
368
|
+
#
|
369
|
+
# // Maps to HTTP POST. Used for creating a resource or performing an action.
|
370
|
+
# string post = 4;
|
371
|
+
#
|
372
|
+
# // Maps to HTTP DELETE. Used for deleting a resource.
|
373
|
+
# string delete = 5;
|
374
|
+
#
|
375
|
+
# // Maps to HTTP PATCH. Used for updating a resource.
|
376
|
+
# string patch = 6;
|
377
|
+
#
|
378
|
+
# // The custom pattern is used for specifying an HTTP method that is not
|
379
|
+
# // included in the `pattern` field, such as HEAD, or "*" to leave the
|
380
|
+
# // HTTP method unspecified for this rule. The wild-card rule is useful
|
381
|
+
# // for services that provide content to Web (HTML) clients.
|
382
|
+
# CustomHttpPattern custom = 8;
|
383
|
+
# }
|
384
|
+
#
|
385
|
+
# // The name of the request field whose value is mapped to the HTTP request
|
386
|
+
# // body, or `*` for mapping all request fields not captured by the path
|
387
|
+
# // pattern to the HTTP body, or omitted for not having any HTTP request body.
|
388
|
+
# //
|
389
|
+
# // NOTE: the referred field must be present at the top-level of the request
|
390
|
+
# // message type.
|
391
|
+
# string body = 7;
|
392
|
+
#
|
393
|
+
# // Optional. The name of the response field whose value is mapped to the HTTP
|
394
|
+
# // response body. When omitted, the entire response message will be used
|
395
|
+
# // as the HTTP response body.
|
396
|
+
# //
|
397
|
+
# // NOTE: The referred field must be present at the top-level of the response
|
398
|
+
# // message type.
|
399
|
+
# string response_body = 12;
|
400
|
+
#
|
401
|
+
# // Additional HTTP bindings for the selector. Nested bindings must
|
402
|
+
# // not contain an `additional_bindings` field themselves (that is,
|
403
|
+
# // the nesting may only be one level deep).
|
404
|
+
# repeated HttpRule additional_bindings = 11;
|
405
|
+
# }
|
406
|
+
#
|
407
|
+
# // A custom pattern is used for defining custom HTTP verb.
|
408
|
+
# message CustomHttpPattern {
|
409
|
+
# // The name of this custom HTTP verb.
|
410
|
+
# string kind = 1;
|
411
|
+
#
|
412
|
+
# // The path matched by this custom verb.
|
413
|
+
# string path = 2;
|
414
|
+
# }
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/httpbody.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\x19google/api/httpbody.proto\x12\ngoogle.api\x1a\x19google/protobuf/any.proto\"X\n\x08HttpBody\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12(\n\nextensions\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyBe\n\x0e\x63om.google.apiB\rHttpBodyProtoP\x01Z;google.golang.org/genproto/googleapis/api/httpbody;httpbody\xa2\x02\x04GAPIb\x06proto3"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError
|
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,86 @@ module Google
|
|
20
39
|
HttpBody = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.HttpBody").msgclass
|
21
40
|
end
|
22
41
|
end
|
42
|
+
|
43
|
+
#### Source proto file: google/api/httpbody.proto ####
|
44
|
+
#
|
45
|
+
# // Copyright 2024 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.api;
|
62
|
+
#
|
63
|
+
# import "google/protobuf/any.proto";
|
64
|
+
#
|
65
|
+
# option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody";
|
66
|
+
# option java_multiple_files = true;
|
67
|
+
# option java_outer_classname = "HttpBodyProto";
|
68
|
+
# option java_package = "com.google.api";
|
69
|
+
# option objc_class_prefix = "GAPI";
|
70
|
+
#
|
71
|
+
# // Message that represents an arbitrary HTTP body. It should only be used for
|
72
|
+
# // payload formats that can't be represented as JSON, such as raw binary or
|
73
|
+
# // an HTML page.
|
74
|
+
# //
|
75
|
+
# //
|
76
|
+
# // This message can be used both in streaming and non-streaming API methods in
|
77
|
+
# // the request as well as the response.
|
78
|
+
# //
|
79
|
+
# // It can be used as a top-level request field, which is convenient if one
|
80
|
+
# // wants to extract parameters from either the URL or HTTP template into the
|
81
|
+
# // request fields and also want access to the raw HTTP body.
|
82
|
+
# //
|
83
|
+
# // Example:
|
84
|
+
# //
|
85
|
+
# // message GetResourceRequest {
|
86
|
+
# // // A unique request id.
|
87
|
+
# // string request_id = 1;
|
88
|
+
# //
|
89
|
+
# // // The raw HTTP body is bound to this field.
|
90
|
+
# // google.api.HttpBody http_body = 2;
|
91
|
+
# //
|
92
|
+
# // }
|
93
|
+
# //
|
94
|
+
# // service ResourceService {
|
95
|
+
# // rpc GetResource(GetResourceRequest)
|
96
|
+
# // returns (google.api.HttpBody);
|
97
|
+
# // rpc UpdateResource(google.api.HttpBody)
|
98
|
+
# // returns (google.protobuf.Empty);
|
99
|
+
# //
|
100
|
+
# // }
|
101
|
+
# //
|
102
|
+
# // Example with streaming methods:
|
103
|
+
# //
|
104
|
+
# // service CaldavService {
|
105
|
+
# // rpc GetCalendar(stream google.api.HttpBody)
|
106
|
+
# // returns (stream google.api.HttpBody);
|
107
|
+
# // rpc UpdateCalendar(stream google.api.HttpBody)
|
108
|
+
# // returns (stream google.api.HttpBody);
|
109
|
+
# //
|
110
|
+
# // }
|
111
|
+
# //
|
112
|
+
# // Use of this type only changes how the request and response bodies are
|
113
|
+
# // handled, all other features will continue to work unchanged.
|
114
|
+
# message HttpBody {
|
115
|
+
# // The HTTP Content-Type header value specifying the content type of the body.
|
116
|
+
# string content_type = 1;
|
117
|
+
#
|
118
|
+
# // The HTTP request/response body as raw binary.
|
119
|
+
# bytes data = 2;
|
120
|
+
#
|
121
|
+
# // Application specific response metadata. Must be set in the first response
|
122
|
+
# // for streaming APIs.
|
123
|
+
# repeated google.protobuf.Any extensions = 3;
|
124
|
+
# }
|
data/lib/google/api/label_pb.rb
CHANGED
@@ -1,21 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/label.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n\x16google/api/label.proto\x12\ngoogle.api\"\x9c\x01\n\x0fLabelDescriptor\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\nvalue_type\x18\x02 \x01(\x0e\x32%.google.api.LabelDescriptor.ValueType\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\",\n\tValueType\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x42_\n\x0e\x63om.google.apiB\nLabelProtoP\x01Z5google.golang.org/genproto/googleapis/api/label;label\xf8\x01\x01\xa2\x02\x04GAPIb\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}"
|
17
28
|
end
|
18
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."
|
19
32
|
end
|
20
33
|
|
21
34
|
module Google
|
@@ -24,3 +37,54 @@ module Google
|
|
24
37
|
LabelDescriptor::ValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.LabelDescriptor.ValueType").enummodule
|
25
38
|
end
|
26
39
|
end
|
40
|
+
|
41
|
+
#### Source proto file: google/api/label.proto ####
|
42
|
+
#
|
43
|
+
# // Copyright 2024 Google LLC
|
44
|
+
# //
|
45
|
+
# // Licensed under the Apache License, Version 2.0 (the "License");
|
46
|
+
# // you may not use this file except in compliance with the License.
|
47
|
+
# // You may obtain a copy of the License at
|
48
|
+
# //
|
49
|
+
# // http://www.apache.org/licenses/LICENSE-2.0
|
50
|
+
# //
|
51
|
+
# // Unless required by applicable law or agreed to in writing, software
|
52
|
+
# // distributed under the License is distributed on an "AS IS" BASIS,
|
53
|
+
# // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
54
|
+
# // See the License for the specific language governing permissions and
|
55
|
+
# // limitations under the License.
|
56
|
+
#
|
57
|
+
# syntax = "proto3";
|
58
|
+
#
|
59
|
+
# package google.api;
|
60
|
+
#
|
61
|
+
# option cc_enable_arenas = true;
|
62
|
+
# option go_package = "google.golang.org/genproto/googleapis/api/label;label";
|
63
|
+
# option java_multiple_files = true;
|
64
|
+
# option java_outer_classname = "LabelProto";
|
65
|
+
# option java_package = "com.google.api";
|
66
|
+
# option objc_class_prefix = "GAPI";
|
67
|
+
#
|
68
|
+
# // A description of a label.
|
69
|
+
# message LabelDescriptor {
|
70
|
+
# // Value types that can be used as label values.
|
71
|
+
# enum ValueType {
|
72
|
+
# // A variable-length string. This is the default.
|
73
|
+
# STRING = 0;
|
74
|
+
#
|
75
|
+
# // Boolean; true or false.
|
76
|
+
# BOOL = 1;
|
77
|
+
#
|
78
|
+
# // A 64-bit signed integer.
|
79
|
+
# INT64 = 2;
|
80
|
+
# }
|
81
|
+
#
|
82
|
+
# // The label key.
|
83
|
+
# string key = 1;
|
84
|
+
#
|
85
|
+
# // The type of data that can be assigned to the label.
|
86
|
+
# ValueType value_type = 2;
|
87
|
+
#
|
88
|
+
# // A human-readable description for the label.
|
89
|
+
# string description = 3;
|
90
|
+
# }
|