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