|
@@ -273,6 +273,8 @@ typedef struct GPBFileDescriptorProto_Storage {
|
|
@dynamic extensionRangeArray;
|
|
@dynamic extensionRangeArray;
|
|
@dynamic oneofDeclArray;
|
|
@dynamic oneofDeclArray;
|
|
@dynamic hasOptions, options;
|
|
@dynamic hasOptions, options;
|
|
|
|
+@dynamic reservedRangeArray;
|
|
|
|
+@dynamic reservedNameArray;
|
|
|
|
|
|
typedef struct GPBDescriptorProto_Storage {
|
|
typedef struct GPBDescriptorProto_Storage {
|
|
uint32_t _has_storage_[1];
|
|
uint32_t _has_storage_[1];
|
|
@@ -284,6 +286,8 @@ typedef struct GPBDescriptorProto_Storage {
|
|
NSMutableArray *extensionArray;
|
|
NSMutableArray *extensionArray;
|
|
GPBMessageOptions *options;
|
|
GPBMessageOptions *options;
|
|
NSMutableArray *oneofDeclArray;
|
|
NSMutableArray *oneofDeclArray;
|
|
|
|
+ NSMutableArray *reservedRangeArray;
|
|
|
|
+ NSMutableArray *reservedNameArray;
|
|
} GPBDescriptorProto_Storage;
|
|
} GPBDescriptorProto_Storage;
|
|
|
|
|
|
// This method is threadsafe because it is initially called
|
|
// This method is threadsafe because it is initially called
|
|
@@ -380,6 +384,28 @@ typedef struct GPBDescriptorProto_Storage {
|
|
.typeSpecific.className = GPBStringifySymbol(GPBOneofDescriptorProto),
|
|
.typeSpecific.className = GPBStringifySymbol(GPBOneofDescriptorProto),
|
|
.fieldOptions = NULL,
|
|
.fieldOptions = NULL,
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ .name = "reservedRangeArray",
|
|
|
|
+ .number = GPBDescriptorProto_FieldNumber_ReservedRangeArray,
|
|
|
|
+ .hasIndex = GPBNoHasBit,
|
|
|
|
+ .flags = GPBFieldRepeated,
|
|
|
|
+ .type = GPBTypeMessage,
|
|
|
|
+ .offset = offsetof(GPBDescriptorProto_Storage, reservedRangeArray),
|
|
|
|
+ .defaultValue.valueMessage = nil,
|
|
|
|
+ .typeSpecific.className = GPBStringifySymbol(GPBDescriptorProto_ReservedRange),
|
|
|
|
+ .fieldOptions = NULL,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "reservedNameArray",
|
|
|
|
+ .number = GPBDescriptorProto_FieldNumber_ReservedNameArray,
|
|
|
|
+ .hasIndex = GPBNoHasBit,
|
|
|
|
+ .flags = GPBFieldRepeated,
|
|
|
|
+ .type = GPBTypeString,
|
|
|
|
+ .offset = offsetof(GPBDescriptorProto_Storage, reservedNameArray),
|
|
|
|
+ .defaultValue.valueMessage = nil,
|
|
|
|
+ .typeSpecific.className = NULL,
|
|
|
|
+ .fieldOptions = NULL,
|
|
|
|
+ },
|
|
};
|
|
};
|
|
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBDescriptorProto class]
|
|
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBDescriptorProto class]
|
|
rootClass:[GPBDescriptorRoot class]
|
|
rootClass:[GPBDescriptorRoot class]
|
|
@@ -461,6 +487,67 @@ typedef struct GPBDescriptorProto_ExtensionRange_Storage {
|
|
|
|
|
|
@end
|
|
@end
|
|
|
|
|
|
|
|
+#pragma mark - GPBDescriptorProto_ReservedRange
|
|
|
|
+
|
|
|
|
+@implementation GPBDescriptorProto_ReservedRange
|
|
|
|
+
|
|
|
|
+@dynamic hasStart, start;
|
|
|
|
+@dynamic hasEnd, end;
|
|
|
|
+
|
|
|
|
+typedef struct GPBDescriptorProto_ReservedRange_Storage {
|
|
|
|
+ uint32_t _has_storage_[1];
|
|
|
|
+ int32_t start;
|
|
|
|
+ int32_t end;
|
|
|
|
+} GPBDescriptorProto_ReservedRange_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 = "start",
|
|
|
|
+ .number = GPBDescriptorProto_ReservedRange_FieldNumber_Start,
|
|
|
|
+ .hasIndex = 0,
|
|
|
|
+ .flags = GPBFieldOptional,
|
|
|
|
+ .type = GPBTypeInt32,
|
|
|
|
+ .offset = offsetof(GPBDescriptorProto_ReservedRange_Storage, start),
|
|
|
|
+ .defaultValue.valueInt32 = 0,
|
|
|
|
+ .typeSpecific.className = NULL,
|
|
|
|
+ .fieldOptions = NULL,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "end",
|
|
|
|
+ .number = GPBDescriptorProto_ReservedRange_FieldNumber_End,
|
|
|
|
+ .hasIndex = 1,
|
|
|
|
+ .flags = GPBFieldOptional,
|
|
|
|
+ .type = GPBTypeInt32,
|
|
|
|
+ .offset = offsetof(GPBDescriptorProto_ReservedRange_Storage, end),
|
|
|
|
+ .defaultValue.valueInt32 = 0,
|
|
|
|
+ .typeSpecific.className = NULL,
|
|
|
|
+ .fieldOptions = NULL,
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ descriptor = [GPBDescriptor allocDescriptorForClass:[GPBDescriptorProto_ReservedRange class]
|
|
|
|
+ rootClass:[GPBDescriptorRoot class]
|
|
|
|
+ file:GPBDescriptorRoot_FileDescriptor()
|
|
|
|
+ fields:fields
|
|
|
|
+ fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription)
|
|
|
|
+ oneofs:NULL
|
|
|
|
+ oneofCount:0
|
|
|
|
+ enums:NULL
|
|
|
|
+ enumCount:0
|
|
|
|
+ ranges:NULL
|
|
|
|
+ rangeCount:0
|
|
|
|
+ storageSize:sizeof(GPBDescriptorProto_ReservedRange_Storage)
|
|
|
|
+ wireFormat:NO];
|
|
|
|
+ }
|
|
|
|
+ return descriptor;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+@end
|
|
|
|
+
|
|
#pragma mark - GPBFieldDescriptorProto
|
|
#pragma mark - GPBFieldDescriptorProto
|
|
|
|
|
|
@implementation GPBFieldDescriptorProto
|
|
@implementation GPBFieldDescriptorProto
|
|
@@ -1462,6 +1549,7 @@ typedef struct GPBMessageOptions_Storage {
|
|
|
|
|
|
@dynamic hasCtype, ctype;
|
|
@dynamic hasCtype, ctype;
|
|
@dynamic hasPacked, packed;
|
|
@dynamic hasPacked, packed;
|
|
|
|
+@dynamic hasJstype, jstype;
|
|
@dynamic hasLazy, lazy;
|
|
@dynamic hasLazy, lazy;
|
|
@dynamic hasDeprecated, deprecated;
|
|
@dynamic hasDeprecated, deprecated;
|
|
@dynamic hasWeak, weak;
|
|
@dynamic hasWeak, weak;
|
|
@@ -1474,6 +1562,7 @@ typedef struct GPBFieldOptions_Storage {
|
|
BOOL lazy;
|
|
BOOL lazy;
|
|
BOOL weak;
|
|
BOOL weak;
|
|
GPBFieldOptions_CType ctype;
|
|
GPBFieldOptions_CType ctype;
|
|
|
|
+ GPBFieldOptions_JSType jstype;
|
|
NSMutableArray *uninterpretedOptionArray;
|
|
NSMutableArray *uninterpretedOptionArray;
|
|
} GPBFieldOptions_Storage;
|
|
} GPBFieldOptions_Storage;
|
|
|
|
|
|
@@ -1508,7 +1597,7 @@ typedef struct GPBFieldOptions_Storage {
|
|
{
|
|
{
|
|
.name = "deprecated",
|
|
.name = "deprecated",
|
|
.number = GPBFieldOptions_FieldNumber_Deprecated,
|
|
.number = GPBFieldOptions_FieldNumber_Deprecated,
|
|
- .hasIndex = 3,
|
|
|
|
|
|
+ .hasIndex = 4,
|
|
.flags = GPBFieldOptional | GPBFieldHasDefaultValue,
|
|
.flags = GPBFieldOptional | GPBFieldHasDefaultValue,
|
|
.type = GPBTypeBool,
|
|
.type = GPBTypeBool,
|
|
.offset = offsetof(GPBFieldOptions_Storage, deprecated),
|
|
.offset = offsetof(GPBFieldOptions_Storage, deprecated),
|
|
@@ -1519,7 +1608,7 @@ typedef struct GPBFieldOptions_Storage {
|
|
{
|
|
{
|
|
.name = "lazy",
|
|
.name = "lazy",
|
|
.number = GPBFieldOptions_FieldNumber_Lazy,
|
|
.number = GPBFieldOptions_FieldNumber_Lazy,
|
|
- .hasIndex = 2,
|
|
|
|
|
|
+ .hasIndex = 3,
|
|
.flags = GPBFieldOptional | GPBFieldHasDefaultValue,
|
|
.flags = GPBFieldOptional | GPBFieldHasDefaultValue,
|
|
.type = GPBTypeBool,
|
|
.type = GPBTypeBool,
|
|
.offset = offsetof(GPBFieldOptions_Storage, lazy),
|
|
.offset = offsetof(GPBFieldOptions_Storage, lazy),
|
|
@@ -1527,10 +1616,21 @@ typedef struct GPBFieldOptions_Storage {
|
|
.typeSpecific.className = NULL,
|
|
.typeSpecific.className = NULL,
|
|
.fieldOptions = NULL,
|
|
.fieldOptions = NULL,
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ .name = "jstype",
|
|
|
|
+ .number = GPBFieldOptions_FieldNumber_Jstype,
|
|
|
|
+ .hasIndex = 2,
|
|
|
|
+ .flags = GPBFieldOptional | GPBFieldHasDefaultValue | GPBFieldHasEnumDescriptor,
|
|
|
|
+ .type = GPBTypeEnum,
|
|
|
|
+ .offset = offsetof(GPBFieldOptions_Storage, jstype),
|
|
|
|
+ .defaultValue.valueEnum = GPBFieldOptions_JSType_JsNormal,
|
|
|
|
+ .typeSpecific.enumDescFunc = GPBFieldOptions_JSType_EnumDescriptor,
|
|
|
|
+ .fieldOptions = NULL,
|
|
|
|
+ },
|
|
{
|
|
{
|
|
.name = "weak",
|
|
.name = "weak",
|
|
.number = GPBFieldOptions_FieldNumber_Weak,
|
|
.number = GPBFieldOptions_FieldNumber_Weak,
|
|
- .hasIndex = 4,
|
|
|
|
|
|
+ .hasIndex = 5,
|
|
.flags = GPBFieldOptional | GPBFieldHasDefaultValue,
|
|
.flags = GPBFieldOptional | GPBFieldHasDefaultValue,
|
|
.type = GPBTypeBool,
|
|
.type = GPBTypeBool,
|
|
.offset = offsetof(GPBFieldOptions_Storage, weak),
|
|
.offset = offsetof(GPBFieldOptions_Storage, weak),
|
|
@@ -1552,6 +1652,7 @@ typedef struct GPBFieldOptions_Storage {
|
|
};
|
|
};
|
|
static GPBMessageEnumDescription enums[] = {
|
|
static GPBMessageEnumDescription enums[] = {
|
|
{ .enumDescriptorFunc = GPBFieldOptions_CType_EnumDescriptor },
|
|
{ .enumDescriptorFunc = GPBFieldOptions_CType_EnumDescriptor },
|
|
|
|
+ { .enumDescriptorFunc = GPBFieldOptions_JSType_EnumDescriptor },
|
|
};
|
|
};
|
|
static GPBExtensionRange ranges[] = {
|
|
static GPBExtensionRange ranges[] = {
|
|
{ .start = 1000, .end = 536870912 },
|
|
{ .start = 1000, .end = 536870912 },
|
|
@@ -1604,6 +1705,35 @@ BOOL GPBFieldOptions_CType_IsValidValue(int32_t value__) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#pragma mark - Enum GPBFieldOptions_JSType
|
|
|
|
+
|
|
|
|
+GPBEnumDescriptor *GPBFieldOptions_JSType_EnumDescriptor(void) {
|
|
|
|
+ static GPBEnumDescriptor *descriptor = NULL;
|
|
|
|
+ if (!descriptor) {
|
|
|
|
+ static GPBMessageEnumValueDescription values[] = {
|
|
|
|
+ { .name = "JsNormal", .number = GPBFieldOptions_JSType_JsNormal },
|
|
|
|
+ { .name = "JsString", .number = GPBFieldOptions_JSType_JsString },
|
|
|
|
+ { .name = "JsNumber", .number = GPBFieldOptions_JSType_JsNumber },
|
|
|
|
+ };
|
|
|
|
+ descriptor = [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBFieldOptions_JSType)
|
|
|
|
+ values:values
|
|
|
|
+ valueCount:sizeof(values) / sizeof(GPBMessageEnumValueDescription)
|
|
|
|
+ enumVerifier:GPBFieldOptions_JSType_IsValidValue];
|
|
|
|
+ }
|
|
|
|
+ return descriptor;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+BOOL GPBFieldOptions_JSType_IsValidValue(int32_t value__) {
|
|
|
|
+ switch (value__) {
|
|
|
|
+ case GPBFieldOptions_JSType_JsNormal:
|
|
|
|
+ case GPBFieldOptions_JSType_JsString:
|
|
|
|
+ case GPBFieldOptions_JSType_JsNumber:
|
|
|
|
+ return YES;
|
|
|
|
+ default:
|
|
|
|
+ return NO;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
#pragma mark - GPBEnumOptions
|
|
#pragma mark - GPBEnumOptions
|
|
|
|
|
|
@implementation GPBEnumOptions
|
|
@implementation GPBEnumOptions
|