HTTP.pbobjc.m 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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. @dynamic fullyDecodeReservedExpansion;
  55. typedef struct GAPIHttp__storage_ {
  56. uint32_t _has_storage_[1];
  57. NSMutableArray *rulesArray;
  58. } GAPIHttp__storage_;
  59. // This method is threadsafe because it is initially called
  60. // in +initialize for each subclass.
  61. + (GPBDescriptor *)descriptor {
  62. static GPBDescriptor *descriptor = nil;
  63. if (!descriptor) {
  64. static GPBMessageFieldDescription fields[] = {
  65. {
  66. .name = "rulesArray",
  67. .dataTypeSpecific.className = GPBStringifySymbol(GAPIHttpRule),
  68. .number = GAPIHttp_FieldNumber_RulesArray,
  69. .hasIndex = GPBNoHasBit,
  70. .offset = (uint32_t)offsetof(GAPIHttp__storage_, rulesArray),
  71. .flags = GPBFieldRepeated,
  72. .dataType = GPBDataTypeMessage,
  73. },
  74. {
  75. .name = "fullyDecodeReservedExpansion",
  76. .dataTypeSpecific.className = NULL,
  77. .number = GAPIHttp_FieldNumber_FullyDecodeReservedExpansion,
  78. .hasIndex = 0,
  79. .offset = 1, // Stored in _has_storage_ to save space.
  80. .flags = GPBFieldOptional,
  81. .dataType = GPBDataTypeBool,
  82. },
  83. };
  84. GPBDescriptor *localDescriptor =
  85. [GPBDescriptor allocDescriptorForClass:[GAPIHttp class]
  86. rootClass:[GAPIHTTPRoot class]
  87. file:GAPIHTTPRoot_FileDescriptor()
  88. fields:fields
  89. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  90. storageSize:sizeof(GAPIHttp__storage_)
  91. flags:GPBDescriptorInitializationFlag_None];
  92. NSAssert(descriptor == nil, @"Startup recursed!");
  93. descriptor = localDescriptor;
  94. }
  95. return descriptor;
  96. }
  97. @end
  98. #pragma mark - GAPIHttpRule
  99. @implementation GAPIHttpRule
  100. @dynamic patternOneOfCase;
  101. @dynamic selector;
  102. @dynamic get;
  103. @dynamic put;
  104. @dynamic post;
  105. @dynamic delete_p;
  106. @dynamic patch;
  107. @dynamic custom;
  108. @dynamic body;
  109. @dynamic additionalBindingsArray, additionalBindingsArray_Count;
  110. typedef struct GAPIHttpRule__storage_ {
  111. uint32_t _has_storage_[2];
  112. NSString *selector;
  113. NSString *get;
  114. NSString *put;
  115. NSString *post;
  116. NSString *delete_p;
  117. NSString *patch;
  118. NSString *body;
  119. GAPICustomHttpPattern *custom;
  120. NSMutableArray *additionalBindingsArray;
  121. } GAPIHttpRule__storage_;
  122. // This method is threadsafe because it is initially called
  123. // in +initialize for each subclass.
  124. + (GPBDescriptor *)descriptor {
  125. static GPBDescriptor *descriptor = nil;
  126. if (!descriptor) {
  127. static GPBMessageFieldDescription fields[] = {
  128. {
  129. .name = "selector",
  130. .dataTypeSpecific.className = NULL,
  131. .number = GAPIHttpRule_FieldNumber_Selector,
  132. .hasIndex = 0,
  133. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, selector),
  134. .flags = GPBFieldOptional,
  135. .dataType = GPBDataTypeString,
  136. },
  137. {
  138. .name = "get",
  139. .dataTypeSpecific.className = NULL,
  140. .number = GAPIHttpRule_FieldNumber_Get,
  141. .hasIndex = -1,
  142. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, get),
  143. .flags = GPBFieldOptional,
  144. .dataType = GPBDataTypeString,
  145. },
  146. {
  147. .name = "put",
  148. .dataTypeSpecific.className = NULL,
  149. .number = GAPIHttpRule_FieldNumber_Put,
  150. .hasIndex = -1,
  151. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, put),
  152. .flags = GPBFieldOptional,
  153. .dataType = GPBDataTypeString,
  154. },
  155. {
  156. .name = "post",
  157. .dataTypeSpecific.className = NULL,
  158. .number = GAPIHttpRule_FieldNumber_Post,
  159. .hasIndex = -1,
  160. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, post),
  161. .flags = GPBFieldOptional,
  162. .dataType = GPBDataTypeString,
  163. },
  164. {
  165. .name = "delete_p",
  166. .dataTypeSpecific.className = NULL,
  167. .number = GAPIHttpRule_FieldNumber_Delete_p,
  168. .hasIndex = -1,
  169. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, delete_p),
  170. .flags = GPBFieldOptional,
  171. .dataType = GPBDataTypeString,
  172. },
  173. {
  174. .name = "patch",
  175. .dataTypeSpecific.className = NULL,
  176. .number = GAPIHttpRule_FieldNumber_Patch,
  177. .hasIndex = -1,
  178. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, patch),
  179. .flags = GPBFieldOptional,
  180. .dataType = GPBDataTypeString,
  181. },
  182. {
  183. .name = "body",
  184. .dataTypeSpecific.className = NULL,
  185. .number = GAPIHttpRule_FieldNumber_Body,
  186. .hasIndex = 1,
  187. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, body),
  188. .flags = GPBFieldOptional,
  189. .dataType = GPBDataTypeString,
  190. },
  191. {
  192. .name = "custom",
  193. .dataTypeSpecific.className = GPBStringifySymbol(GAPICustomHttpPattern),
  194. .number = GAPIHttpRule_FieldNumber_Custom,
  195. .hasIndex = -1,
  196. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, custom),
  197. .flags = GPBFieldOptional,
  198. .dataType = GPBDataTypeMessage,
  199. },
  200. {
  201. .name = "additionalBindingsArray",
  202. .dataTypeSpecific.className = GPBStringifySymbol(GAPIHttpRule),
  203. .number = GAPIHttpRule_FieldNumber_AdditionalBindingsArray,
  204. .hasIndex = GPBNoHasBit,
  205. .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, additionalBindingsArray),
  206. .flags = GPBFieldRepeated,
  207. .dataType = GPBDataTypeMessage,
  208. },
  209. };
  210. GPBDescriptor *localDescriptor =
  211. [GPBDescriptor allocDescriptorForClass:[GAPIHttpRule class]
  212. rootClass:[GAPIHTTPRoot class]
  213. file:GAPIHTTPRoot_FileDescriptor()
  214. fields:fields
  215. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  216. storageSize:sizeof(GAPIHttpRule__storage_)
  217. flags:GPBDescriptorInitializationFlag_None];
  218. static const char *oneofs[] = {
  219. "pattern",
  220. };
  221. [localDescriptor setupOneofs:oneofs
  222. count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
  223. firstHasIndex:-1];
  224. NSAssert(descriptor == nil, @"Startup recursed!");
  225. descriptor = localDescriptor;
  226. }
  227. return descriptor;
  228. }
  229. @end
  230. void GAPIHttpRule_ClearPatternOneOfCase(GAPIHttpRule *message) {
  231. GPBDescriptor *descriptor = [message descriptor];
  232. GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  233. GPBMaybeClearOneof(message, oneof, -1, 0);
  234. }
  235. #pragma mark - GAPICustomHttpPattern
  236. @implementation GAPICustomHttpPattern
  237. @dynamic kind;
  238. @dynamic path;
  239. typedef struct GAPICustomHttpPattern__storage_ {
  240. uint32_t _has_storage_[1];
  241. NSString *kind;
  242. NSString *path;
  243. } GAPICustomHttpPattern__storage_;
  244. // This method is threadsafe because it is initially called
  245. // in +initialize for each subclass.
  246. + (GPBDescriptor *)descriptor {
  247. static GPBDescriptor *descriptor = nil;
  248. if (!descriptor) {
  249. static GPBMessageFieldDescription fields[] = {
  250. {
  251. .name = "kind",
  252. .dataTypeSpecific.className = NULL,
  253. .number = GAPICustomHttpPattern_FieldNumber_Kind,
  254. .hasIndex = 0,
  255. .offset = (uint32_t)offsetof(GAPICustomHttpPattern__storage_, kind),
  256. .flags = GPBFieldOptional,
  257. .dataType = GPBDataTypeString,
  258. },
  259. {
  260. .name = "path",
  261. .dataTypeSpecific.className = NULL,
  262. .number = GAPICustomHttpPattern_FieldNumber_Path,
  263. .hasIndex = 1,
  264. .offset = (uint32_t)offsetof(GAPICustomHttpPattern__storage_, path),
  265. .flags = GPBFieldOptional,
  266. .dataType = GPBDataTypeString,
  267. },
  268. };
  269. GPBDescriptor *localDescriptor =
  270. [GPBDescriptor allocDescriptorForClass:[GAPICustomHttpPattern class]
  271. rootClass:[GAPIHTTPRoot class]
  272. file:GAPIHTTPRoot_FileDescriptor()
  273. fields:fields
  274. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  275. storageSize:sizeof(GAPICustomHttpPattern__storage_)
  276. flags:GPBDescriptorInitializationFlag_None];
  277. NSAssert(descriptor == nil, @"Startup recursed!");
  278. descriptor = localDescriptor;
  279. }
  280. return descriptor;
  281. }
  282. @end
  283. #pragma clang diagnostic pop
  284. // @@protoc_insertion_point(global_scope)