1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
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
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.
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.
31 // Author: kenton@google.com (Kenton Varda)
32 // Based on original Protocol Buffers design by
33 // Sanjay Ghemawat, Jeff Dean, and others.
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).
42 package google.protobuf;
43 option java_package = "com.google.protobuf";
44 option java_outer_classname = "DescriptorProtos";
46 // descriptor.proto must be optimized for speed because reflection-based
47 // algorithms don't work during bootstrapping.
48 option optimize_for = SPEED;
50 // The protocol compiler can output a FileDescriptorSet containing the .proto
52 message FileDescriptorSet {
53 repeated FileDescriptorProto file = 1;
56 // Describes a complete .proto file.
57 message FileDescriptorProto {
58 optional string name = 1; // file name, relative to root of source tree
59 optional string package = 2; // e.g. "foo", "foo.bar", etc.
61 // Names of files imported by this file.
62 repeated string dependency = 3;
63 // Indexes of the public imported files in the dependency list above.
64 repeated int32 public_dependency = 10;
65 // Indexes of the weak imported files in the dependency list.
66 // For Google-internal migration only. Do not use.
67 repeated int32 weak_dependency = 11;
69 // All top-level definitions in this file.
70 repeated DescriptorProto message_type = 4;
71 repeated EnumDescriptorProto enum_type = 5;
72 repeated ServiceDescriptorProto service = 6;
73 repeated FieldDescriptorProto extension = 7;
75 optional FileOptions options = 8;
77 // This field contains optional information about the original source code.
78 // You may safely remove this entire field without harming runtime
79 // functionality of the descriptors -- the information is needed only by
81 optional SourceCodeInfo source_code_info = 9;
83 // The syntax of the proto file.
84 // The supported values are "proto2" and "proto3".
85 optional string syntax = 12;
88 // Describes a message type.
89 message DescriptorProto {
90 optional string name = 1;
92 repeated FieldDescriptorProto field = 2;
93 repeated FieldDescriptorProto extension = 6;
95 repeated DescriptorProto nested_type = 3;
96 repeated EnumDescriptorProto enum_type = 4;
98 message ExtensionRange {
99 optional int32 start = 1;
100 optional int32 end = 2;
102 repeated ExtensionRange extension_range = 5;
104 repeated OneofDescriptorProto oneof_decl = 8;
106 optional MessageOptions options = 7;
109 // Describes a field within a message.
110 message FieldDescriptorProto {
112 // 0 is reserved for errors.
113 // Order is weird for historical reasons.
116 // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
117 // negative values are likely.
120 // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
121 // negative values are likely.
127 TYPE_GROUP = 10; // Tag-delimited aggregate.
128 TYPE_MESSAGE = 11; // Length-delimited aggregate.
136 TYPE_SINT32 = 17; // Uses ZigZag encoding.
137 TYPE_SINT64 = 18; // Uses ZigZag encoding.
141 // 0 is reserved for errors
145 // TODO(sanjay): Should we add LABEL_MAP?
148 optional string name = 1;
149 optional int32 number = 3;
150 optional Label label = 4;
152 // If type_name is set, this need not be set. If both this and type_name
153 // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
154 optional Type type = 5;
156 // For message and enum types, this is the name of the type. If the name
157 // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
158 // rules are used to find the type (i.e. first the nested types within this
159 // message are searched, then within the parent, on up to the root
161 optional string type_name = 6;
163 // For extensions, this is the name of the type being extended. It is
164 // resolved in the same manner as type_name.
165 optional string extendee = 2;
167 // For numeric types, contains the original text representation of the value.
168 // For booleans, "true" or "false".
169 // For strings, contains the default text contents (not escaped in any way).
170 // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
171 // TODO(kenton): Base-64 encode?
172 optional string default_value = 7;
174 // If set, gives the index of a oneof in the containing type's oneof_decl
175 // list. This field is a member of that oneof. Extensions of a oneof should
176 // not set this since the oneof to which they belong will be inferred based
177 // on the extension range containing the extension's field number.
178 optional int32 oneof_index = 9;
180 optional FieldOptions options = 8;
183 // Describes a oneof.
184 message OneofDescriptorProto {
185 optional string name = 1;
188 // Describes an enum type.
189 message EnumDescriptorProto {
190 optional string name = 1;
192 repeated EnumValueDescriptorProto value = 2;
194 optional EnumOptions options = 3;
197 // Describes a value within an enum.
198 message EnumValueDescriptorProto {
199 optional string name = 1;
200 optional int32 number = 2;
202 optional EnumValueOptions options = 3;
205 // Describes a service.
206 message ServiceDescriptorProto {
207 optional string name = 1;
208 repeated MethodDescriptorProto method = 2;
210 optional ServiceOptions options = 3;
213 // Describes a method of a service.
214 message MethodDescriptorProto {
215 optional string name = 1;
217 // Input and output type names. These are resolved in the same way as
218 // FieldDescriptorProto.type_name, but must refer to a message type.
219 optional string input_type = 2;
220 optional string output_type = 3;
222 optional MethodOptions options = 4;
224 // Identifies if client streams multiple client messages
225 optional bool client_streaming = 5 [default=false];
226 // Identifies if server streams multiple server messages
227 optional bool server_streaming = 6 [default=false];
231 // ===================================================================
234 // Each of the definitions above may have "options" attached. These are
235 // just annotations which may cause code to be generated slightly differently
236 // or may contain hints for code that manipulates protocol messages.
238 // Clients may define custom options as extensions of the *Options messages.
239 // These extensions may not yet be known at parsing time, so the parser cannot
240 // store the values in them. Instead it stores them in a field in the *Options
241 // message called uninterpreted_option. This field must have the same name
242 // across all *Options messages. We then use this field to populate the
243 // extensions when we build a descriptor, at which point all protos have been
244 // parsed and so all extensions are known.
246 // Extension numbers for custom options may be chosen as follows:
247 // * For options which will only be used within a single application or
248 // organization, or for experimental options, use field numbers 50000
249 // through 99999. It is up to you to ensure that you do not use the
250 // same number for multiple options.
251 // * For options which will be published and used publicly by multiple
252 // independent entities, e-mail protobuf-global-extension-registry@google.com
253 // to reserve extension numbers. Simply provide your project name (e.g.
254 // Object-C plugin) and your porject website (if available) -- there's no need
255 // to explain how you intend to use them. Usually you only need one extension
256 // number. You can declare multiple options with only one extension number by
257 // putting them in a sub-message. See the Custom Options section of the docs
259 // https://developers.google.com/protocol-buffers/docs/proto#options
260 // If this turns out to be popular, a web service will be set up
261 // to automatically assign option numbers.
264 message FileOptions {
266 // Sets the Java package where classes generated from this .proto will be
267 // placed. By default, the proto package is used, but this is often
268 // inappropriate because proto packages do not normally start with backwards
270 optional string java_package = 1;
273 // If set, all the classes from the .proto file are wrapped in a single
274 // outer class with the given name. This applies to both Proto1
275 // (equivalent to the old "--one_java_file" option) and Proto2 (where
276 // a .proto always translates to a single class, but you may want to
277 // explicitly choose the class name).
278 optional string java_outer_classname = 8;
280 // If set true, then the Java code generator will generate a separate .java
281 // file for each top-level message, enum, and service defined in the .proto
282 // file. Thus, these types will *not* be nested inside the outer class
283 // named by java_outer_classname. However, the outer class will still be
284 // generated to contain the file's getDescriptor() method as well as any
285 // top-level extensions defined in the file.
286 optional bool java_multiple_files = 10 [default=false];
288 // If set true, then the Java code generator will generate equals() and
289 // hashCode() methods for all messages defined in the .proto file.
290 // - In the full runtime, this is purely a speed optimization, as the
291 // AbstractMessage base class includes reflection-based implementations of
293 //- In the lite runtime, setting this option changes the semantics of
294 // equals() and hashCode() to more closely match those of the full runtime;
295 // the generated methods compute their results based on field values rather
296 // than object identity. (Implementations should not assume that hashcodes
297 // will be consistent across runtimes or versions of the protocol compiler.)
298 optional bool java_generate_equals_and_hash = 20 [default=false];
300 // If set true, then the Java2 code generator will generate code that
301 // throws an exception whenever an attempt is made to assign a non-UTF-8
302 // byte sequence to a string field.
303 // Message reflection will do the same.
304 // However, an extension field still accepts non-UTF-8 byte sequences.
305 // This option has no effect on when used with the lite runtime.
306 optional bool java_string_check_utf8 = 27 [default=false];
309 // Generated classes can be optimized for speed or code size.
311 SPEED = 1; // Generate complete code for parsing, serialization,
313 CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
314 LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
316 optional OptimizeMode optimize_for = 9 [default=SPEED];
318 // Sets the Go package where structs generated from this .proto will be
319 // placed. If omitted, the Go package will be derived from the following:
320 // - The basename of the package import path, if provided.
321 // - Otherwise, the package statement in the .proto file, if present.
322 // - Otherwise, the basename of the .proto file, without extension.
323 optional string go_package = 11;
327 // Should generic services be generated in each language? "Generic" services
328 // are not specific to any particular RPC system. They are generated by the
329 // main code generators in each language (without additional plugins).
330 // Generic services were the only kind of service generation supported by
331 // early versions of google.protobuf.
333 // Generic services are now considered deprecated in favor of using plugins
334 // that generate code specific to your particular RPC system. Therefore,
335 // these default to false. Old code which depends on generic services should
336 // explicitly set them to true.
337 optional bool cc_generic_services = 16 [default=false];
338 optional bool java_generic_services = 17 [default=false];
339 optional bool py_generic_services = 18 [default=false];
341 // Is this file deprecated?
342 // Depending on the target platform, this can emit Deprecated annotations
343 // for everything in the file, or it will be completely ignored; in the very
344 // least, this is a formalization for deprecating files.
345 optional bool deprecated = 23 [default=false];
348 // Enables the use of arenas for the proto messages in this file. This applies
349 // only to generated classes for C++.
350 optional bool cc_enable_arenas = 31 [default=false];
353 // The parser stores options it doesn't recognize here. See above.
354 repeated UninterpretedOption uninterpreted_option = 999;
356 // Clients can define custom options in extensions of this message. See above.
357 extensions 1000 to max;
360 message MessageOptions {
361 // Set true to use the old proto1 MessageSet wire format for extensions.
362 // This is provided for backwards-compatibility with the MessageSet wire
363 // format. You should not use this for any other reason: It's less
364 // efficient, has fewer features, and is more complicated.
366 // The message must be defined exactly as follows:
368 // option message_set_wire_format = true;
369 // extensions 4 to max;
371 // Note that the message cannot have any defined fields; MessageSets only
374 // All extensions of your type must be singular messages; e.g. they cannot
375 // be int32s, enums, or repeated messages.
377 // Because this is an option, the above two restrictions are not enforced by
378 // the protocol compiler.
379 optional bool message_set_wire_format = 1 [default=false];
381 // Disables the generation of the standard "descriptor()" accessor, which can
382 // conflict with a field of the same name. This is meant to make migration
383 // from proto1 easier; new code should avoid fields named "descriptor".
384 optional bool no_standard_descriptor_accessor = 2 [default=false];
386 // Is this message deprecated?
387 // Depending on the target platform, this can emit Deprecated annotations
388 // for the message, or it will be completely ignored; in the very least,
389 // this is a formalization for deprecating messages.
390 optional bool deprecated = 3 [default=false];
392 // Whether the message is an automatically generated map entry type for the
396 // map<KeyType, ValueType> map_field = 1;
397 // The parsed descriptor looks like:
398 // message MapFieldEntry {
399 // option map_entry = true;
400 // optional KeyType key = 1;
401 // optional ValueType value = 2;
403 // repeated MapFieldEntry map_field = 1;
405 // Implementations may choose not to generate the map_entry=true message, but
406 // use a native map in the target language to hold the keys and values.
407 // The reflection APIs in such implementions still need to work as
408 // if the field is a repeated message field.
410 // NOTE: Do not set the option in .proto files. Always use the maps syntax
411 // instead. The option should only be implicitly set by the proto compiler
413 optional bool map_entry = 7;
415 // The parser stores options it doesn't recognize here. See above.
416 repeated UninterpretedOption uninterpreted_option = 999;
418 // Clients can define custom options in extensions of this message. See above.
419 extensions 1000 to max;
422 message FieldOptions {
423 // The ctype option instructs the C++ code generator to use a different
424 // representation of the field than it normally would. See the specific
425 // options below. This option is not yet implemented in the open source
426 // release -- sorry, we'll try to include it in a future version!
427 optional CType ctype = 1 [default = STRING];
436 // The packed option can be enabled for repeated primitive fields to enable
437 // a more efficient representation on the wire. Rather than repeatedly
438 // writing the tag and type for each element, the entire array is encoded as
439 // a single length-delimited blob.
440 optional bool packed = 2;
444 // Should this field be parsed lazily? Lazy applies only to message-type
445 // fields. It means that when the outer message is initially parsed, the
446 // inner message's contents will not be parsed but instead stored in encoded
447 // form. The inner message will actually be parsed when it is first accessed.
449 // This is only a hint. Implementations are free to choose whether to use
450 // eager or lazy parsing regardless of the value of this option. However,
451 // setting this option true suggests that the protocol author believes that
452 // using lazy parsing on this field is worth the additional bookkeeping
453 // overhead typically needed to implement it.
455 // This option does not affect the public interface of any generated code;
456 // all method signatures remain the same. Furthermore, thread-safety of the
457 // interface is not affected by this option; const methods remain safe to
458 // call from multiple threads concurrently, while non-const methods continue
459 // to require exclusive access.
462 // Note that implementations may choose not to check required fields within
463 // a lazy sub-message. That is, calling IsInitialized() on the outher message
464 // may return true even if the inner message has missing required fields.
465 // This is necessary because otherwise the inner message would have to be
466 // parsed in order to perform the check, defeating the purpose of lazy
467 // parsing. An implementation which chooses not to check required fields
468 // must be consistent about it. That is, for any particular sub-message, the
469 // implementation must either *always* check its required fields, or *never*
470 // check its required fields, regardless of whether or not the message has
472 optional bool lazy = 5 [default=false];
474 // Is this field deprecated?
475 // Depending on the target platform, this can emit Deprecated annotations
476 // for accessors, or it will be completely ignored; in the very least, this
477 // is a formalization for deprecating fields.
478 optional bool deprecated = 3 [default=false];
480 // For Google-internal migration only. Do not use.
481 optional bool weak = 10 [default=false];
485 // The parser stores options it doesn't recognize here. See above.
486 repeated UninterpretedOption uninterpreted_option = 999;
488 // Clients can define custom options in extensions of this message. See above.
489 extensions 1000 to max;
492 message EnumOptions {
494 // Set this option to true to allow mapping different tag names to the same
496 optional bool allow_alias = 2;
498 // Is this enum deprecated?
499 // Depending on the target platform, this can emit Deprecated annotations
500 // for the enum, or it will be completely ignored; in the very least, this
501 // is a formalization for deprecating enums.
502 optional bool deprecated = 3 [default=false];
504 // The parser stores options it doesn't recognize here. See above.
505 repeated UninterpretedOption uninterpreted_option = 999;
507 // Clients can define custom options in extensions of this message. See above.
508 extensions 1000 to max;
511 message EnumValueOptions {
512 // Is this enum value deprecated?
513 // Depending on the target platform, this can emit Deprecated annotations
514 // for the enum value, or it will be completely ignored; in the very least,
515 // this is a formalization for deprecating enum values.
516 optional bool deprecated = 1 [default=false];
518 // The parser stores options it doesn't recognize here. See above.
519 repeated UninterpretedOption uninterpreted_option = 999;
521 // Clients can define custom options in extensions of this message. See above.
522 extensions 1000 to max;
525 message ServiceOptions {
527 // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
528 // framework. We apologize for hoarding these numbers to ourselves, but
529 // we were already using them long before we decided to release Protocol
532 // Is this service deprecated?
533 // Depending on the target platform, this can emit Deprecated annotations
534 // for the service, or it will be completely ignored; in the very least,
535 // this is a formalization for deprecating services.
536 optional bool deprecated = 33 [default=false];
538 // The parser stores options it doesn't recognize here. See above.
539 repeated UninterpretedOption uninterpreted_option = 999;
541 // Clients can define custom options in extensions of this message. See above.
542 extensions 1000 to max;
545 message MethodOptions {
547 // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
548 // framework. We apologize for hoarding these numbers to ourselves, but
549 // we were already using them long before we decided to release Protocol
552 // Is this method deprecated?
553 // Depending on the target platform, this can emit Deprecated annotations
554 // for the method, or it will be completely ignored; in the very least,
555 // this is a formalization for deprecating methods.
556 optional bool deprecated = 33 [default=false];
558 // The parser stores options it doesn't recognize here. See above.
559 repeated UninterpretedOption uninterpreted_option = 999;
561 // Clients can define custom options in extensions of this message. See above.
562 extensions 1000 to max;
566 // A message representing a option the parser does not recognize. This only
567 // appears in options protos created by the compiler::Parser class.
568 // DescriptorPool resolves these when building Descriptor objects. Therefore,
569 // options protos in descriptor objects (e.g. returned by Descriptor::options(),
570 // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
572 message UninterpretedOption {
573 // The name of the uninterpreted option. Each string represents a segment in
574 // a dot-separated name. is_extension is true iff a segment represents an
575 // extension (denoted with parentheses in options specs in .proto files).
576 // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
577 // "foo.(bar.baz).qux".
579 required string name_part = 1;
580 required bool is_extension = 2;
582 repeated NamePart name = 2;
584 // The value of the uninterpreted option, in whatever type the tokenizer
585 // identified it as during parsing. Exactly one of these should be set.
586 optional string identifier_value = 3;
587 optional uint64 positive_int_value = 4;
588 optional int64 negative_int_value = 5;
589 optional double double_value = 6;
590 optional bytes string_value = 7;
591 optional string aggregate_value = 8;
594 // ===================================================================
595 // Optional source code info
597 // Encapsulates information about the original source file from which a
598 // FileDescriptorProto was generated.
599 message SourceCodeInfo {
600 // A Location identifies a piece of source code in a .proto file which
601 // corresponds to a particular definition. This information is intended
602 // to be useful to IDEs, code indexers, documentation generators, and similar
605 // For example, say we have a file like:
607 // optional string foo = 1;
609 // Let's look at just the field definition:
610 // optional string foo = 1;
613 // We have the following locations:
614 // span path represents
615 // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
616 // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
617 // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
618 // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
619 // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
622 // - A location may refer to a repeated field itself (i.e. not to any
623 // particular index within it). This is used whenever a set of elements are
624 // logically enclosed in a single code segment. For example, an entire
625 // extend block (possibly containing multiple extension definitions) will
626 // have an outer location whose path refers to the "extensions" repeated
627 // field without an index.
628 // - Multiple locations may have the same path. This happens when a single
629 // logical declaration is spread out across multiple places. The most
630 // obvious example is the "extend" block again -- there may be multiple
631 // extend blocks in the same scope, each of which will have the same path.
632 // - A location's span is not always a subset of its parent's span. For
633 // example, the "extendee" of an extension declaration appears at the
634 // beginning of the "extend" block and is shared by all extensions within
636 // - Just because a location's span is a subset of some other location's span
637 // does not mean that it is a descendent. For example, a "group" defines
638 // both a type and a field in a single declaration. Thus, the locations
639 // corresponding to the type and field and their components will overlap.
640 // - Code which tries to interpret locations should probably be designed to
641 // ignore those that it doesn't understand, as more types of locations could
642 // be recorded in the future.
643 repeated Location location = 1;
645 // Identifies which part of the FileDescriptorProto was defined at this
648 // Each element is a field number or an index. They form a path from
649 // the root FileDescriptorProto to the place where the definition. For
650 // example, this path:
653 // file.message_type(3) // 4, 3
656 // This is because FileDescriptorProto.message_type has field number 4:
657 // repeated DescriptorProto message_type = 4;
658 // and DescriptorProto.field has field number 2:
659 // repeated FieldDescriptorProto field = 2;
660 // and FieldDescriptorProto.name has field number 1:
661 // optional string name = 1;
663 // Thus, the above path gives the location of a field name. If we removed
666 // this path refers to the whole field declaration (from the beginning
667 // of the label to the terminating semicolon).
668 repeated int32 path = 1 [packed=true];
670 // Always has exactly three or four elements: start line, start column,
671 // end line (optional, otherwise assumed same as start line), end column.
672 // These are packed into a single field for efficiency. Note that line
673 // and column numbers are zero-based -- typically you will want to add
674 // 1 to each before displaying to a user.
675 repeated int32 span = 2 [packed=true];
677 // If this SourceCodeInfo represents a complete declaration, these are any
678 // comments appearing before and after the declaration which appear to be
679 // attached to the declaration.
681 // A series of line comments appearing on consecutive lines, with no other
682 // tokens appearing on those lines, will be treated as a single comment.
684 // Only the comment content is provided; comment markers (e.g. //) are
685 // stripped out. For block comments, leading whitespace and an asterisk
686 // will be stripped from the beginning of each line other than the first.
687 // Newlines are included in the output.
691 // optional int32 foo = 1; // Comment attached to foo.
692 // // Comment attached to bar.
693 // optional int32 bar = 2;
695 // optional string baz = 3;
696 // // Comment attached to baz.
697 // // Another line attached to baz.
699 // // Comment attached to qux.
701 // // Another line attached to qux.
702 // optional double qux = 4;
704 // optional string corge = 5;
705 // /* Block comment attached
706 // * to corge. Leading asterisks
707 // * will be removed. */
708 // /* Block comment attached to
710 // optional int32 grault = 6;
711 optional string leading_comments = 3;
712 optional string trailing_comments = 4;