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