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