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/struct.proto |
| 3 | |
| 4 | #import "GPBProtocolBuffers_RuntimeSupport.h" |
| 5 | #import "google/protobuf/Struct.pbobjc.h" |
| 6 | // @@protoc_insertion_point(imports) |
| 7 | |
| 8 | #pragma mark - GPBStructRoot |
| 9 | |
| 10 | @implementation GPBStructRoot |
| 11 | |
| 12 | @end |
| 13 | |
| 14 | #pragma mark - GPBStructRoot_FileDescriptor |
| 15 | |
| 16 | static GPBFileDescriptor *GPBStructRoot_FileDescriptor(void) { |
| 17 | // This is called by +initialize so there is no need to worry |
| 18 | // about thread safety of the singleton. |
| 19 | static GPBFileDescriptor *descriptor = NULL; |
| 20 | if (!descriptor) { |
| 21 | GPBDebugCheckRuntimeVersion(); |
| 22 | descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
| 23 | syntax:GPBFileSyntaxProto3]; |
| 24 | } |
| 25 | return descriptor; |
| 26 | } |
| 27 | |
| 28 | #pragma mark - Enum GPBNullValue |
| 29 | |
| 30 | GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void) { |
| 31 | static GPBEnumDescriptor *descriptor = NULL; |
| 32 | if (!descriptor) { |
| 33 | static GPBMessageEnumValueDescription values[] = { |
| 34 | { .name = "NullValue", .number = GPBNullValue_NullValue }, |
| 35 | }; |
| 36 | descriptor = [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBNullValue) |
| 37 | values:values |
| 38 | valueCount:sizeof(values) / sizeof(GPBMessageEnumValueDescription) |
| 39 | enumVerifier:GPBNullValue_IsValidValue]; |
| 40 | } |
| 41 | return descriptor; |
| 42 | } |
| 43 | |
| 44 | BOOL GPBNullValue_IsValidValue(int32_t value__) { |
| 45 | switch (value__) { |
| 46 | case GPBNullValue_NullValue: |
| 47 | return YES; |
| 48 | default: |
| 49 | return NO; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | #pragma mark - GPBStruct |
| 54 | |
| 55 | @implementation GPBStruct |
| 56 | |
| 57 | @dynamic fields, fields_Count; |
| 58 | |
| 59 | typedef struct GPBStruct__storage_ { |
| 60 | uint32_t _has_storage_[1]; |
| 61 | NSMutableDictionary *fields; |
| 62 | } GPBStruct__storage_; |
| 63 | |
| 64 | // This method is threadsafe because it is initially called |
| 65 | // in +initialize for each subclass. |
| 66 | + (GPBDescriptor *)descriptor { |
| 67 | static GPBDescriptor *descriptor = nil; |
| 68 | if (!descriptor) { |
| 69 | static GPBMessageFieldDescription fields[] = { |
| 70 | { |
| 71 | .name = "fields", |
| 72 | .number = GPBStruct_FieldNumber_Fields, |
| 73 | .hasIndex = GPBNoHasBit, |
| 74 | .flags = GPBFieldMapKeyString, |
| 75 | .dataType = GPBDataTypeMessage, |
| 76 | .offset = offsetof(GPBStruct__storage_, fields), |
| 77 | .defaultValue.valueMessage = nil, |
| 78 | .dataTypeSpecific.className = GPBStringifySymbol(GPBValue), |
| 79 | .fieldOptions = NULL, |
| 80 | }, |
| 81 | }; |
| 82 | GPBDescriptor *localDescriptor = |
| 83 | [GPBDescriptor allocDescriptorForClass:[GPBStruct class] |
| 84 | rootClass:[GPBStructRoot class] |
| 85 | file:GPBStructRoot_FileDescriptor() |
| 86 | fields:fields |
| 87 | fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
| 88 | oneofs:NULL |
| 89 | oneofCount:0 |
| 90 | enums:NULL |
| 91 | enumCount:0 |
| 92 | ranges:NULL |
| 93 | rangeCount:0 |
| 94 | storageSize:sizeof(GPBStruct__storage_) |
| 95 | wireFormat:NO]; |
| 96 | NSAssert(descriptor == nil, @"Startup recursed!"); |
| 97 | descriptor = localDescriptor; |
| 98 | } |
| 99 | return descriptor; |
| 100 | } |
| 101 | |
| 102 | @end |
| 103 | |
| 104 | #pragma mark - GPBValue |
| 105 | |
| 106 | @implementation GPBValue |
| 107 | |
| 108 | @dynamic kindOneOfCase; |
| 109 | @dynamic nullValue; |
| 110 | @dynamic numberValue; |
| 111 | @dynamic stringValue; |
| 112 | @dynamic boolValue; |
| 113 | @dynamic structValue; |
| 114 | @dynamic listValue; |
| 115 | |
| 116 | typedef struct GPBValue__storage_ { |
| 117 | uint32_t _has_storage_[2]; |
| 118 | BOOL boolValue; |
| 119 | GPBNullValue nullValue; |
| 120 | NSString *stringValue; |
| 121 | GPBStruct *structValue; |
| 122 | GPBListValue *listValue; |
| 123 | double numberValue; |
| 124 | } GPBValue__storage_; |
| 125 | |
| 126 | // This method is threadsafe because it is initially called |
| 127 | // in +initialize for each subclass. |
| 128 | + (GPBDescriptor *)descriptor { |
| 129 | static GPBDescriptor *descriptor = nil; |
| 130 | if (!descriptor) { |
| 131 | static GPBMessageOneofDescription oneofs[] = { |
| 132 | { |
| 133 | .name = "kind", |
| 134 | .index = -1, |
| 135 | }, |
| 136 | }; |
| 137 | static GPBMessageFieldDescription fields[] = { |
| 138 | { |
| 139 | .name = "nullValue", |
| 140 | .number = GPBValue_FieldNumber_NullValue, |
| 141 | .hasIndex = -1, |
| 142 | .flags = GPBFieldOptional | GPBFieldHasEnumDescriptor, |
| 143 | .dataType = GPBDataTypeEnum, |
| 144 | .offset = offsetof(GPBValue__storage_, nullValue), |
| 145 | .defaultValue.valueEnum = GPBNullValue_NullValue, |
| 146 | .dataTypeSpecific.enumDescFunc = GPBNullValue_EnumDescriptor, |
| 147 | .fieldOptions = NULL, |
| 148 | }, |
| 149 | { |
| 150 | .name = "numberValue", |
| 151 | .number = GPBValue_FieldNumber_NumberValue, |
| 152 | .hasIndex = -1, |
| 153 | .flags = GPBFieldOptional, |
| 154 | .dataType = GPBDataTypeDouble, |
| 155 | .offset = offsetof(GPBValue__storage_, numberValue), |
| 156 | .defaultValue.valueDouble = 0, |
| 157 | .dataTypeSpecific.className = NULL, |
| 158 | .fieldOptions = NULL, |
| 159 | }, |
| 160 | { |
| 161 | .name = "stringValue", |
| 162 | .number = GPBValue_FieldNumber_StringValue, |
| 163 | .hasIndex = -1, |
| 164 | .flags = GPBFieldOptional, |
| 165 | .dataType = GPBDataTypeString, |
| 166 | .offset = offsetof(GPBValue__storage_, stringValue), |
| 167 | .defaultValue.valueString = nil, |
| 168 | .dataTypeSpecific.className = NULL, |
| 169 | .fieldOptions = NULL, |
| 170 | }, |
| 171 | { |
| 172 | .name = "boolValue", |
| 173 | .number = GPBValue_FieldNumber_BoolValue, |
| 174 | .hasIndex = -1, |
| 175 | .flags = GPBFieldOptional, |
| 176 | .dataType = GPBDataTypeBool, |
| 177 | .offset = offsetof(GPBValue__storage_, boolValue), |
| 178 | .defaultValue.valueBool = NO, |
| 179 | .dataTypeSpecific.className = NULL, |
| 180 | .fieldOptions = NULL, |
| 181 | }, |
| 182 | { |
| 183 | .name = "structValue", |
| 184 | .number = GPBValue_FieldNumber_StructValue, |
| 185 | .hasIndex = -1, |
| 186 | .flags = GPBFieldOptional, |
| 187 | .dataType = GPBDataTypeMessage, |
| 188 | .offset = offsetof(GPBValue__storage_, structValue), |
| 189 | .defaultValue.valueMessage = nil, |
| 190 | .dataTypeSpecific.className = GPBStringifySymbol(GPBStruct), |
| 191 | .fieldOptions = NULL, |
| 192 | }, |
| 193 | { |
| 194 | .name = "listValue", |
| 195 | .number = GPBValue_FieldNumber_ListValue, |
| 196 | .hasIndex = -1, |
| 197 | .flags = GPBFieldOptional, |
| 198 | .dataType = GPBDataTypeMessage, |
| 199 | .offset = offsetof(GPBValue__storage_, listValue), |
| 200 | .defaultValue.valueMessage = nil, |
| 201 | .dataTypeSpecific.className = GPBStringifySymbol(GPBListValue), |
| 202 | .fieldOptions = NULL, |
| 203 | }, |
| 204 | }; |
| 205 | GPBDescriptor *localDescriptor = |
| 206 | [GPBDescriptor allocDescriptorForClass:[GPBValue class] |
| 207 | rootClass:[GPBStructRoot class] |
| 208 | file:GPBStructRoot_FileDescriptor() |
| 209 | fields:fields |
| 210 | fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
| 211 | oneofs:oneofs |
| 212 | oneofCount:sizeof(oneofs) / sizeof(GPBMessageOneofDescription) |
| 213 | enums:NULL |
| 214 | enumCount:0 |
| 215 | ranges:NULL |
| 216 | rangeCount:0 |
| 217 | storageSize:sizeof(GPBValue__storage_) |
| 218 | wireFormat:NO]; |
| 219 | NSAssert(descriptor == nil, @"Startup recursed!"); |
| 220 | descriptor = localDescriptor; |
| 221 | } |
| 222 | return descriptor; |
| 223 | } |
| 224 | |
| 225 | @end |
| 226 | |
| 227 | int32_t GPBValue_NullValue_RawValue(GPBValue *message) { |
| 228 | GPBDescriptor *descriptor = [GPBValue descriptor]; |
| 229 | GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; |
| 230 | return GPBGetMessageInt32Field(message, field); |
| 231 | } |
| 232 | |
| 233 | void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value) { |
| 234 | GPBDescriptor *descriptor = [GPBValue descriptor]; |
| 235 | GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; |
| 236 | GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); |
| 237 | } |
| 238 | |
| 239 | void GPBValue_ClearKindOneOfCase(GPBValue *message) { |
| 240 | GPBDescriptor *descriptor = [message descriptor]; |
| 241 | GPBOneofDescriptor *oneof = descriptor->oneofs_[0]; |
| 242 | GPBMaybeClearOneof(message, oneof, 0); |
| 243 | } |
| 244 | #pragma mark - GPBListValue |
| 245 | |
| 246 | @implementation GPBListValue |
| 247 | |
| 248 | @dynamic valuesArray, valuesArray_Count; |
| 249 | |
| 250 | typedef struct GPBListValue__storage_ { |
| 251 | uint32_t _has_storage_[1]; |
| 252 | NSMutableArray *valuesArray; |
| 253 | } GPBListValue__storage_; |
| 254 | |
| 255 | // This method is threadsafe because it is initially called |
| 256 | // in +initialize for each subclass. |
| 257 | + (GPBDescriptor *)descriptor { |
| 258 | static GPBDescriptor *descriptor = nil; |
| 259 | if (!descriptor) { |
| 260 | static GPBMessageFieldDescription fields[] = { |
| 261 | { |
| 262 | .name = "valuesArray", |
| 263 | .number = GPBListValue_FieldNumber_ValuesArray, |
| 264 | .hasIndex = GPBNoHasBit, |
| 265 | .flags = GPBFieldRepeated, |
| 266 | .dataType = GPBDataTypeMessage, |
| 267 | .offset = offsetof(GPBListValue__storage_, valuesArray), |
| 268 | .defaultValue.valueMessage = nil, |
| 269 | .dataTypeSpecific.className = GPBStringifySymbol(GPBValue), |
| 270 | .fieldOptions = NULL, |
| 271 | }, |
| 272 | }; |
| 273 | GPBDescriptor *localDescriptor = |
| 274 | [GPBDescriptor allocDescriptorForClass:[GPBListValue class] |
| 275 | rootClass:[GPBStructRoot class] |
| 276 | file:GPBStructRoot_FileDescriptor() |
| 277 | fields:fields |
| 278 | fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
| 279 | oneofs:NULL |
| 280 | oneofCount:0 |
| 281 | enums:NULL |
| 282 | enumCount:0 |
| 283 | ranges:NULL |
| 284 | rangeCount:0 |
| 285 | storageSize:sizeof(GPBListValue__storage_) |
| 286 | wireFormat:NO]; |
| 287 | NSAssert(descriptor == nil, @"Startup recursed!"); |
| 288 | descriptor = localDescriptor; |
| 289 | } |
| 290 | return descriptor; |
| 291 | } |
| 292 | |
| 293 | @end |
| 294 | |
| 295 | |
| 296 | // @@protoc_insertion_point(global_scope) |