• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Generated by the protocol buffer compiler.  DO NOT EDIT!
2// source: google/protobuf/type.proto
3
4#import "GPBProtocolBuffers_RuntimeSupport.h"
5#import "google/protobuf/Type.pbobjc.h"
6#import "google/protobuf/Any.pbobjc.h"
7#import "google/protobuf/SourceContext.pbobjc.h"
8// @@protoc_insertion_point(imports)
9
10#pragma clang diagnostic push
11#pragma clang diagnostic ignored "-Wdeprecated-declarations"
12
13#pragma mark - GPBTypeRoot
14
15@implementation GPBTypeRoot
16
17+ (GPBExtensionRegistry*)extensionRegistry {
18  // This is called by +initialize so there is no need to worry
19  // about thread safety and initialization of registry.
20  static GPBExtensionRegistry* registry = nil;
21  if (!registry) {
22    GPBDebugCheckRuntimeVersion();
23    registry = [[GPBExtensionRegistry alloc] init];
24    [registry addExtensions:[GPBAnyRoot extensionRegistry]];
25    [registry addExtensions:[GPBSourceContextRoot extensionRegistry]];
26  }
27  return registry;
28}
29
30@end
31
32#pragma mark - GPBTypeRoot_FileDescriptor
33
34static GPBFileDescriptor *GPBTypeRoot_FileDescriptor(void) {
35  // This is called by +initialize so there is no need to worry
36  // about thread safety of the singleton.
37  static GPBFileDescriptor *descriptor = NULL;
38  if (!descriptor) {
39    GPBDebugCheckRuntimeVersion();
40    descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf"
41                                                     syntax:GPBFileSyntaxProto3];
42  }
43  return descriptor;
44}
45
46#pragma mark - Enum GPBSyntax
47
48GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void) {
49  static GPBEnumDescriptor *descriptor = NULL;
50  if (!descriptor) {
51    static const char *valueNames =
52        "SyntaxProto2\000SyntaxProto3\000";
53    static const int32_t values[] = {
54        GPBSyntax_SyntaxProto2,
55        GPBSyntax_SyntaxProto3,
56    };
57    GPBEnumDescriptor *worker =
58        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBSyntax)
59                                       valueNames:valueNames
60                                           values:values
61                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
62                                     enumVerifier:GPBSyntax_IsValidValue];
63    if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
64      [worker release];
65    }
66  }
67  return descriptor;
68}
69
70BOOL GPBSyntax_IsValidValue(int32_t value__) {
71  switch (value__) {
72    case GPBSyntax_SyntaxProto2:
73    case GPBSyntax_SyntaxProto3:
74      return YES;
75    default:
76      return NO;
77  }
78}
79
80#pragma mark - GPBType
81
82@implementation GPBType
83
84@dynamic name;
85@dynamic fieldsArray, fieldsArray_Count;
86@dynamic oneofsArray, oneofsArray_Count;
87@dynamic optionsArray, optionsArray_Count;
88@dynamic hasSourceContext, sourceContext;
89@dynamic syntax;
90
91typedef struct GPBType__storage_ {
92  uint32_t _has_storage_[1];
93  GPBSyntax syntax;
94  NSString *name;
95  NSMutableArray *fieldsArray;
96  NSMutableArray *oneofsArray;
97  NSMutableArray *optionsArray;
98  GPBSourceContext *sourceContext;
99} GPBType__storage_;
100
101// This method is threadsafe because it is initially called
102// in +initialize for each subclass.
103+ (GPBDescriptor *)descriptor {
104  static GPBDescriptor *descriptor = nil;
105  if (!descriptor) {
106    static GPBMessageFieldDescription fields[] = {
107      {
108        .name = "name",
109        .dataTypeSpecific.className = NULL,
110        .number = GPBType_FieldNumber_Name,
111        .hasIndex = 0,
112        .offset = (uint32_t)offsetof(GPBType__storage_, name),
113        .flags = GPBFieldOptional,
114        .dataType = GPBDataTypeString,
115      },
116      {
117        .name = "fieldsArray",
118        .dataTypeSpecific.className = GPBStringifySymbol(GPBField),
119        .number = GPBType_FieldNumber_FieldsArray,
120        .hasIndex = GPBNoHasBit,
121        .offset = (uint32_t)offsetof(GPBType__storage_, fieldsArray),
122        .flags = GPBFieldRepeated,
123        .dataType = GPBDataTypeMessage,
124      },
125      {
126        .name = "oneofsArray",
127        .dataTypeSpecific.className = NULL,
128        .number = GPBType_FieldNumber_OneofsArray,
129        .hasIndex = GPBNoHasBit,
130        .offset = (uint32_t)offsetof(GPBType__storage_, oneofsArray),
131        .flags = GPBFieldRepeated,
132        .dataType = GPBDataTypeString,
133      },
134      {
135        .name = "optionsArray",
136        .dataTypeSpecific.className = GPBStringifySymbol(GPBOption),
137        .number = GPBType_FieldNumber_OptionsArray,
138        .hasIndex = GPBNoHasBit,
139        .offset = (uint32_t)offsetof(GPBType__storage_, optionsArray),
140        .flags = GPBFieldRepeated,
141        .dataType = GPBDataTypeMessage,
142      },
143      {
144        .name = "sourceContext",
145        .dataTypeSpecific.className = GPBStringifySymbol(GPBSourceContext),
146        .number = GPBType_FieldNumber_SourceContext,
147        .hasIndex = 1,
148        .offset = (uint32_t)offsetof(GPBType__storage_, sourceContext),
149        .flags = GPBFieldOptional,
150        .dataType = GPBDataTypeMessage,
151      },
152      {
153        .name = "syntax",
154        .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor,
155        .number = GPBType_FieldNumber_Syntax,
156        .hasIndex = 2,
157        .offset = (uint32_t)offsetof(GPBType__storage_, syntax),
158        .flags = GPBFieldOptional | GPBFieldHasEnumDescriptor,
159        .dataType = GPBDataTypeEnum,
160      },
161    };
162    GPBDescriptor *localDescriptor =
163        [GPBDescriptor allocDescriptorForClass:[GPBType class]
164                                     rootClass:[GPBTypeRoot class]
165                                          file:GPBTypeRoot_FileDescriptor()
166                                        fields:fields
167                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
168                                   storageSize:sizeof(GPBType__storage_)
169                                         flags:0];
170    NSAssert(descriptor == nil, @"Startup recursed!");
171    descriptor = localDescriptor;
172  }
173  return descriptor;
174}
175
176@end
177
178int32_t GPBType_Syntax_RawValue(GPBType *message) {
179  GPBDescriptor *descriptor = [GPBType descriptor];
180  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBType_FieldNumber_Syntax];
181  return GPBGetMessageInt32Field(message, field);
182}
183
184void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value) {
185  GPBDescriptor *descriptor = [GPBType descriptor];
186  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBType_FieldNumber_Syntax];
187  GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
188}
189
190#pragma mark - GPBField
191
192@implementation GPBField
193
194@dynamic kind;
195@dynamic cardinality;
196@dynamic number;
197@dynamic name;
198@dynamic typeURL;
199@dynamic oneofIndex;
200@dynamic packed;
201@dynamic optionsArray, optionsArray_Count;
202@dynamic jsonName;
203@dynamic defaultValue;
204
205typedef struct GPBField__storage_ {
206  uint32_t _has_storage_[1];
207  GPBField_Kind kind;
208  GPBField_Cardinality cardinality;
209  int32_t number;
210  int32_t oneofIndex;
211  NSString *name;
212  NSString *typeURL;
213  NSMutableArray *optionsArray;
214  NSString *jsonName;
215  NSString *defaultValue;
216} GPBField__storage_;
217
218// This method is threadsafe because it is initially called
219// in +initialize for each subclass.
220+ (GPBDescriptor *)descriptor {
221  static GPBDescriptor *descriptor = nil;
222  if (!descriptor) {
223    static GPBMessageFieldDescription fields[] = {
224      {
225        .name = "kind",
226        .dataTypeSpecific.enumDescFunc = GPBField_Kind_EnumDescriptor,
227        .number = GPBField_FieldNumber_Kind,
228        .hasIndex = 0,
229        .offset = (uint32_t)offsetof(GPBField__storage_, kind),
230        .flags = GPBFieldOptional | GPBFieldHasEnumDescriptor,
231        .dataType = GPBDataTypeEnum,
232      },
233      {
234        .name = "cardinality",
235        .dataTypeSpecific.enumDescFunc = GPBField_Cardinality_EnumDescriptor,
236        .number = GPBField_FieldNumber_Cardinality,
237        .hasIndex = 1,
238        .offset = (uint32_t)offsetof(GPBField__storage_, cardinality),
239        .flags = GPBFieldOptional | GPBFieldHasEnumDescriptor,
240        .dataType = GPBDataTypeEnum,
241      },
242      {
243        .name = "number",
244        .dataTypeSpecific.className = NULL,
245        .number = GPBField_FieldNumber_Number,
246        .hasIndex = 2,
247        .offset = (uint32_t)offsetof(GPBField__storage_, number),
248        .flags = GPBFieldOptional,
249        .dataType = GPBDataTypeInt32,
250      },
251      {
252        .name = "name",
253        .dataTypeSpecific.className = NULL,
254        .number = GPBField_FieldNumber_Name,
255        .hasIndex = 3,
256        .offset = (uint32_t)offsetof(GPBField__storage_, name),
257        .flags = GPBFieldOptional,
258        .dataType = GPBDataTypeString,
259      },
260      {
261        .name = "typeURL",
262        .dataTypeSpecific.className = NULL,
263        .number = GPBField_FieldNumber_TypeURL,
264        .hasIndex = 4,
265        .offset = (uint32_t)offsetof(GPBField__storage_, typeURL),
266        .flags = GPBFieldOptional | GPBFieldTextFormatNameCustom,
267        .dataType = GPBDataTypeString,
268      },
269      {
270        .name = "oneofIndex",
271        .dataTypeSpecific.className = NULL,
272        .number = GPBField_FieldNumber_OneofIndex,
273        .hasIndex = 5,
274        .offset = (uint32_t)offsetof(GPBField__storage_, oneofIndex),
275        .flags = GPBFieldOptional,
276        .dataType = GPBDataTypeInt32,
277      },
278      {
279        .name = "packed",
280        .dataTypeSpecific.className = NULL,
281        .number = GPBField_FieldNumber_Packed,
282        .hasIndex = 6,
283        .offset = 7,  // Stored in _has_storage_ to save space.
284        .flags = GPBFieldOptional,
285        .dataType = GPBDataTypeBool,
286      },
287      {
288        .name = "optionsArray",
289        .dataTypeSpecific.className = GPBStringifySymbol(GPBOption),
290        .number = GPBField_FieldNumber_OptionsArray,
291        .hasIndex = GPBNoHasBit,
292        .offset = (uint32_t)offsetof(GPBField__storage_, optionsArray),
293        .flags = GPBFieldRepeated,
294        .dataType = GPBDataTypeMessage,
295      },
296      {
297        .name = "jsonName",
298        .dataTypeSpecific.className = NULL,
299        .number = GPBField_FieldNumber_JsonName,
300        .hasIndex = 8,
301        .offset = (uint32_t)offsetof(GPBField__storage_, jsonName),
302        .flags = GPBFieldOptional,
303        .dataType = GPBDataTypeString,
304      },
305      {
306        .name = "defaultValue",
307        .dataTypeSpecific.className = NULL,
308        .number = GPBField_FieldNumber_DefaultValue,
309        .hasIndex = 9,
310        .offset = (uint32_t)offsetof(GPBField__storage_, defaultValue),
311        .flags = GPBFieldOptional,
312        .dataType = GPBDataTypeString,
313      },
314    };
315    GPBDescriptor *localDescriptor =
316        [GPBDescriptor allocDescriptorForClass:[GPBField class]
317                                     rootClass:[GPBTypeRoot class]
318                                          file:GPBTypeRoot_FileDescriptor()
319                                        fields:fields
320                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
321                                   storageSize:sizeof(GPBField__storage_)
322                                         flags:0];
323#if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
324    static const char *extraTextFormatInfo =
325        "\001\006\004\241!!\000";
326    [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
327#endif  // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
328    NSAssert(descriptor == nil, @"Startup recursed!");
329    descriptor = localDescriptor;
330  }
331  return descriptor;
332}
333
334@end
335
336int32_t GPBField_Kind_RawValue(GPBField *message) {
337  GPBDescriptor *descriptor = [GPBField descriptor];
338  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Kind];
339  return GPBGetMessageInt32Field(message, field);
340}
341
342void SetGPBField_Kind_RawValue(GPBField *message, int32_t value) {
343  GPBDescriptor *descriptor = [GPBField descriptor];
344  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Kind];
345  GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
346}
347
348int32_t GPBField_Cardinality_RawValue(GPBField *message) {
349  GPBDescriptor *descriptor = [GPBField descriptor];
350  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Cardinality];
351  return GPBGetMessageInt32Field(message, field);
352}
353
354void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value) {
355  GPBDescriptor *descriptor = [GPBField descriptor];
356  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Cardinality];
357  GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
358}
359
360#pragma mark - Enum GPBField_Kind
361
362GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void) {
363  static GPBEnumDescriptor *descriptor = NULL;
364  if (!descriptor) {
365    static const char *valueNames =
366        "TypeUnknown\000TypeDouble\000TypeFloat\000TypeInt"
367        "64\000TypeUint64\000TypeInt32\000TypeFixed64\000Type"
368        "Fixed32\000TypeBool\000TypeString\000TypeGroup\000Ty"
369        "peMessage\000TypeBytes\000TypeUint32\000TypeEnum\000"
370        "TypeSfixed32\000TypeSfixed64\000TypeSint32\000Typ"
371        "eSint64\000";
372    static const int32_t values[] = {
373        GPBField_Kind_TypeUnknown,
374        GPBField_Kind_TypeDouble,
375        GPBField_Kind_TypeFloat,
376        GPBField_Kind_TypeInt64,
377        GPBField_Kind_TypeUint64,
378        GPBField_Kind_TypeInt32,
379        GPBField_Kind_TypeFixed64,
380        GPBField_Kind_TypeFixed32,
381        GPBField_Kind_TypeBool,
382        GPBField_Kind_TypeString,
383        GPBField_Kind_TypeGroup,
384        GPBField_Kind_TypeMessage,
385        GPBField_Kind_TypeBytes,
386        GPBField_Kind_TypeUint32,
387        GPBField_Kind_TypeEnum,
388        GPBField_Kind_TypeSfixed32,
389        GPBField_Kind_TypeSfixed64,
390        GPBField_Kind_TypeSint32,
391        GPBField_Kind_TypeSint64,
392    };
393    GPBEnumDescriptor *worker =
394        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBField_Kind)
395                                       valueNames:valueNames
396                                           values:values
397                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
398                                     enumVerifier:GPBField_Kind_IsValidValue];
399    if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
400      [worker release];
401    }
402  }
403  return descriptor;
404}
405
406BOOL GPBField_Kind_IsValidValue(int32_t value__) {
407  switch (value__) {
408    case GPBField_Kind_TypeUnknown:
409    case GPBField_Kind_TypeDouble:
410    case GPBField_Kind_TypeFloat:
411    case GPBField_Kind_TypeInt64:
412    case GPBField_Kind_TypeUint64:
413    case GPBField_Kind_TypeInt32:
414    case GPBField_Kind_TypeFixed64:
415    case GPBField_Kind_TypeFixed32:
416    case GPBField_Kind_TypeBool:
417    case GPBField_Kind_TypeString:
418    case GPBField_Kind_TypeGroup:
419    case GPBField_Kind_TypeMessage:
420    case GPBField_Kind_TypeBytes:
421    case GPBField_Kind_TypeUint32:
422    case GPBField_Kind_TypeEnum:
423    case GPBField_Kind_TypeSfixed32:
424    case GPBField_Kind_TypeSfixed64:
425    case GPBField_Kind_TypeSint32:
426    case GPBField_Kind_TypeSint64:
427      return YES;
428    default:
429      return NO;
430  }
431}
432
433#pragma mark - Enum GPBField_Cardinality
434
435GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void) {
436  static GPBEnumDescriptor *descriptor = NULL;
437  if (!descriptor) {
438    static const char *valueNames =
439        "CardinalityUnknown\000CardinalityOptional\000C"
440        "ardinalityRequired\000CardinalityRepeated\000";
441    static const int32_t values[] = {
442        GPBField_Cardinality_CardinalityUnknown,
443        GPBField_Cardinality_CardinalityOptional,
444        GPBField_Cardinality_CardinalityRequired,
445        GPBField_Cardinality_CardinalityRepeated,
446    };
447    GPBEnumDescriptor *worker =
448        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBField_Cardinality)
449                                       valueNames:valueNames
450                                           values:values
451                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
452                                     enumVerifier:GPBField_Cardinality_IsValidValue];
453    if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
454      [worker release];
455    }
456  }
457  return descriptor;
458}
459
460BOOL GPBField_Cardinality_IsValidValue(int32_t value__) {
461  switch (value__) {
462    case GPBField_Cardinality_CardinalityUnknown:
463    case GPBField_Cardinality_CardinalityOptional:
464    case GPBField_Cardinality_CardinalityRequired:
465    case GPBField_Cardinality_CardinalityRepeated:
466      return YES;
467    default:
468      return NO;
469  }
470}
471
472#pragma mark - GPBEnum
473
474@implementation GPBEnum
475
476@dynamic name;
477@dynamic enumvalueArray, enumvalueArray_Count;
478@dynamic optionsArray, optionsArray_Count;
479@dynamic hasSourceContext, sourceContext;
480@dynamic syntax;
481
482typedef struct GPBEnum__storage_ {
483  uint32_t _has_storage_[1];
484  GPBSyntax syntax;
485  NSString *name;
486  NSMutableArray *enumvalueArray;
487  NSMutableArray *optionsArray;
488  GPBSourceContext *sourceContext;
489} GPBEnum__storage_;
490
491// This method is threadsafe because it is initially called
492// in +initialize for each subclass.
493+ (GPBDescriptor *)descriptor {
494  static GPBDescriptor *descriptor = nil;
495  if (!descriptor) {
496    static GPBMessageFieldDescription fields[] = {
497      {
498        .name = "name",
499        .dataTypeSpecific.className = NULL,
500        .number = GPBEnum_FieldNumber_Name,
501        .hasIndex = 0,
502        .offset = (uint32_t)offsetof(GPBEnum__storage_, name),
503        .flags = GPBFieldOptional,
504        .dataType = GPBDataTypeString,
505      },
506      {
507        .name = "enumvalueArray",
508        .dataTypeSpecific.className = GPBStringifySymbol(GPBEnumValue),
509        .number = GPBEnum_FieldNumber_EnumvalueArray,
510        .hasIndex = GPBNoHasBit,
511        .offset = (uint32_t)offsetof(GPBEnum__storage_, enumvalueArray),
512        .flags = GPBFieldRepeated,
513        .dataType = GPBDataTypeMessage,
514      },
515      {
516        .name = "optionsArray",
517        .dataTypeSpecific.className = GPBStringifySymbol(GPBOption),
518        .number = GPBEnum_FieldNumber_OptionsArray,
519        .hasIndex = GPBNoHasBit,
520        .offset = (uint32_t)offsetof(GPBEnum__storage_, optionsArray),
521        .flags = GPBFieldRepeated,
522        .dataType = GPBDataTypeMessage,
523      },
524      {
525        .name = "sourceContext",
526        .dataTypeSpecific.className = GPBStringifySymbol(GPBSourceContext),
527        .number = GPBEnum_FieldNumber_SourceContext,
528        .hasIndex = 1,
529        .offset = (uint32_t)offsetof(GPBEnum__storage_, sourceContext),
530        .flags = GPBFieldOptional,
531        .dataType = GPBDataTypeMessage,
532      },
533      {
534        .name = "syntax",
535        .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor,
536        .number = GPBEnum_FieldNumber_Syntax,
537        .hasIndex = 2,
538        .offset = (uint32_t)offsetof(GPBEnum__storage_, syntax),
539        .flags = GPBFieldOptional | GPBFieldHasEnumDescriptor,
540        .dataType = GPBDataTypeEnum,
541      },
542    };
543    GPBDescriptor *localDescriptor =
544        [GPBDescriptor allocDescriptorForClass:[GPBEnum class]
545                                     rootClass:[GPBTypeRoot class]
546                                          file:GPBTypeRoot_FileDescriptor()
547                                        fields:fields
548                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
549                                   storageSize:sizeof(GPBEnum__storage_)
550                                         flags:0];
551    NSAssert(descriptor == nil, @"Startup recursed!");
552    descriptor = localDescriptor;
553  }
554  return descriptor;
555}
556
557@end
558
559int32_t GPBEnum_Syntax_RawValue(GPBEnum *message) {
560  GPBDescriptor *descriptor = [GPBEnum descriptor];
561  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBEnum_FieldNumber_Syntax];
562  return GPBGetMessageInt32Field(message, field);
563}
564
565void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value) {
566  GPBDescriptor *descriptor = [GPBEnum descriptor];
567  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBEnum_FieldNumber_Syntax];
568  GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
569}
570
571#pragma mark - GPBEnumValue
572
573@implementation GPBEnumValue
574
575@dynamic name;
576@dynamic number;
577@dynamic optionsArray, optionsArray_Count;
578
579typedef struct GPBEnumValue__storage_ {
580  uint32_t _has_storage_[1];
581  int32_t number;
582  NSString *name;
583  NSMutableArray *optionsArray;
584} GPBEnumValue__storage_;
585
586// This method is threadsafe because it is initially called
587// in +initialize for each subclass.
588+ (GPBDescriptor *)descriptor {
589  static GPBDescriptor *descriptor = nil;
590  if (!descriptor) {
591    static GPBMessageFieldDescription fields[] = {
592      {
593        .name = "name",
594        .dataTypeSpecific.className = NULL,
595        .number = GPBEnumValue_FieldNumber_Name,
596        .hasIndex = 0,
597        .offset = (uint32_t)offsetof(GPBEnumValue__storage_, name),
598        .flags = GPBFieldOptional,
599        .dataType = GPBDataTypeString,
600      },
601      {
602        .name = "number",
603        .dataTypeSpecific.className = NULL,
604        .number = GPBEnumValue_FieldNumber_Number,
605        .hasIndex = 1,
606        .offset = (uint32_t)offsetof(GPBEnumValue__storage_, number),
607        .flags = GPBFieldOptional,
608        .dataType = GPBDataTypeInt32,
609      },
610      {
611        .name = "optionsArray",
612        .dataTypeSpecific.className = GPBStringifySymbol(GPBOption),
613        .number = GPBEnumValue_FieldNumber_OptionsArray,
614        .hasIndex = GPBNoHasBit,
615        .offset = (uint32_t)offsetof(GPBEnumValue__storage_, optionsArray),
616        .flags = GPBFieldRepeated,
617        .dataType = GPBDataTypeMessage,
618      },
619    };
620    GPBDescriptor *localDescriptor =
621        [GPBDescriptor allocDescriptorForClass:[GPBEnumValue class]
622                                     rootClass:[GPBTypeRoot class]
623                                          file:GPBTypeRoot_FileDescriptor()
624                                        fields:fields
625                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
626                                   storageSize:sizeof(GPBEnumValue__storage_)
627                                         flags:0];
628    NSAssert(descriptor == nil, @"Startup recursed!");
629    descriptor = localDescriptor;
630  }
631  return descriptor;
632}
633
634@end
635
636#pragma mark - GPBOption
637
638@implementation GPBOption
639
640@dynamic name;
641@dynamic hasValue, value;
642
643typedef struct GPBOption__storage_ {
644  uint32_t _has_storage_[1];
645  NSString *name;
646  GPBAny *value;
647} GPBOption__storage_;
648
649// This method is threadsafe because it is initially called
650// in +initialize for each subclass.
651+ (GPBDescriptor *)descriptor {
652  static GPBDescriptor *descriptor = nil;
653  if (!descriptor) {
654    static GPBMessageFieldDescription fields[] = {
655      {
656        .name = "name",
657        .dataTypeSpecific.className = NULL,
658        .number = GPBOption_FieldNumber_Name,
659        .hasIndex = 0,
660        .offset = (uint32_t)offsetof(GPBOption__storage_, name),
661        .flags = GPBFieldOptional,
662        .dataType = GPBDataTypeString,
663      },
664      {
665        .name = "value",
666        .dataTypeSpecific.className = GPBStringifySymbol(GPBAny),
667        .number = GPBOption_FieldNumber_Value,
668        .hasIndex = 1,
669        .offset = (uint32_t)offsetof(GPBOption__storage_, value),
670        .flags = GPBFieldOptional,
671        .dataType = GPBDataTypeMessage,
672      },
673    };
674    GPBDescriptor *localDescriptor =
675        [GPBDescriptor allocDescriptorForClass:[GPBOption class]
676                                     rootClass:[GPBTypeRoot class]
677                                          file:GPBTypeRoot_FileDescriptor()
678                                        fields:fields
679                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
680                                   storageSize:sizeof(GPBOption__storage_)
681                                         flags:0];
682    NSAssert(descriptor == nil, @"Startup recursed!");
683    descriptor = localDescriptor;
684  }
685  return descriptor;
686}
687
688@end
689
690
691#pragma clang diagnostic pop
692
693// @@protoc_insertion_point(global_scope)
694