40
40
syntax = "proto2" ;
41
41
42
42
package google.protobuf ;
43
+
43
44
option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor" ;
44
45
option java_package = "com.google.protobuf" ;
45
46
option java_outer_classname = "DescriptorProtos" ;
@@ -59,8 +60,8 @@ message FileDescriptorSet {
59
60
60
61
// Describes a complete .proto file.
61
62
message FileDescriptorProto {
62
- optional string name = 1 ; // file name, relative to root of source tree
63
- optional string package = 2 ; // e.g. "foo", "foo.bar", etc.
63
+ optional string name = 1 ; // file name, relative to root of source tree
64
+ optional string package = 2 ; // e.g. "foo", "foo.bar", etc.
64
65
65
66
// Names of files imported by this file.
66
67
repeated string dependency = 3 ;
@@ -115,8 +116,8 @@ message DescriptorProto {
115
116
// fields or extension ranges in the same message. Reserved ranges may
116
117
// not overlap.
117
118
message ReservedRange {
118
- optional int32 start = 1 ; // Inclusive.
119
- optional int32 end = 2 ; // Exclusive.
119
+ optional int32 start = 1 ; // Inclusive.
120
+ optional int32 end = 2 ; // Exclusive.
120
121
}
121
122
repeated ReservedRange reserved_range = 9 ;
122
123
// Reserved field names, which may not be used by fields in the same message.
@@ -137,42 +138,42 @@ message FieldDescriptorProto {
137
138
enum Type {
138
139
// 0 is reserved for errors.
139
140
// Order is weird for historical reasons.
140
- TYPE_DOUBLE = 1 ;
141
- TYPE_FLOAT = 2 ;
141
+ TYPE_DOUBLE = 1 ;
142
+ TYPE_FLOAT = 2 ;
142
143
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
143
144
// negative values are likely.
144
- TYPE_INT64 = 3 ;
145
- TYPE_UINT64 = 4 ;
145
+ TYPE_INT64 = 3 ;
146
+ TYPE_UINT64 = 4 ;
146
147
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
147
148
// negative values are likely.
148
- TYPE_INT32 = 5 ;
149
- TYPE_FIXED64 = 6 ;
150
- TYPE_FIXED32 = 7 ;
151
- TYPE_BOOL = 8 ;
152
- TYPE_STRING = 9 ;
149
+ TYPE_INT32 = 5 ;
150
+ TYPE_FIXED64 = 6 ;
151
+ TYPE_FIXED32 = 7 ;
152
+ TYPE_BOOL = 8 ;
153
+ TYPE_STRING = 9 ;
153
154
// Tag-delimited aggregate.
154
155
// Group type is deprecated and not supported in proto3. However, Proto3
155
156
// implementations should still be able to parse the group wire format and
156
157
// treat group fields as unknown fields.
157
- TYPE_GROUP = 10 ;
158
- TYPE_MESSAGE = 11 ; // Length-delimited aggregate.
158
+ TYPE_GROUP = 10 ;
159
+ TYPE_MESSAGE = 11 ; // Length-delimited aggregate.
159
160
160
161
// New in version 2.
161
- TYPE_BYTES = 12 ;
162
- TYPE_UINT32 = 13 ;
163
- TYPE_ENUM = 14 ;
164
- TYPE_SFIXED32 = 15 ;
165
- TYPE_SFIXED64 = 16 ;
166
- TYPE_SINT32 = 17 ; // Uses ZigZag encoding.
167
- TYPE_SINT64 = 18 ; // Uses ZigZag encoding.
168
- };
162
+ TYPE_BYTES = 12 ;
163
+ TYPE_UINT32 = 13 ;
164
+ TYPE_ENUM = 14 ;
165
+ TYPE_SFIXED32 = 15 ;
166
+ TYPE_SFIXED64 = 16 ;
167
+ TYPE_SINT32 = 17 ; // Uses ZigZag encoding.
168
+ TYPE_SINT64 = 18 ; // Uses ZigZag encoding.
169
+ }
169
170
170
171
enum Label {
171
172
// 0 is reserved for errors
172
- LABEL_OPTIONAL = 1 ;
173
- LABEL_REQUIRED = 2 ;
174
- LABEL_REPEATED = 3 ;
175
- };
173
+ LABEL_OPTIONAL = 1 ;
174
+ LABEL_REQUIRED = 2 ;
175
+ LABEL_REPEATED = 3 ;
176
+ }
176
177
177
178
optional string name = 1 ;
178
179
optional int32 number = 3 ;
@@ -234,8 +235,8 @@ message EnumDescriptorProto {
234
235
// is inclusive such that it can appropriately represent the entire int32
235
236
// domain.
236
237
message EnumReservedRange {
237
- optional int32 start = 1 ; // Inclusive.
238
- optional int32 end = 2 ; // Inclusive.
238
+ optional int32 start = 1 ; // Inclusive.
239
+ optional int32 end = 2 ; // Inclusive.
239
240
}
240
241
241
242
// Range of reserved numeric values. Reserved numeric values may not be used
@@ -276,9 +277,9 @@ message MethodDescriptorProto {
276
277
optional MethodOptions options = 4 ;
277
278
278
279
// Identifies if client streams multiple client messages
279
- optional bool client_streaming = 5 [default = false ];
280
+ optional bool client_streaming = 5 [default = false ];
280
281
// Identifies if server streams multiple server messages
281
- optional bool server_streaming = 6 [default = false ];
282
+ optional bool server_streaming = 6 [default = false ];
282
283
}
283
284
284
285
@@ -314,7 +315,6 @@ message MethodDescriptorProto {
314
315
// If this turns out to be popular, a web service will be set up
315
316
// to automatically assign option numbers.
316
317
317
-
318
318
message FileOptions {
319
319
320
320
// Sets the Java package where classes generated from this .proto will be
@@ -337,7 +337,7 @@ message FileOptions {
337
337
// named by java_outer_classname. However, the outer class will still be
338
338
// generated to contain the file's getDescriptor() method as well as any
339
339
// top-level extensions defined in the file.
340
- optional bool java_multiple_files = 10 [default = false ];
340
+ optional bool java_multiple_files = 10 [default = false ];
341
341
342
342
// This option does nothing.
343
343
optional bool java_generate_equals_and_hash = 20 [deprecated =true ];
@@ -348,17 +348,17 @@ message FileOptions {
348
348
// Message reflection will do the same.
349
349
// However, an extension field still accepts non-UTF-8 byte sequences.
350
350
// This option has no effect on when used with the lite runtime.
351
- optional bool java_string_check_utf8 = 27 [default = false ];
351
+ optional bool java_string_check_utf8 = 27 [default = false ];
352
352
353
353
354
354
// Generated classes can be optimized for speed or code size.
355
355
enum OptimizeMode {
356
- SPEED = 1 ; // Generate complete code for parsing, serialization,
357
- // etc.
358
- CODE_SIZE = 2 ; // Use ReflectionOps to implement these methods.
359
- LITE_RUNTIME = 3 ; // Generate code using MessageLite and the lite runtime.
356
+ SPEED = 1 ; // Generate complete code for parsing, serialization,
357
+ // etc.
358
+ CODE_SIZE = 2 ; // Use ReflectionOps to implement these methods.
359
+ LITE_RUNTIME = 3 ; // Generate code using MessageLite and the lite runtime.
360
360
}
361
- optional OptimizeMode optimize_for = 9 [default = SPEED ];
361
+ optional OptimizeMode optimize_for = 9 [default = SPEED ];
362
362
363
363
// Sets the Go package where structs generated from this .proto will be
364
364
// placed. If omitted, the Go package will be derived from the following:
@@ -379,20 +379,20 @@ message FileOptions {
379
379
// that generate code specific to your particular RPC system. Therefore,
380
380
// these default to false. Old code which depends on generic services should
381
381
// explicitly set them to true.
382
- optional bool cc_generic_services = 16 [default = false ];
383
- optional bool java_generic_services = 17 [default = false ];
384
- optional bool py_generic_services = 18 [default = false ];
385
- optional bool php_generic_services = 42 [default = false ];
382
+ optional bool cc_generic_services = 16 [default = false ];
383
+ optional bool java_generic_services = 17 [default = false ];
384
+ optional bool py_generic_services = 18 [default = false ];
385
+ optional bool php_generic_services = 42 [default = false ];
386
386
387
387
// Is this file deprecated?
388
388
// Depending on the target platform, this can emit Deprecated annotations
389
389
// for everything in the file, or it will be completely ignored; in the very
390
390
// least, this is a formalization for deprecating files.
391
- optional bool deprecated = 23 [default = false ];
391
+ optional bool deprecated = 23 [default = false ];
392
392
393
393
// Enables the use of arenas for the proto messages in this file. This applies
394
394
// only to generated classes for C++.
395
- optional bool cc_enable_arenas = 31 [default = false ];
395
+ optional bool cc_enable_arenas = 31 [default = false ];
396
396
397
397
398
398
// Sets the objective c class prefix which is prepended to all objective c
@@ -418,8 +418,8 @@ message FileOptions {
418
418
optional string php_namespace = 41 ;
419
419
420
420
// Use this option to change the namespace of php generated metadata classes.
421
- // Default is empty. When this option is empty, the proto file name will be used
422
- // for determining the namespace.
421
+ // Default is empty. When this option is empty, the proto file name will be
422
+ // used for determining the namespace.
423
423
optional string php_metadata_namespace = 44 ;
424
424
425
425
// Use this option to change the package of ruby generated classes. Default
@@ -457,18 +457,18 @@ message MessageOptions {
457
457
//
458
458
// Because this is an option, the above two restrictions are not enforced by
459
459
// the protocol compiler.
460
- optional bool message_set_wire_format = 1 [default = false ];
460
+ optional bool message_set_wire_format = 1 [default = false ];
461
461
462
462
// Disables the generation of the standard "descriptor()" accessor, which can
463
463
// conflict with a field of the same name. This is meant to make migration
464
464
// from proto1 easier; new code should avoid fields named "descriptor".
465
- optional bool no_standard_descriptor_accessor = 2 [default = false ];
465
+ optional bool no_standard_descriptor_accessor = 2 [default = false ];
466
466
467
467
// Is this message deprecated?
468
468
// Depending on the target platform, this can emit Deprecated annotations
469
469
// for the message, or it will be completely ignored; in the very least,
470
470
// this is a formalization for deprecating messages.
471
- optional bool deprecated = 3 [default = false ];
471
+ optional bool deprecated = 3 [default = false ];
472
472
473
473
// Whether the message is an automatically generated map entry type for the
474
474
// maps field.
@@ -575,16 +575,16 @@ message FieldOptions {
575
575
// implementation must either *always* check its required fields, or *never*
576
576
// check its required fields, regardless of whether or not the message has
577
577
// been parsed.
578
- optional bool lazy = 5 [default = false ];
578
+ optional bool lazy = 5 [default = false ];
579
579
580
580
// Is this field deprecated?
581
581
// Depending on the target platform, this can emit Deprecated annotations
582
582
// for accessors, or it will be completely ignored; in the very least, this
583
583
// is a formalization for deprecating fields.
584
- optional bool deprecated = 3 [default = false ];
584
+ optional bool deprecated = 3 [default = false ];
585
585
586
586
// For Google-internal migration only. Do not use.
587
- optional bool weak = 10 [default = false ];
587
+ optional bool weak = 10 [default = false ];
588
588
589
589
590
590
// The parser stores options it doesn't recognize here. See above.
@@ -614,7 +614,7 @@ message EnumOptions {
614
614
// Depending on the target platform, this can emit Deprecated annotations
615
615
// for the enum, or it will be completely ignored; in the very least, this
616
616
// is a formalization for deprecating enums.
617
- optional bool deprecated = 3 [default = false ];
617
+ optional bool deprecated = 3 [default = false ];
618
618
619
619
reserved 5 ; // javanano_as_lite
620
620
@@ -630,7 +630,7 @@ message EnumValueOptions {
630
630
// Depending on the target platform, this can emit Deprecated annotations
631
631
// for the enum value, or it will be completely ignored; in the very least,
632
632
// this is a formalization for deprecating enum values.
633
- optional bool deprecated = 1 [default = false ];
633
+ optional bool deprecated = 1 [default = false ];
634
634
635
635
// The parser stores options it doesn't recognize here. See above.
636
636
repeated UninterpretedOption uninterpreted_option = 999 ;
@@ -650,7 +650,7 @@ message ServiceOptions {
650
650
// Depending on the target platform, this can emit Deprecated annotations
651
651
// for the service, or it will be completely ignored; in the very least,
652
652
// this is a formalization for deprecating services.
653
- optional bool deprecated = 33 [default = false ];
653
+ optional bool deprecated = 33 [default = false ];
654
654
655
655
// The parser stores options it doesn't recognize here. See above.
656
656
repeated UninterpretedOption uninterpreted_option = 999 ;
@@ -670,18 +670,18 @@ message MethodOptions {
670
670
// Depending on the target platform, this can emit Deprecated annotations
671
671
// for the method, or it will be completely ignored; in the very least,
672
672
// this is a formalization for deprecating methods.
673
- optional bool deprecated = 33 [default = false ];
673
+ optional bool deprecated = 33 [default = false ];
674
674
675
675
// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
676
676
// or neither? HTTP based RPC implementation may choose GET verb for safe
677
677
// methods, and PUT verb for idempotent methods instead of the default POST.
678
678
enum IdempotencyLevel {
679
679
IDEMPOTENCY_UNKNOWN = 0 ;
680
- NO_SIDE_EFFECTS = 1 ; // implies idempotent
681
- IDEMPOTENT = 2 ; // idempotent, but may have side effects
680
+ NO_SIDE_EFFECTS = 1 ; // implies idempotent
681
+ IDEMPOTENT = 2 ; // idempotent, but may have side effects
682
682
}
683
- optional IdempotencyLevel idempotency_level =
684
- 34 [default= IDEMPOTENCY_UNKNOWN];
683
+ optional IdempotencyLevel idempotency_level = 34
684
+ [default = IDEMPOTENCY_UNKNOWN ];
685
685
686
686
// The parser stores options it doesn't recognize here. See above.
687
687
repeated UninterpretedOption uninterpreted_option = 999 ;
@@ -793,14 +793,14 @@ message SourceCodeInfo {
793
793
// [ 4, 3, 2, 7 ]
794
794
// this path refers to the whole field declaration (from the beginning
795
795
// of the label to the terminating semicolon).
796
- repeated int32 path = 1 [packed = true ];
796
+ repeated int32 path = 1 [packed = true ];
797
797
798
798
// Always has exactly three or four elements: start line, start column,
799
799
// end line (optional, otherwise assumed same as start line), end column.
800
800
// These are packed into a single field for efficiency. Note that line
801
801
// and column numbers are zero-based -- typically you will want to add
802
802
// 1 to each before displaying to a user.
803
- repeated int32 span = 2 [packed = true ];
803
+ repeated int32 span = 2 [packed = true ];
804
804
805
805
// If this SourceCodeInfo represents a complete declaration, these are any
806
806
// comments appearing before and after the declaration which appear to be
@@ -865,7 +865,7 @@ message GeneratedCodeInfo {
865
865
message Annotation {
866
866
// Identifies the element in the original source .proto file. This field
867
867
// is formatted the same as SourceCodeInfo.Location.path.
868
- repeated int32 path = 1 [packed = true ];
868
+ repeated int32 path = 1 [packed = true ];
869
869
870
870
// Identifies the filesystem path to the original source .proto.
871
871
optional string source_file = 2 ;
0 commit comments