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