@bufbuild/protobuf 2.0.0 → 2.2.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.
- package/dist/cjs/registry.js +1 -1
- package/dist/cjs/types.d.ts +38 -4
- package/dist/cjs/wire/binary-encoding.js +4 -1
- package/dist/cjs/wkt/gen/google/protobuf/any_pb.d.ts +88 -1
- package/dist/cjs/wkt/gen/google/protobuf/api_pb.d.ts +148 -3
- package/dist/cjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +128 -5
- package/dist/cjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +721 -55
- package/dist/cjs/wkt/gen/google/protobuf/descriptor_pb.js +1 -1
- package/dist/cjs/wkt/gen/google/protobuf/duration_pb.d.ts +61 -1
- package/dist/cjs/wkt/gen/google/protobuf/empty_pb.d.ts +10 -1
- package/dist/cjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +201 -1
- package/dist/cjs/wkt/gen/google/protobuf/source_context_pb.d.ts +7 -1
- package/dist/cjs/wkt/gen/google/protobuf/struct_pb.d.ts +29 -4
- package/dist/cjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +92 -1
- package/dist/cjs/wkt/gen/google/protobuf/type_pb.d.ts +89 -8
- package/dist/cjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +45 -9
- package/dist/esm/registry.js +1 -1
- package/dist/esm/types.d.ts +38 -4
- package/dist/esm/wire/binary-encoding.js +4 -1
- package/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +88 -1
- package/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +148 -3
- package/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +128 -5
- package/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +721 -55
- package/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +1 -1
- package/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +61 -1
- package/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +10 -1
- package/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +201 -1
- package/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +7 -1
- package/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +29 -4
- package/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +92 -1
- package/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +89 -8
- package/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +45 -9
- package/package.json +1 -1
|
@@ -85,34 +85,79 @@ export type Api = Message<"google.protobuf.Api"> & {
|
|
|
85
85
|
syntax: Syntax;
|
|
86
86
|
};
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* Api is a light-weight descriptor for an API Interface.
|
|
89
|
+
*
|
|
90
|
+
* Interfaces are also described as "protocol buffer services" in some contexts,
|
|
91
|
+
* such as by the "service" keyword in a .proto file, but they are different
|
|
92
|
+
* from API Services, which represent a concrete implementation of an interface
|
|
93
|
+
* as opposed to simply a description of methods and bindings. They are also
|
|
94
|
+
* sometimes simply referred to as "APIs" in other contexts, such as the name of
|
|
95
|
+
* this message itself. See https://cloud.google.com/apis/design/glossary for
|
|
96
|
+
* detailed terminology.
|
|
97
|
+
*
|
|
98
|
+
* @generated from message google.protobuf.Api
|
|
89
99
|
*/
|
|
90
100
|
export type ApiJson = {
|
|
91
101
|
/**
|
|
102
|
+
* The fully qualified name of this interface, including package name
|
|
103
|
+
* followed by the interface's simple name.
|
|
104
|
+
*
|
|
92
105
|
* @generated from field: string name = 1;
|
|
93
106
|
*/
|
|
94
107
|
name?: string;
|
|
95
108
|
/**
|
|
109
|
+
* The methods of this interface, in unspecified order.
|
|
110
|
+
*
|
|
96
111
|
* @generated from field: repeated google.protobuf.Method methods = 2;
|
|
97
112
|
*/
|
|
98
113
|
methods?: MethodJson[];
|
|
99
114
|
/**
|
|
115
|
+
* Any metadata attached to the interface.
|
|
116
|
+
*
|
|
100
117
|
* @generated from field: repeated google.protobuf.Option options = 3;
|
|
101
118
|
*/
|
|
102
119
|
options?: OptionJson[];
|
|
103
120
|
/**
|
|
121
|
+
* A version string for this interface. If specified, must have the form
|
|
122
|
+
* `major-version.minor-version`, as in `1.10`. If the minor version is
|
|
123
|
+
* omitted, it defaults to zero. If the entire version field is empty, the
|
|
124
|
+
* major version is derived from the package name, as outlined below. If the
|
|
125
|
+
* field is not empty, the version in the package name will be verified to be
|
|
126
|
+
* consistent with what is provided here.
|
|
127
|
+
*
|
|
128
|
+
* The versioning schema uses [semantic
|
|
129
|
+
* versioning](http://semver.org) where the major version number
|
|
130
|
+
* indicates a breaking change and the minor version an additive,
|
|
131
|
+
* non-breaking change. Both version numbers are signals to users
|
|
132
|
+
* what to expect from different versions, and should be carefully
|
|
133
|
+
* chosen based on the product plan.
|
|
134
|
+
*
|
|
135
|
+
* The major version is also reflected in the package name of the
|
|
136
|
+
* interface, which must end in `v<major-version>`, as in
|
|
137
|
+
* `google.feature.v1`. For major versions 0 and 1, the suffix can
|
|
138
|
+
* be omitted. Zero major versions must only be used for
|
|
139
|
+
* experimental, non-GA interfaces.
|
|
140
|
+
*
|
|
141
|
+
*
|
|
104
142
|
* @generated from field: string version = 4;
|
|
105
143
|
*/
|
|
106
144
|
version?: string;
|
|
107
145
|
/**
|
|
146
|
+
* Source context for the protocol buffer service represented by this
|
|
147
|
+
* message.
|
|
148
|
+
*
|
|
108
149
|
* @generated from field: google.protobuf.SourceContext source_context = 5;
|
|
109
150
|
*/
|
|
110
151
|
sourceContext?: SourceContextJson;
|
|
111
152
|
/**
|
|
153
|
+
* Included interfaces. See [Mixin][].
|
|
154
|
+
*
|
|
112
155
|
* @generated from field: repeated google.protobuf.Mixin mixins = 6;
|
|
113
156
|
*/
|
|
114
157
|
mixins?: MixinJson[];
|
|
115
158
|
/**
|
|
159
|
+
* The source syntax of the service.
|
|
160
|
+
*
|
|
116
161
|
* @generated from field: google.protobuf.Syntax syntax = 7;
|
|
117
162
|
*/
|
|
118
163
|
syntax?: SyntaxJson;
|
|
@@ -172,34 +217,50 @@ export type Method = Message<"google.protobuf.Method"> & {
|
|
|
172
217
|
syntax: Syntax;
|
|
173
218
|
};
|
|
174
219
|
/**
|
|
175
|
-
*
|
|
220
|
+
* Method represents a method of an API interface.
|
|
221
|
+
*
|
|
222
|
+
* @generated from message google.protobuf.Method
|
|
176
223
|
*/
|
|
177
224
|
export type MethodJson = {
|
|
178
225
|
/**
|
|
226
|
+
* The simple name of this method.
|
|
227
|
+
*
|
|
179
228
|
* @generated from field: string name = 1;
|
|
180
229
|
*/
|
|
181
230
|
name?: string;
|
|
182
231
|
/**
|
|
232
|
+
* A URL of the input message type.
|
|
233
|
+
*
|
|
183
234
|
* @generated from field: string request_type_url = 2;
|
|
184
235
|
*/
|
|
185
236
|
requestTypeUrl?: string;
|
|
186
237
|
/**
|
|
238
|
+
* If true, the request is streamed.
|
|
239
|
+
*
|
|
187
240
|
* @generated from field: bool request_streaming = 3;
|
|
188
241
|
*/
|
|
189
242
|
requestStreaming?: boolean;
|
|
190
243
|
/**
|
|
244
|
+
* The URL of the output message type.
|
|
245
|
+
*
|
|
191
246
|
* @generated from field: string response_type_url = 4;
|
|
192
247
|
*/
|
|
193
248
|
responseTypeUrl?: string;
|
|
194
249
|
/**
|
|
250
|
+
* If true, the response is streamed.
|
|
251
|
+
*
|
|
195
252
|
* @generated from field: bool response_streaming = 5;
|
|
196
253
|
*/
|
|
197
254
|
responseStreaming?: boolean;
|
|
198
255
|
/**
|
|
256
|
+
* Any metadata attached to the method.
|
|
257
|
+
*
|
|
199
258
|
* @generated from field: repeated google.protobuf.Option options = 6;
|
|
200
259
|
*/
|
|
201
260
|
options?: OptionJson[];
|
|
202
261
|
/**
|
|
262
|
+
* The source syntax of this method.
|
|
263
|
+
*
|
|
203
264
|
* @generated from field: google.protobuf.Syntax syntax = 7;
|
|
204
265
|
*/
|
|
205
266
|
syntax?: SyntaxJson;
|
|
@@ -307,14 +368,98 @@ export type Mixin = Message<"google.protobuf.Mixin"> & {
|
|
|
307
368
|
root: string;
|
|
308
369
|
};
|
|
309
370
|
/**
|
|
310
|
-
*
|
|
371
|
+
* Declares an API Interface to be included in this interface. The including
|
|
372
|
+
* interface must redeclare all the methods from the included interface, but
|
|
373
|
+
* documentation and options are inherited as follows:
|
|
374
|
+
*
|
|
375
|
+
* - If after comment and whitespace stripping, the documentation
|
|
376
|
+
* string of the redeclared method is empty, it will be inherited
|
|
377
|
+
* from the original method.
|
|
378
|
+
*
|
|
379
|
+
* - Each annotation belonging to the service config (http,
|
|
380
|
+
* visibility) which is not set in the redeclared method will be
|
|
381
|
+
* inherited.
|
|
382
|
+
*
|
|
383
|
+
* - If an http annotation is inherited, the path pattern will be
|
|
384
|
+
* modified as follows. Any version prefix will be replaced by the
|
|
385
|
+
* version of the including interface plus the [root][] path if
|
|
386
|
+
* specified.
|
|
387
|
+
*
|
|
388
|
+
* Example of a simple mixin:
|
|
389
|
+
*
|
|
390
|
+
* package google.acl.v1;
|
|
391
|
+
* service AccessControl {
|
|
392
|
+
* // Get the underlying ACL object.
|
|
393
|
+
* rpc GetAcl(GetAclRequest) returns (Acl) {
|
|
394
|
+
* option (google.api.http).get = "/v1/{resource=**}:getAcl";
|
|
395
|
+
* }
|
|
396
|
+
* }
|
|
397
|
+
*
|
|
398
|
+
* package google.storage.v2;
|
|
399
|
+
* service Storage {
|
|
400
|
+
* rpc GetAcl(GetAclRequest) returns (Acl);
|
|
401
|
+
*
|
|
402
|
+
* // Get a data record.
|
|
403
|
+
* rpc GetData(GetDataRequest) returns (Data) {
|
|
404
|
+
* option (google.api.http).get = "/v2/{resource=**}";
|
|
405
|
+
* }
|
|
406
|
+
* }
|
|
407
|
+
*
|
|
408
|
+
* Example of a mixin configuration:
|
|
409
|
+
*
|
|
410
|
+
* apis:
|
|
411
|
+
* - name: google.storage.v2.Storage
|
|
412
|
+
* mixins:
|
|
413
|
+
* - name: google.acl.v1.AccessControl
|
|
414
|
+
*
|
|
415
|
+
* The mixin construct implies that all methods in `AccessControl` are
|
|
416
|
+
* also declared with same name and request/response types in
|
|
417
|
+
* `Storage`. A documentation generator or annotation processor will
|
|
418
|
+
* see the effective `Storage.GetAcl` method after inherting
|
|
419
|
+
* documentation and annotations as follows:
|
|
420
|
+
*
|
|
421
|
+
* service Storage {
|
|
422
|
+
* // Get the underlying ACL object.
|
|
423
|
+
* rpc GetAcl(GetAclRequest) returns (Acl) {
|
|
424
|
+
* option (google.api.http).get = "/v2/{resource=**}:getAcl";
|
|
425
|
+
* }
|
|
426
|
+
* ...
|
|
427
|
+
* }
|
|
428
|
+
*
|
|
429
|
+
* Note how the version in the path pattern changed from `v1` to `v2`.
|
|
430
|
+
*
|
|
431
|
+
* If the `root` field in the mixin is specified, it should be a
|
|
432
|
+
* relative path under which inherited HTTP paths are placed. Example:
|
|
433
|
+
*
|
|
434
|
+
* apis:
|
|
435
|
+
* - name: google.storage.v2.Storage
|
|
436
|
+
* mixins:
|
|
437
|
+
* - name: google.acl.v1.AccessControl
|
|
438
|
+
* root: acls
|
|
439
|
+
*
|
|
440
|
+
* This implies the following inherited HTTP annotation:
|
|
441
|
+
*
|
|
442
|
+
* service Storage {
|
|
443
|
+
* // Get the underlying ACL object.
|
|
444
|
+
* rpc GetAcl(GetAclRequest) returns (Acl) {
|
|
445
|
+
* option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
|
|
446
|
+
* }
|
|
447
|
+
* ...
|
|
448
|
+
* }
|
|
449
|
+
*
|
|
450
|
+
* @generated from message google.protobuf.Mixin
|
|
311
451
|
*/
|
|
312
452
|
export type MixinJson = {
|
|
313
453
|
/**
|
|
454
|
+
* The fully qualified name of the interface which is included.
|
|
455
|
+
*
|
|
314
456
|
* @generated from field: string name = 1;
|
|
315
457
|
*/
|
|
316
458
|
name?: string;
|
|
317
459
|
/**
|
|
460
|
+
* If non-empty specifies a path under which inherited HTTP paths
|
|
461
|
+
* are rooted.
|
|
462
|
+
*
|
|
318
463
|
* @generated from field: string root = 2;
|
|
319
464
|
*/
|
|
320
465
|
root?: string;
|
|
@@ -32,7 +32,9 @@ export type Version = Message<"google.protobuf.compiler.Version"> & {
|
|
|
32
32
|
suffix: string;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* The version number of protocol compiler.
|
|
36
|
+
*
|
|
37
|
+
* @generated from message google.protobuf.compiler.Version
|
|
36
38
|
*/
|
|
37
39
|
export type VersionJson = {
|
|
38
40
|
/**
|
|
@@ -48,6 +50,9 @@ export type VersionJson = {
|
|
|
48
50
|
*/
|
|
49
51
|
patch?: number;
|
|
50
52
|
/**
|
|
53
|
+
* A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
|
|
54
|
+
* be empty for mainline stable releases.
|
|
55
|
+
*
|
|
51
56
|
* @generated from field: optional string suffix = 4;
|
|
52
57
|
*/
|
|
53
58
|
suffix?: string;
|
|
@@ -117,26 +122,60 @@ export type CodeGeneratorRequest = Message<"google.protobuf.compiler.CodeGenerat
|
|
|
117
122
|
compilerVersion?: Version;
|
|
118
123
|
};
|
|
119
124
|
/**
|
|
120
|
-
*
|
|
125
|
+
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
|
|
126
|
+
*
|
|
127
|
+
* @generated from message google.protobuf.compiler.CodeGeneratorRequest
|
|
121
128
|
*/
|
|
122
129
|
export type CodeGeneratorRequestJson = {
|
|
123
130
|
/**
|
|
131
|
+
* The .proto files that were explicitly listed on the command-line. The
|
|
132
|
+
* code generator should generate code only for these files. Each file's
|
|
133
|
+
* descriptor will be included in proto_file, below.
|
|
134
|
+
*
|
|
124
135
|
* @generated from field: repeated string file_to_generate = 1;
|
|
125
136
|
*/
|
|
126
137
|
fileToGenerate?: string[];
|
|
127
138
|
/**
|
|
139
|
+
* The generator parameter passed on the command-line.
|
|
140
|
+
*
|
|
128
141
|
* @generated from field: optional string parameter = 2;
|
|
129
142
|
*/
|
|
130
143
|
parameter?: string;
|
|
131
144
|
/**
|
|
145
|
+
* FileDescriptorProtos for all files in files_to_generate and everything
|
|
146
|
+
* they import. The files will appear in topological order, so each file
|
|
147
|
+
* appears before any file that imports it.
|
|
148
|
+
*
|
|
149
|
+
* Note: the files listed in files_to_generate will include runtime-retention
|
|
150
|
+
* options only, but all other files will include source-retention options.
|
|
151
|
+
* The source_file_descriptors field below is available in case you need
|
|
152
|
+
* source-retention options for files_to_generate.
|
|
153
|
+
*
|
|
154
|
+
* protoc guarantees that all proto_files will be written after
|
|
155
|
+
* the fields above, even though this is not technically guaranteed by the
|
|
156
|
+
* protobuf wire format. This theoretically could allow a plugin to stream
|
|
157
|
+
* in the FileDescriptorProtos and handle them one by one rather than read
|
|
158
|
+
* the entire set into memory at once. However, as of this writing, this
|
|
159
|
+
* is not similarly optimized on protoc's end -- it will store all fields in
|
|
160
|
+
* memory at once before sending them to the plugin.
|
|
161
|
+
*
|
|
162
|
+
* Type names of fields and extensions in the FileDescriptorProto are always
|
|
163
|
+
* fully qualified.
|
|
164
|
+
*
|
|
132
165
|
* @generated from field: repeated google.protobuf.FileDescriptorProto proto_file = 15;
|
|
133
166
|
*/
|
|
134
167
|
protoFile?: FileDescriptorProtoJson[];
|
|
135
168
|
/**
|
|
169
|
+
* File descriptors with all options, including source-retention options.
|
|
170
|
+
* These descriptors are only provided for the files listed in
|
|
171
|
+
* files_to_generate.
|
|
172
|
+
*
|
|
136
173
|
* @generated from field: repeated google.protobuf.FileDescriptorProto source_file_descriptors = 17;
|
|
137
174
|
*/
|
|
138
175
|
sourceFileDescriptors?: FileDescriptorProtoJson[];
|
|
139
176
|
/**
|
|
177
|
+
* The version number of protocol compiler.
|
|
178
|
+
*
|
|
140
179
|
* @generated from field: optional google.protobuf.compiler.Version compiler_version = 3;
|
|
141
180
|
*/
|
|
142
181
|
compilerVersion?: VersionJson;
|
|
@@ -196,22 +235,46 @@ export type CodeGeneratorResponse = Message<"google.protobuf.compiler.CodeGenera
|
|
|
196
235
|
file: CodeGeneratorResponse_File[];
|
|
197
236
|
};
|
|
198
237
|
/**
|
|
199
|
-
*
|
|
238
|
+
* The plugin writes an encoded CodeGeneratorResponse to stdout.
|
|
239
|
+
*
|
|
240
|
+
* @generated from message google.protobuf.compiler.CodeGeneratorResponse
|
|
200
241
|
*/
|
|
201
242
|
export type CodeGeneratorResponseJson = {
|
|
202
243
|
/**
|
|
244
|
+
* Error message. If non-empty, code generation failed. The plugin process
|
|
245
|
+
* should exit with status code zero even if it reports an error in this way.
|
|
246
|
+
*
|
|
247
|
+
* This should be used to indicate errors in .proto files which prevent the
|
|
248
|
+
* code generator from generating correct code. Errors which indicate a
|
|
249
|
+
* problem in protoc itself -- such as the input CodeGeneratorRequest being
|
|
250
|
+
* unparseable -- should be reported by writing a message to stderr and
|
|
251
|
+
* exiting with a non-zero status code.
|
|
252
|
+
*
|
|
203
253
|
* @generated from field: optional string error = 1;
|
|
204
254
|
*/
|
|
205
255
|
error?: string;
|
|
206
256
|
/**
|
|
257
|
+
* A bitmask of supported features that the code generator supports.
|
|
258
|
+
* This is a bitwise "or" of values from the Feature enum.
|
|
259
|
+
*
|
|
207
260
|
* @generated from field: optional uint64 supported_features = 2;
|
|
208
261
|
*/
|
|
209
262
|
supportedFeatures?: string;
|
|
210
263
|
/**
|
|
264
|
+
* The minimum edition this plugin supports. This will be treated as an
|
|
265
|
+
* Edition enum, but we want to allow unknown values. It should be specified
|
|
266
|
+
* according the edition enum value, *not* the edition number. Only takes
|
|
267
|
+
* effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
|
|
268
|
+
*
|
|
211
269
|
* @generated from field: optional int32 minimum_edition = 3;
|
|
212
270
|
*/
|
|
213
271
|
minimumEdition?: number;
|
|
214
272
|
/**
|
|
273
|
+
* The maximum edition this plugin supports. This will be treated as an
|
|
274
|
+
* Edition enum, but we want to allow unknown values. It should be specified
|
|
275
|
+
* according the edition enum value, *not* the edition number. Only takes
|
|
276
|
+
* effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
|
|
277
|
+
*
|
|
215
278
|
* @generated from field: optional int32 maximum_edition = 4;
|
|
216
279
|
*/
|
|
217
280
|
maximumEdition?: number;
|
|
@@ -305,22 +368,80 @@ export type CodeGeneratorResponse_File = Message<"google.protobuf.compiler.CodeG
|
|
|
305
368
|
generatedCodeInfo?: GeneratedCodeInfo;
|
|
306
369
|
};
|
|
307
370
|
/**
|
|
308
|
-
*
|
|
371
|
+
* Represents a single generated file.
|
|
372
|
+
*
|
|
373
|
+
* @generated from message google.protobuf.compiler.CodeGeneratorResponse.File
|
|
309
374
|
*/
|
|
310
375
|
export type CodeGeneratorResponse_FileJson = {
|
|
311
376
|
/**
|
|
377
|
+
* The file name, relative to the output directory. The name must not
|
|
378
|
+
* contain "." or ".." components and must be relative, not be absolute (so,
|
|
379
|
+
* the file cannot lie outside the output directory). "/" must be used as
|
|
380
|
+
* the path separator, not "\".
|
|
381
|
+
*
|
|
382
|
+
* If the name is omitted, the content will be appended to the previous
|
|
383
|
+
* file. This allows the generator to break large files into small chunks,
|
|
384
|
+
* and allows the generated text to be streamed back to protoc so that large
|
|
385
|
+
* files need not reside completely in memory at one time. Note that as of
|
|
386
|
+
* this writing protoc does not optimize for this -- it will read the entire
|
|
387
|
+
* CodeGeneratorResponse before writing files to disk.
|
|
388
|
+
*
|
|
312
389
|
* @generated from field: optional string name = 1;
|
|
313
390
|
*/
|
|
314
391
|
name?: string;
|
|
315
392
|
/**
|
|
393
|
+
* If non-empty, indicates that the named file should already exist, and the
|
|
394
|
+
* content here is to be inserted into that file at a defined insertion
|
|
395
|
+
* point. This feature allows a code generator to extend the output
|
|
396
|
+
* produced by another code generator. The original generator may provide
|
|
397
|
+
* insertion points by placing special annotations in the file that look
|
|
398
|
+
* like:
|
|
399
|
+
* @@protoc_insertion_point(NAME)
|
|
400
|
+
* The annotation can have arbitrary text before and after it on the line,
|
|
401
|
+
* which allows it to be placed in a comment. NAME should be replaced with
|
|
402
|
+
* an identifier naming the point -- this is what other generators will use
|
|
403
|
+
* as the insertion_point. Code inserted at this point will be placed
|
|
404
|
+
* immediately above the line containing the insertion point (thus multiple
|
|
405
|
+
* insertions to the same point will come out in the order they were added).
|
|
406
|
+
* The double-@ is intended to make it unlikely that the generated code
|
|
407
|
+
* could contain things that look like insertion points by accident.
|
|
408
|
+
*
|
|
409
|
+
* For example, the C++ code generator places the following line in the
|
|
410
|
+
* .pb.h files that it generates:
|
|
411
|
+
* // @@protoc_insertion_point(namespace_scope)
|
|
412
|
+
* This line appears within the scope of the file's package namespace, but
|
|
413
|
+
* outside of any particular class. Another plugin can then specify the
|
|
414
|
+
* insertion_point "namespace_scope" to generate additional classes or
|
|
415
|
+
* other declarations that should be placed in this scope.
|
|
416
|
+
*
|
|
417
|
+
* Note that if the line containing the insertion point begins with
|
|
418
|
+
* whitespace, the same whitespace will be added to every line of the
|
|
419
|
+
* inserted text. This is useful for languages like Python, where
|
|
420
|
+
* indentation matters. In these languages, the insertion point comment
|
|
421
|
+
* should be indented the same amount as any inserted code will need to be
|
|
422
|
+
* in order to work correctly in that context.
|
|
423
|
+
*
|
|
424
|
+
* The code generator that generates the initial file and the one which
|
|
425
|
+
* inserts into it must both run as part of a single invocation of protoc.
|
|
426
|
+
* Code generators are executed in the order in which they appear on the
|
|
427
|
+
* command line.
|
|
428
|
+
*
|
|
429
|
+
* If |insertion_point| is present, |name| must also be present.
|
|
430
|
+
*
|
|
316
431
|
* @generated from field: optional string insertion_point = 2;
|
|
317
432
|
*/
|
|
318
433
|
insertionPoint?: string;
|
|
319
434
|
/**
|
|
435
|
+
* The file contents.
|
|
436
|
+
*
|
|
320
437
|
* @generated from field: optional string content = 15;
|
|
321
438
|
*/
|
|
322
439
|
content?: string;
|
|
323
440
|
/**
|
|
441
|
+
* Information describing the file content being inserted. If an insertion
|
|
442
|
+
* point is used, this information will be appropriately offset and inserted
|
|
443
|
+
* into the code generation metadata for the generated files.
|
|
444
|
+
*
|
|
324
445
|
* @generated from field: optional google.protobuf.GeneratedCodeInfo generated_code_info = 16;
|
|
325
446
|
*/
|
|
326
447
|
generatedCodeInfo?: GeneratedCodeInfoJson;
|
|
@@ -350,7 +471,9 @@ export declare enum CodeGeneratorResponse_Feature {
|
|
|
350
471
|
SUPPORTS_EDITIONS = 2
|
|
351
472
|
}
|
|
352
473
|
/**
|
|
353
|
-
*
|
|
474
|
+
* Sync with code_generator.h.
|
|
475
|
+
*
|
|
476
|
+
* @generated from enum google.protobuf.compiler.CodeGeneratorResponse.Feature
|
|
354
477
|
*/
|
|
355
478
|
export type CodeGeneratorResponse_FeatureJson = "FEATURE_NONE" | "FEATURE_PROTO3_OPTIONAL" | "FEATURE_SUPPORTS_EDITIONS";
|
|
356
479
|
/**
|