@zilliz/milvus2-sdk-node 2.5.7 → 2.5.9

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 (51) hide show
  1. package/dist/milvus/MilvusLiteClient.d.ts +5 -0
  2. package/dist/milvus/MilvusLiteClient.js +40 -0
  3. package/dist/milvus/MilvusLiteClient.js.map +1 -0
  4. package/dist/milvus/const/milvus.d.ts +4 -0
  5. package/dist/milvus/const/milvus.js +6 -1
  6. package/dist/milvus/const/milvus.js.map +1 -1
  7. package/dist/milvus/grpc/BaseClient.d.ts +0 -4
  8. package/dist/milvus/grpc/BaseClient.js +11 -20
  9. package/dist/milvus/grpc/BaseClient.js.map +1 -1
  10. package/dist/milvus/grpc/Data.js +7 -1
  11. package/dist/milvus/grpc/Data.js.map +1 -1
  12. package/dist/milvus/grpc/GrpcClient.d.ts +7 -1
  13. package/dist/milvus/grpc/GrpcClient.js +15 -1
  14. package/dist/milvus/grpc/GrpcClient.js.map +1 -1
  15. package/dist/milvus/http/Vector.js +14 -1
  16. package/dist/milvus/http/Vector.js.map +1 -1
  17. package/dist/milvus/index.d.ts +1 -0
  18. package/dist/milvus/index.js +1 -0
  19. package/dist/milvus/index.js.map +1 -1
  20. package/dist/milvus/lite/MilvusLiteServer.d.ts +11 -0
  21. package/dist/milvus/lite/MilvusLiteServer.js +201 -0
  22. package/dist/milvus/lite/MilvusLiteServer.js.map +1 -0
  23. package/dist/milvus/lite/start.py +66 -0
  24. package/dist/milvus/proto-json/milvus.base.d.ts +7092 -0
  25. package/dist/milvus/proto-json/milvus.base.js +7208 -0
  26. package/dist/milvus/proto-json/milvus.base.js.map +1 -0
  27. package/dist/milvus/proto-json/milvus.d.ts +7092 -0
  28. package/dist/milvus/proto-json/milvus.js +7208 -0
  29. package/dist/milvus/proto-json/milvus.js.map +1 -0
  30. package/dist/milvus/proto-json/schema.base.d.ts +2029 -0
  31. package/dist/milvus/proto-json/schema.base.js +2132 -0
  32. package/dist/milvus/proto-json/schema.base.js.map +1 -0
  33. package/dist/milvus/types/Client.d.ts +23 -4
  34. package/dist/milvus/types/Collection.d.ts +1 -0
  35. package/dist/milvus/types/Data.d.ts +1 -0
  36. package/dist/milvus/types/Http.d.ts +6 -3
  37. package/dist/milvus/types/Partition.d.ts +2 -0
  38. package/dist/milvus/utils/Format.js +31 -35
  39. package/dist/milvus/utils/Format.js.map +1 -1
  40. package/dist/milvus/utils/Grpc.d.ts +0 -1
  41. package/dist/milvus/utils/Grpc.js +3 -5
  42. package/dist/milvus/utils/Grpc.js.map +1 -1
  43. package/dist/sdk.json +1 -1
  44. package/package.json +8 -5
  45. package/dist/proto/proto/common.proto +0 -511
  46. package/dist/proto/proto/feder.proto +0 -40
  47. package/dist/proto/proto/google/protobuf/descriptor.proto +0 -1411
  48. package/dist/proto/proto/milvus.proto +0 -2103
  49. package/dist/proto/proto/msg.proto +0 -133
  50. package/dist/proto/proto/rg.proto +0 -35
  51. package/dist/proto/proto/schema.proto +0 -257
@@ -1,1411 +0,0 @@
1
- // Protocol Buffers - Google's data interchange format
2
- // Copyright 2008 Google Inc. All rights reserved.
3
- // https://developers.google.com/protocol-buffers/
4
- //
5
- // Redistribution and use in source and binary forms, with or without
6
- // modification, are permitted provided that the following conditions are
7
- // met:
8
- //
9
- // * Redistributions of source code must retain the above copyright
10
- // notice, this list of conditions and the following disclaimer.
11
- // * Redistributions in binary form must reproduce the above
12
- // copyright notice, this list of conditions and the following disclaimer
13
- // in the documentation and/or other materials provided with the
14
- // distribution.
15
- // * Neither the name of Google Inc. nor the names of its
16
- // contributors may be used to endorse or promote products derived from
17
- // this software without specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
-
31
- // Author: kenton@google.com (Kenton Varda)
32
- // Based on original Protocol Buffers design by
33
- // Sanjay Ghemawat, Jeff Dean, and others.
34
- //
35
- // The messages in this file describe the definitions found in .proto files.
36
- // A valid .proto file can be translated directly to a FileDescriptorProto
37
- // without any other information (e.g. without reading its imports).
38
-
39
- syntax = "proto2";
40
-
41
- package google.protobuf;
42
-
43
- option go_package = "google.golang.org/protobuf/types/descriptorpb";
44
- option java_package = "com.google.protobuf";
45
- option java_outer_classname = "DescriptorProtos";
46
- option csharp_namespace = "Google.Protobuf.Reflection";
47
- option objc_class_prefix = "GPB";
48
- option cc_enable_arenas = true;
49
-
50
- // descriptor.proto must be optimized for speed because reflection-based
51
- // algorithms don't work during bootstrapping.
52
- option optimize_for = SPEED;
53
-
54
- // The protocol compiler can output a FileDescriptorSet containing the .proto
55
- // files it parses.
56
- message FileDescriptorSet {
57
- repeated FileDescriptorProto file = 1;
58
-
59
- // Extensions for tooling.
60
- extensions 536000000 [declaration = {
61
- number: 536000000
62
- type: ".buf.descriptor.v1.FileDescriptorSetExtension"
63
- full_name: ".buf.descriptor.v1.buf_file_descriptor_set_extension"
64
- }];
65
- }
66
-
67
- // The full set of known editions.
68
- enum Edition {
69
- // A placeholder for an unknown edition value.
70
- EDITION_UNKNOWN = 0;
71
-
72
- // A placeholder edition for specifying default behaviors *before* a feature
73
- // was first introduced. This is effectively an "infinite past".
74
- EDITION_LEGACY = 900;
75
-
76
- // Legacy syntax "editions". These pre-date editions, but behave much like
77
- // distinct editions. These can't be used to specify the edition of proto
78
- // files, but feature definitions must supply proto2/proto3 defaults for
79
- // backwards compatibility.
80
- EDITION_PROTO2 = 998;
81
- EDITION_PROTO3 = 999;
82
-
83
- // Editions that have been released. The specific values are arbitrary and
84
- // should not be depended on, but they will always be time-ordered for easy
85
- // comparison.
86
- EDITION_2023 = 1000;
87
- EDITION_2024 = 1001;
88
-
89
- // Placeholder editions for testing feature resolution. These should not be
90
- // used or relied on outside of tests.
91
- EDITION_1_TEST_ONLY = 1;
92
- EDITION_2_TEST_ONLY = 2;
93
- EDITION_99997_TEST_ONLY = 99997;
94
- EDITION_99998_TEST_ONLY = 99998;
95
- EDITION_99999_TEST_ONLY = 99999;
96
-
97
- // Placeholder for specifying unbounded edition support. This should only
98
- // ever be used by plugins that can expect to never require any changes to
99
- // support a new edition.
100
- EDITION_MAX = 0x7FFFFFFF;
101
- }
102
-
103
- // Describes a complete .proto file.
104
- message FileDescriptorProto {
105
- optional string name = 1; // file name, relative to root of source tree
106
- optional string package = 2; // e.g. "foo", "foo.bar", etc.
107
-
108
- // Names of files imported by this file.
109
- repeated string dependency = 3;
110
- // Indexes of the public imported files in the dependency list above.
111
- repeated int32 public_dependency = 10;
112
- // Indexes of the weak imported files in the dependency list.
113
- // For Google-internal migration only. Do not use.
114
- repeated int32 weak_dependency = 11;
115
-
116
- // Names of files imported by this file purely for the purpose of providing
117
- // option extensions. These are excluded from the dependency list above.
118
- repeated string option_dependency = 15;
119
-
120
- // All top-level definitions in this file.
121
- repeated DescriptorProto message_type = 4;
122
- repeated EnumDescriptorProto enum_type = 5;
123
- repeated ServiceDescriptorProto service = 6;
124
- repeated FieldDescriptorProto extension = 7;
125
-
126
- optional FileOptions options = 8;
127
-
128
- // This field contains optional information about the original source code.
129
- // You may safely remove this entire field without harming runtime
130
- // functionality of the descriptors -- the information is needed only by
131
- // development tools.
132
- optional SourceCodeInfo source_code_info = 9;
133
-
134
- // The syntax of the proto file.
135
- // The supported values are "proto2", "proto3", and "editions".
136
- //
137
- // If `edition` is present, this value must be "editions".
138
- // WARNING: This field should only be used by protobuf plugins or special
139
- // cases like the proto compiler. Other uses are discouraged and
140
- // developers should rely on the protoreflect APIs for their client language.
141
- optional string syntax = 12;
142
-
143
- // The edition of the proto file.
144
- // WARNING: This field should only be used by protobuf plugins or special
145
- // cases like the proto compiler. Other uses are discouraged and
146
- // developers should rely on the protoreflect APIs for their client language.
147
- optional Edition edition = 14;
148
- }
149
-
150
- // Describes a message type.
151
- message DescriptorProto {
152
- optional string name = 1;
153
-
154
- repeated FieldDescriptorProto field = 2;
155
- repeated FieldDescriptorProto extension = 6;
156
-
157
- repeated DescriptorProto nested_type = 3;
158
- repeated EnumDescriptorProto enum_type = 4;
159
-
160
- message ExtensionRange {
161
- optional int32 start = 1; // Inclusive.
162
- optional int32 end = 2; // Exclusive.
163
-
164
- optional ExtensionRangeOptions options = 3;
165
- }
166
- repeated ExtensionRange extension_range = 5;
167
-
168
- repeated OneofDescriptorProto oneof_decl = 8;
169
-
170
- optional MessageOptions options = 7;
171
-
172
- // Range of reserved tag numbers. Reserved tag numbers may not be used by
173
- // fields or extension ranges in the same message. Reserved ranges may
174
- // not overlap.
175
- message ReservedRange {
176
- optional int32 start = 1; // Inclusive.
177
- optional int32 end = 2; // Exclusive.
178
- }
179
- repeated ReservedRange reserved_range = 9;
180
- // Reserved field names, which may not be used by fields in the same message.
181
- // A given name may only be reserved once.
182
- repeated string reserved_name = 10;
183
- }
184
-
185
- message ExtensionRangeOptions {
186
- // The parser stores options it doesn't recognize here. See above.
187
- repeated UninterpretedOption uninterpreted_option = 999;
188
-
189
- message Declaration {
190
- // The extension number declared within the extension range.
191
- optional int32 number = 1;
192
-
193
- // The fully-qualified name of the extension field. There must be a leading
194
- // dot in front of the full name.
195
- optional string full_name = 2;
196
-
197
- // The fully-qualified type name of the extension field. Unlike
198
- // Metadata.type, Declaration.type must have a leading dot for messages
199
- // and enums.
200
- optional string type = 3;
201
-
202
- // If true, indicates that the number is reserved in the extension range,
203
- // and any extension field with the number will fail to compile. Set this
204
- // when a declared extension field is deleted.
205
- optional bool reserved = 5;
206
-
207
- // If true, indicates that the extension must be defined as repeated.
208
- // Otherwise the extension must be defined as optional.
209
- optional bool repeated = 6;
210
-
211
- reserved 4; // removed is_repeated
212
- }
213
-
214
- // For external users: DO NOT USE. We are in the process of open sourcing
215
- // extension declaration and executing internal cleanups before it can be
216
- // used externally.
217
- repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];
218
-
219
- // Any features defined in the specific edition.
220
- optional FeatureSet features = 50;
221
-
222
- // The verification state of the extension range.
223
- enum VerificationState {
224
- // All the extensions of the range must be declared.
225
- DECLARATION = 0;
226
- UNVERIFIED = 1;
227
- }
228
-
229
- // The verification state of the range.
230
- // TODO: flip the default to DECLARATION once all empty ranges
231
- // are marked as UNVERIFIED.
232
- optional VerificationState verification = 3
233
- [default = UNVERIFIED, retention = RETENTION_SOURCE];
234
-
235
- // Clients can define custom options in extensions of this message. See above.
236
- extensions 1000 to max;
237
- }
238
-
239
- // Describes a field within a message.
240
- message FieldDescriptorProto {
241
- enum Type {
242
- // 0 is reserved for errors.
243
- // Order is weird for historical reasons.
244
- TYPE_DOUBLE = 1;
245
- TYPE_FLOAT = 2;
246
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
247
- // negative values are likely.
248
- TYPE_INT64 = 3;
249
- TYPE_UINT64 = 4;
250
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
251
- // negative values are likely.
252
- TYPE_INT32 = 5;
253
- TYPE_FIXED64 = 6;
254
- TYPE_FIXED32 = 7;
255
- TYPE_BOOL = 8;
256
- TYPE_STRING = 9;
257
- // Tag-delimited aggregate.
258
- // Group type is deprecated and not supported after google.protobuf. However, Proto3
259
- // implementations should still be able to parse the group wire format and
260
- // treat group fields as unknown fields. In Editions, the group wire format
261
- // can be enabled via the `message_encoding` feature.
262
- TYPE_GROUP = 10;
263
- TYPE_MESSAGE = 11; // Length-delimited aggregate.
264
-
265
- // New in version 2.
266
- TYPE_BYTES = 12;
267
- TYPE_UINT32 = 13;
268
- TYPE_ENUM = 14;
269
- TYPE_SFIXED32 = 15;
270
- TYPE_SFIXED64 = 16;
271
- TYPE_SINT32 = 17; // Uses ZigZag encoding.
272
- TYPE_SINT64 = 18; // Uses ZigZag encoding.
273
- }
274
-
275
- enum Label {
276
- // 0 is reserved for errors
277
- LABEL_OPTIONAL = 1;
278
- LABEL_REPEATED = 3;
279
- // The required label is only allowed in google.protobuf. In proto3 and Editions
280
- // it's explicitly prohibited. In Editions, the `field_presence` feature
281
- // can be used to get this behavior.
282
- LABEL_REQUIRED = 2;
283
- }
284
-
285
- optional string name = 1;
286
- optional int32 number = 3;
287
- optional Label label = 4;
288
-
289
- // If type_name is set, this need not be set. If both this and type_name
290
- // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
291
- optional Type type = 5;
292
-
293
- // For message and enum types, this is the name of the type. If the name
294
- // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
295
- // rules are used to find the type (i.e. first the nested types within this
296
- // message are searched, then within the parent, on up to the root
297
- // namespace).
298
- optional string type_name = 6;
299
-
300
- // For extensions, this is the name of the type being extended. It is
301
- // resolved in the same manner as type_name.
302
- optional string extendee = 2;
303
-
304
- // For numeric types, contains the original text representation of the value.
305
- // For booleans, "true" or "false".
306
- // For strings, contains the default text contents (not escaped in any way).
307
- // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
308
- optional string default_value = 7;
309
-
310
- // If set, gives the index of a oneof in the containing type's oneof_decl
311
- // list. This field is a member of that oneof.
312
- optional int32 oneof_index = 9;
313
-
314
- // JSON name of this field. The value is set by protocol compiler. If the
315
- // user has set a "json_name" option on this field, that option's value
316
- // will be used. Otherwise, it's deduced from the field's name by converting
317
- // it to camelCase.
318
- optional string json_name = 10;
319
-
320
- optional FieldOptions options = 8;
321
-
322
- // If true, this is a proto3 "optional". When a proto3 field is optional, it
323
- // tracks presence regardless of field type.
324
- //
325
- // When proto3_optional is true, this field must belong to a oneof to signal
326
- // to old proto3 clients that presence is tracked for this field. This oneof
327
- // is known as a "synthetic" oneof, and this field must be its sole member
328
- // (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
329
- // exist in the descriptor only, and do not generate any API. Synthetic oneofs
330
- // must be ordered after all "real" oneofs.
331
- //
332
- // For message fields, proto3_optional doesn't create any semantic change,
333
- // since non-repeated message fields always track presence. However it still
334
- // indicates the semantic detail of whether the user wrote "optional" or not.
335
- // This can be useful for round-tripping the .proto file. For consistency we
336
- // give message fields a synthetic oneof also, even though it is not required
337
- // to track presence. This is especially important because the parser can't
338
- // tell if a field is a message or an enum, so it must always create a
339
- // synthetic oneof.
340
- //
341
- // Proto2 optional fields do not set this flag, because they already indicate
342
- // optional with `LABEL_OPTIONAL`.
343
- optional bool proto3_optional = 17;
344
- }
345
-
346
- // Describes a oneof.
347
- message OneofDescriptorProto {
348
- optional string name = 1;
349
- optional OneofOptions options = 2;
350
- }
351
-
352
- // Describes an enum type.
353
- message EnumDescriptorProto {
354
- optional string name = 1;
355
-
356
- repeated EnumValueDescriptorProto value = 2;
357
-
358
- optional EnumOptions options = 3;
359
-
360
- // Range of reserved numeric values. Reserved values may not be used by
361
- // entries in the same enum. Reserved ranges may not overlap.
362
- //
363
- // Note that this is distinct from DescriptorProto.ReservedRange in that it
364
- // is inclusive such that it can appropriately represent the entire int32
365
- // domain.
366
- message EnumReservedRange {
367
- optional int32 start = 1; // Inclusive.
368
- optional int32 end = 2; // Inclusive.
369
- }
370
-
371
- // Range of reserved numeric values. Reserved numeric values may not be used
372
- // by enum values in the same enum declaration. Reserved ranges may not
373
- // overlap.
374
- repeated EnumReservedRange reserved_range = 4;
375
-
376
- // Reserved enum value names, which may not be reused. A given name may only
377
- // be reserved once.
378
- repeated string reserved_name = 5;
379
- }
380
-
381
- // Describes a value within an enum.
382
- message EnumValueDescriptorProto {
383
- optional string name = 1;
384
- optional int32 number = 2;
385
-
386
- optional EnumValueOptions options = 3;
387
- }
388
-
389
- // Describes a service.
390
- message ServiceDescriptorProto {
391
- optional string name = 1;
392
- repeated MethodDescriptorProto method = 2;
393
-
394
- optional ServiceOptions options = 3;
395
- }
396
-
397
- // Describes a method of a service.
398
- message MethodDescriptorProto {
399
- optional string name = 1;
400
-
401
- // Input and output type names. These are resolved in the same way as
402
- // FieldDescriptorProto.type_name, but must refer to a message type.
403
- optional string input_type = 2;
404
- optional string output_type = 3;
405
-
406
- optional MethodOptions options = 4;
407
-
408
- // Identifies if client streams multiple client messages
409
- optional bool client_streaming = 5 [default = false];
410
- // Identifies if server streams multiple server messages
411
- optional bool server_streaming = 6 [default = false];
412
- }
413
-
414
- // ===================================================================
415
- // Options
416
-
417
- // Each of the definitions above may have "options" attached. These are
418
- // just annotations which may cause code to be generated slightly differently
419
- // or may contain hints for code that manipulates protocol messages.
420
- //
421
- // Clients may define custom options as extensions of the *Options messages.
422
- // These extensions may not yet be known at parsing time, so the parser cannot
423
- // store the values in them. Instead it stores them in a field in the *Options
424
- // message called uninterpreted_option. This field must have the same name
425
- // across all *Options messages. We then use this field to populate the
426
- // extensions when we build a descriptor, at which point all protos have been
427
- // parsed and so all extensions are known.
428
- //
429
- // Extension numbers for custom options may be chosen as follows:
430
- // * For options which will only be used within a single application or
431
- // organization, or for experimental options, use field numbers 50000
432
- // through 99999. It is up to you to ensure that you do not use the
433
- // same number for multiple options.
434
- // * For options which will be published and used publicly by multiple
435
- // independent entities, e-mail protobuf-global-extension-registry@google.com
436
- // to reserve extension numbers. Simply provide your project name (e.g.
437
- // Objective-C plugin) and your project website (if available) -- there's no
438
- // need to explain how you intend to use them. Usually you only need one
439
- // extension number. You can declare multiple options with only one extension
440
- // number by putting them in a sub-message. See the Custom Options section of
441
- // the docs for examples:
442
- // https://developers.google.com/protocol-buffers/docs/proto#options
443
- // If this turns out to be popular, a web service will be set up
444
- // to automatically assign option numbers.
445
-
446
- message FileOptions {
447
-
448
- // Sets the Java package where classes generated from this .proto will be
449
- // placed. By default, the proto package is used, but this is often
450
- // inappropriate because proto packages do not normally start with backwards
451
- // domain names.
452
- optional string java_package = 1;
453
-
454
- // Controls the name of the wrapper Java class generated for the .proto file.
455
- // That class will always contain the .proto file's getDescriptor() method as
456
- // well as any top-level extensions defined in the .proto file.
457
- // If java_multiple_files is disabled, then all the other classes from the
458
- // .proto file will be nested inside the single wrapper outer class.
459
- optional string java_outer_classname = 8;
460
-
461
- // If enabled, then the Java code generator will generate a separate .java
462
- // file for each top-level message, enum, and service defined in the .proto
463
- // file. Thus, these types will *not* be nested inside the wrapper class
464
- // named by java_outer_classname. However, the wrapper class will still be
465
- // generated to contain the file's getDescriptor() method as well as any
466
- // top-level extensions defined in the file.
467
- optional bool java_multiple_files = 10 [default = false];
468
-
469
- // This option does nothing.
470
- optional bool java_generate_equals_and_hash = 20 [deprecated=true];
471
-
472
- // A proto2 file can set this to true to opt in to UTF-8 checking for Java,
473
- // which will throw an exception if invalid UTF-8 is parsed from the wire or
474
- // assigned to a string field.
475
- //
476
- // TODO: clarify exactly what kinds of field types this option
477
- // applies to, and update these docs accordingly.
478
- //
479
- // Proto3 files already perform these checks. Setting the option explicitly to
480
- // false has no effect: it cannot be used to opt proto3 files out of UTF-8
481
- // checks.
482
- optional bool java_string_check_utf8 = 27 [default = false];
483
-
484
- // Generated classes can be optimized for speed or code size.
485
- enum OptimizeMode {
486
- SPEED = 1; // Generate complete code for parsing, serialization,
487
- // etc.
488
- CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
489
- LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
490
- }
491
- optional OptimizeMode optimize_for = 9 [default = SPEED];
492
-
493
- // Sets the Go package where structs generated from this .proto will be
494
- // placed. If omitted, the Go package will be derived from the following:
495
- // - The basename of the package import path, if provided.
496
- // - Otherwise, the package statement in the .proto file, if present.
497
- // - Otherwise, the basename of the .proto file, without extension.
498
- optional string go_package = 11;
499
-
500
- // Should generic services be generated in each language? "Generic" services
501
- // are not specific to any particular RPC system. They are generated by the
502
- // main code generators in each language (without additional plugins).
503
- // Generic services were the only kind of service generation supported by
504
- // early versions of google.protobuf.
505
- //
506
- // Generic services are now considered deprecated in favor of using plugins
507
- // that generate code specific to your particular RPC system. Therefore,
508
- // these default to false. Old code which depends on generic services should
509
- // explicitly set them to true.
510
- optional bool cc_generic_services = 16 [default = false];
511
- optional bool java_generic_services = 17 [default = false];
512
- optional bool py_generic_services = 18 [default = false];
513
- reserved 42; // removed php_generic_services
514
- reserved "php_generic_services";
515
-
516
- // Is this file deprecated?
517
- // Depending on the target platform, this can emit Deprecated annotations
518
- // for everything in the file, or it will be completely ignored; in the very
519
- // least, this is a formalization for deprecating files.
520
- optional bool deprecated = 23 [default = false];
521
-
522
- // Enables the use of arenas for the proto messages in this file. This applies
523
- // only to generated classes for C++.
524
- optional bool cc_enable_arenas = 31 [default = true];
525
-
526
- // Sets the objective c class prefix which is prepended to all objective c
527
- // generated classes from this .proto. There is no default.
528
- optional string objc_class_prefix = 36;
529
-
530
- // Namespace for generated classes; defaults to the package.
531
- optional string csharp_namespace = 37;
532
-
533
- // By default Swift generators will take the proto package and CamelCase it
534
- // replacing '.' with underscore and use that to prefix the types/symbols
535
- // defined. When this options is provided, they will use this value instead
536
- // to prefix the types/symbols defined.
537
- optional string swift_prefix = 39;
538
-
539
- // Sets the php class prefix which is prepended to all php generated classes
540
- // from this .proto. Default is empty.
541
- optional string php_class_prefix = 40;
542
-
543
- // Use this option to change the namespace of php generated classes. Default
544
- // is empty. When this option is empty, the package name will be used for
545
- // determining the namespace.
546
- optional string php_namespace = 41;
547
-
548
- // Use this option to change the namespace of php generated metadata classes.
549
- // Default is empty. When this option is empty, the proto file name will be
550
- // used for determining the namespace.
551
- optional string php_metadata_namespace = 44;
552
-
553
- // Use this option to change the package of ruby generated classes. Default
554
- // is empty. When this option is not set, the package name will be used for
555
- // determining the ruby package.
556
- optional string ruby_package = 45;
557
-
558
- // Any features defined in the specific edition.
559
- // WARNING: This field should only be used by protobuf plugins or special
560
- // cases like the proto compiler. Other uses are discouraged and
561
- // developers should rely on the protoreflect APIs for their client language.
562
- optional FeatureSet features = 50;
563
-
564
- // The parser stores options it doesn't recognize here.
565
- // See the documentation for the "Options" section above.
566
- repeated UninterpretedOption uninterpreted_option = 999;
567
-
568
- // Clients can define custom options in extensions of this message.
569
- // See the documentation for the "Options" section above.
570
- extensions 1000 to max;
571
-
572
- reserved 38;
573
- }
574
-
575
- message MessageOptions {
576
- // Set true to use the old proto1 MessageSet wire format for extensions.
577
- // This is provided for backwards-compatibility with the MessageSet wire
578
- // format. You should not use this for any other reason: It's less
579
- // efficient, has fewer features, and is more complicated.
580
- //
581
- // The message must be defined exactly as follows:
582
- // message Foo {
583
- // option message_set_wire_format = true;
584
- // extensions 4 to max;
585
- // }
586
- // Note that the message cannot have any defined fields; MessageSets only
587
- // have extensions.
588
- //
589
- // All extensions of your type must be singular messages; e.g. they cannot
590
- // be int32s, enums, or repeated messages.
591
- //
592
- // Because this is an option, the above two restrictions are not enforced by
593
- // the protocol compiler.
594
- optional bool message_set_wire_format = 1 [default = false];
595
-
596
- // Disables the generation of the standard "descriptor()" accessor, which can
597
- // conflict with a field of the same name. This is meant to make migration
598
- // from proto1 easier; new code should avoid fields named "descriptor".
599
- optional bool no_standard_descriptor_accessor = 2 [default = false];
600
-
601
- // Is this message deprecated?
602
- // Depending on the target platform, this can emit Deprecated annotations
603
- // for the message, or it will be completely ignored; in the very least,
604
- // this is a formalization for deprecating messages.
605
- optional bool deprecated = 3 [default = false];
606
-
607
- reserved 4, 5, 6;
608
-
609
- // Whether the message is an automatically generated map entry type for the
610
- // maps field.
611
- //
612
- // For maps fields:
613
- // map<KeyType, ValueType> map_field = 1;
614
- // The parsed descriptor looks like:
615
- // message MapFieldEntry {
616
- // option map_entry = true;
617
- // optional KeyType key = 1;
618
- // optional ValueType value = 2;
619
- // }
620
- // repeated MapFieldEntry map_field = 1;
621
- //
622
- // Implementations may choose not to generate the map_entry=true message, but
623
- // use a native map in the target language to hold the keys and values.
624
- // The reflection APIs in such implementations still need to work as
625
- // if the field is a repeated message field.
626
- //
627
- // NOTE: Do not set the option in .proto files. Always use the maps syntax
628
- // instead. The option should only be implicitly set by the proto compiler
629
- // parser.
630
- optional bool map_entry = 7;
631
-
632
- reserved 8; // javalite_serializable
633
- reserved 9; // javanano_as_lite
634
-
635
- // Enable the legacy handling of JSON field name conflicts. This lowercases
636
- // and strips underscored from the fields before comparison in proto3 only.
637
- // The new behavior takes `json_name` into account and applies to proto2 as
638
- // well.
639
- //
640
- // This should only be used as a temporary measure against broken builds due
641
- // to the change in behavior for JSON field name conflicts.
642
- //
643
- // TODO This is legacy behavior we plan to remove once downstream
644
- // teams have had time to migrate.
645
- optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
646
-
647
- // Any features defined in the specific edition.
648
- // WARNING: This field should only be used by protobuf plugins or special
649
- // cases like the proto compiler. Other uses are discouraged and
650
- // developers should rely on the protoreflect APIs for their client language.
651
- optional FeatureSet features = 12;
652
-
653
- // The parser stores options it doesn't recognize here. See above.
654
- repeated UninterpretedOption uninterpreted_option = 999;
655
-
656
- // Clients can define custom options in extensions of this message. See above.
657
- extensions 1000 to max;
658
- }
659
-
660
- message FieldOptions {
661
- // NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
662
- // The ctype option instructs the C++ code generator to use a different
663
- // representation of the field than it normally would. See the specific
664
- // options below. This option is only implemented to support use of
665
- // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
666
- // type "bytes" in the open source release.
667
- // TODO: make ctype actually deprecated.
668
- optional CType ctype = 1 [/*deprecated = true,*/ default = STRING];
669
- enum CType {
670
- // Default mode.
671
- STRING = 0;
672
-
673
- // The option [ctype=CORD] may be applied to a non-repeated field of type
674
- // "bytes". It indicates that in C++, the data should be stored in a Cord
675
- // instead of a string. For very large strings, this may reduce memory
676
- // fragmentation. It may also allow better performance when parsing from a
677
- // Cord, or when parsing with aliasing enabled, as the parsed Cord may then
678
- // alias the original buffer.
679
- CORD = 1;
680
-
681
- STRING_PIECE = 2;
682
- }
683
- // The packed option can be enabled for repeated primitive fields to enable
684
- // a more efficient representation on the wire. Rather than repeatedly
685
- // writing the tag and type for each element, the entire array is encoded as
686
- // a single length-delimited blob. In proto3, only explicit setting it to
687
- // false will avoid using packed encoding. This option is prohibited in
688
- // Editions, but the `repeated_field_encoding` feature can be used to control
689
- // the behavior.
690
- optional bool packed = 2;
691
-
692
- // The jstype option determines the JavaScript type used for values of the
693
- // field. The option is permitted only for 64 bit integral and fixed types
694
- // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
695
- // is represented as JavaScript string, which avoids loss of precision that
696
- // can happen when a large value is converted to a floating point JavaScript.
697
- // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
698
- // use the JavaScript "number" type. The behavior of the default option
699
- // JS_NORMAL is implementation dependent.
700
- //
701
- // This option is an enum to permit additional types to be added, e.g.
702
- // goog.math.Integer.
703
- optional JSType jstype = 6 [default = JS_NORMAL];
704
- enum JSType {
705
- // Use the default type.
706
- JS_NORMAL = 0;
707
-
708
- // Use JavaScript strings.
709
- JS_STRING = 1;
710
-
711
- // Use JavaScript numbers.
712
- JS_NUMBER = 2;
713
- }
714
-
715
- // Should this field be parsed lazily? Lazy applies only to message-type
716
- // fields. It means that when the outer message is initially parsed, the
717
- // inner message's contents will not be parsed but instead stored in encoded
718
- // form. The inner message will actually be parsed when it is first accessed.
719
- //
720
- // This is only a hint. Implementations are free to choose whether to use
721
- // eager or lazy parsing regardless of the value of this option. However,
722
- // setting this option true suggests that the protocol author believes that
723
- // using lazy parsing on this field is worth the additional bookkeeping
724
- // overhead typically needed to implement it.
725
- //
726
- // This option does not affect the public interface of any generated code;
727
- // all method signatures remain the same. Furthermore, thread-safety of the
728
- // interface is not affected by this option; const methods remain safe to
729
- // call from multiple threads concurrently, while non-const methods continue
730
- // to require exclusive access.
731
- //
732
- // Note that lazy message fields are still eagerly verified to check
733
- // ill-formed wireformat or missing required fields. Calling IsInitialized()
734
- // on the outer message would fail if the inner message has missing required
735
- // fields. Failed verification would result in parsing failure (except when
736
- // uninitialized messages are acceptable).
737
- optional bool lazy = 5 [default = false];
738
-
739
- // unverified_lazy does no correctness checks on the byte stream. This should
740
- // only be used where lazy with verification is prohibitive for performance
741
- // reasons.
742
- optional bool unverified_lazy = 15 [default = false];
743
-
744
- // Is this field deprecated?
745
- // Depending on the target platform, this can emit Deprecated annotations
746
- // for accessors, or it will be completely ignored; in the very least, this
747
- // is a formalization for deprecating fields.
748
- optional bool deprecated = 3 [default = false];
749
-
750
- // For Google-internal migration only. Do not use.
751
- optional bool weak = 10 [default = false];
752
-
753
- // Indicate that the field value should not be printed out when using debug
754
- // formats, e.g. when the field contains sensitive credentials.
755
- optional bool debug_redact = 16 [default = false];
756
-
757
- // If set to RETENTION_SOURCE, the option will be omitted from the binary.
758
- enum OptionRetention {
759
- RETENTION_UNKNOWN = 0;
760
- RETENTION_RUNTIME = 1;
761
- RETENTION_SOURCE = 2;
762
- }
763
-
764
- optional OptionRetention retention = 17;
765
-
766
- // This indicates the types of entities that the field may apply to when used
767
- // as an option. If it is unset, then the field may be freely used as an
768
- // option on any kind of entity.
769
- enum OptionTargetType {
770
- TARGET_TYPE_UNKNOWN = 0;
771
- TARGET_TYPE_FILE = 1;
772
- TARGET_TYPE_EXTENSION_RANGE = 2;
773
- TARGET_TYPE_MESSAGE = 3;
774
- TARGET_TYPE_FIELD = 4;
775
- TARGET_TYPE_ONEOF = 5;
776
- TARGET_TYPE_ENUM = 6;
777
- TARGET_TYPE_ENUM_ENTRY = 7;
778
- TARGET_TYPE_SERVICE = 8;
779
- TARGET_TYPE_METHOD = 9;
780
- }
781
-
782
- repeated OptionTargetType targets = 19;
783
-
784
- message EditionDefault {
785
- optional Edition edition = 3;
786
- optional string value = 2; // Textproto value.
787
- }
788
- repeated EditionDefault edition_defaults = 20;
789
-
790
- // Any features defined in the specific edition.
791
- // WARNING: This field should only be used by protobuf plugins or special
792
- // cases like the proto compiler. Other uses are discouraged and
793
- // developers should rely on the protoreflect APIs for their client language.
794
- optional FeatureSet features = 21;
795
-
796
- // Information about the support window of a feature.
797
- message FeatureSupport {
798
- // The edition that this feature was first available in. In editions
799
- // earlier than this one, the default assigned to EDITION_LEGACY will be
800
- // used, and proto files will not be able to override it.
801
- optional Edition edition_introduced = 1;
802
-
803
- // The edition this feature becomes deprecated in. Using this after this
804
- // edition may trigger warnings.
805
- optional Edition edition_deprecated = 2;
806
-
807
- // The deprecation warning text if this feature is used after the edition it
808
- // was marked deprecated in.
809
- optional string deprecation_warning = 3;
810
-
811
- // The edition this feature is no longer available in. In editions after
812
- // this one, the last default assigned will be used, and proto files will
813
- // not be able to override it.
814
- optional Edition edition_removed = 4;
815
- }
816
- optional FeatureSupport feature_support = 22;
817
-
818
- // The parser stores options it doesn't recognize here. See above.
819
- repeated UninterpretedOption uninterpreted_option = 999;
820
-
821
- // Clients can define custom options in extensions of this message. See above.
822
- extensions 1000 to max;
823
-
824
- reserved 4; // removed jtype
825
- reserved 18; // reserve target, target_obsolete_do_not_use
826
- }
827
-
828
- message OneofOptions {
829
- // Any features defined in the specific edition.
830
- // WARNING: This field should only be used by protobuf plugins or special
831
- // cases like the proto compiler. Other uses are discouraged and
832
- // developers should rely on the protoreflect APIs for their client language.
833
- optional FeatureSet features = 1;
834
-
835
- // The parser stores options it doesn't recognize here. See above.
836
- repeated UninterpretedOption uninterpreted_option = 999;
837
-
838
- // Clients can define custom options in extensions of this message. See above.
839
- extensions 1000 to max;
840
- }
841
-
842
- message EnumOptions {
843
-
844
- // Set this option to true to allow mapping different tag names to the same
845
- // value.
846
- optional bool allow_alias = 2;
847
-
848
- // Is this enum deprecated?
849
- // Depending on the target platform, this can emit Deprecated annotations
850
- // for the enum, or it will be completely ignored; in the very least, this
851
- // is a formalization for deprecating enums.
852
- optional bool deprecated = 3 [default = false];
853
-
854
- reserved 5; // javanano_as_lite
855
-
856
- // Enable the legacy handling of JSON field name conflicts. This lowercases
857
- // and strips underscored from the fields before comparison in proto3 only.
858
- // The new behavior takes `json_name` into account and applies to proto2 as
859
- // well.
860
- // TODO Remove this legacy behavior once downstream teams have
861
- // had time to migrate.
862
- optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
863
-
864
- // Any features defined in the specific edition.
865
- // WARNING: This field should only be used by protobuf plugins or special
866
- // cases like the proto compiler. Other uses are discouraged and
867
- // developers should rely on the protoreflect APIs for their client language.
868
- optional FeatureSet features = 7;
869
-
870
- // The parser stores options it doesn't recognize here. See above.
871
- repeated UninterpretedOption uninterpreted_option = 999;
872
-
873
- // Clients can define custom options in extensions of this message. See above.
874
- extensions 1000 to max;
875
- }
876
-
877
- message EnumValueOptions {
878
- // Is this enum value deprecated?
879
- // Depending on the target platform, this can emit Deprecated annotations
880
- // for the enum value, or it will be completely ignored; in the very least,
881
- // this is a formalization for deprecating enum values.
882
- optional bool deprecated = 1 [default = false];
883
-
884
- // Any features defined in the specific edition.
885
- // WARNING: This field should only be used by protobuf plugins or special
886
- // cases like the proto compiler. Other uses are discouraged and
887
- // developers should rely on the protoreflect APIs for their client language.
888
- optional FeatureSet features = 2;
889
-
890
- // Indicate that fields annotated with this enum value should not be printed
891
- // out when using debug formats, e.g. when the field contains sensitive
892
- // credentials.
893
- optional bool debug_redact = 3 [default = false];
894
-
895
- // Information about the support window of a feature value.
896
- optional FieldOptions.FeatureSupport feature_support = 4;
897
-
898
- // The parser stores options it doesn't recognize here. See above.
899
- repeated UninterpretedOption uninterpreted_option = 999;
900
-
901
- // Clients can define custom options in extensions of this message. See above.
902
- extensions 1000 to max;
903
- }
904
-
905
- message ServiceOptions {
906
-
907
- // Any features defined in the specific edition.
908
- // WARNING: This field should only be used by protobuf plugins or special
909
- // cases like the proto compiler. Other uses are discouraged and
910
- // developers should rely on the protoreflect APIs for their client language.
911
- optional FeatureSet features = 34;
912
-
913
- // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
914
- // framework. We apologize for hoarding these numbers to ourselves, but
915
- // we were already using them long before we decided to release Protocol
916
- // Buffers.
917
-
918
- // Is this service deprecated?
919
- // Depending on the target platform, this can emit Deprecated annotations
920
- // for the service, or it will be completely ignored; in the very least,
921
- // this is a formalization for deprecating services.
922
- optional bool deprecated = 33 [default = false];
923
-
924
- // The parser stores options it doesn't recognize here. See above.
925
- repeated UninterpretedOption uninterpreted_option = 999;
926
-
927
- // Clients can define custom options in extensions of this message. See above.
928
- extensions 1000 to max;
929
- }
930
-
931
- message MethodOptions {
932
-
933
- // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
934
- // framework. We apologize for hoarding these numbers to ourselves, but
935
- // we were already using them long before we decided to release Protocol
936
- // Buffers.
937
-
938
- // Is this method deprecated?
939
- // Depending on the target platform, this can emit Deprecated annotations
940
- // for the method, or it will be completely ignored; in the very least,
941
- // this is a formalization for deprecating methods.
942
- optional bool deprecated = 33 [default = false];
943
-
944
- // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
945
- // or neither? HTTP based RPC implementation may choose GET verb for safe
946
- // methods, and PUT verb for idempotent methods instead of the default POST.
947
- enum IdempotencyLevel {
948
- IDEMPOTENCY_UNKNOWN = 0;
949
- NO_SIDE_EFFECTS = 1; // implies idempotent
950
- IDEMPOTENT = 2; // idempotent, but may have side effects
951
- }
952
- optional IdempotencyLevel idempotency_level = 34
953
- [default = IDEMPOTENCY_UNKNOWN];
954
-
955
- // Any features defined in the specific edition.
956
- // WARNING: This field should only be used by protobuf plugins or special
957
- // cases like the proto compiler. Other uses are discouraged and
958
- // developers should rely on the protoreflect APIs for their client language.
959
- optional FeatureSet features = 35;
960
-
961
- // The parser stores options it doesn't recognize here. See above.
962
- repeated UninterpretedOption uninterpreted_option = 999;
963
-
964
- // Clients can define custom options in extensions of this message. See above.
965
- extensions 1000 to max;
966
- }
967
-
968
- // A message representing a option the parser does not recognize. This only
969
- // appears in options protos created by the compiler::Parser class.
970
- // DescriptorPool resolves these when building Descriptor objects. Therefore,
971
- // options protos in descriptor objects (e.g. returned by Descriptor::options(),
972
- // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
973
- // in them.
974
- message UninterpretedOption {
975
- // The name of the uninterpreted option. Each string represents a segment in
976
- // a dot-separated name. is_extension is true iff a segment represents an
977
- // extension (denoted with parentheses in options specs in .proto files).
978
- // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
979
- // "foo.(bar.baz).moo".
980
- message NamePart {
981
- required string name_part = 1;
982
- required bool is_extension = 2;
983
- }
984
- repeated NamePart name = 2;
985
-
986
- // The value of the uninterpreted option, in whatever type the tokenizer
987
- // identified it as during parsing. Exactly one of these should be set.
988
- optional string identifier_value = 3;
989
- optional uint64 positive_int_value = 4;
990
- optional int64 negative_int_value = 5;
991
- optional double double_value = 6;
992
- optional bytes string_value = 7;
993
- optional string aggregate_value = 8;
994
- }
995
-
996
- // ===================================================================
997
- // Features
998
-
999
- // TODO Enums in C++ gencode (and potentially other languages) are
1000
- // not well scoped. This means that each of the feature enums below can clash
1001
- // with each other. The short names we've chosen maximize call-site
1002
- // readability, but leave us very open to this scenario. A future feature will
1003
- // be designed and implemented to handle this, hopefully before we ever hit a
1004
- // conflict here.
1005
- message FeatureSet {
1006
- enum FieldPresence {
1007
- FIELD_PRESENCE_UNKNOWN = 0;
1008
- EXPLICIT = 1;
1009
- IMPLICIT = 2;
1010
- LEGACY_REQUIRED = 3;
1011
- }
1012
- optional FieldPresence field_presence = 1 [
1013
- retention = RETENTION_RUNTIME,
1014
- targets = TARGET_TYPE_FIELD,
1015
- targets = TARGET_TYPE_FILE,
1016
- feature_support = {
1017
- edition_introduced: EDITION_2023,
1018
- },
1019
- edition_defaults = { edition: EDITION_LEGACY, value: "EXPLICIT" },
1020
- edition_defaults = { edition: EDITION_PROTO3, value: "IMPLICIT" },
1021
- edition_defaults = { edition: EDITION_2023, value: "EXPLICIT" }
1022
- ];
1023
-
1024
- enum EnumType {
1025
- ENUM_TYPE_UNKNOWN = 0;
1026
- OPEN = 1;
1027
- CLOSED = 2;
1028
- }
1029
- optional EnumType enum_type = 2 [
1030
- retention = RETENTION_RUNTIME,
1031
- targets = TARGET_TYPE_ENUM,
1032
- targets = TARGET_TYPE_FILE,
1033
- feature_support = {
1034
- edition_introduced: EDITION_2023,
1035
- },
1036
- edition_defaults = { edition: EDITION_LEGACY, value: "CLOSED" },
1037
- edition_defaults = { edition: EDITION_PROTO3, value: "OPEN" }
1038
- ];
1039
-
1040
- enum RepeatedFieldEncoding {
1041
- REPEATED_FIELD_ENCODING_UNKNOWN = 0;
1042
- PACKED = 1;
1043
- EXPANDED = 2;
1044
- }
1045
- optional RepeatedFieldEncoding repeated_field_encoding = 3 [
1046
- retention = RETENTION_RUNTIME,
1047
- targets = TARGET_TYPE_FIELD,
1048
- targets = TARGET_TYPE_FILE,
1049
- feature_support = {
1050
- edition_introduced: EDITION_2023,
1051
- },
1052
- edition_defaults = { edition: EDITION_LEGACY, value: "EXPANDED" },
1053
- edition_defaults = { edition: EDITION_PROTO3, value: "PACKED" }
1054
- ];
1055
-
1056
- enum Utf8Validation {
1057
- UTF8_VALIDATION_UNKNOWN = 0;
1058
- VERIFY = 2;
1059
- NONE = 3;
1060
- reserved 1;
1061
- }
1062
- optional Utf8Validation utf8_validation = 4 [
1063
- retention = RETENTION_RUNTIME,
1064
- targets = TARGET_TYPE_FIELD,
1065
- targets = TARGET_TYPE_FILE,
1066
- feature_support = {
1067
- edition_introduced: EDITION_2023,
1068
- },
1069
- edition_defaults = { edition: EDITION_LEGACY, value: "NONE" },
1070
- edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" }
1071
- ];
1072
-
1073
- enum MessageEncoding {
1074
- MESSAGE_ENCODING_UNKNOWN = 0;
1075
- LENGTH_PREFIXED = 1;
1076
- DELIMITED = 2;
1077
- }
1078
- optional MessageEncoding message_encoding = 5 [
1079
- retention = RETENTION_RUNTIME,
1080
- targets = TARGET_TYPE_FIELD,
1081
- targets = TARGET_TYPE_FILE,
1082
- feature_support = {
1083
- edition_introduced: EDITION_2023,
1084
- },
1085
- edition_defaults = { edition: EDITION_LEGACY, value: "LENGTH_PREFIXED" }
1086
- ];
1087
-
1088
- enum JsonFormat {
1089
- JSON_FORMAT_UNKNOWN = 0;
1090
- ALLOW = 1;
1091
- LEGACY_BEST_EFFORT = 2;
1092
- }
1093
- optional JsonFormat json_format = 6 [
1094
- retention = RETENTION_RUNTIME,
1095
- targets = TARGET_TYPE_MESSAGE,
1096
- targets = TARGET_TYPE_ENUM,
1097
- targets = TARGET_TYPE_FILE,
1098
- feature_support = {
1099
- edition_introduced: EDITION_2023,
1100
- },
1101
- edition_defaults = { edition: EDITION_LEGACY, value: "LEGACY_BEST_EFFORT" },
1102
- edition_defaults = { edition: EDITION_PROTO3, value: "ALLOW" }
1103
- ];
1104
-
1105
- enum EnforceNamingStyle {
1106
- ENFORCE_NAMING_STYLE_UNKNOWN = 0;
1107
- STYLE2024 = 1;
1108
- STYLE_LEGACY = 2;
1109
- }
1110
- optional EnforceNamingStyle enforce_naming_style = 7 [
1111
- retention = RETENTION_SOURCE,
1112
- targets = TARGET_TYPE_FILE,
1113
- targets = TARGET_TYPE_EXTENSION_RANGE,
1114
- targets = TARGET_TYPE_MESSAGE,
1115
- targets = TARGET_TYPE_FIELD,
1116
- targets = TARGET_TYPE_ONEOF,
1117
- targets = TARGET_TYPE_ENUM,
1118
- targets = TARGET_TYPE_ENUM_ENTRY,
1119
- targets = TARGET_TYPE_SERVICE,
1120
- targets = TARGET_TYPE_METHOD,
1121
- feature_support = {
1122
- edition_introduced: EDITION_2024,
1123
- },
1124
- edition_defaults = { edition: EDITION_LEGACY, value: "STYLE_LEGACY" },
1125
- edition_defaults = { edition: EDITION_2024, value: "STYLE2024" }
1126
- ];
1127
-
1128
- message VisibilityFeature {
1129
- enum DefaultSymbolVisibility {
1130
- DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
1131
-
1132
- // Default pre-EDITION_2024, all UNSET visibility are export.
1133
- EXPORT_ALL = 1;
1134
-
1135
- // All top-level symbols default to export, nested default to local.
1136
- EXPORT_TOP_LEVEL = 2;
1137
-
1138
- // All symbols default to local.
1139
- LOCAL_ALL = 3;
1140
-
1141
- // All symbols local by default. Nested types cannot be exported.
1142
- // With special case caveat for message { enum {} reserved 1 to max; }
1143
- // This is the recommended setting for new protos.
1144
- STRICT = 4;
1145
- }
1146
- reserved 1 to max;
1147
- }
1148
- optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility =
1149
- 8 [
1150
- retention = RETENTION_SOURCE,
1151
- targets = TARGET_TYPE_FILE,
1152
- feature_support = {
1153
- edition_introduced: EDITION_2024,
1154
- },
1155
- edition_defaults = { edition: EDITION_LEGACY, value: "EXPORT_ALL" },
1156
- edition_defaults = { edition: EDITION_2024, value: "EXPORT_TOP_LEVEL" }
1157
- ];
1158
-
1159
- reserved 999;
1160
-
1161
- extensions 1000 to 9994 [
1162
- declaration = {
1163
- number: 1000,
1164
- full_name: ".pb.cpp",
1165
- type: ".pb.CppFeatures"
1166
- },
1167
- declaration = {
1168
- number: 1001,
1169
- full_name: ".pb.java",
1170
- type: ".pb.JavaFeatures"
1171
- },
1172
- declaration = { number: 1002, full_name: ".pb.go", type: ".pb.GoFeatures" },
1173
- declaration = {
1174
- number: 1003,
1175
- full_name: ".pb.python",
1176
- type: ".pb.PythonFeatures"
1177
- },
1178
- declaration = {
1179
- number: 9990,
1180
- full_name: ".pb.proto1",
1181
- type: ".pb.Proto1Features"
1182
- }
1183
- ];
1184
-
1185
- extensions 9995 to 9999; // For internal testing
1186
- extensions 10000; // for https://github.com/bufbuild/protobuf-es
1187
- }
1188
-
1189
- // A compiled specification for the defaults of a set of features. These
1190
- // messages are generated from FeatureSet extensions and can be used to seed
1191
- // feature resolution. The resolution with this object becomes a simple search
1192
- // for the closest matching edition, followed by proto merges.
1193
- message FeatureSetDefaults {
1194
- // A map from every known edition with a unique set of defaults to its
1195
- // defaults. Not all editions may be contained here. For a given edition,
1196
- // the defaults at the closest matching edition ordered at or before it should
1197
- // be used. This field must be in strict ascending order by edition.
1198
- message FeatureSetEditionDefault {
1199
- optional Edition edition = 3;
1200
-
1201
- // Defaults of features that can be overridden in this edition.
1202
- optional FeatureSet overridable_features = 4;
1203
-
1204
- // Defaults of features that can't be overridden in this edition.
1205
- optional FeatureSet fixed_features = 5;
1206
-
1207
- reserved 1, 2;
1208
- reserved "features";
1209
- }
1210
- repeated FeatureSetEditionDefault defaults = 1;
1211
-
1212
- // The minimum supported edition (inclusive) when this was constructed.
1213
- // Editions before this will not have defaults.
1214
- optional Edition minimum_edition = 4;
1215
-
1216
- // The maximum known edition (inclusive) when this was constructed. Editions
1217
- // after this will not have reliable defaults.
1218
- optional Edition maximum_edition = 5;
1219
- }
1220
-
1221
- // ===================================================================
1222
- // Optional source code info
1223
-
1224
- // Encapsulates information about the original source file from which a
1225
- // FileDescriptorProto was generated.
1226
- message SourceCodeInfo {
1227
- // A Location identifies a piece of source code in a .proto file which
1228
- // corresponds to a particular definition. This information is intended
1229
- // to be useful to IDEs, code indexers, documentation generators, and similar
1230
- // tools.
1231
- //
1232
- // For example, say we have a file like:
1233
- // message Foo {
1234
- // optional string foo = 1;
1235
- // }
1236
- // Let's look at just the field definition:
1237
- // optional string foo = 1;
1238
- // ^ ^^ ^^ ^ ^^^
1239
- // a bc de f ghi
1240
- // We have the following locations:
1241
- // span path represents
1242
- // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
1243
- // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
1244
- // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
1245
- // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
1246
- // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
1247
- //
1248
- // Notes:
1249
- // - A location may refer to a repeated field itself (i.e. not to any
1250
- // particular index within it). This is used whenever a set of elements are
1251
- // logically enclosed in a single code segment. For example, an entire
1252
- // extend block (possibly containing multiple extension definitions) will
1253
- // have an outer location whose path refers to the "extensions" repeated
1254
- // field without an index.
1255
- // - Multiple locations may have the same path. This happens when a single
1256
- // logical declaration is spread out across multiple places. The most
1257
- // obvious example is the "extend" block again -- there may be multiple
1258
- // extend blocks in the same scope, each of which will have the same path.
1259
- // - A location's span is not always a subset of its parent's span. For
1260
- // example, the "extendee" of an extension declaration appears at the
1261
- // beginning of the "extend" block and is shared by all extensions within
1262
- // the block.
1263
- // - Just because a location's span is a subset of some other location's span
1264
- // does not mean that it is a descendant. For example, a "group" defines
1265
- // both a type and a field in a single declaration. Thus, the locations
1266
- // corresponding to the type and field and their components will overlap.
1267
- // - Code which tries to interpret locations should probably be designed to
1268
- // ignore those that it doesn't understand, as more types of locations could
1269
- // be recorded in the future.
1270
- repeated Location location = 1;
1271
- message Location {
1272
- // Identifies which part of the FileDescriptorProto was defined at this
1273
- // location.
1274
- //
1275
- // Each element is a field number or an index. They form a path from
1276
- // the root FileDescriptorProto to the place where the definition appears.
1277
- // For example, this path:
1278
- // [ 4, 3, 2, 7, 1 ]
1279
- // refers to:
1280
- // file.message_type(3) // 4, 3
1281
- // .field(7) // 2, 7
1282
- // .name() // 1
1283
- // This is because FileDescriptorProto.message_type has field number 4:
1284
- // repeated DescriptorProto message_type = 4;
1285
- // and DescriptorProto.field has field number 2:
1286
- // repeated FieldDescriptorProto field = 2;
1287
- // and FieldDescriptorProto.name has field number 1:
1288
- // optional string name = 1;
1289
- //
1290
- // Thus, the above path gives the location of a field name. If we removed
1291
- // the last element:
1292
- // [ 4, 3, 2, 7 ]
1293
- // this path refers to the whole field declaration (from the beginning
1294
- // of the label to the terminating semicolon).
1295
- repeated int32 path = 1 [packed = true];
1296
-
1297
- // Always has exactly three or four elements: start line, start column,
1298
- // end line (optional, otherwise assumed same as start line), end column.
1299
- // These are packed into a single field for efficiency. Note that line
1300
- // and column numbers are zero-based -- typically you will want to add
1301
- // 1 to each before displaying to a user.
1302
- repeated int32 span = 2 [packed = true];
1303
-
1304
- // If this SourceCodeInfo represents a complete declaration, these are any
1305
- // comments appearing before and after the declaration which appear to be
1306
- // attached to the declaration.
1307
- //
1308
- // A series of line comments appearing on consecutive lines, with no other
1309
- // tokens appearing on those lines, will be treated as a single comment.
1310
- //
1311
- // leading_detached_comments will keep paragraphs of comments that appear
1312
- // before (but not connected to) the current element. Each paragraph,
1313
- // separated by empty lines, will be one comment element in the repeated
1314
- // field.
1315
- //
1316
- // Only the comment content is provided; comment markers (e.g. //) are
1317
- // stripped out. For block comments, leading whitespace and an asterisk
1318
- // will be stripped from the beginning of each line other than the first.
1319
- // Newlines are included in the output.
1320
- //
1321
- // Examples:
1322
- //
1323
- // optional int32 foo = 1; // Comment attached to foo.
1324
- // // Comment attached to bar.
1325
- // optional int32 bar = 2;
1326
- //
1327
- // optional string baz = 3;
1328
- // // Comment attached to baz.
1329
- // // Another line attached to baz.
1330
- //
1331
- // // Comment attached to moo.
1332
- // //
1333
- // // Another line attached to moo.
1334
- // optional double moo = 4;
1335
- //
1336
- // // Detached comment for corge. This is not leading or trailing comments
1337
- // // to moo or corge because there are blank lines separating it from
1338
- // // both.
1339
- //
1340
- // // Detached comment for corge paragraph 2.
1341
- //
1342
- // optional string corge = 5;
1343
- // /* Block comment attached
1344
- // * to corge. Leading asterisks
1345
- // * will be removed. */
1346
- // /* Block comment attached to
1347
- // * grault. */
1348
- // optional int32 grault = 6;
1349
- //
1350
- // // ignored detached comments.
1351
- optional string leading_comments = 3;
1352
- optional string trailing_comments = 4;
1353
- repeated string leading_detached_comments = 6;
1354
- }
1355
-
1356
- // Extensions for tooling.
1357
- extensions 536000000 [declaration = {
1358
- number: 536000000
1359
- type: ".buf.descriptor.v1.SourceCodeInfoExtension"
1360
- full_name: ".buf.descriptor.v1.buf_source_code_info_extension"
1361
- }];
1362
- }
1363
-
1364
- // Describes the relationship between generated code and its original source
1365
- // file. A GeneratedCodeInfo message is associated with only one generated
1366
- // source file, but may contain references to different source .proto files.
1367
- message GeneratedCodeInfo {
1368
- // An Annotation connects some span of text in generated code to an element
1369
- // of its generating .proto file.
1370
- repeated Annotation annotation = 1;
1371
- message Annotation {
1372
- // Identifies the element in the original source .proto file. This field
1373
- // is formatted the same as SourceCodeInfo.Location.path.
1374
- repeated int32 path = 1 [packed = true];
1375
-
1376
- // Identifies the filesystem path to the original source .proto.
1377
- optional string source_file = 2;
1378
-
1379
- // Identifies the starting offset in bytes in the generated code
1380
- // that relates to the identified object.
1381
- optional int32 begin = 3;
1382
-
1383
- // Identifies the ending offset in bytes in the generated code that
1384
- // relates to the identified object. The end offset should be one past
1385
- // the last relevant byte (so the length of the text = end - begin).
1386
- optional int32 end = 4;
1387
-
1388
- // Represents the identified object's effect on the element in the original
1389
- // .proto file.
1390
- enum Semantic {
1391
- // There is no effect or the effect is indescribable.
1392
- NONE = 0;
1393
- // The element is set or otherwise mutated.
1394
- SET = 1;
1395
- // An alias to the element is returned.
1396
- ALIAS = 2;
1397
- }
1398
- optional Semantic semantic = 5;
1399
- }
1400
- }
1401
-
1402
- // Describes the 'visibility' of a symbol with respect to the proto import
1403
- // system. Symbols can only be imported when the visibility rules do not prevent
1404
- // it (ex: local symbols cannot be imported). Visibility modifiers can only set
1405
- // on `message` and `enum` as they are the only types available to be referenced
1406
- // from other files.
1407
- enum SymbolVisibility {
1408
- VISIBILITY_UNSET = 0;
1409
- VISIBILITY_LOCAL = 1;
1410
- VISIBILITY_EXPORT = 2;
1411
- }