etcdv3 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,804 @@
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
+
40
+ syntax = "proto2";
41
+
42
+ package google.protobuf;
43
+ option go_package = "descriptor";
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
+
49
+ // descriptor.proto must be optimized for speed because reflection-based
50
+ // algorithms don't work during bootstrapping.
51
+ option optimize_for = SPEED;
52
+
53
+ // The protocol compiler can output a FileDescriptorSet containing the .proto
54
+ // files it parses.
55
+ message FileDescriptorSet {
56
+ repeated FileDescriptorProto file = 1;
57
+ }
58
+
59
+ // Describes a complete .proto file.
60
+ message FileDescriptorProto {
61
+ optional string name = 1; // file name, relative to root of source tree
62
+ optional string package = 2; // e.g. "foo", "foo.bar", etc.
63
+
64
+ // Names of files imported by this file.
65
+ repeated string dependency = 3;
66
+ // Indexes of the public imported files in the dependency list above.
67
+ repeated int32 public_dependency = 10;
68
+ // Indexes of the weak imported files in the dependency list.
69
+ // For Google-internal migration only. Do not use.
70
+ repeated int32 weak_dependency = 11;
71
+
72
+ // All top-level definitions in this file.
73
+ repeated DescriptorProto message_type = 4;
74
+ repeated EnumDescriptorProto enum_type = 5;
75
+ repeated ServiceDescriptorProto service = 6;
76
+ repeated FieldDescriptorProto extension = 7;
77
+
78
+ optional FileOptions options = 8;
79
+
80
+ // This field contains optional information about the original source code.
81
+ // You may safely remove this entire field without harming runtime
82
+ // functionality of the descriptors -- the information is needed only by
83
+ // development tools.
84
+ optional SourceCodeInfo source_code_info = 9;
85
+
86
+ // The syntax of the proto file.
87
+ // The supported values are "proto2" and "proto3".
88
+ optional string syntax = 12;
89
+ }
90
+
91
+ // Describes a message type.
92
+ message DescriptorProto {
93
+ optional string name = 1;
94
+
95
+ repeated FieldDescriptorProto field = 2;
96
+ repeated FieldDescriptorProto extension = 6;
97
+
98
+ repeated DescriptorProto nested_type = 3;
99
+ repeated EnumDescriptorProto enum_type = 4;
100
+
101
+ message ExtensionRange {
102
+ optional int32 start = 1;
103
+ optional int32 end = 2;
104
+ }
105
+ repeated ExtensionRange extension_range = 5;
106
+
107
+ repeated OneofDescriptorProto oneof_decl = 8;
108
+
109
+ optional MessageOptions options = 7;
110
+
111
+ // Range of reserved tag numbers. Reserved tag numbers may not be used by
112
+ // fields or extension ranges in the same message. Reserved ranges may
113
+ // not overlap.
114
+ message ReservedRange {
115
+ optional int32 start = 1; // Inclusive.
116
+ optional int32 end = 2; // Exclusive.
117
+ }
118
+ repeated ReservedRange reserved_range = 9;
119
+ // Reserved field names, which may not be used by fields in the same message.
120
+ // A given name may only be reserved once.
121
+ repeated string reserved_name = 10;
122
+ }
123
+
124
+ // Describes a field within a message.
125
+ message FieldDescriptorProto {
126
+ enum Type {
127
+ // 0 is reserved for errors.
128
+ // Order is weird for historical reasons.
129
+ TYPE_DOUBLE = 1;
130
+ TYPE_FLOAT = 2;
131
+ // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
132
+ // negative values are likely.
133
+ TYPE_INT64 = 3;
134
+ TYPE_UINT64 = 4;
135
+ // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
136
+ // negative values are likely.
137
+ TYPE_INT32 = 5;
138
+ TYPE_FIXED64 = 6;
139
+ TYPE_FIXED32 = 7;
140
+ TYPE_BOOL = 8;
141
+ TYPE_STRING = 9;
142
+ TYPE_GROUP = 10; // Tag-delimited aggregate.
143
+ TYPE_MESSAGE = 11; // Length-delimited aggregate.
144
+
145
+ // New in version 2.
146
+ TYPE_BYTES = 12;
147
+ TYPE_UINT32 = 13;
148
+ TYPE_ENUM = 14;
149
+ TYPE_SFIXED32 = 15;
150
+ TYPE_SFIXED64 = 16;
151
+ TYPE_SINT32 = 17; // Uses ZigZag encoding.
152
+ TYPE_SINT64 = 18; // Uses ZigZag encoding.
153
+ };
154
+
155
+ enum Label {
156
+ // 0 is reserved for errors
157
+ LABEL_OPTIONAL = 1;
158
+ LABEL_REQUIRED = 2;
159
+ LABEL_REPEATED = 3;
160
+ // TODO(sanjay): Should we add LABEL_MAP?
161
+ };
162
+
163
+ optional string name = 1;
164
+ optional int32 number = 3;
165
+ optional Label label = 4;
166
+
167
+ // If type_name is set, this need not be set. If both this and type_name
168
+ // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
169
+ optional Type type = 5;
170
+
171
+ // For message and enum types, this is the name of the type. If the name
172
+ // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
173
+ // rules are used to find the type (i.e. first the nested types within this
174
+ // message are searched, then within the parent, on up to the root
175
+ // namespace).
176
+ optional string type_name = 6;
177
+
178
+ // For extensions, this is the name of the type being extended. It is
179
+ // resolved in the same manner as type_name.
180
+ optional string extendee = 2;
181
+
182
+ // For numeric types, contains the original text representation of the value.
183
+ // For booleans, "true" or "false".
184
+ // For strings, contains the default text contents (not escaped in any way).
185
+ // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
186
+ // TODO(kenton): Base-64 encode?
187
+ optional string default_value = 7;
188
+
189
+ // If set, gives the index of a oneof in the containing type's oneof_decl
190
+ // list. This field is a member of that oneof.
191
+ optional int32 oneof_index = 9;
192
+
193
+ // JSON name of this field. The value is set by protocol compiler. If the
194
+ // user has set a "json_name" option on this field, that option's value
195
+ // will be used. Otherwise, it's deduced from the field's name by converting
196
+ // it to camelCase.
197
+ optional string json_name = 10;
198
+
199
+ optional FieldOptions options = 8;
200
+ }
201
+
202
+ // Describes a oneof.
203
+ message OneofDescriptorProto {
204
+ optional string name = 1;
205
+ optional OneofOptions options = 2;
206
+ }
207
+
208
+ // Describes an enum type.
209
+ message EnumDescriptorProto {
210
+ optional string name = 1;
211
+
212
+ repeated EnumValueDescriptorProto value = 2;
213
+
214
+ optional EnumOptions options = 3;
215
+ }
216
+
217
+ // Describes a value within an enum.
218
+ message EnumValueDescriptorProto {
219
+ optional string name = 1;
220
+ optional int32 number = 2;
221
+
222
+ optional EnumValueOptions options = 3;
223
+ }
224
+
225
+ // Describes a service.
226
+ message ServiceDescriptorProto {
227
+ optional string name = 1;
228
+ repeated MethodDescriptorProto method = 2;
229
+
230
+ optional ServiceOptions options = 3;
231
+ }
232
+
233
+ // Describes a method of a service.
234
+ message MethodDescriptorProto {
235
+ optional string name = 1;
236
+
237
+ // Input and output type names. These are resolved in the same way as
238
+ // FieldDescriptorProto.type_name, but must refer to a message type.
239
+ optional string input_type = 2;
240
+ optional string output_type = 3;
241
+
242
+ optional MethodOptions options = 4;
243
+
244
+ // Identifies if client streams multiple client messages
245
+ optional bool client_streaming = 5 [default=false];
246
+ // Identifies if server streams multiple server messages
247
+ optional bool server_streaming = 6 [default=false];
248
+ }
249
+
250
+
251
+ // ===================================================================
252
+ // Options
253
+
254
+ // Each of the definitions above may have "options" attached. These are
255
+ // just annotations which may cause code to be generated slightly differently
256
+ // or may contain hints for code that manipulates protocol messages.
257
+ //
258
+ // Clients may define custom options as extensions of the *Options messages.
259
+ // These extensions may not yet be known at parsing time, so the parser cannot
260
+ // store the values in them. Instead it stores them in a field in the *Options
261
+ // message called uninterpreted_option. This field must have the same name
262
+ // across all *Options messages. We then use this field to populate the
263
+ // extensions when we build a descriptor, at which point all protos have been
264
+ // parsed and so all extensions are known.
265
+ //
266
+ // Extension numbers for custom options may be chosen as follows:
267
+ // * For options which will only be used within a single application or
268
+ // organization, or for experimental options, use field numbers 50000
269
+ // through 99999. It is up to you to ensure that you do not use the
270
+ // same number for multiple options.
271
+ // * For options which will be published and used publicly by multiple
272
+ // independent entities, e-mail protobuf-global-extension-registry@google.com
273
+ // to reserve extension numbers. Simply provide your project name (e.g.
274
+ // Objective-C plugin) and your project website (if available) -- there's no
275
+ // need to explain how you intend to use them. Usually you only need one
276
+ // extension number. You can declare multiple options with only one extension
277
+ // number by putting them in a sub-message. See the Custom Options section of
278
+ // the docs for examples:
279
+ // https://developers.google.com/protocol-buffers/docs/proto#options
280
+ // If this turns out to be popular, a web service will be set up
281
+ // to automatically assign option numbers.
282
+
283
+
284
+ message FileOptions {
285
+
286
+ // Sets the Java package where classes generated from this .proto will be
287
+ // placed. By default, the proto package is used, but this is often
288
+ // inappropriate because proto packages do not normally start with backwards
289
+ // domain names.
290
+ optional string java_package = 1;
291
+
292
+
293
+ // If set, all the classes from the .proto file are wrapped in a single
294
+ // outer class with the given name. This applies to both Proto1
295
+ // (equivalent to the old "--one_java_file" option) and Proto2 (where
296
+ // a .proto always translates to a single class, but you may want to
297
+ // explicitly choose the class name).
298
+ optional string java_outer_classname = 8;
299
+
300
+ // If set true, then the Java code generator will generate a separate .java
301
+ // file for each top-level message, enum, and service defined in the .proto
302
+ // file. Thus, these types will *not* be nested inside the outer class
303
+ // named by java_outer_classname. However, the outer class will still be
304
+ // generated to contain the file's getDescriptor() method as well as any
305
+ // top-level extensions defined in the file.
306
+ optional bool java_multiple_files = 10 [default=false];
307
+
308
+ // This option does nothing.
309
+ optional bool java_generate_equals_and_hash = 20 [deprecated=true];
310
+
311
+ // If set true, then the Java2 code generator will generate code that
312
+ // throws an exception whenever an attempt is made to assign a non-UTF-8
313
+ // byte sequence to a string field.
314
+ // Message reflection will do the same.
315
+ // However, an extension field still accepts non-UTF-8 byte sequences.
316
+ // This option has no effect on when used with the lite runtime.
317
+ optional bool java_string_check_utf8 = 27 [default=false];
318
+
319
+
320
+ // Generated classes can be optimized for speed or code size.
321
+ enum OptimizeMode {
322
+ SPEED = 1; // Generate complete code for parsing, serialization,
323
+ // etc.
324
+ CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
325
+ LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
326
+ }
327
+ optional OptimizeMode optimize_for = 9 [default=SPEED];
328
+
329
+ // Sets the Go package where structs generated from this .proto will be
330
+ // placed. If omitted, the Go package will be derived from the following:
331
+ // - The basename of the package import path, if provided.
332
+ // - Otherwise, the package statement in the .proto file, if present.
333
+ // - Otherwise, the basename of the .proto file, without extension.
334
+ optional string go_package = 11;
335
+
336
+
337
+
338
+ // Should generic services be generated in each language? "Generic" services
339
+ // are not specific to any particular RPC system. They are generated by the
340
+ // main code generators in each language (without additional plugins).
341
+ // Generic services were the only kind of service generation supported by
342
+ // early versions of google.protobuf.
343
+ //
344
+ // Generic services are now considered deprecated in favor of using plugins
345
+ // that generate code specific to your particular RPC system. Therefore,
346
+ // these default to false. Old code which depends on generic services should
347
+ // explicitly set them to true.
348
+ optional bool cc_generic_services = 16 [default=false];
349
+ optional bool java_generic_services = 17 [default=false];
350
+ optional bool py_generic_services = 18 [default=false];
351
+
352
+ // Is this file deprecated?
353
+ // Depending on the target platform, this can emit Deprecated annotations
354
+ // for everything in the file, or it will be completely ignored; in the very
355
+ // least, this is a formalization for deprecating files.
356
+ optional bool deprecated = 23 [default=false];
357
+
358
+ // Enables the use of arenas for the proto messages in this file. This applies
359
+ // only to generated classes for C++.
360
+ optional bool cc_enable_arenas = 31 [default=false];
361
+
362
+
363
+ // Sets the objective c class prefix which is prepended to all objective c
364
+ // generated classes from this .proto. There is no default.
365
+ optional string objc_class_prefix = 36;
366
+
367
+ // Namespace for generated classes; defaults to the package.
368
+ optional string csharp_namespace = 37;
369
+
370
+ // The parser stores options it doesn't recognize here. See above.
371
+ repeated UninterpretedOption uninterpreted_option = 999;
372
+
373
+ // Clients can define custom options in extensions of this message. See above.
374
+ extensions 1000 to max;
375
+
376
+ reserved 38;
377
+ }
378
+
379
+ message MessageOptions {
380
+ // Set true to use the old proto1 MessageSet wire format for extensions.
381
+ // This is provided for backwards-compatibility with the MessageSet wire
382
+ // format. You should not use this for any other reason: It's less
383
+ // efficient, has fewer features, and is more complicated.
384
+ //
385
+ // The message must be defined exactly as follows:
386
+ // message Foo {
387
+ // option message_set_wire_format = true;
388
+ // extensions 4 to max;
389
+ // }
390
+ // Note that the message cannot have any defined fields; MessageSets only
391
+ // have extensions.
392
+ //
393
+ // All extensions of your type must be singular messages; e.g. they cannot
394
+ // be int32s, enums, or repeated messages.
395
+ //
396
+ // Because this is an option, the above two restrictions are not enforced by
397
+ // the protocol compiler.
398
+ optional bool message_set_wire_format = 1 [default=false];
399
+
400
+ // Disables the generation of the standard "descriptor()" accessor, which can
401
+ // conflict with a field of the same name. This is meant to make migration
402
+ // from proto1 easier; new code should avoid fields named "descriptor".
403
+ optional bool no_standard_descriptor_accessor = 2 [default=false];
404
+
405
+ // Is this message deprecated?
406
+ // Depending on the target platform, this can emit Deprecated annotations
407
+ // for the message, or it will be completely ignored; in the very least,
408
+ // this is a formalization for deprecating messages.
409
+ optional bool deprecated = 3 [default=false];
410
+
411
+ // Whether the message is an automatically generated map entry type for the
412
+ // maps field.
413
+ //
414
+ // For maps fields:
415
+ // map<KeyType, ValueType> map_field = 1;
416
+ // The parsed descriptor looks like:
417
+ // message MapFieldEntry {
418
+ // option map_entry = true;
419
+ // optional KeyType key = 1;
420
+ // optional ValueType value = 2;
421
+ // }
422
+ // repeated MapFieldEntry map_field = 1;
423
+ //
424
+ // Implementations may choose not to generate the map_entry=true message, but
425
+ // use a native map in the target language to hold the keys and values.
426
+ // The reflection APIs in such implementions still need to work as
427
+ // if the field is a repeated message field.
428
+ //
429
+ // NOTE: Do not set the option in .proto files. Always use the maps syntax
430
+ // instead. The option should only be implicitly set by the proto compiler
431
+ // parser.
432
+ optional bool map_entry = 7;
433
+
434
+ // The parser stores options it doesn't recognize here. See above.
435
+ repeated UninterpretedOption uninterpreted_option = 999;
436
+
437
+ // Clients can define custom options in extensions of this message. See above.
438
+ extensions 1000 to max;
439
+
440
+ reserved 8; // javalite_serializable
441
+ }
442
+
443
+ message FieldOptions {
444
+ // The ctype option instructs the C++ code generator to use a different
445
+ // representation of the field than it normally would. See the specific
446
+ // options below. This option is not yet implemented in the open source
447
+ // release -- sorry, we'll try to include it in a future version!
448
+ optional CType ctype = 1 [default = STRING];
449
+ enum CType {
450
+ // Default mode.
451
+ STRING = 0;
452
+
453
+ CORD = 1;
454
+
455
+ STRING_PIECE = 2;
456
+ }
457
+ // The packed option can be enabled for repeated primitive fields to enable
458
+ // a more efficient representation on the wire. Rather than repeatedly
459
+ // writing the tag and type for each element, the entire array is encoded as
460
+ // a single length-delimited blob. In proto3, only explicit setting it to
461
+ // false will avoid using packed encoding.
462
+ optional bool packed = 2;
463
+
464
+ // The jstype option determines the JavaScript type used for values of the
465
+ // field. The option is permitted only for 64 bit integral and fixed types
466
+ // (int64, uint64, sint64, fixed64, sfixed64). By default these types are
467
+ // represented as JavaScript strings. This avoids loss of precision that can
468
+ // happen when a large value is converted to a floating point JavaScript
469
+ // numbers. Specifying JS_NUMBER for the jstype causes the generated
470
+ // JavaScript code to use the JavaScript "number" type instead of strings.
471
+ // This option is an enum to permit additional types to be added,
472
+ // e.g. goog.math.Integer.
473
+ optional JSType jstype = 6 [default = JS_NORMAL];
474
+ enum JSType {
475
+ // Use the default type.
476
+ JS_NORMAL = 0;
477
+
478
+ // Use JavaScript strings.
479
+ JS_STRING = 1;
480
+
481
+ // Use JavaScript numbers.
482
+ JS_NUMBER = 2;
483
+ }
484
+
485
+ // Should this field be parsed lazily? Lazy applies only to message-type
486
+ // fields. It means that when the outer message is initially parsed, the
487
+ // inner message's contents will not be parsed but instead stored in encoded
488
+ // form. The inner message will actually be parsed when it is first accessed.
489
+ //
490
+ // This is only a hint. Implementations are free to choose whether to use
491
+ // eager or lazy parsing regardless of the value of this option. However,
492
+ // setting this option true suggests that the protocol author believes that
493
+ // using lazy parsing on this field is worth the additional bookkeeping
494
+ // overhead typically needed to implement it.
495
+ //
496
+ // This option does not affect the public interface of any generated code;
497
+ // all method signatures remain the same. Furthermore, thread-safety of the
498
+ // interface is not affected by this option; const methods remain safe to
499
+ // call from multiple threads concurrently, while non-const methods continue
500
+ // to require exclusive access.
501
+ //
502
+ //
503
+ // Note that implementations may choose not to check required fields within
504
+ // a lazy sub-message. That is, calling IsInitialized() on the outer message
505
+ // may return true even if the inner message has missing required fields.
506
+ // This is necessary because otherwise the inner message would have to be
507
+ // parsed in order to perform the check, defeating the purpose of lazy
508
+ // parsing. An implementation which chooses not to check required fields
509
+ // must be consistent about it. That is, for any particular sub-message, the
510
+ // implementation must either *always* check its required fields, or *never*
511
+ // check its required fields, regardless of whether or not the message has
512
+ // been parsed.
513
+ optional bool lazy = 5 [default=false];
514
+
515
+ // Is this field deprecated?
516
+ // Depending on the target platform, this can emit Deprecated annotations
517
+ // for accessors, or it will be completely ignored; in the very least, this
518
+ // is a formalization for deprecating fields.
519
+ optional bool deprecated = 3 [default=false];
520
+
521
+ // For Google-internal migration only. Do not use.
522
+ optional bool weak = 10 [default=false];
523
+
524
+
525
+ // The parser stores options it doesn't recognize here. See above.
526
+ repeated UninterpretedOption uninterpreted_option = 999;
527
+
528
+ // Clients can define custom options in extensions of this message. See above.
529
+ extensions 1000 to max;
530
+
531
+ reserved 4; // removed jtype
532
+ }
533
+
534
+ message OneofOptions {
535
+ // The parser stores options it doesn't recognize here. See above.
536
+ repeated UninterpretedOption uninterpreted_option = 999;
537
+
538
+ // Clients can define custom options in extensions of this message. See above.
539
+ extensions 1000 to max;
540
+ }
541
+
542
+ message EnumOptions {
543
+
544
+ // Set this option to true to allow mapping different tag names to the same
545
+ // value.
546
+ optional bool allow_alias = 2;
547
+
548
+ // Is this enum deprecated?
549
+ // Depending on the target platform, this can emit Deprecated annotations
550
+ // for the enum, or it will be completely ignored; in the very least, this
551
+ // is a formalization for deprecating enums.
552
+ optional bool deprecated = 3 [default=false];
553
+
554
+ // The parser stores options it doesn't recognize here. See above.
555
+ repeated UninterpretedOption uninterpreted_option = 999;
556
+
557
+ // Clients can define custom options in extensions of this message. See above.
558
+ extensions 1000 to max;
559
+ }
560
+
561
+ message EnumValueOptions {
562
+ // Is this enum value deprecated?
563
+ // Depending on the target platform, this can emit Deprecated annotations
564
+ // for the enum value, or it will be completely ignored; in the very least,
565
+ // this is a formalization for deprecating enum values.
566
+ optional bool deprecated = 1 [default=false];
567
+
568
+ // The parser stores options it doesn't recognize here. See above.
569
+ repeated UninterpretedOption uninterpreted_option = 999;
570
+
571
+ // Clients can define custom options in extensions of this message. See above.
572
+ extensions 1000 to max;
573
+ }
574
+
575
+ message ServiceOptions {
576
+
577
+ // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
578
+ // framework. We apologize for hoarding these numbers to ourselves, but
579
+ // we were already using them long before we decided to release Protocol
580
+ // Buffers.
581
+
582
+ // Is this service deprecated?
583
+ // Depending on the target platform, this can emit Deprecated annotations
584
+ // for the service, or it will be completely ignored; in the very least,
585
+ // this is a formalization for deprecating services.
586
+ optional bool deprecated = 33 [default=false];
587
+
588
+ // The parser stores options it doesn't recognize here. See above.
589
+ repeated UninterpretedOption uninterpreted_option = 999;
590
+
591
+ // Clients can define custom options in extensions of this message. See above.
592
+ extensions 1000 to max;
593
+ }
594
+
595
+ message MethodOptions {
596
+
597
+ // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
598
+ // framework. We apologize for hoarding these numbers to ourselves, but
599
+ // we were already using them long before we decided to release Protocol
600
+ // Buffers.
601
+
602
+ // Is this method deprecated?
603
+ // Depending on the target platform, this can emit Deprecated annotations
604
+ // for the method, or it will be completely ignored; in the very least,
605
+ // this is a formalization for deprecating methods.
606
+ optional bool deprecated = 33 [default=false];
607
+
608
+ // The parser stores options it doesn't recognize here. See above.
609
+ repeated UninterpretedOption uninterpreted_option = 999;
610
+
611
+ // Clients can define custom options in extensions of this message. See above.
612
+ extensions 1000 to max;
613
+ }
614
+
615
+
616
+ // A message representing a option the parser does not recognize. This only
617
+ // appears in options protos created by the compiler::Parser class.
618
+ // DescriptorPool resolves these when building Descriptor objects. Therefore,
619
+ // options protos in descriptor objects (e.g. returned by Descriptor::options(),
620
+ // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
621
+ // in them.
622
+ message UninterpretedOption {
623
+ // The name of the uninterpreted option. Each string represents a segment in
624
+ // a dot-separated name. is_extension is true iff a segment represents an
625
+ // extension (denoted with parentheses in options specs in .proto files).
626
+ // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
627
+ // "foo.(bar.baz).qux".
628
+ message NamePart {
629
+ required string name_part = 1;
630
+ required bool is_extension = 2;
631
+ }
632
+ repeated NamePart name = 2;
633
+
634
+ // The value of the uninterpreted option, in whatever type the tokenizer
635
+ // identified it as during parsing. Exactly one of these should be set.
636
+ optional string identifier_value = 3;
637
+ optional uint64 positive_int_value = 4;
638
+ optional int64 negative_int_value = 5;
639
+ optional double double_value = 6;
640
+ optional bytes string_value = 7;
641
+ optional string aggregate_value = 8;
642
+ }
643
+
644
+ // ===================================================================
645
+ // Optional source code info
646
+
647
+ // Encapsulates information about the original source file from which a
648
+ // FileDescriptorProto was generated.
649
+ message SourceCodeInfo {
650
+ // A Location identifies a piece of source code in a .proto file which
651
+ // corresponds to a particular definition. This information is intended
652
+ // to be useful to IDEs, code indexers, documentation generators, and similar
653
+ // tools.
654
+ //
655
+ // For example, say we have a file like:
656
+ // message Foo {
657
+ // optional string foo = 1;
658
+ // }
659
+ // Let's look at just the field definition:
660
+ // optional string foo = 1;
661
+ // ^ ^^ ^^ ^ ^^^
662
+ // a bc de f ghi
663
+ // We have the following locations:
664
+ // span path represents
665
+ // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
666
+ // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
667
+ // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
668
+ // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
669
+ // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
670
+ //
671
+ // Notes:
672
+ // - A location may refer to a repeated field itself (i.e. not to any
673
+ // particular index within it). This is used whenever a set of elements are
674
+ // logically enclosed in a single code segment. For example, an entire
675
+ // extend block (possibly containing multiple extension definitions) will
676
+ // have an outer location whose path refers to the "extensions" repeated
677
+ // field without an index.
678
+ // - Multiple locations may have the same path. This happens when a single
679
+ // logical declaration is spread out across multiple places. The most
680
+ // obvious example is the "extend" block again -- there may be multiple
681
+ // extend blocks in the same scope, each of which will have the same path.
682
+ // - A location's span is not always a subset of its parent's span. For
683
+ // example, the "extendee" of an extension declaration appears at the
684
+ // beginning of the "extend" block and is shared by all extensions within
685
+ // the block.
686
+ // - Just because a location's span is a subset of some other location's span
687
+ // does not mean that it is a descendent. For example, a "group" defines
688
+ // both a type and a field in a single declaration. Thus, the locations
689
+ // corresponding to the type and field and their components will overlap.
690
+ // - Code which tries to interpret locations should probably be designed to
691
+ // ignore those that it doesn't understand, as more types of locations could
692
+ // be recorded in the future.
693
+ repeated Location location = 1;
694
+ message Location {
695
+ // Identifies which part of the FileDescriptorProto was defined at this
696
+ // location.
697
+ //
698
+ // Each element is a field number or an index. They form a path from
699
+ // the root FileDescriptorProto to the place where the definition. For
700
+ // example, this path:
701
+ // [ 4, 3, 2, 7, 1 ]
702
+ // refers to:
703
+ // file.message_type(3) // 4, 3
704
+ // .field(7) // 2, 7
705
+ // .name() // 1
706
+ // This is because FileDescriptorProto.message_type has field number 4:
707
+ // repeated DescriptorProto message_type = 4;
708
+ // and DescriptorProto.field has field number 2:
709
+ // repeated FieldDescriptorProto field = 2;
710
+ // and FieldDescriptorProto.name has field number 1:
711
+ // optional string name = 1;
712
+ //
713
+ // Thus, the above path gives the location of a field name. If we removed
714
+ // the last element:
715
+ // [ 4, 3, 2, 7 ]
716
+ // this path refers to the whole field declaration (from the beginning
717
+ // of the label to the terminating semicolon).
718
+ repeated int32 path = 1 [packed=true];
719
+
720
+ // Always has exactly three or four elements: start line, start column,
721
+ // end line (optional, otherwise assumed same as start line), end column.
722
+ // These are packed into a single field for efficiency. Note that line
723
+ // and column numbers are zero-based -- typically you will want to add
724
+ // 1 to each before displaying to a user.
725
+ repeated int32 span = 2 [packed=true];
726
+
727
+ // If this SourceCodeInfo represents a complete declaration, these are any
728
+ // comments appearing before and after the declaration which appear to be
729
+ // attached to the declaration.
730
+ //
731
+ // A series of line comments appearing on consecutive lines, with no other
732
+ // tokens appearing on those lines, will be treated as a single comment.
733
+ //
734
+ // leading_detached_comments will keep paragraphs of comments that appear
735
+ // before (but not connected to) the current element. Each paragraph,
736
+ // separated by empty lines, will be one comment element in the repeated
737
+ // field.
738
+ //
739
+ // Only the comment content is provided; comment markers (e.g. //) are
740
+ // stripped out. For block comments, leading whitespace and an asterisk
741
+ // will be stripped from the beginning of each line other than the first.
742
+ // Newlines are included in the output.
743
+ //
744
+ // Examples:
745
+ //
746
+ // optional int32 foo = 1; // Comment attached to foo.
747
+ // // Comment attached to bar.
748
+ // optional int32 bar = 2;
749
+ //
750
+ // optional string baz = 3;
751
+ // // Comment attached to baz.
752
+ // // Another line attached to baz.
753
+ //
754
+ // // Comment attached to qux.
755
+ // //
756
+ // // Another line attached to qux.
757
+ // optional double qux = 4;
758
+ //
759
+ // // Detached comment for corge. This is not leading or trailing comments
760
+ // // to qux or corge because there are blank lines separating it from
761
+ // // both.
762
+ //
763
+ // // Detached comment for corge paragraph 2.
764
+ //
765
+ // optional string corge = 5;
766
+ // /* Block comment attached
767
+ // * to corge. Leading asterisks
768
+ // * will be removed. */
769
+ // /* Block comment attached to
770
+ // * grault. */
771
+ // optional int32 grault = 6;
772
+ //
773
+ // // ignored detached comments.
774
+ optional string leading_comments = 3;
775
+ optional string trailing_comments = 4;
776
+ repeated string leading_detached_comments = 6;
777
+ }
778
+ }
779
+
780
+ // Describes the relationship between generated code and its original source
781
+ // file. A GeneratedCodeInfo message is associated with only one generated
782
+ // source file, but may contain references to different source .proto files.
783
+ message GeneratedCodeInfo {
784
+ // An Annotation connects some span of text in generated code to an element
785
+ // of its generating .proto file.
786
+ repeated Annotation annotation = 1;
787
+ message Annotation {
788
+ // Identifies the element in the original source .proto file. This field
789
+ // is formatted the same as SourceCodeInfo.Location.path.
790
+ repeated int32 path = 1 [packed=true];
791
+
792
+ // Identifies the filesystem path to the original source .proto.
793
+ optional string source_file = 2;
794
+
795
+ // Identifies the starting offset in bytes in the generated code
796
+ // that relates to the identified object.
797
+ optional int32 begin = 3;
798
+
799
+ // Identifies the ending offset in bytes in the generated code that
800
+ // relates to the identified offset. The end offset should be one past
801
+ // the last relevant byte (so the length of the text = end - begin).
802
+ optional int32 end = 4;
803
+ }
804
+ }