Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
284 lines
9.8 KiB
284 lines
9.8 KiB
// Generated by the protocol buffer compiler. DO NOT EDIT! |
|
// source: google/protobuf/struct.proto |
|
|
|
#import "GPBProtocolBuffers_RuntimeSupport.h" |
|
#import "google/protobuf/Struct.pbobjc.h" |
|
// @@protoc_insertion_point(imports) |
|
|
|
#pragma mark - GPBStructRoot |
|
|
|
@implementation GPBStructRoot |
|
|
|
@end |
|
|
|
static GPBFileDescriptor *GPBStructRoot_FileDescriptor(void) { |
|
// This is called by +initialize so there is no need to worry |
|
// about thread safety of the singleton. |
|
static GPBFileDescriptor *descriptor = NULL; |
|
if (!descriptor) { |
|
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
|
syntax:GPBFileSyntaxProto3]; |
|
} |
|
return descriptor; |
|
} |
|
|
|
#pragma mark - Enum GPBNullValue |
|
|
|
GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void) { |
|
static GPBEnumDescriptor *descriptor = NULL; |
|
if (!descriptor) { |
|
static GPBMessageEnumValueDescription values[] = { |
|
{ .name = "NullValue", .number = GPBNullValue_NullValue }, |
|
}; |
|
descriptor = [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBNullValue) |
|
values:values |
|
valueCount:sizeof(values) / sizeof(GPBMessageEnumValueDescription) |
|
enumVerifier:GPBNullValue_IsValidValue]; |
|
} |
|
return descriptor; |
|
} |
|
|
|
BOOL GPBNullValue_IsValidValue(int32_t value__) { |
|
switch (value__) { |
|
case GPBNullValue_NullValue: |
|
return YES; |
|
default: |
|
return NO; |
|
} |
|
} |
|
|
|
#pragma mark - GPBStruct |
|
|
|
@implementation GPBStruct |
|
|
|
@dynamic fields; |
|
|
|
typedef struct GPBStruct_Storage { |
|
uint32_t _has_storage_[1]; |
|
NSMutableDictionary *fields; |
|
} GPBStruct_Storage; |
|
|
|
// This method is threadsafe because it is initially called |
|
// in +initialize for each subclass. |
|
+ (GPBDescriptor *)descriptor { |
|
static GPBDescriptor *descriptor = NULL; |
|
if (!descriptor) { |
|
static GPBMessageFieldDescription fields[] = { |
|
{ |
|
.name = "fields", |
|
.number = GPBStruct_FieldNumber_Fields, |
|
.hasIndex = GPBNoHasBit, |
|
.flags = GPBFieldMapKeyString, |
|
.type = GPBTypeMessage, |
|
.offset = offsetof(GPBStruct_Storage, fields), |
|
.defaultValue.valueMessage = nil, |
|
.typeSpecific.className = GPBStringifySymbol(GPBValue), |
|
.fieldOptions = NULL, |
|
}, |
|
}; |
|
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBStruct class] |
|
rootClass:[GPBStructRoot class] |
|
file:GPBStructRoot_FileDescriptor() |
|
fields:fields |
|
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
|
oneofs:NULL |
|
oneofCount:0 |
|
enums:NULL |
|
enumCount:0 |
|
ranges:NULL |
|
rangeCount:0 |
|
storageSize:sizeof(GPBStruct_Storage) |
|
wireFormat:NO]; |
|
} |
|
return descriptor; |
|
} |
|
|
|
@end |
|
|
|
#pragma mark - GPBValue |
|
|
|
@implementation GPBValue |
|
|
|
@dynamic kindOneOfCase; |
|
@dynamic nullValue; |
|
@dynamic numberValue; |
|
@dynamic stringValue; |
|
@dynamic boolValue; |
|
@dynamic structValue; |
|
@dynamic listValue; |
|
|
|
typedef struct GPBValue_Storage { |
|
uint32_t _has_storage_[2]; |
|
BOOL boolValue; |
|
GPBNullValue nullValue; |
|
NSString *stringValue; |
|
GPBStruct *structValue; |
|
GPBListValue *listValue; |
|
double numberValue; |
|
} GPBValue_Storage; |
|
|
|
// This method is threadsafe because it is initially called |
|
// in +initialize for each subclass. |
|
+ (GPBDescriptor *)descriptor { |
|
static GPBDescriptor *descriptor = NULL; |
|
if (!descriptor) { |
|
static GPBMessageOneofDescription oneofs[] = { |
|
{ |
|
.name = "kind", |
|
.index = -1, |
|
}, |
|
}; |
|
static GPBMessageFieldDescription fields[] = { |
|
{ |
|
.name = "nullValue", |
|
.number = GPBValue_FieldNumber_NullValue, |
|
.hasIndex = -1, |
|
.flags = GPBFieldOptional | GPBFieldHasEnumDescriptor, |
|
.type = GPBTypeEnum, |
|
.offset = offsetof(GPBValue_Storage, nullValue), |
|
.defaultValue.valueEnum = GPBNullValue_NullValue, |
|
.typeSpecific.enumDescFunc = GPBNullValue_EnumDescriptor, |
|
.fieldOptions = NULL, |
|
}, |
|
{ |
|
.name = "numberValue", |
|
.number = GPBValue_FieldNumber_NumberValue, |
|
.hasIndex = -1, |
|
.flags = GPBFieldOptional, |
|
.type = GPBTypeDouble, |
|
.offset = offsetof(GPBValue_Storage, numberValue), |
|
.defaultValue.valueDouble = 0, |
|
.typeSpecific.className = NULL, |
|
.fieldOptions = NULL, |
|
}, |
|
{ |
|
.name = "stringValue", |
|
.number = GPBValue_FieldNumber_StringValue, |
|
.hasIndex = -1, |
|
.flags = GPBFieldOptional, |
|
.type = GPBTypeString, |
|
.offset = offsetof(GPBValue_Storage, stringValue), |
|
.defaultValue.valueString = nil, |
|
.typeSpecific.className = NULL, |
|
.fieldOptions = NULL, |
|
}, |
|
{ |
|
.name = "boolValue", |
|
.number = GPBValue_FieldNumber_BoolValue, |
|
.hasIndex = -1, |
|
.flags = GPBFieldOptional, |
|
.type = GPBTypeBool, |
|
.offset = offsetof(GPBValue_Storage, boolValue), |
|
.defaultValue.valueBool = NO, |
|
.typeSpecific.className = NULL, |
|
.fieldOptions = NULL, |
|
}, |
|
{ |
|
.name = "structValue", |
|
.number = GPBValue_FieldNumber_StructValue, |
|
.hasIndex = -1, |
|
.flags = GPBFieldOptional, |
|
.type = GPBTypeMessage, |
|
.offset = offsetof(GPBValue_Storage, structValue), |
|
.defaultValue.valueMessage = nil, |
|
.typeSpecific.className = GPBStringifySymbol(GPBStruct), |
|
.fieldOptions = NULL, |
|
}, |
|
{ |
|
.name = "listValue", |
|
.number = GPBValue_FieldNumber_ListValue, |
|
.hasIndex = -1, |
|
.flags = GPBFieldOptional, |
|
.type = GPBTypeMessage, |
|
.offset = offsetof(GPBValue_Storage, listValue), |
|
.defaultValue.valueMessage = nil, |
|
.typeSpecific.className = GPBStringifySymbol(GPBListValue), |
|
.fieldOptions = NULL, |
|
}, |
|
}; |
|
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBValue class] |
|
rootClass:[GPBStructRoot class] |
|
file:GPBStructRoot_FileDescriptor() |
|
fields:fields |
|
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
|
oneofs:oneofs |
|
oneofCount:sizeof(oneofs) / sizeof(GPBMessageOneofDescription) |
|
enums:NULL |
|
enumCount:0 |
|
ranges:NULL |
|
rangeCount:0 |
|
storageSize:sizeof(GPBValue_Storage) |
|
wireFormat:NO]; |
|
} |
|
return descriptor; |
|
} |
|
|
|
@end |
|
|
|
int32_t GPBValue_NullValue_RawValue(GPBValue *message) { |
|
GPBDescriptor *descriptor = [GPBValue descriptor]; |
|
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; |
|
return GPBGetInt32IvarWithField(message, field); |
|
} |
|
|
|
void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value) { |
|
GPBDescriptor *descriptor = [GPBValue descriptor]; |
|
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; |
|
GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); |
|
} |
|
|
|
void GPBValue_ClearKindOneOfCase(GPBValue *message) { |
|
GPBDescriptor *descriptor = [message descriptor]; |
|
GPBOneofDescriptor *oneof = descriptor->oneofs_[0]; |
|
GPBMaybeClearOneof(message, oneof, 0); |
|
} |
|
#pragma mark - GPBListValue |
|
|
|
@implementation GPBListValue |
|
|
|
@dynamic valuesArray; |
|
|
|
typedef struct GPBListValue_Storage { |
|
uint32_t _has_storage_[1]; |
|
NSMutableArray *valuesArray; |
|
} GPBListValue_Storage; |
|
|
|
// This method is threadsafe because it is initially called |
|
// in +initialize for each subclass. |
|
+ (GPBDescriptor *)descriptor { |
|
static GPBDescriptor *descriptor = NULL; |
|
if (!descriptor) { |
|
static GPBMessageFieldDescription fields[] = { |
|
{ |
|
.name = "valuesArray", |
|
.number = GPBListValue_FieldNumber_ValuesArray, |
|
.hasIndex = GPBNoHasBit, |
|
.flags = GPBFieldRepeated, |
|
.type = GPBTypeMessage, |
|
.offset = offsetof(GPBListValue_Storage, valuesArray), |
|
.defaultValue.valueMessage = nil, |
|
.typeSpecific.className = GPBStringifySymbol(GPBValue), |
|
.fieldOptions = NULL, |
|
}, |
|
}; |
|
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBListValue class] |
|
rootClass:[GPBStructRoot class] |
|
file:GPBStructRoot_FileDescriptor() |
|
fields:fields |
|
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
|
oneofs:NULL |
|
oneofCount:0 |
|
enums:NULL |
|
enumCount:0 |
|
ranges:NULL |
|
rangeCount:0 |
|
storageSize:sizeof(GPBListValue_Storage) |
|
wireFormat:NO]; |
|
} |
|
return descriptor; |
|
} |
|
|
|
@end |
|
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
|
|