@devvit/protos 0.11.17-next-2025-05-28-417d95f5a.0 → 0.11.17-next-2025-05-29-91b3cf49f.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 (30) hide show
  1. package/package.json +4 -4
  2. package/schema/.snootobuf/deps/google/api/annotations.proto +1 -1
  3. package/schema/.snootobuf/deps/google/api/auth.proto +19 -75
  4. package/schema/.snootobuf/deps/google/api/backend.proto +8 -142
  5. package/schema/.snootobuf/deps/google/api/billing.proto +13 -23
  6. package/schema/.snootobuf/deps/google/api/client.proto +1 -333
  7. package/schema/.snootobuf/deps/google/api/config_change.proto +3 -2
  8. package/schema/.snootobuf/deps/google/api/consumer.proto +2 -1
  9. package/schema/.snootobuf/deps/google/api/context.proto +5 -34
  10. package/schema/.snootobuf/deps/google/api/control.proto +7 -15
  11. package/schema/.snootobuf/deps/google/api/distribution.proto +5 -5
  12. package/schema/.snootobuf/deps/google/api/documentation.proto +16 -27
  13. package/schema/.snootobuf/deps/google/api/endpoint.proto +25 -23
  14. package/schema/.snootobuf/deps/google/api/field_behavior.proto +3 -23
  15. package/schema/.snootobuf/deps/google/api/http.proto +120 -173
  16. package/schema/.snootobuf/deps/google/api/httpbody.proto +6 -11
  17. package/schema/.snootobuf/deps/google/api/label.proto +2 -1
  18. package/schema/.snootobuf/deps/google/api/launch_stage.proto +5 -10
  19. package/schema/.snootobuf/deps/google/api/log.proto +2 -1
  20. package/schema/.snootobuf/deps/google/api/logging.proto +8 -6
  21. package/schema/.snootobuf/deps/google/api/metric.proto +40 -116
  22. package/schema/.snootobuf/deps/google/api/monitored_resource.proto +24 -38
  23. package/schema/.snootobuf/deps/google/api/monitoring.proto +25 -43
  24. package/schema/.snootobuf/deps/google/api/quota.proto +95 -20
  25. package/schema/.snootobuf/deps/google/api/resource.proto +74 -18
  26. package/schema/.snootobuf/deps/google/api/routing.proto +1 -1
  27. package/schema/.snootobuf/deps/google/api/service.proto +38 -54
  28. package/schema/.snootobuf/deps/google/api/source_info.proto +2 -1
  29. package/schema/.snootobuf/deps/google/api/system_parameter.proto +3 -3
  30. package/schema/.snootobuf/deps/google/api/usage.proto +5 -9
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Google LLC
1
+ // Copyright 2018 Google LLC.
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -16,47 +16,49 @@ syntax = "proto3";
16
16
 
17
17
  package google.api;
18
18
 
19
+ import "google/api/annotations.proto";
20
+
19
21
  option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
20
22
  option java_multiple_files = true;
21
23
  option java_outer_classname = "EndpointProto";
22
24
  option java_package = "com.google.api";
23
25
  option objc_class_prefix = "GAPI";
24
26
 
25
- // `Endpoint` describes a network address of a service that serves a set of
26
- // APIs. It is commonly known as a service endpoint. A service may expose
27
- // any number of service endpoints, and all service endpoints share the same
28
- // service definition, such as quota limits and monitoring metrics.
27
+
28
+ // `Endpoint` describes a network endpoint that serves a set of APIs.
29
+ // A service may expose any number of endpoints, and all endpoints share the
30
+ // same service configuration, such as quota configuration and monitoring
31
+ // configuration.
29
32
  //
30
- // Example:
33
+ // Example service configuration:
31
34
  //
32
- // type: google.api.Service
33
35
  // name: library-example.googleapis.com
34
36
  // endpoints:
35
- // # Declares network address `https://library-example.googleapis.com`
36
- // # for service `library-example.googleapis.com`. The `https` scheme
37
- // # is implicit for all service endpoints. Other schemes may be
38
- // # supported in the future.
37
+ // # Below entry makes 'google.example.library.v1.Library'
38
+ // # API be served from endpoint address library-example.googleapis.com.
39
+ // # It also allows HTTP OPTIONS calls to be passed to the backend, for
40
+ // # it to decide whether the subsequent cross-origin request is
41
+ // # allowed to proceed.
39
42
  // - name: library-example.googleapis.com
40
- // allow_cors: false
41
- // - name: content-staging-library-example.googleapis.com
42
- // # Allows HTTP OPTIONS calls to be passed to the API frontend, for it
43
- // # to decide whether the subsequent cross-origin request is allowed
44
- // # to proceed.
45
43
  // allow_cors: true
46
44
  message Endpoint {
47
45
  // The canonical name of this endpoint.
48
46
  string name = 1;
49
47
 
50
- // Aliases for this endpoint, these will be served by the same UrlMap as the
51
- // parent endpoint, and will be provisioned in the GCP stack for the Regional
52
- // Endpoints.
48
+ // DEPRECATED: This field is no longer supported. Instead of using aliases,
49
+ // please specify multiple [google.api.Endpoint][google.api.Endpoint] for each of the intended
50
+ // aliases.
51
+ //
52
+ // Additional names that this endpoint will be hosted on.
53
53
  repeated string aliases = 2;
54
54
 
55
+ // The list of features enabled on this endpoint.
56
+ repeated string features = 4;
57
+
55
58
  // The specification of an Internet routable address of API frontend that will
56
- // handle requests to this [API
57
- // Endpoint](https://cloud.google.com/apis/design/glossary). It should be
58
- // either a valid IPv4 address or a fully-qualified domain name. For example,
59
- // "8.8.8.8" or "myservice.appspot.com".
59
+ // handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).
60
+ // It should be either a valid IPv4 address or a fully-qualified domain name.
61
+ // For example, "8.8.8.8" or "myservice.appspot.com".
60
62
  string target = 101;
61
63
 
62
64
  // Allowing
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Google LLC
1
+ // Copyright 2020 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ extend google.protobuf.FieldOptions {
37
37
  // google.protobuf.Timestamp expire_time = 1
38
38
  // [(google.api.field_behavior) = OUTPUT_ONLY,
39
39
  // (google.api.field_behavior) = IMMUTABLE];
40
- repeated google.api.FieldBehavior field_behavior = 1052 [packed = false];
40
+ repeated google.api.FieldBehavior field_behavior = 1052;
41
41
  }
42
42
 
43
43
  // An indicator of the behavior of a given field (for example, that a field
@@ -78,27 +78,7 @@ enum FieldBehavior {
78
78
 
79
79
  // Denotes that a (repeated) field is an unordered list.
80
80
  // This indicates that the service may provide the elements of the list
81
- // in any arbitrary order, rather than the order the user originally
81
+ // in any arbitrary order, rather than the order the user originally
82
82
  // provided. Additionally, the list's order may or may not be stable.
83
83
  UNORDERED_LIST = 6;
84
-
85
- // Denotes that this field returns a non-empty default value if not set.
86
- // This indicates that if the user provides the empty value in a request,
87
- // a non-empty value will be returned. The user will not be aware of what
88
- // non-empty value to expect.
89
- NON_EMPTY_DEFAULT = 7;
90
-
91
- // Denotes that the field in a resource (a message annotated with
92
- // google.api.resource) is used in the resource name to uniquely identify the
93
- // resource. For AIP-compliant APIs, this should only be applied to the
94
- // `name` field on the resource.
95
- //
96
- // This behavior should not be applied to references to other resources within
97
- // the message.
98
- //
99
- // The identifier field of resources often have different field behavior
100
- // depending on the request it is embedded in (e.g. for Create methods name
101
- // is optional and unused, while for Update methods it is required). Instead
102
- // of method-specific annotations, only `IDENTIFIER` is required.
103
- IDENTIFIER = 8;
104
84
  }
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Google LLC
1
+ // Copyright 2018 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ option java_outer_classname = "HttpProto";
23
23
  option java_package = "com.google.api";
24
24
  option objc_class_prefix = "GAPI";
25
25
 
26
+
26
27
  // Defines the HTTP configuration for an API service. It contains a list of
27
28
  // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
28
29
  // to one or more HTTP REST API methods.
@@ -32,7 +33,7 @@ message Http {
32
33
  // **NOTE:** All service configuration rules follow "last one wins" order.
33
34
  repeated HttpRule rules = 1;
34
35
 
35
- // When set to true, URL path parameters will be fully URI-decoded except in
36
+ // When set to true, URL path parmeters will be fully URI-decoded except in
36
37
  // cases of single segment matches in reserved expansion, where "%2F" will be
37
38
  // left encoded.
38
39
  //
@@ -41,91 +42,94 @@ message Http {
41
42
  bool fully_decode_reserved_expansion = 2;
42
43
  }
43
44
 
44
- // gRPC Transcoding
45
- //
46
- // gRPC Transcoding is a feature for mapping between a gRPC method and one or
47
- // more HTTP REST endpoints. It allows developers to build a single API service
48
- // that supports both gRPC APIs and REST APIs. Many systems, including [Google
49
- // APIs](https://github.com/googleapis/googleapis),
50
- // [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
51
- // Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
52
- // and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
53
- // and use it for large scale production services.
54
- //
55
- // `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
56
- // how different portions of the gRPC request message are mapped to the URL
57
- // path, URL query parameters, and HTTP request body. It also controls how the
58
- // gRPC response message is mapped to the HTTP response body. `HttpRule` is
59
- // typically specified as an `google.api.http` annotation on the gRPC method.
60
- //
61
- // Each mapping specifies a URL path template and an HTTP method. The path
62
- // template may refer to one or more fields in the gRPC request message, as long
63
- // as each field is a non-repeated field with a primitive (non-message) type.
64
- // The path template controls how fields of the request message are mapped to
65
- // the URL path.
66
- //
67
- // Example:
45
+ // `HttpRule` defines the mapping of an RPC method to one or more HTTP
46
+ // REST API methods. The mapping specifies how different portions of the RPC
47
+ // request message are mapped to URL path, URL query parameters, and
48
+ // HTTP request body. The mapping is typically specified as an
49
+ // `google.api.http` annotation on the RPC method,
50
+ // see "google/api/annotations.proto" for details.
51
+ //
52
+ // The mapping consists of a field specifying the path template and
53
+ // method kind. The path template can refer to fields in the request
54
+ // message, as in the example below which describes a REST GET
55
+ // operation on a resource collection of messages:
56
+ //
68
57
  //
69
58
  // service Messaging {
70
59
  // rpc GetMessage(GetMessageRequest) returns (Message) {
71
- // option (google.api.http) = {
72
- // get: "/v1/{name=messages/*}"
73
- // };
60
+ // option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
74
61
  // }
75
62
  // }
76
63
  // message GetMessageRequest {
77
- // string name = 1; // Mapped to URL path.
64
+ // message SubMessage {
65
+ // string subfield = 1;
66
+ // }
67
+ // string message_id = 1; // mapped to the URL
68
+ // SubMessage sub = 2; // `sub.subfield` is url-mapped
78
69
  // }
79
70
  // message Message {
80
- // string text = 1; // The resource content.
71
+ // string text = 1; // content of the resource
81
72
  // }
82
73
  //
83
- // This enables an HTTP REST to gRPC mapping as below:
74
+ // The same http annotation can alternatively be expressed inside the
75
+ // `GRPC API Configuration` YAML file.
84
76
  //
85
- // - HTTP: `GET /v1/messages/123456`
86
- // - gRPC: `GetMessage(name: "messages/123456")`
77
+ // http:
78
+ // rules:
79
+ // - selector: <proto_package_name>.Messaging.GetMessage
80
+ // get: /v1/messages/{message_id}/{sub.subfield}
81
+ //
82
+ // This definition enables an automatic, bidrectional mapping of HTTP
83
+ // JSON to RPC. Example:
84
+ //
85
+ // HTTP | RPC
86
+ // -----|-----
87
+ // `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))`
88
+ //
89
+ // In general, not only fields but also field paths can be referenced
90
+ // from a path pattern. Fields mapped to the path pattern cannot be
91
+ // repeated and must have a primitive (non-message) type.
92
+ //
93
+ // Any fields in the request message which are not bound by the path
94
+ // pattern automatically become (optional) HTTP query
95
+ // parameters. Assume the following definition of the request message:
87
96
  //
88
- // Any fields in the request message which are not bound by the path template
89
- // automatically become HTTP query parameters if there is no HTTP request body.
90
- // For example:
91
97
  //
92
98
  // service Messaging {
93
99
  // rpc GetMessage(GetMessageRequest) returns (Message) {
94
- // option (google.api.http) = {
95
- // get:"/v1/messages/{message_id}"
96
- // };
100
+ // option (google.api.http).get = "/v1/messages/{message_id}";
97
101
  // }
98
102
  // }
99
103
  // message GetMessageRequest {
100
104
  // message SubMessage {
101
105
  // string subfield = 1;
102
106
  // }
103
- // string message_id = 1; // Mapped to URL path.
104
- // int64 revision = 2; // Mapped to URL query parameter `revision`.
105
- // SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
107
+ // string message_id = 1; // mapped to the URL
108
+ // int64 revision = 2; // becomes a parameter
109
+ // SubMessage sub = 3; // `sub.subfield` becomes a parameter
106
110
  // }
107
111
  //
112
+ //
108
113
  // This enables a HTTP JSON to RPC mapping as below:
109
114
  //
110
- // - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
111
- // - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
112
- // SubMessage(subfield: "foo"))`
115
+ // HTTP | RPC
116
+ // -----|-----
117
+ // `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
113
118
  //
114
- // Note that fields which are mapped to URL query parameters must have a
115
- // primitive type or a repeated primitive type or a non-repeated message type.
116
- // In the case of a repeated type, the parameter can be repeated in the URL
117
- // as `...?param=A&param=B`. In the case of a message type, each field of the
118
- // message is mapped to a separate parameter, such as
119
- // `...?foo.a=A&foo.b=B&foo.c=C`.
119
+ // Note that fields which are mapped to HTTP parameters must have a
120
+ // primitive type or a repeated primitive type. Message types are not
121
+ // allowed. In the case of a repeated type, the parameter can be
122
+ // repeated in the URL, as in `...?param=A&param=B`.
120
123
  //
121
- // For HTTP methods that allow a request body, the `body` field
124
+ // For HTTP method kinds which allow a request body, the `body` field
122
125
  // specifies the mapping. Consider a REST update method on the
123
126
  // message resource collection:
124
127
  //
128
+ //
125
129
  // service Messaging {
126
130
  // rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
127
131
  // option (google.api.http) = {
128
- // patch: "/v1/messages/{message_id}"
132
+ // put: "/v1/messages/{message_id}"
129
133
  // body: "message"
130
134
  // };
131
135
  // }
@@ -135,12 +139,14 @@ message Http {
135
139
  // Message message = 2; // mapped to the body
136
140
  // }
137
141
  //
142
+ //
138
143
  // The following HTTP JSON to RPC mapping is enabled, where the
139
144
  // representation of the JSON in the request body is determined by
140
145
  // protos JSON encoding:
141
146
  //
142
- // - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
143
- // - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
147
+ // HTTP | RPC
148
+ // -----|-----
149
+ // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
144
150
  //
145
151
  // The special name `*` can be used in the body mapping to define that
146
152
  // every field not bound by the path template should be mapped to the
@@ -150,7 +156,7 @@ message Http {
150
156
  // service Messaging {
151
157
  // rpc UpdateMessage(Message) returns (Message) {
152
158
  // option (google.api.http) = {
153
- // patch: "/v1/messages/{message_id}"
159
+ // put: "/v1/messages/{message_id}"
154
160
  // body: "*"
155
161
  // };
156
162
  // }
@@ -163,12 +169,13 @@ message Http {
163
169
  //
164
170
  // The following HTTP JSON to RPC mapping is enabled:
165
171
  //
166
- // - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
167
- // - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
172
+ // HTTP | RPC
173
+ // -----|-----
174
+ // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
168
175
  //
169
176
  // Note that when using `*` in the body mapping, it is not possible to
170
177
  // have HTTP parameters, as all fields not bound by the path end in
171
- // the body. This makes this option more rarely used in practice when
178
+ // the body. This makes this option more rarely used in practice of
172
179
  // defining REST APIs. The common usage of `*` is in custom methods
173
180
  // which don't use the URL at all for transferring data.
174
181
  //
@@ -190,34 +197,32 @@ message Http {
190
197
  // string user_id = 2;
191
198
  // }
192
199
  //
193
- // This enables the following two alternative HTTP JSON to RPC mappings:
194
200
  //
195
- // - HTTP: `GET /v1/messages/123456`
196
- // - gRPC: `GetMessage(message_id: "123456")`
201
+ // This enables the following two alternative HTTP JSON to RPC
202
+ // mappings:
203
+ //
204
+ // HTTP | RPC
205
+ // -----|-----
206
+ // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
207
+ // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
197
208
  //
198
- // - HTTP: `GET /v1/users/me/messages/123456`
199
- // - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
209
+ // # Rules for HTTP mapping
200
210
  //
201
- // Rules for HTTP mapping
211
+ // The rules for mapping HTTP path, query parameters, and body fields
212
+ // to the request message are as follows:
202
213
  //
203
- // 1. Leaf request fields (recursive expansion nested messages in the request
204
- // message) are classified into three categories:
205
- // - Fields referred by the path template. They are passed via the URL path.
206
- // - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
207
- // are passed via the HTTP
208
- // request body.
209
- // - All other fields are passed via the URL query parameters, and the
210
- // parameter name is the field path in the request message. A repeated
211
- // field can be represented as multiple query parameters under the same
212
- // name.
213
- // 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
214
- // query parameter, all fields
215
- // are passed via URL path and HTTP request body.
216
- // 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
217
- // request body, all
218
- // fields are passed via URL path and URL query parameters.
214
+ // 1. The `body` field specifies either `*` or a field path, or is
215
+ // omitted. If omitted, it indicates there is no HTTP request body.
216
+ // 2. Leaf fields (recursive expansion of nested messages in the
217
+ // request) can be classified into three types:
218
+ // (a) Matched in the URL template.
219
+ // (b) Covered by body (if body is `*`, everything except (a) fields;
220
+ // else everything under the body field)
221
+ // (c) All other fields.
222
+ // 3. URL query parameters found in the HTTP request are mapped to (c) fields.
223
+ // 4. Any body sent with an HTTP request can contain only (b) fields.
219
224
  //
220
- // Path template syntax
225
+ // The syntax of the path template is as follows:
221
226
  //
222
227
  // Template = "/" Segments [ Verb ] ;
223
228
  // Segments = Segment { "/" Segment } ;
@@ -226,110 +231,57 @@ message Http {
226
231
  // FieldPath = IDENT { "." IDENT } ;
227
232
  // Verb = ":" LITERAL ;
228
233
  //
229
- // The syntax `*` matches a single URL path segment. The syntax `**` matches
230
- // zero or more URL path segments, which must be the last part of the URL path
231
- // except the `Verb`.
234
+ // The syntax `*` matches a single path segment. The syntax `**` matches zero
235
+ // or more path segments, which must be the last part of the path except the
236
+ // `Verb`. The syntax `LITERAL` matches literal text in the path.
232
237
  //
233
238
  // The syntax `Variable` matches part of the URL path as specified by its
234
239
  // template. A variable template must not contain other variables. If a variable
235
240
  // matches a single path segment, its template may be omitted, e.g. `{var}`
236
241
  // is equivalent to `{var=*}`.
237
242
  //
238
- // The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
239
- // contains any reserved character, such characters should be percent-encoded
240
- // before the matching.
241
- //
242
243
  // If a variable contains exactly one path segment, such as `"{var}"` or
243
- // `"{var=*}"`, when such a variable is expanded into a URL path on the client
244
- // side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
245
- // server side does the reverse decoding. Such variables show up in the
246
- // [Discovery
247
- // Document](https://developers.google.com/discovery/v1/reference/apis) as
248
- // `{var}`.
249
- //
250
- // If a variable contains multiple path segments, such as `"{var=foo/*}"`
251
- // or `"{var=**}"`, when such a variable is expanded into a URL path on the
252
- // client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
253
- // The server side does the reverse decoding, except "%2F" and "%2f" are left
254
- // unchanged. Such variables show up in the
255
- // [Discovery
256
- // Document](https://developers.google.com/discovery/v1/reference/apis) as
257
- // `{+var}`.
258
- //
259
- // Using gRPC API Service Configuration
260
- //
261
- // gRPC API Service Configuration (service config) is a configuration language
262
- // for configuring a gRPC service to become a user-facing product. The
263
- // service config is simply the YAML representation of the `google.api.Service`
264
- // proto message.
265
- //
266
- // As an alternative to annotating your proto file, you can configure gRPC
267
- // transcoding in your service config YAML files. You do this by specifying a
268
- // `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
269
- // effect as the proto annotation. This can be particularly useful if you
270
- // have a proto that is reused in multiple services. Note that any transcoding
271
- // specified in the service config will override any matching transcoding
272
- // configuration in the proto.
273
- //
274
- // The following example selects a gRPC method and applies an `HttpRule` to it:
275
- //
276
- // http:
277
- // rules:
278
- // - selector: example.v1.Messaging.GetMessage
279
- // get: /v1/messages/{message_id}/{sub.subfield}
280
- //
281
- // Special notes
282
- //
283
- // When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
284
- // proto to JSON conversion must follow the [proto3
285
- // specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
286
- //
287
- // While the single segment variable follows the semantics of
288
- // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
289
- // Expansion, the multi segment variable **does not** follow RFC 6570 Section
290
- // 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
244
+ // `"{var=*}"`, when such a variable is expanded into a URL path, all characters
245
+ // except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the
246
+ // Discovery Document as `{var}`.
247
+ //
248
+ // If a variable contains one or more path segments, such as `"{var=foo/*}"`
249
+ // or `"{var=**}"`, when such a variable is expanded into a URL path, all
250
+ // characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables
251
+ // show up in the Discovery Document as `{+var}`.
252
+ //
253
+ // NOTE: While the single segment variable matches the semantics of
254
+ // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
255
+ // Simple String Expansion, the multi segment variable **does not** match
256
+ // RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion
291
257
  // does not expand special characters like `?` and `#`, which would lead
292
- // to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
293
- // for multi segment variables.
294
- //
295
- // The path variables **must not** refer to any repeated or mapped field,
296
- // because client libraries are not capable of handling such variable expansion.
258
+ // to invalid URLs.
297
259
  //
298
- // The path variables **must not** capture the leading "/" character. The reason
299
- // is that the most common use case "{var}" does not capture the leading "/"
300
- // character. For consistency, all path variables must share the same behavior.
301
- //
302
- // Repeated message fields must not be mapped to URL query parameters, because
303
- // no client library can support such complicated mapping.
304
- //
305
- // If an API needs to use a JSON array for request or response body, it can map
306
- // the request or response body to a repeated field. However, some gRPC
307
- // Transcoding implementations may not support this feature.
260
+ // NOTE: the field paths in variables and in the `body` must not refer to
261
+ // repeated fields or map fields.
308
262
  message HttpRule {
309
- // Selects a method to which this rule applies.
263
+ // Selects methods to which this rule applies.
310
264
  //
311
- // Refer to [selector][google.api.DocumentationRule.selector] for syntax
312
- // details.
265
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
313
266
  string selector = 1;
314
267
 
315
268
  // Determines the URL pattern is matched by this rules. This pattern can be
316
269
  // used with any of the {get|put|post|delete|patch} methods. A custom method
317
270
  // can be defined using the 'custom' field.
318
271
  oneof pattern {
319
- // Maps to HTTP GET. Used for listing and getting information about
320
- // resources.
272
+ // Used for listing and getting information about resources.
321
273
  string get = 2;
322
274
 
323
- // Maps to HTTP PUT. Used for replacing a resource.
275
+ // Used for updating a resource.
324
276
  string put = 3;
325
277
 
326
- // Maps to HTTP POST. Used for creating a resource or performing an action.
278
+ // Used for creating a resource.
327
279
  string post = 4;
328
280
 
329
- // Maps to HTTP DELETE. Used for deleting a resource.
281
+ // Used for deleting a resource.
330
282
  string delete = 5;
331
283
 
332
- // Maps to HTTP PATCH. Used for updating a resource.
284
+ // Used for updating a resource.
333
285
  string patch = 6;
334
286
 
335
287
  // The custom pattern is used for specifying an HTTP method that is not
@@ -339,20 +291,15 @@ message HttpRule {
339
291
  CustomHttpPattern custom = 8;
340
292
  }
341
293
 
342
- // The name of the request field whose value is mapped to the HTTP request
343
- // body, or `*` for mapping all request fields not captured by the path
344
- // pattern to the HTTP body, or omitted for not having any HTTP request body.
345
- //
346
- // NOTE: the referred field must be present at the top-level of the request
347
- // message type.
294
+ // The name of the request field whose value is mapped to the HTTP body, or
295
+ // `*` for mapping all fields not captured by the path pattern to the HTTP
296
+ // body. NOTE: the referred field must not be a repeated field and must be
297
+ // present at the top-level of request message type.
348
298
  string body = 7;
349
299
 
350
300
  // Optional. The name of the response field whose value is mapped to the HTTP
351
- // response body. When omitted, the entire response message will be used
352
- // as the HTTP response body.
353
- //
354
- // NOTE: The referred field must be present at the top-level of the response
355
- // message type.
301
+ // body of response. Other response fields are ignored. When
302
+ // not set, the response message will be used as HTTP body of response.
356
303
  string response_body = 12;
357
304
 
358
305
  // Additional HTTP bindings for the selector. Nested bindings must
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Google LLC
1
+ // Copyright 2018 Google LLC.
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -18,13 +18,13 @@ package google.api;
18
18
 
19
19
  import "google/protobuf/any.proto";
20
20
 
21
- option cc_enable_arenas = true;
22
21
  option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody";
23
22
  option java_multiple_files = true;
24
23
  option java_outer_classname = "HttpBodyProto";
25
24
  option java_package = "com.google.api";
26
25
  option objc_class_prefix = "GAPI";
27
26
 
27
+
28
28
  // Message that represents an arbitrary HTTP body. It should only be used for
29
29
  // payload formats that can't be represented as JSON, such as raw binary or
30
30
  // an HTML page.
@@ -45,15 +45,11 @@ option objc_class_prefix = "GAPI";
45
45
  //
46
46
  // // The raw HTTP body is bound to this field.
47
47
  // google.api.HttpBody http_body = 2;
48
- //
49
48
  // }
50
49
  //
51
50
  // service ResourceService {
52
- // rpc GetResource(GetResourceRequest)
53
- // returns (google.api.HttpBody);
54
- // rpc UpdateResource(google.api.HttpBody)
55
- // returns (google.protobuf.Empty);
56
- //
51
+ // rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
52
+ // rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);
57
53
  // }
58
54
  //
59
55
  // Example with streaming methods:
@@ -63,16 +59,15 @@ option objc_class_prefix = "GAPI";
63
59
  // returns (stream google.api.HttpBody);
64
60
  // rpc UpdateCalendar(stream google.api.HttpBody)
65
61
  // returns (stream google.api.HttpBody);
66
- //
67
62
  // }
68
63
  //
69
64
  // Use of this type only changes how the request and response bodies are
70
65
  // handled, all other features will continue to work unchanged.
71
66
  message HttpBody {
72
- // The HTTP Content-Type header value specifying the content type of the body.
67
+ // The HTTP Content-Type string representing the content type of the body.
73
68
  string content_type = 1;
74
69
 
75
- // The HTTP request/response body as raw binary.
70
+ // HTTP body binary data.
76
71
  bytes data = 2;
77
72
 
78
73
  // Application specific response metadata. Must be set in the first response
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Google LLC
1
+ // Copyright 2018 Google LLC.
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ option java_outer_classname = "LabelProto";
23
23
  option java_package = "com.google.api";
24
24
  option objc_class_prefix = "GAPI";
25
25
 
26
+
26
27
  // A description of a label.
27
28
  message LabelDescriptor {
28
29
  // Value types that can be used as label values.