Api.pbobjc.m 12 KB

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