summaryrefslogtreecommitdiff
path: root/descriptor/descriptor.h
blob: 8db5bd304f810997397223e44ae6bfc0603541b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
/* This file was generated by upbc (the upb compiler).  Do not edit. */

#ifndef DESCRIPTOR_DESCRIPTOR_H
#define DESCRIPTOR_DESCRIPTOR_H

#include <upb_data.h>

#ifdef __cplusplus
extern "C" {
#endif

struct google_protobuf_FileDescriptorSet;
extern struct google_protobuf_FileDescriptorSet *upb_file_descriptor_set;

/* Forward declarations of all message types.
 * So they can refer to each other in possibly-recursive ways. */

struct google_protobuf_UninterpretedOption_NamePart;
typedef struct google_protobuf_UninterpretedOption_NamePart
    google_protobuf_UninterpretedOption_NamePart;

struct google_protobuf_DescriptorProto;
typedef struct google_protobuf_DescriptorProto
    google_protobuf_DescriptorProto;

struct google_protobuf_EnumDescriptorProto;
typedef struct google_protobuf_EnumDescriptorProto
    google_protobuf_EnumDescriptorProto;

struct google_protobuf_UninterpretedOption;
typedef struct google_protobuf_UninterpretedOption
    google_protobuf_UninterpretedOption;

struct google_protobuf_FileDescriptorProto;
typedef struct google_protobuf_FileDescriptorProto
    google_protobuf_FileDescriptorProto;

struct google_protobuf_MethodDescriptorProto;
typedef struct google_protobuf_MethodDescriptorProto
    google_protobuf_MethodDescriptorProto;

struct google_protobuf_EnumValueOptions;
typedef struct google_protobuf_EnumValueOptions
    google_protobuf_EnumValueOptions;

struct google_protobuf_EnumValueDescriptorProto;
typedef struct google_protobuf_EnumValueDescriptorProto
    google_protobuf_EnumValueDescriptorProto;

struct google_protobuf_ServiceDescriptorProto;
typedef struct google_protobuf_ServiceDescriptorProto
    google_protobuf_ServiceDescriptorProto;

struct google_protobuf_FileDescriptorSet;
typedef struct google_protobuf_FileDescriptorSet
    google_protobuf_FileDescriptorSet;

struct google_protobuf_DescriptorProto_ExtensionRange;
typedef struct google_protobuf_DescriptorProto_ExtensionRange
    google_protobuf_DescriptorProto_ExtensionRange;

struct google_protobuf_FieldOptions;
typedef struct google_protobuf_FieldOptions
    google_protobuf_FieldOptions;

struct google_protobuf_FileOptions;
typedef struct google_protobuf_FileOptions
    google_protobuf_FileOptions;

struct google_protobuf_MessageOptions;
typedef struct google_protobuf_MessageOptions
    google_protobuf_MessageOptions;

struct google_protobuf_EnumOptions;
typedef struct google_protobuf_EnumOptions
    google_protobuf_EnumOptions;

struct google_protobuf_FieldDescriptorProto;
typedef struct google_protobuf_FieldDescriptorProto
    google_protobuf_FieldDescriptorProto;

struct google_protobuf_ServiceOptions;
typedef struct google_protobuf_ServiceOptions
    google_protobuf_ServiceOptions;

struct google_protobuf_MethodOptions;
typedef struct google_protobuf_MethodOptions
    google_protobuf_MethodOptions;

/* The message definitions themselves. */

struct google_protobuf_UninterpretedOption_NamePart {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool name_part:1;  /* = 1, required. */
      bool is_extension:1;  /* = 2, required. */
    } has;
  } set_flags;
  upb_strptr name_part;
  bool is_extension;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_UninterpretedOption_NamePart)

struct google_protobuf_DescriptorProto {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool name:1;  /* = 1, optional. */
      bool field:1;  /* = 2, repeated. */
      bool nested_type:1;  /* = 3, repeated. */
      bool enum_type:1;  /* = 4, repeated. */
      bool extension_range:1;  /* = 5, repeated. */
      bool extension:1;  /* = 6, repeated. */
      bool options:1;  /* = 7, optional. */
    } has;
  } set_flags;
  upb_strptr name;
  UPB_MSG_ARRAY(google_protobuf_FieldDescriptorProto)* field;
  UPB_MSG_ARRAY(google_protobuf_DescriptorProto)* nested_type;
  UPB_MSG_ARRAY(google_protobuf_EnumDescriptorProto)* enum_type;
  UPB_MSG_ARRAY(google_protobuf_DescriptorProto_ExtensionRange)* extension_range;
  UPB_MSG_ARRAY(google_protobuf_FieldDescriptorProto)* extension;
  google_protobuf_MessageOptions* options;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_DescriptorProto)

struct google_protobuf_EnumDescriptorProto {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool name:1;  /* = 1, optional. */
      bool value:1;  /* = 2, repeated. */
      bool options:1;  /* = 3, optional. */
    } has;
  } set_flags;
  upb_strptr name;
  UPB_MSG_ARRAY(google_protobuf_EnumValueDescriptorProto)* value;
  google_protobuf_EnumOptions* options;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_EnumDescriptorProto)

struct google_protobuf_UninterpretedOption {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool name:1;  /* = 2, repeated. */
      bool identifier_value:1;  /* = 3, optional. */
      bool positive_int_value:1;  /* = 4, optional. */
      bool negative_int_value:1;  /* = 5, optional. */
      bool double_value:1;  /* = 6, optional. */
      bool string_value:1;  /* = 7, optional. */
    } has;
  } set_flags;
  UPB_MSG_ARRAY(google_protobuf_UninterpretedOption_NamePart)* name;
  upb_strptr identifier_value;
  uint64_t positive_int_value;
  int64_t negative_int_value;
  double double_value;
  upb_strptr string_value;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_UninterpretedOption)

struct google_protobuf_FileDescriptorProto {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool name:1;  /* = 1, optional. */
      bool package:1;  /* = 2, optional. */
      bool dependency:1;  /* = 3, repeated. */
      bool message_type:1;  /* = 4, repeated. */
      bool enum_type:1;  /* = 5, repeated. */
      bool service:1;  /* = 6, repeated. */
      bool extension:1;  /* = 7, repeated. */
      bool options:1;  /* = 8, optional. */
    } has;
  } set_flags;
  upb_strptr name;
  upb_strptr package;
  upb_array* dependency;
  UPB_MSG_ARRAY(google_protobuf_DescriptorProto)* message_type;
  UPB_MSG_ARRAY(google_protobuf_EnumDescriptorProto)* enum_type;
  UPB_MSG_ARRAY(google_protobuf_ServiceDescriptorProto)* service;
  UPB_MSG_ARRAY(google_protobuf_FieldDescriptorProto)* extension;
  google_protobuf_FileOptions* options;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_FileDescriptorProto)

struct google_protobuf_MethodDescriptorProto {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool name:1;  /* = 1, optional. */
      bool input_type:1;  /* = 2, optional. */
      bool output_type:1;  /* = 3, optional. */
      bool options:1;  /* = 4, optional. */
    } has;
  } set_flags;
  upb_strptr name;
  upb_strptr input_type;
  upb_strptr output_type;
  google_protobuf_MethodOptions* options;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_MethodDescriptorProto)

struct google_protobuf_EnumValueOptions {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool uninterpreted_option:1;  /* = 999, repeated. */
    } has;
  } set_flags;
  UPB_MSG_ARRAY(google_protobuf_UninterpretedOption)* uninterpreted_option;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_EnumValueOptions)

struct google_protobuf_EnumValueDescriptorProto {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool name:1;  /* = 1, optional. */
      bool number:1;  /* = 2, optional. */
      bool options:1;  /* = 3, optional. */
    } has;
  } set_flags;
  upb_strptr name;
  int32_t number;
  google_protobuf_EnumValueOptions* options;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_EnumValueDescriptorProto)

struct google_protobuf_ServiceDescriptorProto {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool name:1;  /* = 1, optional. */
      bool method:1;  /* = 2, repeated. */
      bool options:1;  /* = 3, optional. */
    } has;
  } set_flags;
  upb_strptr name;
  UPB_MSG_ARRAY(google_protobuf_MethodDescriptorProto)* method;
  google_protobuf_ServiceOptions* options;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_ServiceDescriptorProto)

struct google_protobuf_FileDescriptorSet {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool file:1;  /* = 1, repeated. */
    } has;
  } set_flags;
  UPB_MSG_ARRAY(google_protobuf_FileDescriptorProto)* file;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_FileDescriptorSet)

struct google_protobuf_DescriptorProto_ExtensionRange {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool start:1;  /* = 1, optional. */
      bool end:1;  /* = 2, optional. */
    } has;
  } set_flags;
  int32_t start;
  int32_t end;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_DescriptorProto_ExtensionRange)

struct google_protobuf_FieldOptions {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool ctype:1;  /* = 1, optional. */
      bool packed:1;  /* = 2, optional. */
      bool deprecated:1;  /* = 3, optional. */
      bool experimental_map_key:1;  /* = 9, optional. */
      bool uninterpreted_option:1;  /* = 999, repeated. */
    } has;
  } set_flags;
  int32_t ctype;
  bool packed;
  bool deprecated;
  upb_strptr experimental_map_key;
  UPB_MSG_ARRAY(google_protobuf_UninterpretedOption)* uninterpreted_option;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_FieldOptions)

struct google_protobuf_FileOptions {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool java_package:1;  /* = 1, optional. */
      bool java_outer_classname:1;  /* = 8, optional. */
      bool optimize_for:1;  /* = 9, optional. */
      bool java_multiple_files:1;  /* = 10, optional. */
      bool uninterpreted_option:1;  /* = 999, repeated. */
    } has;
  } set_flags;
  upb_strptr java_package;
  upb_strptr java_outer_classname;
  int32_t optimize_for;
  bool java_multiple_files;
  UPB_MSG_ARRAY(google_protobuf_UninterpretedOption)* uninterpreted_option;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_FileOptions)

struct google_protobuf_MessageOptions {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool message_set_wire_format:1;  /* = 1, optional. */
      bool uninterpreted_option:1;  /* = 999, repeated. */
    } has;
  } set_flags;
  bool message_set_wire_format;
  UPB_MSG_ARRAY(google_protobuf_UninterpretedOption)* uninterpreted_option;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_MessageOptions)

struct google_protobuf_EnumOptions {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool uninterpreted_option:1;  /* = 999, repeated. */
    } has;
  } set_flags;
  UPB_MSG_ARRAY(google_protobuf_UninterpretedOption)* uninterpreted_option;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_EnumOptions)

struct google_protobuf_FieldDescriptorProto {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool name:1;  /* = 1, optional. */
      bool extendee:1;  /* = 2, optional. */
      bool number:1;  /* = 3, optional. */
      bool label:1;  /* = 4, optional. */
      bool type:1;  /* = 5, optional. */
      bool type_name:1;  /* = 6, optional. */
      bool default_value:1;  /* = 7, optional. */
      bool options:1;  /* = 8, optional. */
    } has;
  } set_flags;
  upb_strptr name;
  upb_strptr extendee;
  int32_t number;
  int32_t label;
  int32_t type;
  upb_strptr type_name;
  upb_strptr default_value;
  google_protobuf_FieldOptions* options;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_FieldDescriptorProto)

struct google_protobuf_ServiceOptions {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool uninterpreted_option:1;  /* = 999, repeated. */
    } has;
  } set_flags;
  UPB_MSG_ARRAY(google_protobuf_UninterpretedOption)* uninterpreted_option;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_ServiceOptions)

struct google_protobuf_MethodOptions {
  upb_data base;
  union {
    uint8_t bytes[1];
    struct {
      bool uninterpreted_option:1;  /* = 999, repeated. */
    } has;
  } set_flags;
  UPB_MSG_ARRAY(google_protobuf_UninterpretedOption)* uninterpreted_option;
};
UPB_DEFINE_MSG_ARRAY(google_protobuf_MethodOptions)

#ifdef __cplusplus
}  /* extern "C" */
#endif

#endif  /* DESCRIPTOR_DESCRIPTOR_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback