• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Generated by the protocol buffer compiler.  DO NOT EDIT!
2// source: google/protobuf/api.proto
3
4// This CPP symbol can be defined to use imports that match up to the framework
5// imports needed when using CocoaPods.
6#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
7 #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
8#endif
9
10#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
11 #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
12#else
13 #import "GPBProtocolBuffers_RuntimeSupport.h"
14#endif
15
16#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
17 #import <Protobuf/GPBApi.pbobjc.h>
18 #import <Protobuf/GPBSourceContext.pbobjc.h>
19 #import <Protobuf/GPBType.pbobjc.h>
20#else
21 #import "GPBApi.pbobjc.h"
22 #import "GPBSourceContext.pbobjc.h"
23 #import "GPBType.pbobjc.h"
24#endif
25// @@protoc_insertion_point(imports)
26
27#pragma clang diagnostic push
28#pragma clang diagnostic ignored "-Wdeprecated-declarations"
29#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
30
31#pragma mark - Objective C Class declarations
32// Forward declarations of Objective C classes that we can use as
33// static values in struct initializers.
34// We don't use [Foo class] because it is not a static value.
35GPBObjCClassDeclaration(GPBMethod);
36GPBObjCClassDeclaration(GPBMixin);
37GPBObjCClassDeclaration(GPBOption);
38GPBObjCClassDeclaration(GPBSourceContext);
39
40#pragma mark - GPBApiRoot
41
42@implementation GPBApiRoot
43
44// No extensions in the file and none of the imports (direct or indirect)
45// defined extensions, so no need to generate +extensionRegistry.
46
47@end
48
49#pragma mark - GPBApiRoot_FileDescriptor
50
51static GPBFileDescriptor *GPBApiRoot_FileDescriptor(void) {
52  // This is called by +initialize so there is no need to worry
53  // about thread safety of the singleton.
54  static GPBFileDescriptor *descriptor = NULL;
55  if (!descriptor) {
56    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
57    descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf"
58                                                 objcPrefix:@"GPB"
59                                                     syntax:GPBFileSyntaxProto3];
60  }
61  return descriptor;
62}
63
64#pragma mark - GPBApi
65
66@implementation GPBApi
67
68@dynamic name;
69@dynamic methodsArray, methodsArray_Count;
70@dynamic optionsArray, optionsArray_Count;
71@dynamic version;
72@dynamic hasSourceContext, sourceContext;
73@dynamic mixinsArray, mixinsArray_Count;
74@dynamic syntax;
75
76typedef struct GPBApi__storage_ {
77  uint32_t _has_storage_[1];
78  GPBSyntax syntax;
79  NSString *name;
80  NSMutableArray *methodsArray;
81  NSMutableArray *optionsArray;
82  NSString *version;
83  GPBSourceContext *sourceContext;
84  NSMutableArray *mixinsArray;
85} GPBApi__storage_;
86
87// This method is threadsafe because it is initially called
88// in +initialize for each subclass.
89+ (GPBDescriptor *)descriptor {
90  static GPBDescriptor *descriptor = nil;
91  if (!descriptor) {
92    static GPBMessageFieldDescription fields[] = {
93      {
94        .name = "name",
95        .dataTypeSpecific.clazz = Nil,
96        .number = GPBApi_FieldNumber_Name,
97        .hasIndex = 0,
98        .offset = (uint32_t)offsetof(GPBApi__storage_, name),
99        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
100        .dataType = GPBDataTypeString,
101      },
102      {
103        .name = "methodsArray",
104        .dataTypeSpecific.clazz = GPBObjCClass(GPBMethod),
105        .number = GPBApi_FieldNumber_MethodsArray,
106        .hasIndex = GPBNoHasBit,
107        .offset = (uint32_t)offsetof(GPBApi__storage_, methodsArray),
108        .flags = GPBFieldRepeated,
109        .dataType = GPBDataTypeMessage,
110      },
111      {
112        .name = "optionsArray",
113        .dataTypeSpecific.clazz = GPBObjCClass(GPBOption),
114        .number = GPBApi_FieldNumber_OptionsArray,
115        .hasIndex = GPBNoHasBit,
116        .offset = (uint32_t)offsetof(GPBApi__storage_, optionsArray),
117        .flags = GPBFieldRepeated,
118        .dataType = GPBDataTypeMessage,
119      },
120      {
121        .name = "version",
122        .dataTypeSpecific.clazz = Nil,
123        .number = GPBApi_FieldNumber_Version,
124        .hasIndex = 1,
125        .offset = (uint32_t)offsetof(GPBApi__storage_, version),
126        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
127        .dataType = GPBDataTypeString,
128      },
129      {
130        .name = "sourceContext",
131        .dataTypeSpecific.clazz = GPBObjCClass(GPBSourceContext),
132        .number = GPBApi_FieldNumber_SourceContext,
133        .hasIndex = 2,
134        .offset = (uint32_t)offsetof(GPBApi__storage_, sourceContext),
135        .flags = GPBFieldOptional,
136        .dataType = GPBDataTypeMessage,
137      },
138      {
139        .name = "mixinsArray",
140        .dataTypeSpecific.clazz = GPBObjCClass(GPBMixin),
141        .number = GPBApi_FieldNumber_MixinsArray,
142        .hasIndex = GPBNoHasBit,
143        .offset = (uint32_t)offsetof(GPBApi__storage_, mixinsArray),
144        .flags = GPBFieldRepeated,
145        .dataType = GPBDataTypeMessage,
146      },
147      {
148        .name = "syntax",
149        .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor,
150        .number = GPBApi_FieldNumber_Syntax,
151        .hasIndex = 3,
152        .offset = (uint32_t)offsetof(GPBApi__storage_, syntax),
153        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
154        .dataType = GPBDataTypeEnum,
155      },
156    };
157    GPBDescriptor *localDescriptor =
158        [GPBDescriptor allocDescriptorForClass:[GPBApi class]
159                                     rootClass:[GPBApiRoot class]
160                                          file:GPBApiRoot_FileDescriptor()
161                                        fields:fields
162                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
163                                   storageSize:sizeof(GPBApi__storage_)
164                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)];
165    #if defined(DEBUG) && DEBUG
166      NSAssert(descriptor == nil, @"Startup recursed!");
167    #endif  // DEBUG
168    descriptor = localDescriptor;
169  }
170  return descriptor;
171}
172
173@end
174
175int32_t GPBApi_Syntax_RawValue(GPBApi *message) {
176  GPBDescriptor *descriptor = [GPBApi descriptor];
177  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBApi_FieldNumber_Syntax];
178  return GPBGetMessageRawEnumField(message, field);
179}
180
181void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value) {
182  GPBDescriptor *descriptor = [GPBApi descriptor];
183  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBApi_FieldNumber_Syntax];
184  GPBSetMessageRawEnumField(message, field, value);
185}
186
187#pragma mark - GPBMethod
188
189@implementation GPBMethod
190
191@dynamic name;
192@dynamic requestTypeURL;
193@dynamic requestStreaming;
194@dynamic responseTypeURL;
195@dynamic responseStreaming;
196@dynamic optionsArray, optionsArray_Count;
197@dynamic syntax;
198
199typedef struct GPBMethod__storage_ {
200  uint32_t _has_storage_[1];
201  GPBSyntax syntax;
202  NSString *name;
203  NSString *requestTypeURL;
204  NSString *responseTypeURL;
205  NSMutableArray *optionsArray;
206} GPBMethod__storage_;
207
208// This method is threadsafe because it is initially called
209// in +initialize for each subclass.
210+ (GPBDescriptor *)descriptor {
211  static GPBDescriptor *descriptor = nil;
212  if (!descriptor) {
213    static GPBMessageFieldDescription fields[] = {
214      {
215        .name = "name",
216        .dataTypeSpecific.clazz = Nil,
217        .number = GPBMethod_FieldNumber_Name,
218        .hasIndex = 0,
219        .offset = (uint32_t)offsetof(GPBMethod__storage_, name),
220        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
221        .dataType = GPBDataTypeString,
222      },
223      {
224        .name = "requestTypeURL",
225        .dataTypeSpecific.clazz = Nil,
226        .number = GPBMethod_FieldNumber_RequestTypeURL,
227        .hasIndex = 1,
228        .offset = (uint32_t)offsetof(GPBMethod__storage_, requestTypeURL),
229        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom | GPBFieldClearHasIvarOnZero),
230        .dataType = GPBDataTypeString,
231      },
232      {
233        .name = "requestStreaming",
234        .dataTypeSpecific.clazz = Nil,
235        .number = GPBMethod_FieldNumber_RequestStreaming,
236        .hasIndex = 2,
237        .offset = 3,  // Stored in _has_storage_ to save space.
238        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
239        .dataType = GPBDataTypeBool,
240      },
241      {
242        .name = "responseTypeURL",
243        .dataTypeSpecific.clazz = Nil,
244        .number = GPBMethod_FieldNumber_ResponseTypeURL,
245        .hasIndex = 4,
246        .offset = (uint32_t)offsetof(GPBMethod__storage_, responseTypeURL),
247        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom | GPBFieldClearHasIvarOnZero),
248        .dataType = GPBDataTypeString,
249      },
250      {
251        .name = "responseStreaming",
252        .dataTypeSpecific.clazz = Nil,
253        .number = GPBMethod_FieldNumber_ResponseStreaming,
254        .hasIndex = 5,
255        .offset = 6,  // Stored in _has_storage_ to save space.
256        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
257        .dataType = GPBDataTypeBool,
258      },
259      {
260        .name = "optionsArray",
261        .dataTypeSpecific.clazz = GPBObjCClass(GPBOption),
262        .number = GPBMethod_FieldNumber_OptionsArray,
263        .hasIndex = GPBNoHasBit,
264        .offset = (uint32_t)offsetof(GPBMethod__storage_, optionsArray),
265        .flags = GPBFieldRepeated,
266        .dataType = GPBDataTypeMessage,
267      },
268      {
269        .name = "syntax",
270        .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor,
271        .number = GPBMethod_FieldNumber_Syntax,
272        .hasIndex = 7,
273        .offset = (uint32_t)offsetof(GPBMethod__storage_, syntax),
274        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
275        .dataType = GPBDataTypeEnum,
276      },
277    };
278    GPBDescriptor *localDescriptor =
279        [GPBDescriptor allocDescriptorForClass:[GPBMethod class]
280                                     rootClass:[GPBApiRoot class]
281                                          file:GPBApiRoot_FileDescriptor()
282                                        fields:fields
283                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
284                                   storageSize:sizeof(GPBMethod__storage_)
285                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)];
286#if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
287    static const char *extraTextFormatInfo =
288        "\002\002\007\244\241!!\000\004\010\244\241!!\000";
289    [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
290#endif  // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
291    #if defined(DEBUG) && DEBUG
292      NSAssert(descriptor == nil, @"Startup recursed!");
293    #endif  // DEBUG
294    descriptor = localDescriptor;
295  }
296  return descriptor;
297}
298
299@end
300
301int32_t GPBMethod_Syntax_RawValue(GPBMethod *message) {
302  GPBDescriptor *descriptor = [GPBMethod descriptor];
303  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBMethod_FieldNumber_Syntax];
304  return GPBGetMessageRawEnumField(message, field);
305}
306
307void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value) {
308  GPBDescriptor *descriptor = [GPBMethod descriptor];
309  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBMethod_FieldNumber_Syntax];
310  GPBSetMessageRawEnumField(message, field, value);
311}
312
313#pragma mark - GPBMixin
314
315@implementation GPBMixin
316
317@dynamic name;
318@dynamic root;
319
320typedef struct GPBMixin__storage_ {
321  uint32_t _has_storage_[1];
322  NSString *name;
323  NSString *root;
324} GPBMixin__storage_;
325
326// This method is threadsafe because it is initially called
327// in +initialize for each subclass.
328+ (GPBDescriptor *)descriptor {
329  static GPBDescriptor *descriptor = nil;
330  if (!descriptor) {
331    static GPBMessageFieldDescription fields[] = {
332      {
333        .name = "name",
334        .dataTypeSpecific.clazz = Nil,
335        .number = GPBMixin_FieldNumber_Name,
336        .hasIndex = 0,
337        .offset = (uint32_t)offsetof(GPBMixin__storage_, name),
338        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
339        .dataType = GPBDataTypeString,
340      },
341      {
342        .name = "root",
343        .dataTypeSpecific.clazz = Nil,
344        .number = GPBMixin_FieldNumber_Root,
345        .hasIndex = 1,
346        .offset = (uint32_t)offsetof(GPBMixin__storage_, root),
347        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
348        .dataType = GPBDataTypeString,
349      },
350    };
351    GPBDescriptor *localDescriptor =
352        [GPBDescriptor allocDescriptorForClass:[GPBMixin class]
353                                     rootClass:[GPBApiRoot class]
354                                          file:GPBApiRoot_FileDescriptor()
355                                        fields:fields
356                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
357                                   storageSize:sizeof(GPBMixin__storage_)
358                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)];
359    #if defined(DEBUG) && DEBUG
360      NSAssert(descriptor == nil, @"Startup recursed!");
361    #endif  // DEBUG
362    descriptor = localDescriptor;
363  }
364  return descriptor;
365}
366
367@end
368
369
370#pragma clang diagnostic pop
371
372// @@protoc_insertion_point(global_scope)
373