1// This file is from https://github.com/protocolbuffers/protobuf/blob/3.14.x/src/google/protobuf/descriptor.proto
2// To reduce the file size, some comments have been removed.
3
4syntax = "proto2";
5
6package google.protobuf;
7
8option go_package = "google.golang.org/protobuf/types/descriptorpb";
9option java_package = "com.google.protobuf";
10option java_outer_classname = "DescriptorProtos";
11option csharp_namespace = "Google.Protobuf.Reflection";
12option objc_class_prefix = "GPB";
13option cc_enable_arenas = true;
14
15option optimize_for = SPEED;
16
17message FileDescriptorSet {
18  repeated FileDescriptorProto file = 1;
19}
20
21message FileDescriptorProto {
22  optional string name = 1;
23  optional string package = 2;
24  repeated string dependency = 3;
25  repeated int32 public_dependency = 10;
26  repeated int32 weak_dependency = 11;
27  repeated DescriptorProto message_type = 4;
28  repeated EnumDescriptorProto enum_type = 5;
29  repeated ServiceDescriptorProto service = 6;
30  repeated FieldDescriptorProto extension = 7;
31  optional FileOptions options = 8;
32  optional SourceCodeInfo source_code_info = 9;
33  optional string syntax = 12;
34}
35
36message DescriptorProto {
37  optional string name = 1;
38  repeated FieldDescriptorProto field = 2;
39  repeated FieldDescriptorProto extension = 6;
40  repeated DescriptorProto nested_type = 3;
41  repeated EnumDescriptorProto enum_type = 4;
42
43  message ExtensionRange {
44    optional int32 start = 1;
45    optional int32 end = 2;
46    optional ExtensionRangeOptions options = 3;
47  }
48  repeated ExtensionRange extension_range = 5;
49  repeated OneofDescriptorProto oneof_decl = 8;
50  optional MessageOptions options = 7;
51
52  message ReservedRange {
53    optional int32 start = 1;
54    optional int32 end = 2;
55  }
56  repeated ReservedRange reserved_range = 9;
57  repeated string reserved_name = 10;
58}
59
60message ExtensionRangeOptions {
61  repeated UninterpretedOption uninterpreted_option = 999;
62  extensions 1000 to max;
63}
64
65message FieldDescriptorProto {
66  enum Type {
67    TYPE_DOUBLE = 1;
68    TYPE_FLOAT = 2;
69    TYPE_INT64 = 3;
70    TYPE_UINT64 = 4;
71    TYPE_INT32 = 5;
72    TYPE_FIXED64 = 6;
73    TYPE_FIXED32 = 7;
74    TYPE_BOOL = 8;
75    TYPE_STRING = 9;
76    TYPE_GROUP = 10;
77    TYPE_MESSAGE = 11;
78    TYPE_BYTES = 12;
79    TYPE_UINT32 = 13;
80    TYPE_ENUM = 14;
81    TYPE_SFIXED32 = 15;
82    TYPE_SFIXED64 = 16;
83    TYPE_SINT32 = 17;
84    TYPE_SINT64 = 18;
85  }
86
87  enum Label {
88    LABEL_OPTIONAL = 1;
89    LABEL_REQUIRED = 2;
90    LABEL_REPEATED = 3;
91  }
92
93  optional string name = 1;
94  optional int32 number = 3;
95  optional Label label = 4;
96  optional Type type = 5;
97  optional string type_name = 6;
98  optional string extendee = 2;
99  optional string default_value = 7;
100  optional int32 oneof_index = 9;
101  optional string json_name = 10;
102  optional FieldOptions options = 8;
103  optional bool proto3_optional = 17;
104}
105
106message OneofDescriptorProto {
107  optional string name = 1;
108  optional OneofOptions options = 2;
109}
110
111message EnumDescriptorProto {
112  optional string name = 1;
113  repeated EnumValueDescriptorProto value = 2;
114  optional EnumOptions options = 3;
115
116  message EnumReservedRange {
117    optional int32 start = 1;
118    optional int32 end = 2;
119  }
120
121  repeated EnumReservedRange reserved_range = 4;
122  repeated string reserved_name = 5;
123}
124
125message EnumValueDescriptorProto {
126  optional string name = 1;
127  optional int32 number = 2;
128  optional EnumValueOptions options = 3;
129}
130
131message ServiceDescriptorProto {
132  optional string name = 1;
133  repeated MethodDescriptorProto method = 2;
134  optional ServiceOptions options = 3;
135}
136
137message MethodDescriptorProto {
138  optional string name = 1;
139  optional string input_type = 2;
140  optional string output_type = 3;
141  optional MethodOptions options = 4;
142  optional bool client_streaming = 5 [default = false];
143  optional bool server_streaming = 6 [default = false];
144}
145
146message FileOptions {
147  optional string java_package = 1;
148  optional string java_outer_classname = 8;
149  optional bool java_multiple_files = 10 [default = false];
150  optional bool java_generate_equals_and_hash = 20 [deprecated=true];
151  optional bool java_string_check_utf8 = 27 [default = false];
152  enum OptimizeMode {
153    SPEED = 1;
154    CODE_SIZE = 2;
155    LITE_RUNTIME = 3;
156  }
157  optional OptimizeMode optimize_for = 9 [default = SPEED];
158  optional string go_package = 11;
159  optional bool cc_generic_services = 16 [default = false];
160  optional bool java_generic_services = 17 [default = false];
161  optional bool py_generic_services = 18 [default = false];
162  optional bool php_generic_services = 42 [default = false];
163  optional bool deprecated = 23 [default = false];
164  optional bool cc_enable_arenas = 31 [default = true];
165  optional string objc_class_prefix = 36;
166  optional string csharp_namespace = 37;
167  optional string swift_prefix = 39;
168  optional string php_class_prefix = 40;
169  optional string php_namespace = 41;
170  optional string php_metadata_namespace = 44;
171  optional string ruby_package = 45;
172  repeated UninterpretedOption uninterpreted_option = 999;
173  extensions 1000 to max;
174  reserved 38;
175}
176
177message MessageOptions {
178  optional bool message_set_wire_format = 1 [default = false];
179  optional bool no_standard_descriptor_accessor = 2 [default = false];
180  optional bool deprecated = 3 [default = false];
181  optional bool map_entry = 7;
182  reserved 8;
183  reserved 9;
184  repeated UninterpretedOption uninterpreted_option = 999;
185  extensions 1000 to max;
186}
187
188message FieldOptions {
189  optional CType ctype = 1 [default = STRING];
190  enum CType {
191    STRING = 0;
192    CORD = 1;
193    STRING_PIECE = 2;
194  }
195  optional bool packed = 2;
196  optional JSType jstype = 6 [default = JS_NORMAL];
197  enum JSType {
198    JS_NORMAL = 0;
199    JS_STRING = 1;
200    JS_NUMBER = 2;
201  }
202  optional bool lazy = 5 [default = false];
203  optional bool deprecated = 3 [default = false];
204  optional bool weak = 10 [default = false];
205  repeated UninterpretedOption uninterpreted_option = 999;
206  extensions 1000 to max;
207
208  reserved 4;
209}
210
211message OneofOptions {
212  repeated UninterpretedOption uninterpreted_option = 999;
213  extensions 1000 to max;
214}
215
216message EnumOptions {
217  optional bool allow_alias = 2;
218  optional bool deprecated = 3 [default = false];
219  reserved 5;
220  repeated UninterpretedOption uninterpreted_option = 999;
221  extensions 1000 to max;
222}
223
224message EnumValueOptions {
225  optional bool deprecated = 1 [default = false];
226  repeated UninterpretedOption uninterpreted_option = 999;
227  extensions 1000 to max;
228}
229
230message ServiceOptions {
231  optional bool deprecated = 33 [default = false];
232  repeated UninterpretedOption uninterpreted_option = 999;
233  extensions 1000 to max;
234}
235
236message MethodOptions {
237  optional bool deprecated = 33 [default = false];
238  enum IdempotencyLevel {
239    IDEMPOTENCY_UNKNOWN = 0;
240    NO_SIDE_EFFECTS = 1;
241    IDEMPOTENT = 2;
242  }
243  optional IdempotencyLevel idempotency_level = 34
244      [default = IDEMPOTENCY_UNKNOWN];
245  repeated UninterpretedOption uninterpreted_option = 999;
246  extensions 1000 to max;
247}
248
249message UninterpretedOption {
250  message NamePart {
251    required string name_part = 1;
252    required bool is_extension = 2;
253  }
254  repeated NamePart name = 2;
255  optional string identifier_value = 3;
256  optional uint64 positive_int_value = 4;
257  optional int64 negative_int_value = 5;
258  optional double double_value = 6;
259  optional bytes string_value = 7;
260  optional string aggregate_value = 8;
261}
262
263message SourceCodeInfo {
264  repeated Location location = 1;
265  message Location {
266    repeated int32 path = 1 [packed = true];
267    repeated int32 span = 2 [packed = true];
268    optional string leading_comments = 3;
269    optional string trailing_comments = 4;
270    repeated string leading_detached_comments = 6;
271  }
272}
273
274message GeneratedCodeInfo {
275  repeated Annotation annotation = 1;
276  message Annotation {
277    repeated int32 path = 1 [packed = true];
278    optional string source_file = 2;
279    optional int32 begin = 3;
280    optional int32 end = 4;
281  }
282}
283