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