HTTP.pbobjc.m 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: google/api/http.proto
  18. // This CPP symbol can be defined to use imports that match up to the framework
  19. // imports needed when using CocoaPods.
  20. #if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
  21. #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
  22. #endif
  23. #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
  24. #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
  25. #else
  26. #import "GPBProtocolBuffers_RuntimeSupport.h"
  27. #endif
  28. #import "HTTP.pbobjc.h"
  29. // @@protoc_insertion_point(imports)
  30. #pragma clang diagnostic push
  31. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  32. #pragma clang diagnostic ignored "-Wdirect-ivar-access"
  33. #pragma mark - GAPIHTTPRoot
  34. @implementation GAPIHTTPRoot
  35. // No extensions in the file and no imports, so no need to generate
  36. // +extensionRegistry.
  37. @end
  38. #pragma mark - GAPIHTTPRoot_FileDescriptor
  39. static GPBFileDescriptor *GAPIHTTPRoot_FileDescriptor(void) {
  40. // This is called by +initialize so there is no need to worry
  41. // about thread safety of the singleton.
  42. static GPBFileDescriptor *descriptor = NULL;
  43. if (!descriptor) {
  44. GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
  45. descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.api"
  46. objcPrefix:@"GAPI"
  47. syntax:GPBFileSyntaxProto3];
  48. }
  49. return descriptor;
  50. }
  51. #pragma mark - GAPIHttp
  52. @implementation GAPIHttp
  53. @dynamic rulesArray, rulesArray_Count;
  54. typedef struct GAPIHttp__storage_ {
  55. uint32_t _has_storage_[1];
  56. NSMutableArray *rulesArray;
  57. } GAPIHttp__storage_;
  58. // This method is threadsafe because it is initially called
  59. // in +initialize for each subclass.
  60. + (GPBDescriptor *)descriptor {
  61. static GPBDescriptor *descriptor = nil;
  62. if (!descriptor) {
  63. static GPBMessageFieldDescription fields[] = {
  64. {
  65. .name = "rulesArray",
  66. .dataTypeSpecific.className = GPBStringifySymbol(GAPIHttpRule),
  67. .number = GAPIHttp_FieldNumber_RulesArray,
  68. .hasIndex = GPBNoHasBit,
  69. .offset = (uint32_t)offsetof(GAPIHttp__storage_, rulesArray),
  70. .flags = GPBFieldRepeated,
  71. .dataType = GPBDataTypeMessage,
  72. },
  73. };
  74. GPBDescriptor *localDescriptor =
  75. [GPBDescriptor allocDescriptorForClass:[GAPIHttp class]
  76. rootClass:[GAPIHTTPRoot class]
  77. file:GAPIHTTPRoot_FileDescriptor()
  78. fields:fields
  79. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  80. storageSize:sizeof(GAPIHttp__storage_)
  81. flags:GPBDescriptorInitializationFlag_None];
  82. NSAssert(descriptor == nil, @"Startup recursed!");
  83. descriptor = localDescriptor;
  84. }
  85. return descriptor;
  86. }
  87. @end
  88. #pragma mark - GAPIHttpRule
  89. @implementation GAPIHttpRule
  90. @dynamic patternOneOfCase;
  91. @dynamic selector;
  92. @dynamic get;
  93. @dynamic put;
  94. @dynamic post;
  95. @dynamic delete_p;
  96. @dynamic patch;
  97. @dynamic custom;
  98. @dynamic body;
  99. @dynamic additionalBindingsArray, additionalBindingsArray_Count;
  100. typedef struct GAPIHttpRule__storage_ {
  101. uint32_t _has_storage_[2];
  102. NSString *selector;
  103. NSString *get;
  104. NSString *put;
  105. NSString *post;
  106. NSString *delete_p;
  107. NSString *patch;
  108. NSString *body;
  109. GAPICustomHttpPattern *custom;
  110. NSMutableArray *additionalBindingsArray;
  111. } GAPIHttpRule__storage_;
  112. // This method is threadsafe because it is initially called
  113. // in +initialize for each subclass.
  114. + (GPBDescriptor *)descriptor {
  115. static GPBDescriptor *descriptor = nil;
  116. if (!descriptor) {
  117. static GPBMessageFieldDescription fields[] = {
  118. {
  119. .name = "selector",
  120. .dataTypeSpecific.className = NULL,
  121. .number = GAPIHttpRule_FieldNumber_Selector,
  122. .hasIndex = 0,
  123. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, selector),
  124. .flags = GPBFieldOptional,
  125. .dataType = GPBDataTypeString,
  126. },
  127. {
  128. .name = "get",
  129. .dataTypeSpecific.className = NULL,
  130. .number = GAPIHttpRule_FieldNumber_Get,
  131. .hasIndex = -1,
  132. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, get),
  133. .flags = GPBFieldOptional,
  134. .dataType = GPBDataTypeString,
  135. },
  136. {
  137. .name = "put",
  138. .dataTypeSpecific.className = NULL,
  139. .number = GAPIHttpRule_FieldNumber_Put,
  140. .hasIndex = -1,
  141. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, put),
  142. .flags = GPBFieldOptional,
  143. .dataType = GPBDataTypeString,
  144. },
  145. {
  146. .name = "post",
  147. .dataTypeSpecific.className = NULL,
  148. .number = GAPIHttpRule_FieldNumber_Post,
  149. .hasIndex = -1,
  150. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, post),
  151. .flags = GPBFieldOptional,
  152. .dataType = GPBDataTypeString,
  153. },
  154. {
  155. .name = "delete_p",
  156. .dataTypeSpecific.className = NULL,
  157. .number = GAPIHttpRule_FieldNumber_Delete_p,
  158. .hasIndex = -1,
  159. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, delete_p),
  160. .flags = GPBFieldOptional,
  161. .dataType = GPBDataTypeString,
  162. },
  163. {
  164. .name = "patch",
  165. .dataTypeSpecific.className = NULL,
  166. .number = GAPIHttpRule_FieldNumber_Patch,
  167. .hasIndex = -1,
  168. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, patch),
  169. .flags = GPBFieldOptional,
  170. .dataType = GPBDataTypeString,
  171. },
  172. {
  173. .name = "body",
  174. .dataTypeSpecific.className = NULL,
  175. .number = GAPIHttpRule_FieldNumber_Body,
  176. .hasIndex = 1,
  177. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, body),
  178. .flags = GPBFieldOptional,
  179. .dataType = GPBDataTypeString,
  180. },
  181. {
  182. .name = "custom",
  183. .dataTypeSpecific.className = GPBStringifySymbol(GAPICustomHttpPattern),
  184. .number = GAPIHttpRule_FieldNumber_Custom,
  185. .hasIndex = -1,
  186. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, custom),
  187. .flags = GPBFieldOptional,
  188. .dataType = GPBDataTypeMessage,
  189. },
  190. {
  191. .name = "additionalBindingsArray",
  192. .dataTypeSpecific.className = GPBStringifySymbol(GAPIHttpRule),
  193. .number = GAPIHttpRule_FieldNumber_AdditionalBindingsArray,
  194. .hasIndex = GPBNoHasBit,
  195. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, additionalBindingsArray),
  196. .flags = GPBFieldRepeated,
  197. .dataType = GPBDataTypeMessage,
  198. },
  199. };
  200. GPBDescriptor *localDescriptor =
  201. [GPBDescriptor allocDescriptorForClass:[GAPIHttpRule class]
  202. rootClass:[GAPIHTTPRoot class]
  203. file:GAPIHTTPRoot_FileDescriptor()
  204. fields:fields
  205. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  206. storageSize:sizeof(GAPIHttpRule__storage_)
  207. flags:GPBDescriptorInitializationFlag_None];
  208. static const char *oneofs[] = {
  209. "pattern",
  210. };
  211. [localDescriptor setupOneofs:oneofs
  212. count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
  213. firstHasIndex:-1];
  214. NSAssert(descriptor == nil, @"Startup recursed!");
  215. descriptor = localDescriptor;
  216. }
  217. return descriptor;
  218. }
  219. @end
  220. void GAPIHttpRule_ClearPatternOneOfCase(GAPIHttpRule *message) {
  221. GPBDescriptor *descriptor = [message descriptor];
  222. GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  223. GPBMaybeClearOneof(message, oneof, -1, 0);
  224. }
  225. #pragma mark - GAPICustomHttpPattern
  226. @implementation GAPICustomHttpPattern
  227. @dynamic kind;
  228. @dynamic path;
  229. typedef struct GAPICustomHttpPattern__storage_ {
  230. uint32_t _has_storage_[1];
  231. NSString *kind;
  232. NSString *path;
  233. } GAPICustomHttpPattern__storage_;
  234. // This method is threadsafe because it is initially called
  235. // in +initialize for each subclass.
  236. + (GPBDescriptor *)descriptor {
  237. static GPBDescriptor *descriptor = nil;
  238. if (!descriptor) {
  239. static GPBMessageFieldDescription fields[] = {
  240. {
  241. .name = "kind",
  242. .dataTypeSpecific.className = NULL,
  243. .number = GAPICustomHttpPattern_FieldNumber_Kind,
  244. .hasIndex = 0,
  245. .offset = (uint32_t)offsetof(GAPICustomHttpPattern__storage_, kind),
  246. .flags = GPBFieldOptional,
  247. .dataType = GPBDataTypeString,
  248. },
  249. {
  250. .name = "path",
  251. .dataTypeSpecific.className = NULL,
  252. .number = GAPICustomHttpPattern_FieldNumber_Path,
  253. .hasIndex = 1,
  254. .offset = (uint32_t)offsetof(GAPICustomHttpPattern__storage_, path),
  255. .flags = GPBFieldOptional,
  256. .dataType = GPBDataTypeString,
  257. },
  258. };
  259. GPBDescriptor *localDescriptor =
  260. [GPBDescriptor allocDescriptorForClass:[GAPICustomHttpPattern class]
  261. rootClass:[GAPIHTTPRoot class]
  262. file:GAPIHTTPRoot_FileDescriptor()
  263. fields:fields
  264. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  265. storageSize:sizeof(GAPICustomHttpPattern__storage_)
  266. flags:GPBDescriptorInitializationFlag_None];
  267. NSAssert(descriptor == nil, @"Startup recursed!");
  268. descriptor = localDescriptor;
  269. }
  270. return descriptor;
  271. }
  272. @end
  273. #pragma clang diagnostic pop
  274. // @@protoc_insertion_point(global_scope)