src/runtime/Tests/Unittest.pb.m
// Generated by the protocol buffer compiler.  DO NOT EDIT!

#import "Unittest.pb.h"

@implementation UnittestRoot
static id<PBExtensionField> UnittestRoot_optionalInt32Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalInt64Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalUint32Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalUint64Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalSint32Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalSint64Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalFixed32Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalFixed64Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalSfixed32Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalSfixed64Extension = nil;
static id<PBExtensionField> UnittestRoot_optionalFloatExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalDoubleExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalBoolExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalStringExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalBytesExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalGroupExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalNestedMessageExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalForeignMessageExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalImportMessageExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalNestedEnumExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalForeignEnumExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalImportEnumExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalStringPieceExtension = nil;
static id<PBExtensionField> UnittestRoot_optionalCordExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedInt32Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedInt64Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedUint32Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedUint64Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedSint32Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedSint64Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedFixed32Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedFixed64Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedSfixed32Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedSfixed64Extension = nil;
static id<PBExtensionField> UnittestRoot_repeatedFloatExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedDoubleExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedBoolExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedStringExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedBytesExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedGroupExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedNestedMessageExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedForeignMessageExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedImportMessageExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedNestedEnumExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedForeignEnumExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedImportEnumExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedStringPieceExtension = nil;
static id<PBExtensionField> UnittestRoot_repeatedCordExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultInt32Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultInt64Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultUint32Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultUint64Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultSint32Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultSint64Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultFixed32Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultFixed64Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultSfixed32Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultSfixed64Extension = nil;
static id<PBExtensionField> UnittestRoot_defaultFloatExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultDoubleExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultBoolExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultStringExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultBytesExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultNestedEnumExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultForeignEnumExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultImportEnumExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultStringPieceExtension = nil;
static id<PBExtensionField> UnittestRoot_defaultCordExtension = nil;
static id<PBExtensionField> UnittestRoot_myExtensionString = nil;
static id<PBExtensionField> UnittestRoot_myExtensionInt = nil;
static id<PBExtensionField> UnittestRoot_packedInt32Extension = nil;
static id<PBExtensionField> UnittestRoot_packedInt64Extension = nil;
static id<PBExtensionField> UnittestRoot_packedUint32Extension = nil;
static id<PBExtensionField> UnittestRoot_packedUint64Extension = nil;
static id<PBExtensionField> UnittestRoot_packedSint32Extension = nil;
static id<PBExtensionField> UnittestRoot_packedSint64Extension = nil;
static id<PBExtensionField> UnittestRoot_packedFixed32Extension = nil;
static id<PBExtensionField> UnittestRoot_packedFixed64Extension = nil;
static id<PBExtensionField> UnittestRoot_packedSfixed32Extension = nil;
static id<PBExtensionField> UnittestRoot_packedSfixed64Extension = nil;
static id<PBExtensionField> UnittestRoot_packedFloatExtension = nil;
static id<PBExtensionField> UnittestRoot_packedDoubleExtension = nil;
static id<PBExtensionField> UnittestRoot_packedBoolExtension = nil;
static id<PBExtensionField> UnittestRoot_packedEnumExtension = nil;
static id<PBExtensionField> TestNestedExtension_test = nil;
static id<PBExtensionField> TestRequired_single = nil;
static id<PBExtensionField> TestRequired_multi = nil;
static PBExtensionRegistry* extensionRegistry = nil;
+ (PBExtensionRegistry*) extensionRegistry {
  return extensionRegistry;
}

+ (void) initialize {
  if (self == [UnittestRoot class]) {
    UnittestRoot_optionalInt32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeInt32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:1
                                      defaultValue:[NSNumber numberWithInt:0]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalInt64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeInt64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:2
                                      defaultValue:[NSNumber numberWithLongLong:0L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalUint32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeUInt32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:3
                                      defaultValue:[NSNumber numberWithInt:0]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalUint64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeUInt64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:4
                                      defaultValue:[NSNumber numberWithLongLong:0L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalSint32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSInt32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:5
                                      defaultValue:[NSNumber numberWithInt:0]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalSint64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSInt64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:6
                                      defaultValue:[NSNumber numberWithLongLong:0L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalFixed32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFixed32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:7
                                      defaultValue:[NSNumber numberWithInt:0]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalFixed64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFixed64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:8
                                      defaultValue:[NSNumber numberWithLongLong:0L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalSfixed32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSFixed32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:9
                                      defaultValue:[NSNumber numberWithInt:0]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalSfixed64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSFixed64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:10
                                      defaultValue:[NSNumber numberWithLongLong:0L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalFloatExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFloat
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:11
                                      defaultValue:[NSNumber numberWithFloat:0]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalDoubleExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeDouble
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:12
                                      defaultValue:[NSNumber numberWithDouble:0]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalBoolExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeBool
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:13
                                      defaultValue:[NSNumber numberWithBool:NO]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalStringExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:14
                                      defaultValue:@""
                               messageOrGroupClass:[NSString class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalBytesExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeBytes
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:15
                                      defaultValue:[NSData data]
                               messageOrGroupClass:[NSData class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalGroupExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeGroup
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:16
                                      defaultValue:[OptionalGroup_extension defaultInstance]
                               messageOrGroupClass:[OptionalGroup_extension class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalNestedMessageExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeMessage
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:18
                                      defaultValue:[TestAllTypes_NestedMessage defaultInstance]
                               messageOrGroupClass:[TestAllTypes_NestedMessage class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalForeignMessageExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeMessage
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:19
                                      defaultValue:[ForeignMessage defaultInstance]
                               messageOrGroupClass:[ForeignMessage class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalImportMessageExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeMessage
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:20
                                      defaultValue:[ImportMessage defaultInstance]
                               messageOrGroupClass:[ImportMessage class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalNestedEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:21
                                      defaultValue:[NSNumber numberWithInt:TestAllTypes_NestedEnumFoo]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalForeignEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:22
                                      defaultValue:[NSNumber numberWithInt:ForeignEnumForeignFoo]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalImportEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:23
                                      defaultValue:[NSNumber numberWithInt:ImportEnumImportFoo]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalStringPieceExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:24
                                      defaultValue:@""
                               messageOrGroupClass:[NSString class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_optionalCordExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:25
                                      defaultValue:@""
                               messageOrGroupClass:[NSString class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedInt32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeInt32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:31
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedInt64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeInt64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:32
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedUint32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeUInt32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:33
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeUInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedUint64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeUInt64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:34
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeUInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedSint32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSInt32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:35
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedSint64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSInt64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:36
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedFixed32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFixed32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:37
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeUInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedFixed64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFixed64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:38
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeUInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedSfixed32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSFixed32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:39
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedSfixed64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSFixed64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:40
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedFloatExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFloat
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:41
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeFloat]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedDoubleExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeDouble
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:42
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeDouble]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedBoolExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeBool
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:43
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeBool]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedStringExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:44
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[NSString class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedBytesExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeBytes
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:45
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[NSData class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedGroupExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeGroup
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:46
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[RepeatedGroup_extension class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedNestedMessageExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeMessage
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:48
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[TestAllTypes_NestedMessage class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedForeignMessageExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeMessage
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:49
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[ForeignMessage class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedImportMessageExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeMessage
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:50
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[ImportMessage class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedNestedEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:51
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedForeignEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:52
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedImportEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:53
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedStringPieceExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:54
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[NSString class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_repeatedCordExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:55
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[NSString class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultInt32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeInt32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:61
                                      defaultValue:[NSNumber numberWithInt:41]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultInt64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeInt64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:62
                                      defaultValue:[NSNumber numberWithLongLong:42L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultUint32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeUInt32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:63
                                      defaultValue:[NSNumber numberWithInt:43]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultUint64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeUInt64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:64
                                      defaultValue:[NSNumber numberWithLongLong:44L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultSint32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSInt32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:65
                                      defaultValue:[NSNumber numberWithInt:-45]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultSint64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSInt64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:66
                                      defaultValue:[NSNumber numberWithLongLong:46L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultFixed32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFixed32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:67
                                      defaultValue:[NSNumber numberWithInt:47]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultFixed64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFixed64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:68
                                      defaultValue:[NSNumber numberWithLongLong:48L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultSfixed32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSFixed32
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:69
                                      defaultValue:[NSNumber numberWithInt:49]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultSfixed64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSFixed64
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:70
                                      defaultValue:[NSNumber numberWithLongLong:-50L]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultFloatExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFloat
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:71
                                      defaultValue:[NSNumber numberWithFloat:51.5]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultDoubleExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeDouble
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:72
                                      defaultValue:[NSNumber numberWithDouble:52000]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultBoolExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeBool
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:73
                                      defaultValue:[NSNumber numberWithBool:YES]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultStringExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:74
                                      defaultValue:@"hello"
                               messageOrGroupClass:[NSString class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultBytesExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeBytes
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:75
                                      defaultValue:[NSData dataWithBytes:"world" length:5]
                               messageOrGroupClass:[NSData class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultNestedEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:81
                                      defaultValue:[NSNumber numberWithInt:TestAllTypes_NestedEnumBar]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultForeignEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:82
                                      defaultValue:[NSNumber numberWithInt:ForeignEnumForeignBar]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultImportEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:83
                                      defaultValue:[NSNumber numberWithInt:ImportEnumImportBar]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultStringPieceExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:84
                                      defaultValue:@"abc"
                               messageOrGroupClass:[NSString class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_defaultCordExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:85
                                      defaultValue:@"123"
                               messageOrGroupClass:[NSString class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_myExtensionString =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestFieldOrderings class]
                                       fieldNumber:50
                                      defaultValue:@""
                               messageOrGroupClass:[NSString class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_myExtensionInt =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeInt32
                                     extendedClass:[TestFieldOrderings class]
                                       fieldNumber:5
                                      defaultValue:[NSNumber numberWithInt:0]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedInt32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeInt32
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:90
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedInt64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeInt64
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:91
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedUint32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeUInt32
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:92
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeUInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedUint64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeUInt64
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:93
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeUInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedSint32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSInt32
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:94
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedSint64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSInt64
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:95
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedFixed32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFixed32
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:96
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeUInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedFixed64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFixed64
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:97
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeUInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedSfixed32Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSFixed32
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:98
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt32]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedSfixed64Extension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeSFixed64
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:99
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeInt64]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedFloatExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeFloat
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:100
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeFloat]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedDoubleExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeDouble
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:101
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeDouble]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedBoolExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeBool
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:102
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeBool]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    UnittestRoot_packedEnumExtension =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeEnum
                                     extendedClass:[TestPackedExtensions class]
                                       fieldNumber:103
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[NSNumber class]
                                        isRepeated:YES
                                          isPacked:YES
                            isMessageSetWireFormat:NO] retain];
    TestNestedExtension_test =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeString
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:1002
                                      defaultValue:@"test"
                               messageOrGroupClass:[NSString class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    TestRequired_single =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeMessage
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:1000
                                      defaultValue:[TestRequired defaultInstance]
                               messageOrGroupClass:[TestRequired class]
                                        isRepeated:NO
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    TestRequired_multi =
      [[PBConcreteExtensionField extensionWithType:PBExtensionTypeMessage
                                     extendedClass:[TestAllExtensions class]
                                       fieldNumber:1001
                                      defaultValue:[PBArray arrayWithValueType:PBArrayValueTypeObject]
                               messageOrGroupClass:[TestRequired class]
                                        isRepeated:YES
                                          isPacked:NO
                            isMessageSetWireFormat:NO] retain];
    PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry];
    [self registerAllExtensions:registry];
    [UnittestImportRoot registerAllExtensions:registry];
    extensionRegistry = [registry retain];
  }
}
+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry {
  [registry addExtension:UnittestRoot_optionalInt32Extension];
  [registry addExtension:UnittestRoot_optionalInt64Extension];
  [registry addExtension:UnittestRoot_optionalUint32Extension];
  [registry addExtension:UnittestRoot_optionalUint64Extension];
  [registry addExtension:UnittestRoot_optionalSint32Extension];
  [registry addExtension:UnittestRoot_optionalSint64Extension];
  [registry addExtension:UnittestRoot_optionalFixed32Extension];
  [registry addExtension:UnittestRoot_optionalFixed64Extension];
  [registry addExtension:UnittestRoot_optionalSfixed32Extension];
  [registry addExtension:UnittestRoot_optionalSfixed64Extension];
  [registry addExtension:UnittestRoot_optionalFloatExtension];
  [registry addExtension:UnittestRoot_optionalDoubleExtension];
  [registry addExtension:UnittestRoot_optionalBoolExtension];
  [registry addExtension:UnittestRoot_optionalStringExtension];
  [registry addExtension:UnittestRoot_optionalBytesExtension];
  [registry addExtension:UnittestRoot_optionalGroupExtension];
  [registry addExtension:UnittestRoot_optionalNestedMessageExtension];
  [registry addExtension:UnittestRoot_optionalForeignMessageExtension];
  [registry addExtension:UnittestRoot_optionalImportMessageExtension];
  [registry addExtension:UnittestRoot_optionalNestedEnumExtension];
  [registry addExtension:UnittestRoot_optionalForeignEnumExtension];
  [registry addExtension:UnittestRoot_optionalImportEnumExtension];
  [registry addExtension:UnittestRoot_optionalStringPieceExtension];
  [registry addExtension:UnittestRoot_optionalCordExtension];
  [registry addExtension:UnittestRoot_repeatedInt32Extension];
  [registry addExtension:UnittestRoot_repeatedInt64Extension];
  [registry addExtension:UnittestRoot_repeatedUint32Extension];
  [registry addExtension:UnittestRoot_repeatedUint64Extension];
  [registry addExtension:UnittestRoot_repeatedSint32Extension];
  [registry addExtension:UnittestRoot_repeatedSint64Extension];
  [registry addExtension:UnittestRoot_repeatedFixed32Extension];
  [registry addExtension:UnittestRoot_repeatedFixed64Extension];
  [registry addExtension:UnittestRoot_repeatedSfixed32Extension];
  [registry addExtension:UnittestRoot_repeatedSfixed64Extension];
  [registry addExtension:UnittestRoot_repeatedFloatExtension];
  [registry addExtension:UnittestRoot_repeatedDoubleExtension];
  [registry addExtension:UnittestRoot_repeatedBoolExtension];
  [registry addExtension:UnittestRoot_repeatedStringExtension];
  [registry addExtension:UnittestRoot_repeatedBytesExtension];
  [registry addExtension:UnittestRoot_repeatedGroupExtension];
  [registry addExtension:UnittestRoot_repeatedNestedMessageExtension];
  [registry addExtension:UnittestRoot_repeatedForeignMessageExtension];
  [registry addExtension:UnittestRoot_repeatedImportMessageExtension];
  [registry addExtension:UnittestRoot_repeatedNestedEnumExtension];
  [registry addExtension:UnittestRoot_repeatedForeignEnumExtension];
  [registry addExtension:UnittestRoot_repeatedImportEnumExtension];
  [registry addExtension:UnittestRoot_repeatedStringPieceExtension];
  [registry addExtension:UnittestRoot_repeatedCordExtension];
  [registry addExtension:UnittestRoot_defaultInt32Extension];
  [registry addExtension:UnittestRoot_defaultInt64Extension];
  [registry addExtension:UnittestRoot_defaultUint32Extension];
  [registry addExtension:UnittestRoot_defaultUint64Extension];
  [registry addExtension:UnittestRoot_defaultSint32Extension];
  [registry addExtension:UnittestRoot_defaultSint64Extension];
  [registry addExtension:UnittestRoot_defaultFixed32Extension];
  [registry addExtension:UnittestRoot_defaultFixed64Extension];
  [registry addExtension:UnittestRoot_defaultSfixed32Extension];
  [registry addExtension:UnittestRoot_defaultSfixed64Extension];
  [registry addExtension:UnittestRoot_defaultFloatExtension];
  [registry addExtension:UnittestRoot_defaultDoubleExtension];
  [registry addExtension:UnittestRoot_defaultBoolExtension];
  [registry addExtension:UnittestRoot_defaultStringExtension];
  [registry addExtension:UnittestRoot_defaultBytesExtension];
  [registry addExtension:UnittestRoot_defaultNestedEnumExtension];
  [registry addExtension:UnittestRoot_defaultForeignEnumExtension];
  [registry addExtension:UnittestRoot_defaultImportEnumExtension];
  [registry addExtension:UnittestRoot_defaultStringPieceExtension];
  [registry addExtension:UnittestRoot_defaultCordExtension];
  [registry addExtension:UnittestRoot_myExtensionString];
  [registry addExtension:UnittestRoot_myExtensionInt];
  [registry addExtension:UnittestRoot_packedInt32Extension];
  [registry addExtension:UnittestRoot_packedInt64Extension];
  [registry addExtension:UnittestRoot_packedUint32Extension];
  [registry addExtension:UnittestRoot_packedUint64Extension];
  [registry addExtension:UnittestRoot_packedSint32Extension];
  [registry addExtension:UnittestRoot_packedSint64Extension];
  [registry addExtension:UnittestRoot_packedFixed32Extension];
  [registry addExtension:UnittestRoot_packedFixed64Extension];
  [registry addExtension:UnittestRoot_packedSfixed32Extension];
  [registry addExtension:UnittestRoot_packedSfixed64Extension];
  [registry addExtension:UnittestRoot_packedFloatExtension];
  [registry addExtension:UnittestRoot_packedDoubleExtension];
  [registry addExtension:UnittestRoot_packedBoolExtension];
  [registry addExtension:UnittestRoot_packedEnumExtension];
  [registry addExtension:TestNestedExtension_test];
  [registry addExtension:TestRequired_single];
  [registry addExtension:TestRequired_multi];
}
+ (id<PBExtensionField>) optionalInt32Extension {
  return UnittestRoot_optionalInt32Extension;
}
+ (id<PBExtensionField>) optionalInt64Extension {
  return UnittestRoot_optionalInt64Extension;
}
+ (id<PBExtensionField>) optionalUint32Extension {
  return UnittestRoot_optionalUint32Extension;
}
+ (id<PBExtensionField>) optionalUint64Extension {
  return UnittestRoot_optionalUint64Extension;
}
+ (id<PBExtensionField>) optionalSint32Extension {
  return UnittestRoot_optionalSint32Extension;
}
+ (id<PBExtensionField>) optionalSint64Extension {
  return UnittestRoot_optionalSint64Extension;
}
+ (id<PBExtensionField>) optionalFixed32Extension {
  return UnittestRoot_optionalFixed32Extension;
}
+ (id<PBExtensionField>) optionalFixed64Extension {
  return UnittestRoot_optionalFixed64Extension;
}
+ (id<PBExtensionField>) optionalSfixed32Extension {
  return UnittestRoot_optionalSfixed32Extension;
}
+ (id<PBExtensionField>) optionalSfixed64Extension {
  return UnittestRoot_optionalSfixed64Extension;
}
+ (id<PBExtensionField>) optionalFloatExtension {
  return UnittestRoot_optionalFloatExtension;
}
+ (id<PBExtensionField>) optionalDoubleExtension {
  return UnittestRoot_optionalDoubleExtension;
}
+ (id<PBExtensionField>) optionalBoolExtension {
  return UnittestRoot_optionalBoolExtension;
}
+ (id<PBExtensionField>) optionalStringExtension {
  return UnittestRoot_optionalStringExtension;
}
+ (id<PBExtensionField>) optionalBytesExtension {
  return UnittestRoot_optionalBytesExtension;
}
+ (id<PBExtensionField>) optionalGroupExtension {
  return UnittestRoot_optionalGroupExtension;
}
+ (id<PBExtensionField>) optionalNestedMessageExtension {
  return UnittestRoot_optionalNestedMessageExtension;
}
+ (id<PBExtensionField>) optionalForeignMessageExtension {
  return UnittestRoot_optionalForeignMessageExtension;
}
+ (id<PBExtensionField>) optionalImportMessageExtension {
  return UnittestRoot_optionalImportMessageExtension;
}
+ (id<PBExtensionField>) optionalNestedEnumExtension {
  return UnittestRoot_optionalNestedEnumExtension;
}
+ (id<PBExtensionField>) optionalForeignEnumExtension {
  return UnittestRoot_optionalForeignEnumExtension;
}
+ (id<PBExtensionField>) optionalImportEnumExtension {
  return UnittestRoot_optionalImportEnumExtension;
}
+ (id<PBExtensionField>) optionalStringPieceExtension {
  return UnittestRoot_optionalStringPieceExtension;
}
+ (id<PBExtensionField>) optionalCordExtension {
  return UnittestRoot_optionalCordExtension;
}
+ (id<PBExtensionField>) repeatedInt32Extension {
  return UnittestRoot_repeatedInt32Extension;
}
+ (id<PBExtensionField>) repeatedInt64Extension {
  return UnittestRoot_repeatedInt64Extension;
}
+ (id<PBExtensionField>) repeatedUint32Extension {
  return UnittestRoot_repeatedUint32Extension;
}
+ (id<PBExtensionField>) repeatedUint64Extension {
  return UnittestRoot_repeatedUint64Extension;
}
+ (id<PBExtensionField>) repeatedSint32Extension {
  return UnittestRoot_repeatedSint32Extension;
}
+ (id<PBExtensionField>) repeatedSint64Extension {
  return UnittestRoot_repeatedSint64Extension;
}
+ (id<PBExtensionField>) repeatedFixed32Extension {
  return UnittestRoot_repeatedFixed32Extension;
}
+ (id<PBExtensionField>) repeatedFixed64Extension {
  return UnittestRoot_repeatedFixed64Extension;
}
+ (id<PBExtensionField>) repeatedSfixed32Extension {
  return UnittestRoot_repeatedSfixed32Extension;
}
+ (id<PBExtensionField>) repeatedSfixed64Extension {
  return UnittestRoot_repeatedSfixed64Extension;
}
+ (id<PBExtensionField>) repeatedFloatExtension {
  return UnittestRoot_repeatedFloatExtension;
}
+ (id<PBExtensionField>) repeatedDoubleExtension {
  return UnittestRoot_repeatedDoubleExtension;
}
+ (id<PBExtensionField>) repeatedBoolExtension {
  return UnittestRoot_repeatedBoolExtension;
}
+ (id<PBExtensionField>) repeatedStringExtension {
  return UnittestRoot_repeatedStringExtension;
}
+ (id<PBExtensionField>) repeatedBytesExtension {
  return UnittestRoot_repeatedBytesExtension;
}
+ (id<PBExtensionField>) repeatedGroupExtension {
  return UnittestRoot_repeatedGroupExtension;
}
+ (id<PBExtensionField>) repeatedNestedMessageExtension {
  return UnittestRoot_repeatedNestedMessageExtension;
}
+ (id<PBExtensionField>) repeatedForeignMessageExtension {
  return UnittestRoot_repeatedForeignMessageExtension;
}
+ (id<PBExtensionField>) repeatedImportMessageExtension {
  return UnittestRoot_repeatedImportMessageExtension;
}
+ (id<PBExtensionField>) repeatedNestedEnumExtension {
  return UnittestRoot_repeatedNestedEnumExtension;
}
+ (id<PBExtensionField>) repeatedForeignEnumExtension {
  return UnittestRoot_repeatedForeignEnumExtension;
}
+ (id<PBExtensionField>) repeatedImportEnumExtension {
  return UnittestRoot_repeatedImportEnumExtension;
}
+ (id<PBExtensionField>) repeatedStringPieceExtension {
  return UnittestRoot_repeatedStringPieceExtension;
}
+ (id<PBExtensionField>) repeatedCordExtension {
  return UnittestRoot_repeatedCordExtension;
}
+ (id<PBExtensionField>) defaultInt32Extension {
  return UnittestRoot_defaultInt32Extension;
}
+ (id<PBExtensionField>) defaultInt64Extension {
  return UnittestRoot_defaultInt64Extension;
}
+ (id<PBExtensionField>) defaultUint32Extension {
  return UnittestRoot_defaultUint32Extension;
}
+ (id<PBExtensionField>) defaultUint64Extension {
  return UnittestRoot_defaultUint64Extension;
}
+ (id<PBExtensionField>) defaultSint32Extension {
  return UnittestRoot_defaultSint32Extension;
}
+ (id<PBExtensionField>) defaultSint64Extension {
  return UnittestRoot_defaultSint64Extension;
}
+ (id<PBExtensionField>) defaultFixed32Extension {
  return UnittestRoot_defaultFixed32Extension;
}
+ (id<PBExtensionField>) defaultFixed64Extension {
  return UnittestRoot_defaultFixed64Extension;
}
+ (id<PBExtensionField>) defaultSfixed32Extension {
  return UnittestRoot_defaultSfixed32Extension;
}
+ (id<PBExtensionField>) defaultSfixed64Extension {
  return UnittestRoot_defaultSfixed64Extension;
}
+ (id<PBExtensionField>) defaultFloatExtension {
  return UnittestRoot_defaultFloatExtension;
}
+ (id<PBExtensionField>) defaultDoubleExtension {
  return UnittestRoot_defaultDoubleExtension;
}
+ (id<PBExtensionField>) defaultBoolExtension {
  return UnittestRoot_defaultBoolExtension;
}
+ (id<PBExtensionField>) defaultStringExtension {
  return UnittestRoot_defaultStringExtension;
}
+ (id<PBExtensionField>) defaultBytesExtension {
  return UnittestRoot_defaultBytesExtension;
}
+ (id<PBExtensionField>) defaultNestedEnumExtension {
  return UnittestRoot_defaultNestedEnumExtension;
}
+ (id<PBExtensionField>) defaultForeignEnumExtension {
  return UnittestRoot_defaultForeignEnumExtension;
}
+ (id<PBExtensionField>) defaultImportEnumExtension {
  return UnittestRoot_defaultImportEnumExtension;
}
+ (id<PBExtensionField>) defaultStringPieceExtension {
  return UnittestRoot_defaultStringPieceExtension;
}
+ (id<PBExtensionField>) defaultCordExtension {
  return UnittestRoot_defaultCordExtension;
}
+ (id<PBExtensionField>) myExtensionString {
  return UnittestRoot_myExtensionString;
}
+ (id<PBExtensionField>) myExtensionInt {
  return UnittestRoot_myExtensionInt;
}
+ (id<PBExtensionField>) packedInt32Extension {
  return UnittestRoot_packedInt32Extension;
}
+ (id<PBExtensionField>) packedInt64Extension {
  return UnittestRoot_packedInt64Extension;
}
+ (id<PBExtensionField>) packedUint32Extension {
  return UnittestRoot_packedUint32Extension;
}
+ (id<PBExtensionField>) packedUint64Extension {
  return UnittestRoot_packedUint64Extension;
}
+ (id<PBExtensionField>) packedSint32Extension {
  return UnittestRoot_packedSint32Extension;
}
+ (id<PBExtensionField>) packedSint64Extension {
  return UnittestRoot_packedSint64Extension;
}
+ (id<PBExtensionField>) packedFixed32Extension {
  return UnittestRoot_packedFixed32Extension;
}
+ (id<PBExtensionField>) packedFixed64Extension {
  return UnittestRoot_packedFixed64Extension;
}
+ (id<PBExtensionField>) packedSfixed32Extension {
  return UnittestRoot_packedSfixed32Extension;
}
+ (id<PBExtensionField>) packedSfixed64Extension {
  return UnittestRoot_packedSfixed64Extension;
}
+ (id<PBExtensionField>) packedFloatExtension {
  return UnittestRoot_packedFloatExtension;
}
+ (id<PBExtensionField>) packedDoubleExtension {
  return UnittestRoot_packedDoubleExtension;
}
+ (id<PBExtensionField>) packedBoolExtension {
  return UnittestRoot_packedBoolExtension;
}
+ (id<PBExtensionField>) packedEnumExtension {
  return UnittestRoot_packedEnumExtension;
}
@end

BOOL ForeignEnumIsValidValue(ForeignEnum value) {
  switch (value) {
    case ForeignEnumForeignFoo:
    case ForeignEnumForeignBar:
    case ForeignEnumForeignBaz:
      return YES;
    default:
      return NO;
  }
}
BOOL TestEnumWithDupValueIsValidValue(TestEnumWithDupValue value) {
  switch (value) {
    case TestEnumWithDupValueFoo1:
    case TestEnumWithDupValueBar1:
    case TestEnumWithDupValueBaz:
      return YES;
    default:
      return NO;
  }
}
BOOL TestSparseEnumIsValidValue(TestSparseEnum value) {
  switch (value) {
    case TestSparseEnumSparseA:
    case TestSparseEnumSparseB:
    case TestSparseEnumSparseC:
    case TestSparseEnumSparseD:
    case TestSparseEnumSparseE:
    case TestSparseEnumSparseF:
    case TestSparseEnumSparseG:
      return YES;
    default:
      return NO;
  }
}
@interface TestAllTypes ()
@property int32_t optionalInt32;
@property int64_t optionalInt64;
@property uint32_t optionalUint32;
@property uint64_t optionalUint64;
@property int32_t optionalSint32;
@property int64_t optionalSint64;
@property uint32_t optionalFixed32;
@property uint64_t optionalFixed64;
@property int32_t optionalSfixed32;
@property int64_t optionalSfixed64;
@property Float32 optionalFloat;
@property Float64 optionalDouble;
@property BOOL optionalBool;
@property (retain) NSString* optionalString;
@property (retain) NSData* optionalBytes;
@property (retain) TestAllTypes_OptionalGroup* optionalGroup;
@property (retain) TestAllTypes_NestedMessage* optionalNestedMessage;
@property (retain) ForeignMessage* optionalForeignMessage;
@property (retain) ImportMessage* optionalImportMessage;
@property TestAllTypes_NestedEnum optionalNestedEnum;
@property ForeignEnum optionalForeignEnum;
@property ImportEnum optionalImportEnum;
@property (retain) NSString* optionalStringPiece;
@property (retain) NSString* optionalCord;
@property (retain) PBAppendableArray * repeatedInt32Array;
@property (retain) PBAppendableArray * repeatedInt64Array;
@property (retain) PBAppendableArray * repeatedUint32Array;
@property (retain) PBAppendableArray * repeatedUint64Array;
@property (retain) PBAppendableArray * repeatedSint32Array;
@property (retain) PBAppendableArray * repeatedSint64Array;
@property (retain) PBAppendableArray * repeatedFixed32Array;
@property (retain) PBAppendableArray * repeatedFixed64Array;
@property (retain) PBAppendableArray * repeatedSfixed32Array;
@property (retain) PBAppendableArray * repeatedSfixed64Array;
@property (retain) PBAppendableArray * repeatedFloatArray;
@property (retain) PBAppendableArray * repeatedDoubleArray;
@property (retain) PBAppendableArray * repeatedBoolArray;
@property (retain) PBAppendableArray * repeatedStringArray;
@property (retain) PBAppendableArray * repeatedBytesArray;
@property (retain) PBAppendableArray * repeatedGroupArray;
@property (retain) PBAppendableArray * repeatedNestedMessageArray;
@property (retain) PBAppendableArray * repeatedForeignMessageArray;
@property (retain) PBAppendableArray * repeatedImportMessageArray;
@property (retain) PBAppendableArray * repeatedNestedEnumArray;
@property (retain) PBAppendableArray * repeatedForeignEnumArray;
@property (retain) PBAppendableArray * repeatedImportEnumArray;
@property (retain) PBAppendableArray * repeatedStringPieceArray;
@property (retain) PBAppendableArray * repeatedCordArray;
@property int32_t defaultInt32;
@property int64_t defaultInt64;
@property uint32_t defaultUint32;
@property uint64_t defaultUint64;
@property int32_t defaultSint32;
@property int64_t defaultSint64;
@property uint32_t defaultFixed32;
@property uint64_t defaultFixed64;
@property int32_t defaultSfixed32;
@property int64_t defaultSfixed64;
@property Float32 defaultFloat;
@property Float64 defaultDouble;
@property BOOL defaultBool;
@property (retain) NSString* defaultString;
@property (retain) NSData* defaultBytes;
@property TestAllTypes_NestedEnum defaultNestedEnum;
@property ForeignEnum defaultForeignEnum;
@property ImportEnum defaultImportEnum;
@property (retain) NSString* defaultStringPiece;
@property (retain) NSString* defaultCord;
@end

@implementation TestAllTypes

- (BOOL) hasOptionalInt32 {
  return !!hasOptionalInt32_;
}
- (void) setHasOptionalInt32:(BOOL) value {
  hasOptionalInt32_ = !!value;
}
@synthesize optionalInt32;
- (BOOL) hasOptionalInt64 {
  return !!hasOptionalInt64_;
}
- (void) setHasOptionalInt64:(BOOL) value {
  hasOptionalInt64_ = !!value;
}
@synthesize optionalInt64;
- (BOOL) hasOptionalUint32 {
  return !!hasOptionalUint32_;
}
- (void) setHasOptionalUint32:(BOOL) value {
  hasOptionalUint32_ = !!value;
}
@synthesize optionalUint32;
- (BOOL) hasOptionalUint64 {
  return !!hasOptionalUint64_;
}
- (void) setHasOptionalUint64:(BOOL) value {
  hasOptionalUint64_ = !!value;
}
@synthesize optionalUint64;
- (BOOL) hasOptionalSint32 {
  return !!hasOptionalSint32_;
}
- (void) setHasOptionalSint32:(BOOL) value {
  hasOptionalSint32_ = !!value;
}
@synthesize optionalSint32;
- (BOOL) hasOptionalSint64 {
  return !!hasOptionalSint64_;
}
- (void) setHasOptionalSint64:(BOOL) value {
  hasOptionalSint64_ = !!value;
}
@synthesize optionalSint64;
- (BOOL) hasOptionalFixed32 {
  return !!hasOptionalFixed32_;
}
- (void) setHasOptionalFixed32:(BOOL) value {
  hasOptionalFixed32_ = !!value;
}
@synthesize optionalFixed32;
- (BOOL) hasOptionalFixed64 {
  return !!hasOptionalFixed64_;
}
- (void) setHasOptionalFixed64:(BOOL) value {
  hasOptionalFixed64_ = !!value;
}
@synthesize optionalFixed64;
- (BOOL) hasOptionalSfixed32 {
  return !!hasOptionalSfixed32_;
}
- (void) setHasOptionalSfixed32:(BOOL) value {
  hasOptionalSfixed32_ = !!value;
}
@synthesize optionalSfixed32;
- (BOOL) hasOptionalSfixed64 {
  return !!hasOptionalSfixed64_;
}
- (void) setHasOptionalSfixed64:(BOOL) value {
  hasOptionalSfixed64_ = !!value;
}
@synthesize optionalSfixed64;
- (BOOL) hasOptionalFloat {
  return !!hasOptionalFloat_;
}
- (void) setHasOptionalFloat:(BOOL) value {
  hasOptionalFloat_ = !!value;
}
@synthesize optionalFloat;
- (BOOL) hasOptionalDouble {
  return !!hasOptionalDouble_;
}
- (void) setHasOptionalDouble:(BOOL) value {
  hasOptionalDouble_ = !!value;
}
@synthesize optionalDouble;
- (BOOL) hasOptionalBool {
  return !!hasOptionalBool_;
}
- (void) setHasOptionalBool:(BOOL) value {
  hasOptionalBool_ = !!value;
}
- (BOOL) optionalBool {
  return !!optionalBool_;
}
- (void) setOptionalBool:(BOOL) value {
  optionalBool_ = !!value;
}
- (BOOL) hasOptionalString {
  return !!hasOptionalString_;
}
- (void) setHasOptionalString:(BOOL) value {
  hasOptionalString_ = !!value;
}
@synthesize optionalString;
- (BOOL) hasOptionalBytes {
  return !!hasOptionalBytes_;
}
- (void) setHasOptionalBytes:(BOOL) value {
  hasOptionalBytes_ = !!value;
}
@synthesize optionalBytes;
- (BOOL) hasOptionalGroup {
  return !!hasOptionalGroup_;
}
- (void) setHasOptionalGroup:(BOOL) value {
  hasOptionalGroup_ = !!value;
}
@synthesize optionalGroup;
- (BOOL) hasOptionalNestedMessage {
  return !!hasOptionalNestedMessage_;
}
- (void) setHasOptionalNestedMessage:(BOOL) value {
  hasOptionalNestedMessage_ = !!value;
}
@synthesize optionalNestedMessage;
- (BOOL) hasOptionalForeignMessage {
  return !!hasOptionalForeignMessage_;
}
- (void) setHasOptionalForeignMessage:(BOOL) value {
  hasOptionalForeignMessage_ = !!value;
}
@synthesize optionalForeignMessage;
- (BOOL) hasOptionalImportMessage {
  return !!hasOptionalImportMessage_;
}
- (void) setHasOptionalImportMessage:(BOOL) value {
  hasOptionalImportMessage_ = !!value;
}
@synthesize optionalImportMessage;
- (BOOL) hasOptionalNestedEnum {
  return !!hasOptionalNestedEnum_;
}
- (void) setHasOptionalNestedEnum:(BOOL) value {
  hasOptionalNestedEnum_ = !!value;
}
@synthesize optionalNestedEnum;
- (BOOL) hasOptionalForeignEnum {
  return !!hasOptionalForeignEnum_;
}
- (void) setHasOptionalForeignEnum:(BOOL) value {
  hasOptionalForeignEnum_ = !!value;
}
@synthesize optionalForeignEnum;
- (BOOL) hasOptionalImportEnum {
  return !!hasOptionalImportEnum_;
}
- (void) setHasOptionalImportEnum:(BOOL) value {
  hasOptionalImportEnum_ = !!value;
}
@synthesize optionalImportEnum;
- (BOOL) hasOptionalStringPiece {
  return !!hasOptionalStringPiece_;
}
- (void) setHasOptionalStringPiece:(BOOL) value {
  hasOptionalStringPiece_ = !!value;
}
@synthesize optionalStringPiece;
- (BOOL) hasOptionalCord {
  return !!hasOptionalCord_;
}
- (void) setHasOptionalCord:(BOOL) value {
  hasOptionalCord_ = !!value;
}
@synthesize optionalCord;
@synthesize repeatedInt32Array;
@dynamic repeatedInt32;
@synthesize repeatedInt64Array;
@dynamic repeatedInt64;
@synthesize repeatedUint32Array;
@dynamic repeatedUint32;
@synthesize repeatedUint64Array;
@dynamic repeatedUint64;
@synthesize repeatedSint32Array;
@dynamic repeatedSint32;
@synthesize repeatedSint64Array;
@dynamic repeatedSint64;
@synthesize repeatedFixed32Array;
@dynamic repeatedFixed32;
@synthesize repeatedFixed64Array;
@dynamic repeatedFixed64;
@synthesize repeatedSfixed32Array;
@dynamic repeatedSfixed32;
@synthesize repeatedSfixed64Array;
@dynamic repeatedSfixed64;
@synthesize repeatedFloatArray;
@dynamic repeatedFloat;
@synthesize repeatedDoubleArray;
@dynamic repeatedDouble;
@synthesize repeatedBoolArray;
@dynamic repeatedBool;
@synthesize repeatedStringArray;
@dynamic repeatedString;
@synthesize repeatedBytesArray;
@dynamic repeatedBytes;
@synthesize repeatedGroupArray;
@dynamic repeatedGroup;
@synthesize repeatedNestedMessageArray;
@dynamic repeatedNestedMessage;
@synthesize repeatedForeignMessageArray;
@dynamic repeatedForeignMessage;
@synthesize repeatedImportMessageArray;
@dynamic repeatedImportMessage;
@synthesize repeatedNestedEnumArray;
@dynamic repeatedNestedEnum;
@synthesize repeatedForeignEnumArray;
@dynamic repeatedForeignEnum;
@synthesize repeatedImportEnumArray;
@dynamic repeatedImportEnum;
@synthesize repeatedStringPieceArray;
@dynamic repeatedStringPiece;
@synthesize repeatedCordArray;
@dynamic repeatedCord;
- (BOOL) hasDefaultInt32 {
  return !!hasDefaultInt32_;
}
- (void) setHasDefaultInt32:(BOOL) value {
  hasDefaultInt32_ = !!value;
}
@synthesize defaultInt32;
- (BOOL) hasDefaultInt64 {
  return !!hasDefaultInt64_;
}
- (void) setHasDefaultInt64:(BOOL) value {
  hasDefaultInt64_ = !!value;
}
@synthesize defaultInt64;
- (BOOL) hasDefaultUint32 {
  return !!hasDefaultUint32_;
}
- (void) setHasDefaultUint32:(BOOL) value {
  hasDefaultUint32_ = !!value;
}
@synthesize defaultUint32;
- (BOOL) hasDefaultUint64 {
  return !!hasDefaultUint64_;
}
- (void) setHasDefaultUint64:(BOOL) value {
  hasDefaultUint64_ = !!value;
}
@synthesize defaultUint64;
- (BOOL) hasDefaultSint32 {
  return !!hasDefaultSint32_;
}
- (void) setHasDefaultSint32:(BOOL) value {
  hasDefaultSint32_ = !!value;
}
@synthesize defaultSint32;
- (BOOL) hasDefaultSint64 {
  return !!hasDefaultSint64_;
}
- (void) setHasDefaultSint64:(BOOL) value {
  hasDefaultSint64_ = !!value;
}
@synthesize defaultSint64;
- (BOOL) hasDefaultFixed32 {
  return !!hasDefaultFixed32_;
}
- (void) setHasDefaultFixed32:(BOOL) value {
  hasDefaultFixed32_ = !!value;
}
@synthesize defaultFixed32;
- (BOOL) hasDefaultFixed64 {
  return !!hasDefaultFixed64_;
}
- (void) setHasDefaultFixed64:(BOOL) value {
  hasDefaultFixed64_ = !!value;
}
@synthesize defaultFixed64;
- (BOOL) hasDefaultSfixed32 {
  return !!hasDefaultSfixed32_;
}
- (void) setHasDefaultSfixed32:(BOOL) value {
  hasDefaultSfixed32_ = !!value;
}
@synthesize defaultSfixed32;
- (BOOL) hasDefaultSfixed64 {
  return !!hasDefaultSfixed64_;
}
- (void) setHasDefaultSfixed64:(BOOL) value {
  hasDefaultSfixed64_ = !!value;
}
@synthesize defaultSfixed64;
- (BOOL) hasDefaultFloat {
  return !!hasDefaultFloat_;
}
- (void) setHasDefaultFloat:(BOOL) value {
  hasDefaultFloat_ = !!value;
}
@synthesize defaultFloat;
- (BOOL) hasDefaultDouble {
  return !!hasDefaultDouble_;
}
- (void) setHasDefaultDouble:(BOOL) value {
  hasDefaultDouble_ = !!value;
}
@synthesize defaultDouble;
- (BOOL) hasDefaultBool {
  return !!hasDefaultBool_;
}
- (void) setHasDefaultBool:(BOOL) value {
  hasDefaultBool_ = !!value;
}
- (BOOL) defaultBool {
  return !!defaultBool_;
}
- (void) setDefaultBool:(BOOL) value {
  defaultBool_ = !!value;
}
- (BOOL) hasDefaultString {
  return !!hasDefaultString_;
}
- (void) setHasDefaultString:(BOOL) value {
  hasDefaultString_ = !!value;
}
@synthesize defaultString;
- (BOOL) hasDefaultBytes {
  return !!hasDefaultBytes_;
}
- (void) setHasDefaultBytes:(BOOL) value {
  hasDefaultBytes_ = !!value;
}
@synthesize defaultBytes;
- (BOOL) hasDefaultNestedEnum {
  return !!hasDefaultNestedEnum_;
}
- (void) setHasDefaultNestedEnum:(BOOL) value {
  hasDefaultNestedEnum_ = !!value;
}
@synthesize defaultNestedEnum;
- (BOOL) hasDefaultForeignEnum {
  return !!hasDefaultForeignEnum_;
}
- (void) setHasDefaultForeignEnum:(BOOL) value {
  hasDefaultForeignEnum_ = !!value;
}
@synthesize defaultForeignEnum;
- (BOOL) hasDefaultImportEnum {
  return !!hasDefaultImportEnum_;
}
- (void) setHasDefaultImportEnum:(BOOL) value {
  hasDefaultImportEnum_ = !!value;
}
@synthesize defaultImportEnum;
- (BOOL) hasDefaultStringPiece {
  return !!hasDefaultStringPiece_;
}
- (void) setHasDefaultStringPiece:(BOOL) value {
  hasDefaultStringPiece_ = !!value;
}
@synthesize defaultStringPiece;
- (BOOL) hasDefaultCord {
  return !!hasDefaultCord_;
}
- (void) setHasDefaultCord:(BOOL) value {
  hasDefaultCord_ = !!value;
}
@synthesize defaultCord;
- (void) dealloc {
  self.optionalString = nil;
  self.optionalBytes = nil;
  self.optionalGroup = nil;
  self.optionalNestedMessage = nil;
  self.optionalForeignMessage = nil;
  self.optionalImportMessage = nil;
  self.optionalStringPiece = nil;
  self.optionalCord = nil;
  self.repeatedInt32Array = nil;
  self.repeatedInt64Array = nil;
  self.repeatedUint32Array = nil;
  self.repeatedUint64Array = nil;
  self.repeatedSint32Array = nil;
  self.repeatedSint64Array = nil;
  self.repeatedFixed32Array = nil;
  self.repeatedFixed64Array = nil;
  self.repeatedSfixed32Array = nil;
  self.repeatedSfixed64Array = nil;
  self.repeatedFloatArray = nil;
  self.repeatedDoubleArray = nil;
  self.repeatedBoolArray = nil;
  self.repeatedStringArray = nil;
  self.repeatedBytesArray = nil;
  self.repeatedGroupArray = nil;
  self.repeatedNestedMessageArray = nil;
  self.repeatedForeignMessageArray = nil;
  self.repeatedImportMessageArray = nil;
  self.repeatedNestedEnumArray = nil;
  self.repeatedForeignEnumArray = nil;
  self.repeatedImportEnumArray = nil;
  self.repeatedStringPieceArray = nil;
  self.repeatedCordArray = nil;
  self.defaultString = nil;
  self.defaultBytes = nil;
  self.defaultStringPiece = nil;
  self.defaultCord = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.optionalInt32 = 0;
    self.optionalInt64 = 0L;
    self.optionalUint32 = 0;
    self.optionalUint64 = 0L;
    self.optionalSint32 = 0;
    self.optionalSint64 = 0L;
    self.optionalFixed32 = 0;
    self.optionalFixed64 = 0L;
    self.optionalSfixed32 = 0;
    self.optionalSfixed64 = 0L;
    self.optionalFloat = 0;
    self.optionalDouble = 0;
    self.optionalBool = NO;
    self.optionalString = @"";
    self.optionalBytes = [NSData data];
    self.optionalGroup = [TestAllTypes_OptionalGroup defaultInstance];
    self.optionalNestedMessage = [TestAllTypes_NestedMessage defaultInstance];
    self.optionalForeignMessage = [ForeignMessage defaultInstance];
    self.optionalImportMessage = [ImportMessage defaultInstance];
    self.optionalNestedEnum = TestAllTypes_NestedEnumFoo;
    self.optionalForeignEnum = ForeignEnumForeignFoo;
    self.optionalImportEnum = ImportEnumImportFoo;
    self.optionalStringPiece = @"";
    self.optionalCord = @"";
    self.defaultInt32 = 41;
    self.defaultInt64 = 42L;
    self.defaultUint32 = 43;
    self.defaultUint64 = 44L;
    self.defaultSint32 = -45;
    self.defaultSint64 = 46L;
    self.defaultFixed32 = 47;
    self.defaultFixed64 = 48L;
    self.defaultSfixed32 = 49;
    self.defaultSfixed64 = -50L;
    self.defaultFloat = 51.5;
    self.defaultDouble = 52000;
    self.defaultBool = YES;
    self.defaultString = @"hello";
    self.defaultBytes = [NSData dataWithBytes:"world" length:5];
    self.defaultNestedEnum = TestAllTypes_NestedEnumBar;
    self.defaultForeignEnum = ForeignEnumForeignBar;
    self.defaultImportEnum = ImportEnumImportBar;
    self.defaultStringPiece = @"abc";
    self.defaultCord = @"123";
  }
  return self;
}
static TestAllTypes* defaultTestAllTypesInstance = nil;
+ (void) initialize {
  if (self == [TestAllTypes class]) {
    defaultTestAllTypesInstance = [[TestAllTypes alloc] init];
  }
}
+ (TestAllTypes*) defaultInstance {
  return defaultTestAllTypesInstance;
}
- (TestAllTypes*) defaultInstance {
  return defaultTestAllTypesInstance;
}
- (PBArray *)repeatedInt32 {
  return repeatedInt32Array;
}
- (int32_t)repeatedInt32AtIndex:(NSUInteger)index {
  return [repeatedInt32Array int32AtIndex:index];
}
- (PBArray *)repeatedInt64 {
  return repeatedInt64Array;
}
- (int64_t)repeatedInt64AtIndex:(NSUInteger)index {
  return [repeatedInt64Array int64AtIndex:index];
}
- (PBArray *)repeatedUint32 {
  return repeatedUint32Array;
}
- (uint32_t)repeatedUint32AtIndex:(NSUInteger)index {
  return [repeatedUint32Array uint32AtIndex:index];
}
- (PBArray *)repeatedUint64 {
  return repeatedUint64Array;
}
- (uint64_t)repeatedUint64AtIndex:(NSUInteger)index {
  return [repeatedUint64Array uint64AtIndex:index];
}
- (PBArray *)repeatedSint32 {
  return repeatedSint32Array;
}
- (int32_t)repeatedSint32AtIndex:(NSUInteger)index {
  return [repeatedSint32Array int32AtIndex:index];
}
- (PBArray *)repeatedSint64 {
  return repeatedSint64Array;
}
- (int64_t)repeatedSint64AtIndex:(NSUInteger)index {
  return [repeatedSint64Array int64AtIndex:index];
}
- (PBArray *)repeatedFixed32 {
  return repeatedFixed32Array;
}
- (uint32_t)repeatedFixed32AtIndex:(NSUInteger)index {
  return [repeatedFixed32Array uint32AtIndex:index];
}
- (PBArray *)repeatedFixed64 {
  return repeatedFixed64Array;
}
- (uint64_t)repeatedFixed64AtIndex:(NSUInteger)index {
  return [repeatedFixed64Array uint64AtIndex:index];
}
- (PBArray *)repeatedSfixed32 {
  return repeatedSfixed32Array;
}
- (int32_t)repeatedSfixed32AtIndex:(NSUInteger)index {
  return [repeatedSfixed32Array int32AtIndex:index];
}
- (PBArray *)repeatedSfixed64 {
  return repeatedSfixed64Array;
}
- (int64_t)repeatedSfixed64AtIndex:(NSUInteger)index {
  return [repeatedSfixed64Array int64AtIndex:index];
}
- (PBArray *)repeatedFloat {
  return repeatedFloatArray;
}
- (Float32)repeatedFloatAtIndex:(NSUInteger)index {
  return [repeatedFloatArray floatAtIndex:index];
}
- (PBArray *)repeatedDouble {
  return repeatedDoubleArray;
}
- (Float64)repeatedDoubleAtIndex:(NSUInteger)index {
  return [repeatedDoubleArray doubleAtIndex:index];
}
- (PBArray *)repeatedBool {
  return repeatedBoolArray;
}
- (BOOL)repeatedBoolAtIndex:(NSUInteger)index {
  return [repeatedBoolArray boolAtIndex:index];
}
- (PBArray *)repeatedString {
  return repeatedStringArray;
}
- (NSString*)repeatedStringAtIndex:(NSUInteger)index {
  return [repeatedStringArray objectAtIndex:index];
}
- (PBArray *)repeatedBytes {
  return repeatedBytesArray;
}
- (NSData*)repeatedBytesAtIndex:(NSUInteger)index {
  return [repeatedBytesArray objectAtIndex:index];
}
- (PBArray *)repeatedGroup {
  return repeatedGroupArray;
}
- (TestAllTypes_RepeatedGroup*)repeatedGroupAtIndex:(NSUInteger)index {
  return [repeatedGroupArray objectAtIndex:index];
}
- (PBArray *)repeatedNestedMessage {
  return repeatedNestedMessageArray;
}
- (TestAllTypes_NestedMessage*)repeatedNestedMessageAtIndex:(NSUInteger)index {
  return [repeatedNestedMessageArray objectAtIndex:index];
}
- (PBArray *)repeatedForeignMessage {
  return repeatedForeignMessageArray;
}
- (ForeignMessage*)repeatedForeignMessageAtIndex:(NSUInteger)index {
  return [repeatedForeignMessageArray objectAtIndex:index];
}
- (PBArray *)repeatedImportMessage {
  return repeatedImportMessageArray;
}
- (ImportMessage*)repeatedImportMessageAtIndex:(NSUInteger)index {
  return [repeatedImportMessageArray objectAtIndex:index];
}
- (PBArray *)repeatedNestedEnum {
  return repeatedNestedEnumArray;
}
- (TestAllTypes_NestedEnum)repeatedNestedEnumAtIndex:(NSUInteger)index {
  return [repeatedNestedEnumArray int32AtIndex:index];
}
- (PBArray *)repeatedForeignEnum {
  return repeatedForeignEnumArray;
}
- (ForeignEnum)repeatedForeignEnumAtIndex:(NSUInteger)index {
  return [repeatedForeignEnumArray int32AtIndex:index];
}
- (PBArray *)repeatedImportEnum {
  return repeatedImportEnumArray;
}
- (ImportEnum)repeatedImportEnumAtIndex:(NSUInteger)index {
  return [repeatedImportEnumArray int32AtIndex:index];
}
- (PBArray *)repeatedStringPiece {
  return repeatedStringPieceArray;
}
- (NSString*)repeatedStringPieceAtIndex:(NSUInteger)index {
  return [repeatedStringPieceArray objectAtIndex:index];
}
- (PBArray *)repeatedCord {
  return repeatedCordArray;
}
- (NSString*)repeatedCordAtIndex:(NSUInteger)index {
  return [repeatedCordArray objectAtIndex:index];
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasOptionalInt32) {
    [output writeInt32:1 value:self.optionalInt32];
  }
  if (self.hasOptionalInt64) {
    [output writeInt64:2 value:self.optionalInt64];
  }
  if (self.hasOptionalUint32) {
    [output writeUInt32:3 value:self.optionalUint32];
  }
  if (self.hasOptionalUint64) {
    [output writeUInt64:4 value:self.optionalUint64];
  }
  if (self.hasOptionalSint32) {
    [output writeSInt32:5 value:self.optionalSint32];
  }
  if (self.hasOptionalSint64) {
    [output writeSInt64:6 value:self.optionalSint64];
  }
  if (self.hasOptionalFixed32) {
    [output writeFixed32:7 value:self.optionalFixed32];
  }
  if (self.hasOptionalFixed64) {
    [output writeFixed64:8 value:self.optionalFixed64];
  }
  if (self.hasOptionalSfixed32) {
    [output writeSFixed32:9 value:self.optionalSfixed32];
  }
  if (self.hasOptionalSfixed64) {
    [output writeSFixed64:10 value:self.optionalSfixed64];
  }
  if (self.hasOptionalFloat) {
    [output writeFloat:11 value:self.optionalFloat];
  }
  if (self.hasOptionalDouble) {
    [output writeDouble:12 value:self.optionalDouble];
  }
  if (self.hasOptionalBool) {
    [output writeBool:13 value:self.optionalBool];
  }
  if (self.hasOptionalString) {
    [output writeString:14 value:self.optionalString];
  }
  if (self.hasOptionalBytes) {
    [output writeData:15 value:self.optionalBytes];
  }
  if (self.hasOptionalGroup) {
    [output writeGroup:16 value:self.optionalGroup];
  }
  if (self.hasOptionalNestedMessage) {
    [output writeMessage:18 value:self.optionalNestedMessage];
  }
  if (self.hasOptionalForeignMessage) {
    [output writeMessage:19 value:self.optionalForeignMessage];
  }
  if (self.hasOptionalImportMessage) {
    [output writeMessage:20 value:self.optionalImportMessage];
  }
  if (self.hasOptionalNestedEnum) {
    [output writeEnum:21 value:self.optionalNestedEnum];
  }
  if (self.hasOptionalForeignEnum) {
    [output writeEnum:22 value:self.optionalForeignEnum];
  }
  if (self.hasOptionalImportEnum) {
    [output writeEnum:23 value:self.optionalImportEnum];
  }
  if (self.hasOptionalStringPiece) {
    [output writeString:24 value:self.optionalStringPiece];
  }
  if (self.hasOptionalCord) {
    [output writeString:25 value:self.optionalCord];
  }
  const NSUInteger repeatedInt32ArrayCount = self.repeatedInt32Array.count;
  if (repeatedInt32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.repeatedInt32Array.data;
    for (NSUInteger i = 0; i < repeatedInt32ArrayCount; ++i) {
      [output writeInt32:31 value:values[i]];
    }
  }
  const NSUInteger repeatedInt64ArrayCount = self.repeatedInt64Array.count;
  if (repeatedInt64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.repeatedInt64Array.data;
    for (NSUInteger i = 0; i < repeatedInt64ArrayCount; ++i) {
      [output writeInt64:32 value:values[i]];
    }
  }
  const NSUInteger repeatedUint32ArrayCount = self.repeatedUint32Array.count;
  if (repeatedUint32ArrayCount > 0) {
    const uint32_t *values = (const uint32_t *)self.repeatedUint32Array.data;
    for (NSUInteger i = 0; i < repeatedUint32ArrayCount; ++i) {
      [output writeUInt32:33 value:values[i]];
    }
  }
  const NSUInteger repeatedUint64ArrayCount = self.repeatedUint64Array.count;
  if (repeatedUint64ArrayCount > 0) {
    const uint64_t *values = (const uint64_t *)self.repeatedUint64Array.data;
    for (NSUInteger i = 0; i < repeatedUint64ArrayCount; ++i) {
      [output writeUInt64:34 value:values[i]];
    }
  }
  const NSUInteger repeatedSint32ArrayCount = self.repeatedSint32Array.count;
  if (repeatedSint32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.repeatedSint32Array.data;
    for (NSUInteger i = 0; i < repeatedSint32ArrayCount; ++i) {
      [output writeSInt32:35 value:values[i]];
    }
  }
  const NSUInteger repeatedSint64ArrayCount = self.repeatedSint64Array.count;
  if (repeatedSint64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.repeatedSint64Array.data;
    for (NSUInteger i = 0; i < repeatedSint64ArrayCount; ++i) {
      [output writeSInt64:36 value:values[i]];
    }
  }
  const NSUInteger repeatedFixed32ArrayCount = self.repeatedFixed32Array.count;
  if (repeatedFixed32ArrayCount > 0) {
    const uint32_t *values = (const uint32_t *)self.repeatedFixed32Array.data;
    for (NSUInteger i = 0; i < repeatedFixed32ArrayCount; ++i) {
      [output writeFixed32:37 value:values[i]];
    }
  }
  const NSUInteger repeatedFixed64ArrayCount = self.repeatedFixed64Array.count;
  if (repeatedFixed64ArrayCount > 0) {
    const uint64_t *values = (const uint64_t *)self.repeatedFixed64Array.data;
    for (NSUInteger i = 0; i < repeatedFixed64ArrayCount; ++i) {
      [output writeFixed64:38 value:values[i]];
    }
  }
  const NSUInteger repeatedSfixed32ArrayCount = self.repeatedSfixed32Array.count;
  if (repeatedSfixed32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.repeatedSfixed32Array.data;
    for (NSUInteger i = 0; i < repeatedSfixed32ArrayCount; ++i) {
      [output writeSFixed32:39 value:values[i]];
    }
  }
  const NSUInteger repeatedSfixed64ArrayCount = self.repeatedSfixed64Array.count;
  if (repeatedSfixed64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.repeatedSfixed64Array.data;
    for (NSUInteger i = 0; i < repeatedSfixed64ArrayCount; ++i) {
      [output writeSFixed64:40 value:values[i]];
    }
  }
  const NSUInteger repeatedFloatArrayCount = self.repeatedFloatArray.count;
  if (repeatedFloatArrayCount > 0) {
    const Float32 *values = (const Float32 *)self.repeatedFloatArray.data;
    for (NSUInteger i = 0; i < repeatedFloatArrayCount; ++i) {
      [output writeFloat:41 value:values[i]];
    }
  }
  const NSUInteger repeatedDoubleArrayCount = self.repeatedDoubleArray.count;
  if (repeatedDoubleArrayCount > 0) {
    const Float64 *values = (const Float64 *)self.repeatedDoubleArray.data;
    for (NSUInteger i = 0; i < repeatedDoubleArrayCount; ++i) {
      [output writeDouble:42 value:values[i]];
    }
  }
  const NSUInteger repeatedBoolArrayCount = self.repeatedBoolArray.count;
  if (repeatedBoolArrayCount > 0) {
    const BOOL *values = (const BOOL *)self.repeatedBoolArray.data;
    for (NSUInteger i = 0; i < repeatedBoolArrayCount; ++i) {
      [output writeBool:43 value:values[i]];
    }
  }
  const NSUInteger repeatedStringArrayCount = self.repeatedStringArray.count;
  if (repeatedStringArrayCount > 0) {
    const NSString* *values = (const NSString* *)self.repeatedStringArray.data;
    for (NSUInteger i = 0; i < repeatedStringArrayCount; ++i) {
      [output writeString:44 value:values[i]];
    }
  }
  const NSUInteger repeatedBytesArrayCount = self.repeatedBytesArray.count;
  if (repeatedBytesArrayCount > 0) {
    const NSData* *values = (const NSData* *)self.repeatedBytesArray.data;
    for (NSUInteger i = 0; i < repeatedBytesArrayCount; ++i) {
      [output writeData:45 value:values[i]];
    }
  }
  for (TestAllTypes_RepeatedGroup *element in self.repeatedGroupArray) {
    [output writeGroup:46 value:element];
  }
  for (TestAllTypes_NestedMessage *element in self.repeatedNestedMessageArray) {
    [output writeMessage:48 value:element];
  }
  for (ForeignMessage *element in self.repeatedForeignMessageArray) {
    [output writeMessage:49 value:element];
  }
  for (ImportMessage *element in self.repeatedImportMessageArray) {
    [output writeMessage:50 value:element];
  }
  const NSUInteger repeatedNestedEnumArrayCount = self.repeatedNestedEnumArray.count;
  const TestAllTypes_NestedEnum *repeatedNestedEnumArrayValues = (const TestAllTypes_NestedEnum *)self.repeatedNestedEnumArray.data;
  for (NSUInteger i = 0; i < repeatedNestedEnumArrayCount; ++i) {
    [output writeEnum:51 value:repeatedNestedEnumArrayValues[i]];
  }
  const NSUInteger repeatedForeignEnumArrayCount = self.repeatedForeignEnumArray.count;
  const ForeignEnum *repeatedForeignEnumArrayValues = (const ForeignEnum *)self.repeatedForeignEnumArray.data;
  for (NSUInteger i = 0; i < repeatedForeignEnumArrayCount; ++i) {
    [output writeEnum:52 value:repeatedForeignEnumArrayValues[i]];
  }
  const NSUInteger repeatedImportEnumArrayCount = self.repeatedImportEnumArray.count;
  const ImportEnum *repeatedImportEnumArrayValues = (const ImportEnum *)self.repeatedImportEnumArray.data;
  for (NSUInteger i = 0; i < repeatedImportEnumArrayCount; ++i) {
    [output writeEnum:53 value:repeatedImportEnumArrayValues[i]];
  }
  const NSUInteger repeatedStringPieceArrayCount = self.repeatedStringPieceArray.count;
  if (repeatedStringPieceArrayCount > 0) {
    const NSString* *values = (const NSString* *)self.repeatedStringPieceArray.data;
    for (NSUInteger i = 0; i < repeatedStringPieceArrayCount; ++i) {
      [output writeString:54 value:values[i]];
    }
  }
  const NSUInteger repeatedCordArrayCount = self.repeatedCordArray.count;
  if (repeatedCordArrayCount > 0) {
    const NSString* *values = (const NSString* *)self.repeatedCordArray.data;
    for (NSUInteger i = 0; i < repeatedCordArrayCount; ++i) {
      [output writeString:55 value:values[i]];
    }
  }
  if (self.hasDefaultInt32) {
    [output writeInt32:61 value:self.defaultInt32];
  }
  if (self.hasDefaultInt64) {
    [output writeInt64:62 value:self.defaultInt64];
  }
  if (self.hasDefaultUint32) {
    [output writeUInt32:63 value:self.defaultUint32];
  }
  if (self.hasDefaultUint64) {
    [output writeUInt64:64 value:self.defaultUint64];
  }
  if (self.hasDefaultSint32) {
    [output writeSInt32:65 value:self.defaultSint32];
  }
  if (self.hasDefaultSint64) {
    [output writeSInt64:66 value:self.defaultSint64];
  }
  if (self.hasDefaultFixed32) {
    [output writeFixed32:67 value:self.defaultFixed32];
  }
  if (self.hasDefaultFixed64) {
    [output writeFixed64:68 value:self.defaultFixed64];
  }
  if (self.hasDefaultSfixed32) {
    [output writeSFixed32:69 value:self.defaultSfixed32];
  }
  if (self.hasDefaultSfixed64) {
    [output writeSFixed64:70 value:self.defaultSfixed64];
  }
  if (self.hasDefaultFloat) {
    [output writeFloat:71 value:self.defaultFloat];
  }
  if (self.hasDefaultDouble) {
    [output writeDouble:72 value:self.defaultDouble];
  }
  if (self.hasDefaultBool) {
    [output writeBool:73 value:self.defaultBool];
  }
  if (self.hasDefaultString) {
    [output writeString:74 value:self.defaultString];
  }
  if (self.hasDefaultBytes) {
    [output writeData:75 value:self.defaultBytes];
  }
  if (self.hasDefaultNestedEnum) {
    [output writeEnum:81 value:self.defaultNestedEnum];
  }
  if (self.hasDefaultForeignEnum) {
    [output writeEnum:82 value:self.defaultForeignEnum];
  }
  if (self.hasDefaultImportEnum) {
    [output writeEnum:83 value:self.defaultImportEnum];
  }
  if (self.hasDefaultStringPiece) {
    [output writeString:84 value:self.defaultStringPiece];
  }
  if (self.hasDefaultCord) {
    [output writeString:85 value:self.defaultCord];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasOptionalInt32) {
    size += computeInt32Size(1, self.optionalInt32);
  }
  if (self.hasOptionalInt64) {
    size += computeInt64Size(2, self.optionalInt64);
  }
  if (self.hasOptionalUint32) {
    size += computeUInt32Size(3, self.optionalUint32);
  }
  if (self.hasOptionalUint64) {
    size += computeUInt64Size(4, self.optionalUint64);
  }
  if (self.hasOptionalSint32) {
    size += computeSInt32Size(5, self.optionalSint32);
  }
  if (self.hasOptionalSint64) {
    size += computeSInt64Size(6, self.optionalSint64);
  }
  if (self.hasOptionalFixed32) {
    size += computeFixed32Size(7, self.optionalFixed32);
  }
  if (self.hasOptionalFixed64) {
    size += computeFixed64Size(8, self.optionalFixed64);
  }
  if (self.hasOptionalSfixed32) {
    size += computeSFixed32Size(9, self.optionalSfixed32);
  }
  if (self.hasOptionalSfixed64) {
    size += computeSFixed64Size(10, self.optionalSfixed64);
  }
  if (self.hasOptionalFloat) {
    size += computeFloatSize(11, self.optionalFloat);
  }
  if (self.hasOptionalDouble) {
    size += computeDoubleSize(12, self.optionalDouble);
  }
  if (self.hasOptionalBool) {
    size += computeBoolSize(13, self.optionalBool);
  }
  if (self.hasOptionalString) {
    size += computeStringSize(14, self.optionalString);
  }
  if (self.hasOptionalBytes) {
    size += computeDataSize(15, self.optionalBytes);
  }
  if (self.hasOptionalGroup) {
    size += computeGroupSize(16, self.optionalGroup);
  }
  if (self.hasOptionalNestedMessage) {
    size += computeMessageSize(18, self.optionalNestedMessage);
  }
  if (self.hasOptionalForeignMessage) {
    size += computeMessageSize(19, self.optionalForeignMessage);
  }
  if (self.hasOptionalImportMessage) {
    size += computeMessageSize(20, self.optionalImportMessage);
  }
  if (self.hasOptionalNestedEnum) {
    size += computeEnumSize(21, self.optionalNestedEnum);
  }
  if (self.hasOptionalForeignEnum) {
    size += computeEnumSize(22, self.optionalForeignEnum);
  }
  if (self.hasOptionalImportEnum) {
    size += computeEnumSize(23, self.optionalImportEnum);
  }
  if (self.hasOptionalStringPiece) {
    size += computeStringSize(24, self.optionalStringPiece);
  }
  if (self.hasOptionalCord) {
    size += computeStringSize(25, self.optionalCord);
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedInt32Array.count;
    const int32_t *values = (const int32_t *)self.repeatedInt32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedInt64Array.count;
    const int64_t *values = (const int64_t *)self.repeatedInt64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedUint32Array.count;
    const uint32_t *values = (const uint32_t *)self.repeatedUint32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeUInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedUint64Array.count;
    const uint64_t *values = (const uint64_t *)self.repeatedUint64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeUInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedSint32Array.count;
    const int32_t *values = (const int32_t *)self.repeatedSint32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeSInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedSint64Array.count;
    const int64_t *values = (const int64_t *)self.repeatedSint64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeSInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedFixed32Array.count;
    dataSize = 4 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedFixed64Array.count;
    dataSize = 8 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedSfixed32Array.count;
    dataSize = 4 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedSfixed64Array.count;
    dataSize = 8 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedFloatArray.count;
    dataSize = 4 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedDoubleArray.count;
    dataSize = 8 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedBoolArray.count;
    dataSize = 1 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedStringArray.count;
    const NSString* *values = (const NSString* *)self.repeatedStringArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeStringSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedBytesArray.count;
    const NSData* *values = (const NSData* *)self.repeatedBytesArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeDataSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  for (TestAllTypes_RepeatedGroup *element in self.repeatedGroupArray) {
    size += computeGroupSize(46, element);
  }
  for (TestAllTypes_NestedMessage *element in self.repeatedNestedMessageArray) {
    size += computeMessageSize(48, element);
  }
  for (ForeignMessage *element in self.repeatedForeignMessageArray) {
    size += computeMessageSize(49, element);
  }
  for (ImportMessage *element in self.repeatedImportMessageArray) {
    size += computeMessageSize(50, element);
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedNestedEnumArray.count;
    const TestAllTypes_NestedEnum *values = (const TestAllTypes_NestedEnum *)self.repeatedNestedEnumArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeEnumSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedForeignEnumArray.count;
    const ForeignEnum *values = (const ForeignEnum *)self.repeatedForeignEnumArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeEnumSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedImportEnumArray.count;
    const ImportEnum *values = (const ImportEnum *)self.repeatedImportEnumArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeEnumSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedStringPieceArray.count;
    const NSString* *values = (const NSString* *)self.repeatedStringPieceArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeStringSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedCordArray.count;
    const NSString* *values = (const NSString* *)self.repeatedCordArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeStringSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  if (self.hasDefaultInt32) {
    size += computeInt32Size(61, self.defaultInt32);
  }
  if (self.hasDefaultInt64) {
    size += computeInt64Size(62, self.defaultInt64);
  }
  if (self.hasDefaultUint32) {
    size += computeUInt32Size(63, self.defaultUint32);
  }
  if (self.hasDefaultUint64) {
    size += computeUInt64Size(64, self.defaultUint64);
  }
  if (self.hasDefaultSint32) {
    size += computeSInt32Size(65, self.defaultSint32);
  }
  if (self.hasDefaultSint64) {
    size += computeSInt64Size(66, self.defaultSint64);
  }
  if (self.hasDefaultFixed32) {
    size += computeFixed32Size(67, self.defaultFixed32);
  }
  if (self.hasDefaultFixed64) {
    size += computeFixed64Size(68, self.defaultFixed64);
  }
  if (self.hasDefaultSfixed32) {
    size += computeSFixed32Size(69, self.defaultSfixed32);
  }
  if (self.hasDefaultSfixed64) {
    size += computeSFixed64Size(70, self.defaultSfixed64);
  }
  if (self.hasDefaultFloat) {
    size += computeFloatSize(71, self.defaultFloat);
  }
  if (self.hasDefaultDouble) {
    size += computeDoubleSize(72, self.defaultDouble);
  }
  if (self.hasDefaultBool) {
    size += computeBoolSize(73, self.defaultBool);
  }
  if (self.hasDefaultString) {
    size += computeStringSize(74, self.defaultString);
  }
  if (self.hasDefaultBytes) {
    size += computeDataSize(75, self.defaultBytes);
  }
  if (self.hasDefaultNestedEnum) {
    size += computeEnumSize(81, self.defaultNestedEnum);
  }
  if (self.hasDefaultForeignEnum) {
    size += computeEnumSize(82, self.defaultForeignEnum);
  }
  if (self.hasDefaultImportEnum) {
    size += computeEnumSize(83, self.defaultImportEnum);
  }
  if (self.hasDefaultStringPiece) {
    size += computeStringSize(84, self.defaultStringPiece);
  }
  if (self.hasDefaultCord) {
    size += computeStringSize(85, self.defaultCord);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestAllTypes*) parseFromData:(NSData*) data {
  return (TestAllTypes*)[[[TestAllTypes builder] mergeFromData:data] build];
}
+ (TestAllTypes*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes*)[[[TestAllTypes builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes*) parseFromInputStream:(NSInputStream*) input {
  return (TestAllTypes*)[[[TestAllTypes builder] mergeFromInputStream:input] build];
}
+ (TestAllTypes*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes*)[[[TestAllTypes builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestAllTypes*)[[[TestAllTypes builder] mergeFromCodedInputStream:input] build];
}
+ (TestAllTypes*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes*)[[[TestAllTypes builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_Builder*) builder {
  return [[[TestAllTypes_Builder alloc] init] autorelease];
}
+ (TestAllTypes_Builder*) builderWithPrototype:(TestAllTypes*) prototype {
  return [[TestAllTypes builder] mergeFrom:prototype];
}
- (TestAllTypes_Builder*) builder {
  return [TestAllTypes builder];
}
- (TestAllTypes_Builder*) toBuilder {
  return [TestAllTypes builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasOptionalInt32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalInt32", [NSNumber numberWithInt:self.optionalInt32]];
  }
  if (self.hasOptionalInt64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalInt64", [NSNumber numberWithLongLong:self.optionalInt64]];
  }
  if (self.hasOptionalUint32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalUint32", [NSNumber numberWithInt:self.optionalUint32]];
  }
  if (self.hasOptionalUint64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalUint64", [NSNumber numberWithLongLong:self.optionalUint64]];
  }
  if (self.hasOptionalSint32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalSint32", [NSNumber numberWithInt:self.optionalSint32]];
  }
  if (self.hasOptionalSint64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalSint64", [NSNumber numberWithLongLong:self.optionalSint64]];
  }
  if (self.hasOptionalFixed32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalFixed32", [NSNumber numberWithInt:self.optionalFixed32]];
  }
  if (self.hasOptionalFixed64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalFixed64", [NSNumber numberWithLongLong:self.optionalFixed64]];
  }
  if (self.hasOptionalSfixed32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalSfixed32", [NSNumber numberWithInt:self.optionalSfixed32]];
  }
  if (self.hasOptionalSfixed64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalSfixed64", [NSNumber numberWithLongLong:self.optionalSfixed64]];
  }
  if (self.hasOptionalFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalFloat", [NSNumber numberWithFloat:self.optionalFloat]];
  }
  if (self.hasOptionalDouble) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalDouble", [NSNumber numberWithDouble:self.optionalDouble]];
  }
  if (self.hasOptionalBool) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalBool", [NSNumber numberWithBool:self.optionalBool]];
  }
  if (self.hasOptionalString) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalString", self.optionalString];
  }
  if (self.hasOptionalBytes) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalBytes", self.optionalBytes];
  }
  if (self.hasOptionalGroup) {
    [output appendFormat:@"%@%@ {\n", indent, @"optionalGroup"];
    [self.optionalGroup writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasOptionalNestedMessage) {
    [output appendFormat:@"%@%@ {\n", indent, @"optionalNestedMessage"];
    [self.optionalNestedMessage writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasOptionalForeignMessage) {
    [output appendFormat:@"%@%@ {\n", indent, @"optionalForeignMessage"];
    [self.optionalForeignMessage writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasOptionalImportMessage) {
    [output appendFormat:@"%@%@ {\n", indent, @"optionalImportMessage"];
    [self.optionalImportMessage writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasOptionalNestedEnum) {
    [output appendFormat:@"%@%@: %d\n", indent, @"optionalNestedEnum", self.optionalNestedEnum];
  }
  if (self.hasOptionalForeignEnum) {
    [output appendFormat:@"%@%@: %d\n", indent, @"optionalForeignEnum", self.optionalForeignEnum];
  }
  if (self.hasOptionalImportEnum) {
    [output appendFormat:@"%@%@: %d\n", indent, @"optionalImportEnum", self.optionalImportEnum];
  }
  if (self.hasOptionalStringPiece) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalStringPiece", self.optionalStringPiece];
  }
  if (self.hasOptionalCord) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalCord", self.optionalCord];
  }
  for (NSNumber* value in self.repeatedInt32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedInt32", value];
  }
  for (NSNumber* value in self.repeatedInt64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedInt64", value];
  }
  for (NSNumber* value in self.repeatedUint32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedUint32", value];
  }
  for (NSNumber* value in self.repeatedUint64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedUint64", value];
  }
  for (NSNumber* value in self.repeatedSint32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedSint32", value];
  }
  for (NSNumber* value in self.repeatedSint64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedSint64", value];
  }
  for (NSNumber* value in self.repeatedFixed32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedFixed32", value];
  }
  for (NSNumber* value in self.repeatedFixed64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedFixed64", value];
  }
  for (NSNumber* value in self.repeatedSfixed32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedSfixed32", value];
  }
  for (NSNumber* value in self.repeatedSfixed64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedSfixed64", value];
  }
  for (NSNumber* value in self.repeatedFloatArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedFloat", value];
  }
  for (NSNumber* value in self.repeatedDoubleArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedDouble", value];
  }
  for (NSNumber* value in self.repeatedBoolArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedBool", value];
  }
  for (NSString* element in self.repeatedStringArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedString", element];
  }
  for (NSData* element in self.repeatedBytesArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedBytes", element];
  }
  for (TestAllTypes_RepeatedGroup* element in self.repeatedGroupArray) {
    [output appendFormat:@"%@%@ {\n", indent, @"repeatedGroup"];
    [element writeDescriptionTo:output
                     withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  for (TestAllTypes_NestedMessage* element in self.repeatedNestedMessageArray) {
    [output appendFormat:@"%@%@ {\n", indent, @"repeatedNestedMessage"];
    [element writeDescriptionTo:output
                     withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  for (ForeignMessage* element in self.repeatedForeignMessageArray) {
    [output appendFormat:@"%@%@ {\n", indent, @"repeatedForeignMessage"];
    [element writeDescriptionTo:output
                     withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  for (ImportMessage* element in self.repeatedImportMessageArray) {
    [output appendFormat:@"%@%@ {\n", indent, @"repeatedImportMessage"];
    [element writeDescriptionTo:output
                     withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  for (NSNumber* element in self.repeatedNestedEnumArray) {
    [output appendFormat:@"%@%@: %d\n", indent, @"repeatedNestedEnum", element.intValue];
  }
  for (NSNumber* element in self.repeatedForeignEnumArray) {
    [output appendFormat:@"%@%@: %d\n", indent, @"repeatedForeignEnum", element.intValue];
  }
  for (NSNumber* element in self.repeatedImportEnumArray) {
    [output appendFormat:@"%@%@: %d\n", indent, @"repeatedImportEnum", element.intValue];
  }
  for (NSString* element in self.repeatedStringPieceArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedStringPiece", element];
  }
  for (NSString* element in self.repeatedCordArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedCord", element];
  }
  if (self.hasDefaultInt32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultInt32", [NSNumber numberWithInt:self.defaultInt32]];
  }
  if (self.hasDefaultInt64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultInt64", [NSNumber numberWithLongLong:self.defaultInt64]];
  }
  if (self.hasDefaultUint32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultUint32", [NSNumber numberWithInt:self.defaultUint32]];
  }
  if (self.hasDefaultUint64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultUint64", [NSNumber numberWithLongLong:self.defaultUint64]];
  }
  if (self.hasDefaultSint32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultSint32", [NSNumber numberWithInt:self.defaultSint32]];
  }
  if (self.hasDefaultSint64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultSint64", [NSNumber numberWithLongLong:self.defaultSint64]];
  }
  if (self.hasDefaultFixed32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultFixed32", [NSNumber numberWithInt:self.defaultFixed32]];
  }
  if (self.hasDefaultFixed64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultFixed64", [NSNumber numberWithLongLong:self.defaultFixed64]];
  }
  if (self.hasDefaultSfixed32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultSfixed32", [NSNumber numberWithInt:self.defaultSfixed32]];
  }
  if (self.hasDefaultSfixed64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultSfixed64", [NSNumber numberWithLongLong:self.defaultSfixed64]];
  }
  if (self.hasDefaultFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultFloat", [NSNumber numberWithFloat:self.defaultFloat]];
  }
  if (self.hasDefaultDouble) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultDouble", [NSNumber numberWithDouble:self.defaultDouble]];
  }
  if (self.hasDefaultBool) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultBool", [NSNumber numberWithBool:self.defaultBool]];
  }
  if (self.hasDefaultString) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultString", self.defaultString];
  }
  if (self.hasDefaultBytes) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultBytes", self.defaultBytes];
  }
  if (self.hasDefaultNestedEnum) {
    [output appendFormat:@"%@%@: %d\n", indent, @"defaultNestedEnum", self.defaultNestedEnum];
  }
  if (self.hasDefaultForeignEnum) {
    [output appendFormat:@"%@%@: %d\n", indent, @"defaultForeignEnum", self.defaultForeignEnum];
  }
  if (self.hasDefaultImportEnum) {
    [output appendFormat:@"%@%@: %d\n", indent, @"defaultImportEnum", self.defaultImportEnum];
  }
  if (self.hasDefaultStringPiece) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultStringPiece", self.defaultStringPiece];
  }
  if (self.hasDefaultCord) {
    [output appendFormat:@"%@%@: %@\n", indent, @"defaultCord", self.defaultCord];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestAllTypes class]]) {
    return NO;
  }
  TestAllTypes *otherMessage = other;
  return
      self.hasOptionalInt32 == otherMessage.hasOptionalInt32 &&
      (!self.hasOptionalInt32 || self.optionalInt32 == otherMessage.optionalInt32) &&
      
      self.hasOptionalInt64 == otherMessage.hasOptionalInt64 &&
      (!self.hasOptionalInt64 || self.optionalInt64 == otherMessage.optionalInt64) &&
      
      self.hasOptionalUint32 == otherMessage.hasOptionalUint32 &&
      (!self.hasOptionalUint32 || self.optionalUint32 == otherMessage.optionalUint32) &&
      
      self.hasOptionalUint64 == otherMessage.hasOptionalUint64 &&
      (!self.hasOptionalUint64 || self.optionalUint64 == otherMessage.optionalUint64) &&
      
      self.hasOptionalSint32 == otherMessage.hasOptionalSint32 &&
      (!self.hasOptionalSint32 || self.optionalSint32 == otherMessage.optionalSint32) &&
      
      self.hasOptionalSint64 == otherMessage.hasOptionalSint64 &&
      (!self.hasOptionalSint64 || self.optionalSint64 == otherMessage.optionalSint64) &&
      
      self.hasOptionalFixed32 == otherMessage.hasOptionalFixed32 &&
      (!self.hasOptionalFixed32 || self.optionalFixed32 == otherMessage.optionalFixed32) &&
      
      self.hasOptionalFixed64 == otherMessage.hasOptionalFixed64 &&
      (!self.hasOptionalFixed64 || self.optionalFixed64 == otherMessage.optionalFixed64) &&
      
      self.hasOptionalSfixed32 == otherMessage.hasOptionalSfixed32 &&
      (!self.hasOptionalSfixed32 || self.optionalSfixed32 == otherMessage.optionalSfixed32) &&
      
      self.hasOptionalSfixed64 == otherMessage.hasOptionalSfixed64 &&
      (!self.hasOptionalSfixed64 || self.optionalSfixed64 == otherMessage.optionalSfixed64) &&
      
      self.hasOptionalFloat == otherMessage.hasOptionalFloat &&
      (!self.hasOptionalFloat || self.optionalFloat == otherMessage.optionalFloat) &&
      
      self.hasOptionalDouble == otherMessage.hasOptionalDouble &&
      (!self.hasOptionalDouble || self.optionalDouble == otherMessage.optionalDouble) &&
      
      self.hasOptionalBool == otherMessage.hasOptionalBool &&
      (!self.hasOptionalBool || self.optionalBool == otherMessage.optionalBool) &&
      
      self.hasOptionalString == otherMessage.hasOptionalString &&
      (!self.hasOptionalString || [self.optionalString isEqual:otherMessage.optionalString]) &&
      
      self.hasOptionalBytes == otherMessage.hasOptionalBytes &&
      (!self.hasOptionalBytes || [self.optionalBytes isEqual:otherMessage.optionalBytes]) &&
      
      self.hasOptionalGroup == otherMessage.hasOptionalGroup &&
      (!self.hasOptionalGroup || [self.optionalGroup isEqual:otherMessage.optionalGroup]) &&
      
      self.hasOptionalNestedMessage == otherMessage.hasOptionalNestedMessage &&
      (!self.hasOptionalNestedMessage || [self.optionalNestedMessage isEqual:otherMessage.optionalNestedMessage]) &&
      
      self.hasOptionalForeignMessage == otherMessage.hasOptionalForeignMessage &&
      (!self.hasOptionalForeignMessage || [self.optionalForeignMessage isEqual:otherMessage.optionalForeignMessage]) &&
      
      self.hasOptionalImportMessage == otherMessage.hasOptionalImportMessage &&
      (!self.hasOptionalImportMessage || [self.optionalImportMessage isEqual:otherMessage.optionalImportMessage]) &&
      
      self.hasOptionalNestedEnum == otherMessage.hasOptionalNestedEnum &&
      (!self.hasOptionalNestedEnum || self.optionalNestedEnum != otherMessage.optionalNestedEnum) &&
      
      self.hasOptionalForeignEnum == otherMessage.hasOptionalForeignEnum &&
      (!self.hasOptionalForeignEnum || self.optionalForeignEnum != otherMessage.optionalForeignEnum) &&
      
      self.hasOptionalImportEnum == otherMessage.hasOptionalImportEnum &&
      (!self.hasOptionalImportEnum || self.optionalImportEnum != otherMessage.optionalImportEnum) &&
      
      self.hasOptionalStringPiece == otherMessage.hasOptionalStringPiece &&
      (!self.hasOptionalStringPiece || [self.optionalStringPiece isEqual:otherMessage.optionalStringPiece]) &&
      
      self.hasOptionalCord == otherMessage.hasOptionalCord &&
      (!self.hasOptionalCord || [self.optionalCord isEqual:otherMessage.optionalCord]) &&
      
      [self.repeatedInt32Array isEqualToArray:otherMessage.repeatedInt32Array] &&
      
      [self.repeatedInt64Array isEqualToArray:otherMessage.repeatedInt64Array] &&
      
      [self.repeatedUint32Array isEqualToArray:otherMessage.repeatedUint32Array] &&
      
      [self.repeatedUint64Array isEqualToArray:otherMessage.repeatedUint64Array] &&
      
      [self.repeatedSint32Array isEqualToArray:otherMessage.repeatedSint32Array] &&
      
      [self.repeatedSint64Array isEqualToArray:otherMessage.repeatedSint64Array] &&
      
      [self.repeatedFixed32Array isEqualToArray:otherMessage.repeatedFixed32Array] &&
      
      [self.repeatedFixed64Array isEqualToArray:otherMessage.repeatedFixed64Array] &&
      
      [self.repeatedSfixed32Array isEqualToArray:otherMessage.repeatedSfixed32Array] &&
      
      [self.repeatedSfixed64Array isEqualToArray:otherMessage.repeatedSfixed64Array] &&
      
      [self.repeatedFloatArray isEqualToArray:otherMessage.repeatedFloatArray] &&
      
      [self.repeatedDoubleArray isEqualToArray:otherMessage.repeatedDoubleArray] &&
      
      [self.repeatedBoolArray isEqualToArray:otherMessage.repeatedBoolArray] &&
      
      [self.repeatedStringArray isEqualToArray:otherMessage.repeatedStringArray] &&
      
      [self.repeatedBytesArray isEqualToArray:otherMessage.repeatedBytesArray] &&
      
      [self.repeatedGroupArray isEqualToArray:otherMessage.repeatedGroupArray] &&
      
      [self.repeatedNestedMessageArray isEqualToArray:otherMessage.repeatedNestedMessageArray] &&
      
      [self.repeatedForeignMessageArray isEqualToArray:otherMessage.repeatedForeignMessageArray] &&
      
      [self.repeatedImportMessageArray isEqualToArray:otherMessage.repeatedImportMessageArray] &&
      
      [self.repeatedNestedEnumArray isEqualToArray:otherMessage.repeatedNestedEnumArray] &&
      
      [self.repeatedForeignEnumArray isEqualToArray:otherMessage.repeatedForeignEnumArray] &&
      
      [self.repeatedImportEnumArray isEqualToArray:otherMessage.repeatedImportEnumArray] &&
      
      [self.repeatedStringPieceArray isEqualToArray:otherMessage.repeatedStringPieceArray] &&
      
      [self.repeatedCordArray isEqualToArray:otherMessage.repeatedCordArray] &&
      
      self.hasDefaultInt32 == otherMessage.hasDefaultInt32 &&
      (!self.hasDefaultInt32 || self.defaultInt32 == otherMessage.defaultInt32) &&
      
      self.hasDefaultInt64 == otherMessage.hasDefaultInt64 &&
      (!self.hasDefaultInt64 || self.defaultInt64 == otherMessage.defaultInt64) &&
      
      self.hasDefaultUint32 == otherMessage.hasDefaultUint32 &&
      (!self.hasDefaultUint32 || self.defaultUint32 == otherMessage.defaultUint32) &&
      
      self.hasDefaultUint64 == otherMessage.hasDefaultUint64 &&
      (!self.hasDefaultUint64 || self.defaultUint64 == otherMessage.defaultUint64) &&
      
      self.hasDefaultSint32 == otherMessage.hasDefaultSint32 &&
      (!self.hasDefaultSint32 || self.defaultSint32 == otherMessage.defaultSint32) &&
      
      self.hasDefaultSint64 == otherMessage.hasDefaultSint64 &&
      (!self.hasDefaultSint64 || self.defaultSint64 == otherMessage.defaultSint64) &&
      
      self.hasDefaultFixed32 == otherMessage.hasDefaultFixed32 &&
      (!self.hasDefaultFixed32 || self.defaultFixed32 == otherMessage.defaultFixed32) &&
      
      self.hasDefaultFixed64 == otherMessage.hasDefaultFixed64 &&
      (!self.hasDefaultFixed64 || self.defaultFixed64 == otherMessage.defaultFixed64) &&
      
      self.hasDefaultSfixed32 == otherMessage.hasDefaultSfixed32 &&
      (!self.hasDefaultSfixed32 || self.defaultSfixed32 == otherMessage.defaultSfixed32) &&
      
      self.hasDefaultSfixed64 == otherMessage.hasDefaultSfixed64 &&
      (!self.hasDefaultSfixed64 || self.defaultSfixed64 == otherMessage.defaultSfixed64) &&
      
      self.hasDefaultFloat == otherMessage.hasDefaultFloat &&
      (!self.hasDefaultFloat || self.defaultFloat == otherMessage.defaultFloat) &&
      
      self.hasDefaultDouble == otherMessage.hasDefaultDouble &&
      (!self.hasDefaultDouble || self.defaultDouble == otherMessage.defaultDouble) &&
      
      self.hasDefaultBool == otherMessage.hasDefaultBool &&
      (!self.hasDefaultBool || self.defaultBool == otherMessage.defaultBool) &&
      
      self.hasDefaultString == otherMessage.hasDefaultString &&
      (!self.hasDefaultString || [self.defaultString isEqual:otherMessage.defaultString]) &&
      
      self.hasDefaultBytes == otherMessage.hasDefaultBytes &&
      (!self.hasDefaultBytes || [self.defaultBytes isEqual:otherMessage.defaultBytes]) &&
      
      self.hasDefaultNestedEnum == otherMessage.hasDefaultNestedEnum &&
      (!self.hasDefaultNestedEnum || self.defaultNestedEnum != otherMessage.defaultNestedEnum) &&
      
      self.hasDefaultForeignEnum == otherMessage.hasDefaultForeignEnum &&
      (!self.hasDefaultForeignEnum || self.defaultForeignEnum != otherMessage.defaultForeignEnum) &&
      
      self.hasDefaultImportEnum == otherMessage.hasDefaultImportEnum &&
      (!self.hasDefaultImportEnum || self.defaultImportEnum != otherMessage.defaultImportEnum) &&
      
      self.hasDefaultStringPiece == otherMessage.hasDefaultStringPiece &&
      (!self.hasDefaultStringPiece || [self.defaultStringPiece isEqual:otherMessage.defaultStringPiece]) &&
      
      self.hasDefaultCord == otherMessage.hasDefaultCord &&
      (!self.hasDefaultCord || [self.defaultCord isEqual:otherMessage.defaultCord]) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasOptionalInt32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.optionalInt32] hash];
  }
  if (self.hasOptionalInt64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.optionalInt64] hash];
  }
  if (self.hasOptionalUint32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.optionalUint32] hash];
  }
  if (self.hasOptionalUint64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.optionalUint64] hash];
  }
  if (self.hasOptionalSint32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.optionalSint32] hash];
  }
  if (self.hasOptionalSint64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.optionalSint64] hash];
  }
  if (self.hasOptionalFixed32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.optionalFixed32] hash];
  }
  if (self.hasOptionalFixed64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.optionalFixed64] hash];
  }
  if (self.hasOptionalSfixed32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.optionalSfixed32] hash];
  }
  if (self.hasOptionalSfixed64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.optionalSfixed64] hash];
  }
  if (self.hasOptionalFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.optionalFloat] hash];
  }
  if (self.hasOptionalDouble) {
    hashCode = hashCode * 31 + [[NSNumber numberWithDouble:self.optionalDouble] hash];
  }
  if (self.hasOptionalBool) {
    hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.optionalBool] hash];
  }
  if (self.hasOptionalString) {
    hashCode = hashCode * 31 + [self.optionalString hash];
  }
  if (self.hasOptionalBytes) {
    hashCode = hashCode * 31 + [self.optionalBytes hash];
  }
  if (self.hasOptionalGroup) {
    hashCode = hashCode * 31 + [self.optionalGroup hash];
  }
  if (self.hasOptionalNestedMessage) {
    hashCode = hashCode * 31 + [self.optionalNestedMessage hash];
  }
  if (self.hasOptionalForeignMessage) {
    hashCode = hashCode * 31 + [self.optionalForeignMessage hash];
  }
  if (self.hasOptionalImportMessage) {
    hashCode = hashCode * 31 + [self.optionalImportMessage hash];
  }
  if (self.hasOptionalNestedEnum) {
    hashCode = hashCode * 31 + self.optionalNestedEnum;
  }
  if (self.hasOptionalForeignEnum) {
    hashCode = hashCode * 31 + self.optionalForeignEnum;
  }
  if (self.hasOptionalImportEnum) {
    hashCode = hashCode * 31 + self.optionalImportEnum;
  }
  if (self.hasOptionalStringPiece) {
    hashCode = hashCode * 31 + [self.optionalStringPiece hash];
  }
  if (self.hasOptionalCord) {
    hashCode = hashCode * 31 + [self.optionalCord hash];
  }
  for (NSNumber* value in self.repeatedInt32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedInt64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedUint32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedUint64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedSint32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedSint64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedFixed32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedFixed64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedSfixed32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedSfixed64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedFloatArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedDoubleArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedBoolArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSString* element in self.repeatedStringArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (NSData* element in self.repeatedBytesArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (TestAllTypes_RepeatedGroup* element in self.repeatedGroupArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (TestAllTypes_NestedMessage* element in self.repeatedNestedMessageArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (ForeignMessage* element in self.repeatedForeignMessageArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (ImportMessage* element in self.repeatedImportMessageArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (NSNumber* element in self.repeatedNestedEnumArray) {
    hashCode = hashCode * 31 + element.intValue;
  }
  for (NSNumber* element in self.repeatedForeignEnumArray) {
    hashCode = hashCode * 31 + element.intValue;
  }
  for (NSNumber* element in self.repeatedImportEnumArray) {
    hashCode = hashCode * 31 + element.intValue;
  }
  for (NSString* element in self.repeatedStringPieceArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (NSString* element in self.repeatedCordArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  if (self.hasDefaultInt32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.defaultInt32] hash];
  }
  if (self.hasDefaultInt64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.defaultInt64] hash];
  }
  if (self.hasDefaultUint32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.defaultUint32] hash];
  }
  if (self.hasDefaultUint64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.defaultUint64] hash];
  }
  if (self.hasDefaultSint32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.defaultSint32] hash];
  }
  if (self.hasDefaultSint64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.defaultSint64] hash];
  }
  if (self.hasDefaultFixed32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.defaultFixed32] hash];
  }
  if (self.hasDefaultFixed64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.defaultFixed64] hash];
  }
  if (self.hasDefaultSfixed32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.defaultSfixed32] hash];
  }
  if (self.hasDefaultSfixed64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.defaultSfixed64] hash];
  }
  if (self.hasDefaultFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.defaultFloat] hash];
  }
  if (self.hasDefaultDouble) {
    hashCode = hashCode * 31 + [[NSNumber numberWithDouble:self.defaultDouble] hash];
  }
  if (self.hasDefaultBool) {
    hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.defaultBool] hash];
  }
  if (self.hasDefaultString) {
    hashCode = hashCode * 31 + [self.defaultString hash];
  }
  if (self.hasDefaultBytes) {
    hashCode = hashCode * 31 + [self.defaultBytes hash];
  }
  if (self.hasDefaultNestedEnum) {
    hashCode = hashCode * 31 + self.defaultNestedEnum;
  }
  if (self.hasDefaultForeignEnum) {
    hashCode = hashCode * 31 + self.defaultForeignEnum;
  }
  if (self.hasDefaultImportEnum) {
    hashCode = hashCode * 31 + self.defaultImportEnum;
  }
  if (self.hasDefaultStringPiece) {
    hashCode = hashCode * 31 + [self.defaultStringPiece hash];
  }
  if (self.hasDefaultCord) {
    hashCode = hashCode * 31 + [self.defaultCord hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

BOOL TestAllTypes_NestedEnumIsValidValue(TestAllTypes_NestedEnum value) {
  switch (value) {
    case TestAllTypes_NestedEnumFoo:
    case TestAllTypes_NestedEnumBar:
    case TestAllTypes_NestedEnumBaz:
      return YES;
    default:
      return NO;
  }
}
@interface TestAllTypes_NestedMessage ()
@property int32_t bb;
@end

@implementation TestAllTypes_NestedMessage

- (BOOL) hasBb {
  return !!hasBb_;
}
- (void) setHasBb:(BOOL) value {
  hasBb_ = !!value;
}
@synthesize bb;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.bb = 0;
  }
  return self;
}
static TestAllTypes_NestedMessage* defaultTestAllTypes_NestedMessageInstance = nil;
+ (void) initialize {
  if (self == [TestAllTypes_NestedMessage class]) {
    defaultTestAllTypes_NestedMessageInstance = [[TestAllTypes_NestedMessage alloc] init];
  }
}
+ (TestAllTypes_NestedMessage*) defaultInstance {
  return defaultTestAllTypes_NestedMessageInstance;
}
- (TestAllTypes_NestedMessage*) defaultInstance {
  return defaultTestAllTypes_NestedMessageInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasBb) {
    [output writeInt32:1 value:self.bb];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasBb) {
    size += computeInt32Size(1, self.bb);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestAllTypes_NestedMessage*) parseFromData:(NSData*) data {
  return (TestAllTypes_NestedMessage*)[[[TestAllTypes_NestedMessage builder] mergeFromData:data] build];
}
+ (TestAllTypes_NestedMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes_NestedMessage*)[[[TestAllTypes_NestedMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_NestedMessage*) parseFromInputStream:(NSInputStream*) input {
  return (TestAllTypes_NestedMessage*)[[[TestAllTypes_NestedMessage builder] mergeFromInputStream:input] build];
}
+ (TestAllTypes_NestedMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes_NestedMessage*)[[[TestAllTypes_NestedMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_NestedMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestAllTypes_NestedMessage*)[[[TestAllTypes_NestedMessage builder] mergeFromCodedInputStream:input] build];
}
+ (TestAllTypes_NestedMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes_NestedMessage*)[[[TestAllTypes_NestedMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_NestedMessage_Builder*) builder {
  return [[[TestAllTypes_NestedMessage_Builder alloc] init] autorelease];
}
+ (TestAllTypes_NestedMessage_Builder*) builderWithPrototype:(TestAllTypes_NestedMessage*) prototype {
  return [[TestAllTypes_NestedMessage builder] mergeFrom:prototype];
}
- (TestAllTypes_NestedMessage_Builder*) builder {
  return [TestAllTypes_NestedMessage builder];
}
- (TestAllTypes_NestedMessage_Builder*) toBuilder {
  return [TestAllTypes_NestedMessage builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasBb) {
    [output appendFormat:@"%@%@: %@\n", indent, @"bb", [NSNumber numberWithInt:self.bb]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestAllTypes_NestedMessage class]]) {
    return NO;
  }
  TestAllTypes_NestedMessage *otherMessage = other;
  return
      self.hasBb == otherMessage.hasBb &&
      (!self.hasBb || self.bb == otherMessage.bb) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasBb) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.bb] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestAllTypes_NestedMessage_Builder()
@property (retain) TestAllTypes_NestedMessage* result;
@end

@implementation TestAllTypes_NestedMessage_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestAllTypes_NestedMessage alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestAllTypes_NestedMessage_Builder*) clear {
  self.result = [[[TestAllTypes_NestedMessage alloc] init] autorelease];
  return self;
}
- (TestAllTypes_NestedMessage_Builder*) clone {
  return [TestAllTypes_NestedMessage builderWithPrototype:result];
}
- (TestAllTypes_NestedMessage*) defaultInstance {
  return [TestAllTypes_NestedMessage defaultInstance];
}
- (TestAllTypes_NestedMessage*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestAllTypes_NestedMessage*) buildPartial {
  TestAllTypes_NestedMessage* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestAllTypes_NestedMessage_Builder*) mergeFrom:(TestAllTypes_NestedMessage*) other {
  if (other == [TestAllTypes_NestedMessage defaultInstance]) {
    return self;
  }
  if (other.hasBb) {
    [self setBb:other.bb];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestAllTypes_NestedMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestAllTypes_NestedMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setBb:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasBb {
  return result.hasBb;
}
- (int32_t) bb {
  return result.bb;
}
- (TestAllTypes_NestedMessage_Builder*) setBb:(int32_t) value {
  result.hasBb = YES;
  result.bb = value;
  return self;
}
- (TestAllTypes_NestedMessage_Builder*) clearBb {
  result.hasBb = NO;
  result.bb = 0;
  return self;
}
@end

@interface TestAllTypes_OptionalGroup ()
@property int32_t a;
@end

@implementation TestAllTypes_OptionalGroup

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = 0;
  }
  return self;
}
static TestAllTypes_OptionalGroup* defaultTestAllTypes_OptionalGroupInstance = nil;
+ (void) initialize {
  if (self == [TestAllTypes_OptionalGroup class]) {
    defaultTestAllTypes_OptionalGroupInstance = [[TestAllTypes_OptionalGroup alloc] init];
  }
}
+ (TestAllTypes_OptionalGroup*) defaultInstance {
  return defaultTestAllTypes_OptionalGroupInstance;
}
- (TestAllTypes_OptionalGroup*) defaultInstance {
  return defaultTestAllTypes_OptionalGroupInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeInt32:17 value:self.a];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeInt32Size(17, self.a);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestAllTypes_OptionalGroup*) parseFromData:(NSData*) data {
  return (TestAllTypes_OptionalGroup*)[[[TestAllTypes_OptionalGroup builder] mergeFromData:data] build];
}
+ (TestAllTypes_OptionalGroup*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes_OptionalGroup*)[[[TestAllTypes_OptionalGroup builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_OptionalGroup*) parseFromInputStream:(NSInputStream*) input {
  return (TestAllTypes_OptionalGroup*)[[[TestAllTypes_OptionalGroup builder] mergeFromInputStream:input] build];
}
+ (TestAllTypes_OptionalGroup*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes_OptionalGroup*)[[[TestAllTypes_OptionalGroup builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_OptionalGroup*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestAllTypes_OptionalGroup*)[[[TestAllTypes_OptionalGroup builder] mergeFromCodedInputStream:input] build];
}
+ (TestAllTypes_OptionalGroup*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes_OptionalGroup*)[[[TestAllTypes_OptionalGroup builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_OptionalGroup_Builder*) builder {
  return [[[TestAllTypes_OptionalGroup_Builder alloc] init] autorelease];
}
+ (TestAllTypes_OptionalGroup_Builder*) builderWithPrototype:(TestAllTypes_OptionalGroup*) prototype {
  return [[TestAllTypes_OptionalGroup builder] mergeFrom:prototype];
}
- (TestAllTypes_OptionalGroup_Builder*) builder {
  return [TestAllTypes_OptionalGroup builder];
}
- (TestAllTypes_OptionalGroup_Builder*) toBuilder {
  return [TestAllTypes_OptionalGroup builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@: %@\n", indent, @"a", [NSNumber numberWithInt:self.a]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestAllTypes_OptionalGroup class]]) {
    return NO;
  }
  TestAllTypes_OptionalGroup *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || self.a == otherMessage.a) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.a] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestAllTypes_OptionalGroup_Builder()
@property (retain) TestAllTypes_OptionalGroup* result;
@end

@implementation TestAllTypes_OptionalGroup_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestAllTypes_OptionalGroup alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestAllTypes_OptionalGroup_Builder*) clear {
  self.result = [[[TestAllTypes_OptionalGroup alloc] init] autorelease];
  return self;
}
- (TestAllTypes_OptionalGroup_Builder*) clone {
  return [TestAllTypes_OptionalGroup builderWithPrototype:result];
}
- (TestAllTypes_OptionalGroup*) defaultInstance {
  return [TestAllTypes_OptionalGroup defaultInstance];
}
- (TestAllTypes_OptionalGroup*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestAllTypes_OptionalGroup*) buildPartial {
  TestAllTypes_OptionalGroup* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestAllTypes_OptionalGroup_Builder*) mergeFrom:(TestAllTypes_OptionalGroup*) other {
  if (other == [TestAllTypes_OptionalGroup defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self setA:other.a];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestAllTypes_OptionalGroup_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestAllTypes_OptionalGroup_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 136: {
        [self setA:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (int32_t) a {
  return result.a;
}
- (TestAllTypes_OptionalGroup_Builder*) setA:(int32_t) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (TestAllTypes_OptionalGroup_Builder*) clearA {
  result.hasA = NO;
  result.a = 0;
  return self;
}
@end

@interface TestAllTypes_RepeatedGroup ()
@property int32_t a;
@end

@implementation TestAllTypes_RepeatedGroup

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = 0;
  }
  return self;
}
static TestAllTypes_RepeatedGroup* defaultTestAllTypes_RepeatedGroupInstance = nil;
+ (void) initialize {
  if (self == [TestAllTypes_RepeatedGroup class]) {
    defaultTestAllTypes_RepeatedGroupInstance = [[TestAllTypes_RepeatedGroup alloc] init];
  }
}
+ (TestAllTypes_RepeatedGroup*) defaultInstance {
  return defaultTestAllTypes_RepeatedGroupInstance;
}
- (TestAllTypes_RepeatedGroup*) defaultInstance {
  return defaultTestAllTypes_RepeatedGroupInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeInt32:47 value:self.a];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeInt32Size(47, self.a);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestAllTypes_RepeatedGroup*) parseFromData:(NSData*) data {
  return (TestAllTypes_RepeatedGroup*)[[[TestAllTypes_RepeatedGroup builder] mergeFromData:data] build];
}
+ (TestAllTypes_RepeatedGroup*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes_RepeatedGroup*)[[[TestAllTypes_RepeatedGroup builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_RepeatedGroup*) parseFromInputStream:(NSInputStream*) input {
  return (TestAllTypes_RepeatedGroup*)[[[TestAllTypes_RepeatedGroup builder] mergeFromInputStream:input] build];
}
+ (TestAllTypes_RepeatedGroup*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes_RepeatedGroup*)[[[TestAllTypes_RepeatedGroup builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_RepeatedGroup*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestAllTypes_RepeatedGroup*)[[[TestAllTypes_RepeatedGroup builder] mergeFromCodedInputStream:input] build];
}
+ (TestAllTypes_RepeatedGroup*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllTypes_RepeatedGroup*)[[[TestAllTypes_RepeatedGroup builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllTypes_RepeatedGroup_Builder*) builder {
  return [[[TestAllTypes_RepeatedGroup_Builder alloc] init] autorelease];
}
+ (TestAllTypes_RepeatedGroup_Builder*) builderWithPrototype:(TestAllTypes_RepeatedGroup*) prototype {
  return [[TestAllTypes_RepeatedGroup builder] mergeFrom:prototype];
}
- (TestAllTypes_RepeatedGroup_Builder*) builder {
  return [TestAllTypes_RepeatedGroup builder];
}
- (TestAllTypes_RepeatedGroup_Builder*) toBuilder {
  return [TestAllTypes_RepeatedGroup builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@: %@\n", indent, @"a", [NSNumber numberWithInt:self.a]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestAllTypes_RepeatedGroup class]]) {
    return NO;
  }
  TestAllTypes_RepeatedGroup *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || self.a == otherMessage.a) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.a] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestAllTypes_RepeatedGroup_Builder()
@property (retain) TestAllTypes_RepeatedGroup* result;
@end

@implementation TestAllTypes_RepeatedGroup_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestAllTypes_RepeatedGroup alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestAllTypes_RepeatedGroup_Builder*) clear {
  self.result = [[[TestAllTypes_RepeatedGroup alloc] init] autorelease];
  return self;
}
- (TestAllTypes_RepeatedGroup_Builder*) clone {
  return [TestAllTypes_RepeatedGroup builderWithPrototype:result];
}
- (TestAllTypes_RepeatedGroup*) defaultInstance {
  return [TestAllTypes_RepeatedGroup defaultInstance];
}
- (TestAllTypes_RepeatedGroup*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestAllTypes_RepeatedGroup*) buildPartial {
  TestAllTypes_RepeatedGroup* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestAllTypes_RepeatedGroup_Builder*) mergeFrom:(TestAllTypes_RepeatedGroup*) other {
  if (other == [TestAllTypes_RepeatedGroup defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self setA:other.a];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestAllTypes_RepeatedGroup_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestAllTypes_RepeatedGroup_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 376: {
        [self setA:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (int32_t) a {
  return result.a;
}
- (TestAllTypes_RepeatedGroup_Builder*) setA:(int32_t) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (TestAllTypes_RepeatedGroup_Builder*) clearA {
  result.hasA = NO;
  result.a = 0;
  return self;
}
@end

@interface TestAllTypes_Builder()
@property (retain) TestAllTypes* result;
@end

@implementation TestAllTypes_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestAllTypes alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestAllTypes_Builder*) clear {
  self.result = [[[TestAllTypes alloc] init] autorelease];
  return self;
}
- (TestAllTypes_Builder*) clone {
  return [TestAllTypes builderWithPrototype:result];
}
- (TestAllTypes*) defaultInstance {
  return [TestAllTypes defaultInstance];
}
- (TestAllTypes*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestAllTypes*) buildPartial {
  TestAllTypes* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestAllTypes_Builder*) mergeFrom:(TestAllTypes*) other {
  if (other == [TestAllTypes defaultInstance]) {
    return self;
  }
  if (other.hasOptionalInt32) {
    [self setOptionalInt32:other.optionalInt32];
  }
  if (other.hasOptionalInt64) {
    [self setOptionalInt64:other.optionalInt64];
  }
  if (other.hasOptionalUint32) {
    [self setOptionalUint32:other.optionalUint32];
  }
  if (other.hasOptionalUint64) {
    [self setOptionalUint64:other.optionalUint64];
  }
  if (other.hasOptionalSint32) {
    [self setOptionalSint32:other.optionalSint32];
  }
  if (other.hasOptionalSint64) {
    [self setOptionalSint64:other.optionalSint64];
  }
  if (other.hasOptionalFixed32) {
    [self setOptionalFixed32:other.optionalFixed32];
  }
  if (other.hasOptionalFixed64) {
    [self setOptionalFixed64:other.optionalFixed64];
  }
  if (other.hasOptionalSfixed32) {
    [self setOptionalSfixed32:other.optionalSfixed32];
  }
  if (other.hasOptionalSfixed64) {
    [self setOptionalSfixed64:other.optionalSfixed64];
  }
  if (other.hasOptionalFloat) {
    [self setOptionalFloat:other.optionalFloat];
  }
  if (other.hasOptionalDouble) {
    [self setOptionalDouble:other.optionalDouble];
  }
  if (other.hasOptionalBool) {
    [self setOptionalBool:other.optionalBool];
  }
  if (other.hasOptionalString) {
    [self setOptionalString:other.optionalString];
  }
  if (other.hasOptionalBytes) {
    [self setOptionalBytes:other.optionalBytes];
  }
  if (other.hasOptionalGroup) {
    [self mergeOptionalGroup:other.optionalGroup];
  }
  if (other.hasOptionalNestedMessage) {
    [self mergeOptionalNestedMessage:other.optionalNestedMessage];
  }
  if (other.hasOptionalForeignMessage) {
    [self mergeOptionalForeignMessage:other.optionalForeignMessage];
  }
  if (other.hasOptionalImportMessage) {
    [self mergeOptionalImportMessage:other.optionalImportMessage];
  }
  if (other.hasOptionalNestedEnum) {
    [self setOptionalNestedEnum:other.optionalNestedEnum];
  }
  if (other.hasOptionalForeignEnum) {
    [self setOptionalForeignEnum:other.optionalForeignEnum];
  }
  if (other.hasOptionalImportEnum) {
    [self setOptionalImportEnum:other.optionalImportEnum];
  }
  if (other.hasOptionalStringPiece) {
    [self setOptionalStringPiece:other.optionalStringPiece];
  }
  if (other.hasOptionalCord) {
    [self setOptionalCord:other.optionalCord];
  }
  if (other.repeatedInt32Array.count > 0) {
    if (result.repeatedInt32Array == nil) {
      result.repeatedInt32Array = [[other.repeatedInt32Array copyWithZone:[other.repeatedInt32Array zone]] autorelease];
    } else {
      [result.repeatedInt32Array appendArray:other.repeatedInt32Array];
    }
  }
  if (other.repeatedInt64Array.count > 0) {
    if (result.repeatedInt64Array == nil) {
      result.repeatedInt64Array = [[other.repeatedInt64Array copyWithZone:[other.repeatedInt64Array zone]] autorelease];
    } else {
      [result.repeatedInt64Array appendArray:other.repeatedInt64Array];
    }
  }
  if (other.repeatedUint32Array.count > 0) {
    if (result.repeatedUint32Array == nil) {
      result.repeatedUint32Array = [[other.repeatedUint32Array copyWithZone:[other.repeatedUint32Array zone]] autorelease];
    } else {
      [result.repeatedUint32Array appendArray:other.repeatedUint32Array];
    }
  }
  if (other.repeatedUint64Array.count > 0) {
    if (result.repeatedUint64Array == nil) {
      result.repeatedUint64Array = [[other.repeatedUint64Array copyWithZone:[other.repeatedUint64Array zone]] autorelease];
    } else {
      [result.repeatedUint64Array appendArray:other.repeatedUint64Array];
    }
  }
  if (other.repeatedSint32Array.count > 0) {
    if (result.repeatedSint32Array == nil) {
      result.repeatedSint32Array = [[other.repeatedSint32Array copyWithZone:[other.repeatedSint32Array zone]] autorelease];
    } else {
      [result.repeatedSint32Array appendArray:other.repeatedSint32Array];
    }
  }
  if (other.repeatedSint64Array.count > 0) {
    if (result.repeatedSint64Array == nil) {
      result.repeatedSint64Array = [[other.repeatedSint64Array copyWithZone:[other.repeatedSint64Array zone]] autorelease];
    } else {
      [result.repeatedSint64Array appendArray:other.repeatedSint64Array];
    }
  }
  if (other.repeatedFixed32Array.count > 0) {
    if (result.repeatedFixed32Array == nil) {
      result.repeatedFixed32Array = [[other.repeatedFixed32Array copyWithZone:[other.repeatedFixed32Array zone]] autorelease];
    } else {
      [result.repeatedFixed32Array appendArray:other.repeatedFixed32Array];
    }
  }
  if (other.repeatedFixed64Array.count > 0) {
    if (result.repeatedFixed64Array == nil) {
      result.repeatedFixed64Array = [[other.repeatedFixed64Array copyWithZone:[other.repeatedFixed64Array zone]] autorelease];
    } else {
      [result.repeatedFixed64Array appendArray:other.repeatedFixed64Array];
    }
  }
  if (other.repeatedSfixed32Array.count > 0) {
    if (result.repeatedSfixed32Array == nil) {
      result.repeatedSfixed32Array = [[other.repeatedSfixed32Array copyWithZone:[other.repeatedSfixed32Array zone]] autorelease];
    } else {
      [result.repeatedSfixed32Array appendArray:other.repeatedSfixed32Array];
    }
  }
  if (other.repeatedSfixed64Array.count > 0) {
    if (result.repeatedSfixed64Array == nil) {
      result.repeatedSfixed64Array = [[other.repeatedSfixed64Array copyWithZone:[other.repeatedSfixed64Array zone]] autorelease];
    } else {
      [result.repeatedSfixed64Array appendArray:other.repeatedSfixed64Array];
    }
  }
  if (other.repeatedFloatArray.count > 0) {
    if (result.repeatedFloatArray == nil) {
      result.repeatedFloatArray = [[other.repeatedFloatArray copyWithZone:[other.repeatedFloatArray zone]] autorelease];
    } else {
      [result.repeatedFloatArray appendArray:other.repeatedFloatArray];
    }
  }
  if (other.repeatedDoubleArray.count > 0) {
    if (result.repeatedDoubleArray == nil) {
      result.repeatedDoubleArray = [[other.repeatedDoubleArray copyWithZone:[other.repeatedDoubleArray zone]] autorelease];
    } else {
      [result.repeatedDoubleArray appendArray:other.repeatedDoubleArray];
    }
  }
  if (other.repeatedBoolArray.count > 0) {
    if (result.repeatedBoolArray == nil) {
      result.repeatedBoolArray = [[other.repeatedBoolArray copyWithZone:[other.repeatedBoolArray zone]] autorelease];
    } else {
      [result.repeatedBoolArray appendArray:other.repeatedBoolArray];
    }
  }
  if (other.repeatedStringArray.count > 0) {
    if (result.repeatedStringArray == nil) {
      result.repeatedStringArray = [[other.repeatedStringArray copyWithZone:[other.repeatedStringArray zone]] autorelease];
    } else {
      [result.repeatedStringArray appendArray:other.repeatedStringArray];
    }
  }
  if (other.repeatedBytesArray.count > 0) {
    if (result.repeatedBytesArray == nil) {
      result.repeatedBytesArray = [[other.repeatedBytesArray copyWithZone:[other.repeatedBytesArray zone]] autorelease];
    } else {
      [result.repeatedBytesArray appendArray:other.repeatedBytesArray];
    }
  }
  if (other.repeatedGroupArray.count > 0) {
    if (result.repeatedGroupArray == nil) {
      result.repeatedGroupArray = [[other.repeatedGroupArray copyWithZone:[other.repeatedGroupArray zone]] autorelease];
    } else {
      [result.repeatedGroupArray appendArray:other.repeatedGroupArray];
    }
  }
  if (other.repeatedNestedMessageArray.count > 0) {
    if (result.repeatedNestedMessageArray == nil) {
      result.repeatedNestedMessageArray = [[other.repeatedNestedMessageArray copyWithZone:[other.repeatedNestedMessageArray zone]] autorelease];
    } else {
      [result.repeatedNestedMessageArray appendArray:other.repeatedNestedMessageArray];
    }
  }
  if (other.repeatedForeignMessageArray.count > 0) {
    if (result.repeatedForeignMessageArray == nil) {
      result.repeatedForeignMessageArray = [[other.repeatedForeignMessageArray copyWithZone:[other.repeatedForeignMessageArray zone]] autorelease];
    } else {
      [result.repeatedForeignMessageArray appendArray:other.repeatedForeignMessageArray];
    }
  }
  if (other.repeatedImportMessageArray.count > 0) {
    if (result.repeatedImportMessageArray == nil) {
      result.repeatedImportMessageArray = [[other.repeatedImportMessageArray copyWithZone:[other.repeatedImportMessageArray zone]] autorelease];
    } else {
      [result.repeatedImportMessageArray appendArray:other.repeatedImportMessageArray];
    }
  }
  if (other.repeatedNestedEnumArray.count > 0) {
    if (result.repeatedNestedEnumArray == nil) {
      result.repeatedNestedEnumArray = [[other.repeatedNestedEnumArray copyWithZone:[other.repeatedNestedEnumArray zone]] autorelease];
    } else {
      [result.repeatedNestedEnumArray appendArray:other.repeatedNestedEnumArray];
    }
  }
  if (other.repeatedForeignEnumArray.count > 0) {
    if (result.repeatedForeignEnumArray == nil) {
      result.repeatedForeignEnumArray = [[other.repeatedForeignEnumArray copyWithZone:[other.repeatedForeignEnumArray zone]] autorelease];
    } else {
      [result.repeatedForeignEnumArray appendArray:other.repeatedForeignEnumArray];
    }
  }
  if (other.repeatedImportEnumArray.count > 0) {
    if (result.repeatedImportEnumArray == nil) {
      result.repeatedImportEnumArray = [[other.repeatedImportEnumArray copyWithZone:[other.repeatedImportEnumArray zone]] autorelease];
    } else {
      [result.repeatedImportEnumArray appendArray:other.repeatedImportEnumArray];
    }
  }
  if (other.repeatedStringPieceArray.count > 0) {
    if (result.repeatedStringPieceArray == nil) {
      result.repeatedStringPieceArray = [[other.repeatedStringPieceArray copyWithZone:[other.repeatedStringPieceArray zone]] autorelease];
    } else {
      [result.repeatedStringPieceArray appendArray:other.repeatedStringPieceArray];
    }
  }
  if (other.repeatedCordArray.count > 0) {
    if (result.repeatedCordArray == nil) {
      result.repeatedCordArray = [[other.repeatedCordArray copyWithZone:[other.repeatedCordArray zone]] autorelease];
    } else {
      [result.repeatedCordArray appendArray:other.repeatedCordArray];
    }
  }
  if (other.hasDefaultInt32) {
    [self setDefaultInt32:other.defaultInt32];
  }
  if (other.hasDefaultInt64) {
    [self setDefaultInt64:other.defaultInt64];
  }
  if (other.hasDefaultUint32) {
    [self setDefaultUint32:other.defaultUint32];
  }
  if (other.hasDefaultUint64) {
    [self setDefaultUint64:other.defaultUint64];
  }
  if (other.hasDefaultSint32) {
    [self setDefaultSint32:other.defaultSint32];
  }
  if (other.hasDefaultSint64) {
    [self setDefaultSint64:other.defaultSint64];
  }
  if (other.hasDefaultFixed32) {
    [self setDefaultFixed32:other.defaultFixed32];
  }
  if (other.hasDefaultFixed64) {
    [self setDefaultFixed64:other.defaultFixed64];
  }
  if (other.hasDefaultSfixed32) {
    [self setDefaultSfixed32:other.defaultSfixed32];
  }
  if (other.hasDefaultSfixed64) {
    [self setDefaultSfixed64:other.defaultSfixed64];
  }
  if (other.hasDefaultFloat) {
    [self setDefaultFloat:other.defaultFloat];
  }
  if (other.hasDefaultDouble) {
    [self setDefaultDouble:other.defaultDouble];
  }
  if (other.hasDefaultBool) {
    [self setDefaultBool:other.defaultBool];
  }
  if (other.hasDefaultString) {
    [self setDefaultString:other.defaultString];
  }
  if (other.hasDefaultBytes) {
    [self setDefaultBytes:other.defaultBytes];
  }
  if (other.hasDefaultNestedEnum) {
    [self setDefaultNestedEnum:other.defaultNestedEnum];
  }
  if (other.hasDefaultForeignEnum) {
    [self setDefaultForeignEnum:other.defaultForeignEnum];
  }
  if (other.hasDefaultImportEnum) {
    [self setDefaultImportEnum:other.defaultImportEnum];
  }
  if (other.hasDefaultStringPiece) {
    [self setDefaultStringPiece:other.defaultStringPiece];
  }
  if (other.hasDefaultCord) {
    [self setDefaultCord:other.defaultCord];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestAllTypes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestAllTypes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setOptionalInt32:[input readInt32]];
        break;
      }
      case 16: {
        [self setOptionalInt64:[input readInt64]];
        break;
      }
      case 24: {
        [self setOptionalUint32:[input readUInt32]];
        break;
      }
      case 32: {
        [self setOptionalUint64:[input readUInt64]];
        break;
      }
      case 40: {
        [self setOptionalSint32:[input readSInt32]];
        break;
      }
      case 48: {
        [self setOptionalSint64:[input readSInt64]];
        break;
      }
      case 61: {
        [self setOptionalFixed32:[input readFixed32]];
        break;
      }
      case 65: {
        [self setOptionalFixed64:[input readFixed64]];
        break;
      }
      case 77: {
        [self setOptionalSfixed32:[input readSFixed32]];
        break;
      }
      case 81: {
        [self setOptionalSfixed64:[input readSFixed64]];
        break;
      }
      case 93: {
        [self setOptionalFloat:[input readFloat]];
        break;
      }
      case 97: {
        [self setOptionalDouble:[input readDouble]];
        break;
      }
      case 104: {
        [self setOptionalBool:[input readBool]];
        break;
      }
      case 114: {
        [self setOptionalString:[input readString]];
        break;
      }
      case 122: {
        [self setOptionalBytes:[input readData]];
        break;
      }
      case 131: {
        TestAllTypes_OptionalGroup_Builder* subBuilder = [TestAllTypes_OptionalGroup builder];
        if (self.hasOptionalGroup) {
          [subBuilder mergeFrom:self.optionalGroup];
        }
        [input readGroup:16 builder:subBuilder extensionRegistry:extensionRegistry];
        [self setOptionalGroup:[subBuilder buildPartial]];
        break;
      }
      case 146: {
        TestAllTypes_NestedMessage_Builder* subBuilder = [TestAllTypes_NestedMessage builder];
        if (self.hasOptionalNestedMessage) {
          [subBuilder mergeFrom:self.optionalNestedMessage];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptionalNestedMessage:[subBuilder buildPartial]];
        break;
      }
      case 154: {
        ForeignMessage_Builder* subBuilder = [ForeignMessage builder];
        if (self.hasOptionalForeignMessage) {
          [subBuilder mergeFrom:self.optionalForeignMessage];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptionalForeignMessage:[subBuilder buildPartial]];
        break;
      }
      case 162: {
        ImportMessage_Builder* subBuilder = [ImportMessage builder];
        if (self.hasOptionalImportMessage) {
          [subBuilder mergeFrom:self.optionalImportMessage];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptionalImportMessage:[subBuilder buildPartial]];
        break;
      }
      case 168: {
        int32_t value = [input readEnum];
        if (TestAllTypes_NestedEnumIsValidValue(value)) {
          [self setOptionalNestedEnum:value];
        } else {
          [unknownFields mergeVarintField:21 value:value];
        }
        break;
      }
      case 176: {
        int32_t value = [input readEnum];
        if (ForeignEnumIsValidValue(value)) {
          [self setOptionalForeignEnum:value];
        } else {
          [unknownFields mergeVarintField:22 value:value];
        }
        break;
      }
      case 184: {
        int32_t value = [input readEnum];
        if (ImportEnumIsValidValue(value)) {
          [self setOptionalImportEnum:value];
        } else {
          [unknownFields mergeVarintField:23 value:value];
        }
        break;
      }
      case 194: {
        [self setOptionalStringPiece:[input readString]];
        break;
      }
      case 202: {
        [self setOptionalCord:[input readString]];
        break;
      }
      case 248: {
        [self addRepeatedInt32:[input readInt32]];
        break;
      }
      case 256: {
        [self addRepeatedInt64:[input readInt64]];
        break;
      }
      case 264: {
        [self addRepeatedUint32:[input readUInt32]];
        break;
      }
      case 272: {
        [self addRepeatedUint64:[input readUInt64]];
        break;
      }
      case 280: {
        [self addRepeatedSint32:[input readSInt32]];
        break;
      }
      case 288: {
        [self addRepeatedSint64:[input readSInt64]];
        break;
      }
      case 301: {
        [self addRepeatedFixed32:[input readFixed32]];
        break;
      }
      case 305: {
        [self addRepeatedFixed64:[input readFixed64]];
        break;
      }
      case 317: {
        [self addRepeatedSfixed32:[input readSFixed32]];
        break;
      }
      case 321: {
        [self addRepeatedSfixed64:[input readSFixed64]];
        break;
      }
      case 333: {
        [self addRepeatedFloat:[input readFloat]];
        break;
      }
      case 337: {
        [self addRepeatedDouble:[input readDouble]];
        break;
      }
      case 344: {
        [self addRepeatedBool:[input readBool]];
        break;
      }
      case 354: {
        [self addRepeatedString:[input readString]];
        break;
      }
      case 362: {
        [self addRepeatedBytes:[input readData]];
        break;
      }
      case 371: {
        TestAllTypes_RepeatedGroup_Builder* subBuilder = [TestAllTypes_RepeatedGroup builder];
        [input readGroup:46 builder:subBuilder extensionRegistry:extensionRegistry];
        [self addRepeatedGroup:[subBuilder buildPartial]];
        break;
      }
      case 386: {
        TestAllTypes_NestedMessage_Builder* subBuilder = [TestAllTypes_NestedMessage builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addRepeatedNestedMessage:[subBuilder buildPartial]];
        break;
      }
      case 394: {
        ForeignMessage_Builder* subBuilder = [ForeignMessage builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addRepeatedForeignMessage:[subBuilder buildPartial]];
        break;
      }
      case 402: {
        ImportMessage_Builder* subBuilder = [ImportMessage builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addRepeatedImportMessage:[subBuilder buildPartial]];
        break;
      }
      case 408: {
        int32_t value = [input readEnum];
        if (TestAllTypes_NestedEnumIsValidValue(value)) {
          [self addRepeatedNestedEnum:value];
        } else {
          [unknownFields mergeVarintField:51 value:value];
        }
        break;
      }
      case 416: {
        int32_t value = [input readEnum];
        if (ForeignEnumIsValidValue(value)) {
          [self addRepeatedForeignEnum:value];
        } else {
          [unknownFields mergeVarintField:52 value:value];
        }
        break;
      }
      case 424: {
        int32_t value = [input readEnum];
        if (ImportEnumIsValidValue(value)) {
          [self addRepeatedImportEnum:value];
        } else {
          [unknownFields mergeVarintField:53 value:value];
        }
        break;
      }
      case 434: {
        [self addRepeatedStringPiece:[input readString]];
        break;
      }
      case 442: {
        [self addRepeatedCord:[input readString]];
        break;
      }
      case 488: {
        [self setDefaultInt32:[input readInt32]];
        break;
      }
      case 496: {
        [self setDefaultInt64:[input readInt64]];
        break;
      }
      case 504: {
        [self setDefaultUint32:[input readUInt32]];
        break;
      }
      case 512: {
        [self setDefaultUint64:[input readUInt64]];
        break;
      }
      case 520: {
        [self setDefaultSint32:[input readSInt32]];
        break;
      }
      case 528: {
        [self setDefaultSint64:[input readSInt64]];
        break;
      }
      case 541: {
        [self setDefaultFixed32:[input readFixed32]];
        break;
      }
      case 545: {
        [self setDefaultFixed64:[input readFixed64]];
        break;
      }
      case 557: {
        [self setDefaultSfixed32:[input readSFixed32]];
        break;
      }
      case 561: {
        [self setDefaultSfixed64:[input readSFixed64]];
        break;
      }
      case 573: {
        [self setDefaultFloat:[input readFloat]];
        break;
      }
      case 577: {
        [self setDefaultDouble:[input readDouble]];
        break;
      }
      case 584: {
        [self setDefaultBool:[input readBool]];
        break;
      }
      case 594: {
        [self setDefaultString:[input readString]];
        break;
      }
      case 602: {
        [self setDefaultBytes:[input readData]];
        break;
      }
      case 648: {
        int32_t value = [input readEnum];
        if (TestAllTypes_NestedEnumIsValidValue(value)) {
          [self setDefaultNestedEnum:value];
        } else {
          [unknownFields mergeVarintField:81 value:value];
        }
        break;
      }
      case 656: {
        int32_t value = [input readEnum];
        if (ForeignEnumIsValidValue(value)) {
          [self setDefaultForeignEnum:value];
        } else {
          [unknownFields mergeVarintField:82 value:value];
        }
        break;
      }
      case 664: {
        int32_t value = [input readEnum];
        if (ImportEnumIsValidValue(value)) {
          [self setDefaultImportEnum:value];
        } else {
          [unknownFields mergeVarintField:83 value:value];
        }
        break;
      }
      case 674: {
        [self setDefaultStringPiece:[input readString]];
        break;
      }
      case 682: {
        [self setDefaultCord:[input readString]];
        break;
      }
    }
  }
}
- (BOOL) hasOptionalInt32 {
  return result.hasOptionalInt32;
}
- (int32_t) optionalInt32 {
  return result.optionalInt32;
}
- (TestAllTypes_Builder*) setOptionalInt32:(int32_t) value {
  result.hasOptionalInt32 = YES;
  result.optionalInt32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalInt32 {
  result.hasOptionalInt32 = NO;
  result.optionalInt32 = 0;
  return self;
}
- (BOOL) hasOptionalInt64 {
  return result.hasOptionalInt64;
}
- (int64_t) optionalInt64 {
  return result.optionalInt64;
}
- (TestAllTypes_Builder*) setOptionalInt64:(int64_t) value {
  result.hasOptionalInt64 = YES;
  result.optionalInt64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalInt64 {
  result.hasOptionalInt64 = NO;
  result.optionalInt64 = 0L;
  return self;
}
- (BOOL) hasOptionalUint32 {
  return result.hasOptionalUint32;
}
- (uint32_t) optionalUint32 {
  return result.optionalUint32;
}
- (TestAllTypes_Builder*) setOptionalUint32:(uint32_t) value {
  result.hasOptionalUint32 = YES;
  result.optionalUint32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalUint32 {
  result.hasOptionalUint32 = NO;
  result.optionalUint32 = 0;
  return self;
}
- (BOOL) hasOptionalUint64 {
  return result.hasOptionalUint64;
}
- (uint64_t) optionalUint64 {
  return result.optionalUint64;
}
- (TestAllTypes_Builder*) setOptionalUint64:(uint64_t) value {
  result.hasOptionalUint64 = YES;
  result.optionalUint64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalUint64 {
  result.hasOptionalUint64 = NO;
  result.optionalUint64 = 0L;
  return self;
}
- (BOOL) hasOptionalSint32 {
  return result.hasOptionalSint32;
}
- (int32_t) optionalSint32 {
  return result.optionalSint32;
}
- (TestAllTypes_Builder*) setOptionalSint32:(int32_t) value {
  result.hasOptionalSint32 = YES;
  result.optionalSint32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalSint32 {
  result.hasOptionalSint32 = NO;
  result.optionalSint32 = 0;
  return self;
}
- (BOOL) hasOptionalSint64 {
  return result.hasOptionalSint64;
}
- (int64_t) optionalSint64 {
  return result.optionalSint64;
}
- (TestAllTypes_Builder*) setOptionalSint64:(int64_t) value {
  result.hasOptionalSint64 = YES;
  result.optionalSint64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalSint64 {
  result.hasOptionalSint64 = NO;
  result.optionalSint64 = 0L;
  return self;
}
- (BOOL) hasOptionalFixed32 {
  return result.hasOptionalFixed32;
}
- (uint32_t) optionalFixed32 {
  return result.optionalFixed32;
}
- (TestAllTypes_Builder*) setOptionalFixed32:(uint32_t) value {
  result.hasOptionalFixed32 = YES;
  result.optionalFixed32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalFixed32 {
  result.hasOptionalFixed32 = NO;
  result.optionalFixed32 = 0;
  return self;
}
- (BOOL) hasOptionalFixed64 {
  return result.hasOptionalFixed64;
}
- (uint64_t) optionalFixed64 {
  return result.optionalFixed64;
}
- (TestAllTypes_Builder*) setOptionalFixed64:(uint64_t) value {
  result.hasOptionalFixed64 = YES;
  result.optionalFixed64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalFixed64 {
  result.hasOptionalFixed64 = NO;
  result.optionalFixed64 = 0L;
  return self;
}
- (BOOL) hasOptionalSfixed32 {
  return result.hasOptionalSfixed32;
}
- (int32_t) optionalSfixed32 {
  return result.optionalSfixed32;
}
- (TestAllTypes_Builder*) setOptionalSfixed32:(int32_t) value {
  result.hasOptionalSfixed32 = YES;
  result.optionalSfixed32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalSfixed32 {
  result.hasOptionalSfixed32 = NO;
  result.optionalSfixed32 = 0;
  return self;
}
- (BOOL) hasOptionalSfixed64 {
  return result.hasOptionalSfixed64;
}
- (int64_t) optionalSfixed64 {
  return result.optionalSfixed64;
}
- (TestAllTypes_Builder*) setOptionalSfixed64:(int64_t) value {
  result.hasOptionalSfixed64 = YES;
  result.optionalSfixed64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalSfixed64 {
  result.hasOptionalSfixed64 = NO;
  result.optionalSfixed64 = 0L;
  return self;
}
- (BOOL) hasOptionalFloat {
  return result.hasOptionalFloat;
}
- (Float32) optionalFloat {
  return result.optionalFloat;
}
- (TestAllTypes_Builder*) setOptionalFloat:(Float32) value {
  result.hasOptionalFloat = YES;
  result.optionalFloat = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalFloat {
  result.hasOptionalFloat = NO;
  result.optionalFloat = 0;
  return self;
}
- (BOOL) hasOptionalDouble {
  return result.hasOptionalDouble;
}
- (Float64) optionalDouble {
  return result.optionalDouble;
}
- (TestAllTypes_Builder*) setOptionalDouble:(Float64) value {
  result.hasOptionalDouble = YES;
  result.optionalDouble = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalDouble {
  result.hasOptionalDouble = NO;
  result.optionalDouble = 0;
  return self;
}
- (BOOL) hasOptionalBool {
  return result.hasOptionalBool;
}
- (BOOL) optionalBool {
  return result.optionalBool;
}
- (TestAllTypes_Builder*) setOptionalBool:(BOOL) value {
  result.hasOptionalBool = YES;
  result.optionalBool = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalBool {
  result.hasOptionalBool = NO;
  result.optionalBool = NO;
  return self;
}
- (BOOL) hasOptionalString {
  return result.hasOptionalString;
}
- (NSString*) optionalString {
  return result.optionalString;
}
- (TestAllTypes_Builder*) setOptionalString:(NSString*) value {
  result.hasOptionalString = YES;
  result.optionalString = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalString {
  result.hasOptionalString = NO;
  result.optionalString = @"";
  return self;
}
- (BOOL) hasOptionalBytes {
  return result.hasOptionalBytes;
}
- (NSData*) optionalBytes {
  return result.optionalBytes;
}
- (TestAllTypes_Builder*) setOptionalBytes:(NSData*) value {
  result.hasOptionalBytes = YES;
  result.optionalBytes = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalBytes {
  result.hasOptionalBytes = NO;
  result.optionalBytes = [NSData data];
  return self;
}
- (BOOL) hasOptionalGroup {
  return result.hasOptionalGroup;
}
- (TestAllTypes_OptionalGroup*) optionalGroup {
  return result.optionalGroup;
}
- (TestAllTypes_Builder*) setOptionalGroup:(TestAllTypes_OptionalGroup*) value {
  result.hasOptionalGroup = YES;
  result.optionalGroup = value;
  return self;
}
- (TestAllTypes_Builder*) setOptionalGroupBuilder:(TestAllTypes_OptionalGroup_Builder*) builderForValue {
  return [self setOptionalGroup:[builderForValue build]];
}
- (TestAllTypes_Builder*) mergeOptionalGroup:(TestAllTypes_OptionalGroup*) value {
  if (result.hasOptionalGroup &&
      result.optionalGroup != [TestAllTypes_OptionalGroup defaultInstance]) {
    result.optionalGroup =
      [[[TestAllTypes_OptionalGroup builderWithPrototype:result.optionalGroup] mergeFrom:value] buildPartial];
  } else {
    result.optionalGroup = value;
  }
  result.hasOptionalGroup = YES;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalGroup {
  result.hasOptionalGroup = NO;
  result.optionalGroup = [TestAllTypes_OptionalGroup defaultInstance];
  return self;
}
- (BOOL) hasOptionalNestedMessage {
  return result.hasOptionalNestedMessage;
}
- (TestAllTypes_NestedMessage*) optionalNestedMessage {
  return result.optionalNestedMessage;
}
- (TestAllTypes_Builder*) setOptionalNestedMessage:(TestAllTypes_NestedMessage*) value {
  result.hasOptionalNestedMessage = YES;
  result.optionalNestedMessage = value;
  return self;
}
- (TestAllTypes_Builder*) setOptionalNestedMessageBuilder:(TestAllTypes_NestedMessage_Builder*) builderForValue {
  return [self setOptionalNestedMessage:[builderForValue build]];
}
- (TestAllTypes_Builder*) mergeOptionalNestedMessage:(TestAllTypes_NestedMessage*) value {
  if (result.hasOptionalNestedMessage &&
      result.optionalNestedMessage != [TestAllTypes_NestedMessage defaultInstance]) {
    result.optionalNestedMessage =
      [[[TestAllTypes_NestedMessage builderWithPrototype:result.optionalNestedMessage] mergeFrom:value] buildPartial];
  } else {
    result.optionalNestedMessage = value;
  }
  result.hasOptionalNestedMessage = YES;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalNestedMessage {
  result.hasOptionalNestedMessage = NO;
  result.optionalNestedMessage = [TestAllTypes_NestedMessage defaultInstance];
  return self;
}
- (BOOL) hasOptionalForeignMessage {
  return result.hasOptionalForeignMessage;
}
- (ForeignMessage*) optionalForeignMessage {
  return result.optionalForeignMessage;
}
- (TestAllTypes_Builder*) setOptionalForeignMessage:(ForeignMessage*) value {
  result.hasOptionalForeignMessage = YES;
  result.optionalForeignMessage = value;
  return self;
}
- (TestAllTypes_Builder*) setOptionalForeignMessageBuilder:(ForeignMessage_Builder*) builderForValue {
  return [self setOptionalForeignMessage:[builderForValue build]];
}
- (TestAllTypes_Builder*) mergeOptionalForeignMessage:(ForeignMessage*) value {
  if (result.hasOptionalForeignMessage &&
      result.optionalForeignMessage != [ForeignMessage defaultInstance]) {
    result.optionalForeignMessage =
      [[[ForeignMessage builderWithPrototype:result.optionalForeignMessage] mergeFrom:value] buildPartial];
  } else {
    result.optionalForeignMessage = value;
  }
  result.hasOptionalForeignMessage = YES;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalForeignMessage {
  result.hasOptionalForeignMessage = NO;
  result.optionalForeignMessage = [ForeignMessage defaultInstance];
  return self;
}
- (BOOL) hasOptionalImportMessage {
  return result.hasOptionalImportMessage;
}
- (ImportMessage*) optionalImportMessage {
  return result.optionalImportMessage;
}
- (TestAllTypes_Builder*) setOptionalImportMessage:(ImportMessage*) value {
  result.hasOptionalImportMessage = YES;
  result.optionalImportMessage = value;
  return self;
}
- (TestAllTypes_Builder*) setOptionalImportMessageBuilder:(ImportMessage_Builder*) builderForValue {
  return [self setOptionalImportMessage:[builderForValue build]];
}
- (TestAllTypes_Builder*) mergeOptionalImportMessage:(ImportMessage*) value {
  if (result.hasOptionalImportMessage &&
      result.optionalImportMessage != [ImportMessage defaultInstance]) {
    result.optionalImportMessage =
      [[[ImportMessage builderWithPrototype:result.optionalImportMessage] mergeFrom:value] buildPartial];
  } else {
    result.optionalImportMessage = value;
  }
  result.hasOptionalImportMessage = YES;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalImportMessage {
  result.hasOptionalImportMessage = NO;
  result.optionalImportMessage = [ImportMessage defaultInstance];
  return self;
}
- (BOOL) hasOptionalNestedEnum {
  return result.hasOptionalNestedEnum;
}
- (TestAllTypes_NestedEnum) optionalNestedEnum {
  return result.optionalNestedEnum;
}
- (TestAllTypes_Builder*) setOptionalNestedEnum:(TestAllTypes_NestedEnum) value {
  result.hasOptionalNestedEnum = YES;
  result.optionalNestedEnum = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalNestedEnum {
  result.hasOptionalNestedEnum = NO;
  result.optionalNestedEnum = TestAllTypes_NestedEnumFoo;
  return self;
}
- (BOOL) hasOptionalForeignEnum {
  return result.hasOptionalForeignEnum;
}
- (ForeignEnum) optionalForeignEnum {
  return result.optionalForeignEnum;
}
- (TestAllTypes_Builder*) setOptionalForeignEnum:(ForeignEnum) value {
  result.hasOptionalForeignEnum = YES;
  result.optionalForeignEnum = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalForeignEnum {
  result.hasOptionalForeignEnum = NO;
  result.optionalForeignEnum = ForeignEnumForeignFoo;
  return self;
}
- (BOOL) hasOptionalImportEnum {
  return result.hasOptionalImportEnum;
}
- (ImportEnum) optionalImportEnum {
  return result.optionalImportEnum;
}
- (TestAllTypes_Builder*) setOptionalImportEnum:(ImportEnum) value {
  result.hasOptionalImportEnum = YES;
  result.optionalImportEnum = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalImportEnum {
  result.hasOptionalImportEnum = NO;
  result.optionalImportEnum = ImportEnumImportFoo;
  return self;
}
- (BOOL) hasOptionalStringPiece {
  return result.hasOptionalStringPiece;
}
- (NSString*) optionalStringPiece {
  return result.optionalStringPiece;
}
- (TestAllTypes_Builder*) setOptionalStringPiece:(NSString*) value {
  result.hasOptionalStringPiece = YES;
  result.optionalStringPiece = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalStringPiece {
  result.hasOptionalStringPiece = NO;
  result.optionalStringPiece = @"";
  return self;
}
- (BOOL) hasOptionalCord {
  return result.hasOptionalCord;
}
- (NSString*) optionalCord {
  return result.optionalCord;
}
- (TestAllTypes_Builder*) setOptionalCord:(NSString*) value {
  result.hasOptionalCord = YES;
  result.optionalCord = value;
  return self;
}
- (TestAllTypes_Builder*) clearOptionalCord {
  result.hasOptionalCord = NO;
  result.optionalCord = @"";
  return self;
}
- (PBAppendableArray *)repeatedInt32 {
  return result.repeatedInt32Array;
}
- (int32_t)repeatedInt32AtIndex:(NSUInteger)index {
  return [result repeatedInt32AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedInt32:(int32_t)value {
  if (result.repeatedInt32Array == nil) {
    result.repeatedInt32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.repeatedInt32Array addInt32:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedInt32Array:(NSArray *)array {
  result.repeatedInt32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedInt32Values:(const int32_t *)values count:(NSUInteger)count {
  result.repeatedInt32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedInt32 {
  result.repeatedInt32Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedInt64 {
  return result.repeatedInt64Array;
}
- (int64_t)repeatedInt64AtIndex:(NSUInteger)index {
  return [result repeatedInt64AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedInt64:(int64_t)value {
  if (result.repeatedInt64Array == nil) {
    result.repeatedInt64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.repeatedInt64Array addInt64:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedInt64Array:(NSArray *)array {
  result.repeatedInt64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedInt64Values:(const int64_t *)values count:(NSUInteger)count {
  result.repeatedInt64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedInt64 {
  result.repeatedInt64Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedUint32 {
  return result.repeatedUint32Array;
}
- (uint32_t)repeatedUint32AtIndex:(NSUInteger)index {
  return [result repeatedUint32AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedUint32:(uint32_t)value {
  if (result.repeatedUint32Array == nil) {
    result.repeatedUint32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt32];
  }
  [result.repeatedUint32Array addUint32:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedUint32Array:(NSArray *)array {
  result.repeatedUint32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedUint32Values:(const uint32_t *)values count:(NSUInteger)count {
  result.repeatedUint32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedUint32 {
  result.repeatedUint32Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedUint64 {
  return result.repeatedUint64Array;
}
- (uint64_t)repeatedUint64AtIndex:(NSUInteger)index {
  return [result repeatedUint64AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedUint64:(uint64_t)value {
  if (result.repeatedUint64Array == nil) {
    result.repeatedUint64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
  }
  [result.repeatedUint64Array addUint64:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedUint64Array:(NSArray *)array {
  result.repeatedUint64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedUint64Values:(const uint64_t *)values count:(NSUInteger)count {
  result.repeatedUint64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedUint64 {
  result.repeatedUint64Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedSint32 {
  return result.repeatedSint32Array;
}
- (int32_t)repeatedSint32AtIndex:(NSUInteger)index {
  return [result repeatedSint32AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedSint32:(int32_t)value {
  if (result.repeatedSint32Array == nil) {
    result.repeatedSint32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.repeatedSint32Array addInt32:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedSint32Array:(NSArray *)array {
  result.repeatedSint32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedSint32Values:(const int32_t *)values count:(NSUInteger)count {
  result.repeatedSint32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedSint32 {
  result.repeatedSint32Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedSint64 {
  return result.repeatedSint64Array;
}
- (int64_t)repeatedSint64AtIndex:(NSUInteger)index {
  return [result repeatedSint64AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedSint64:(int64_t)value {
  if (result.repeatedSint64Array == nil) {
    result.repeatedSint64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.repeatedSint64Array addInt64:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedSint64Array:(NSArray *)array {
  result.repeatedSint64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedSint64Values:(const int64_t *)values count:(NSUInteger)count {
  result.repeatedSint64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedSint64 {
  result.repeatedSint64Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedFixed32 {
  return result.repeatedFixed32Array;
}
- (uint32_t)repeatedFixed32AtIndex:(NSUInteger)index {
  return [result repeatedFixed32AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedFixed32:(uint32_t)value {
  if (result.repeatedFixed32Array == nil) {
    result.repeatedFixed32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt32];
  }
  [result.repeatedFixed32Array addUint32:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedFixed32Array:(NSArray *)array {
  result.repeatedFixed32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedFixed32Values:(const uint32_t *)values count:(NSUInteger)count {
  result.repeatedFixed32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedFixed32 {
  result.repeatedFixed32Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedFixed64 {
  return result.repeatedFixed64Array;
}
- (uint64_t)repeatedFixed64AtIndex:(NSUInteger)index {
  return [result repeatedFixed64AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedFixed64:(uint64_t)value {
  if (result.repeatedFixed64Array == nil) {
    result.repeatedFixed64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
  }
  [result.repeatedFixed64Array addUint64:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedFixed64Array:(NSArray *)array {
  result.repeatedFixed64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedFixed64Values:(const uint64_t *)values count:(NSUInteger)count {
  result.repeatedFixed64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedFixed64 {
  result.repeatedFixed64Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedSfixed32 {
  return result.repeatedSfixed32Array;
}
- (int32_t)repeatedSfixed32AtIndex:(NSUInteger)index {
  return [result repeatedSfixed32AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedSfixed32:(int32_t)value {
  if (result.repeatedSfixed32Array == nil) {
    result.repeatedSfixed32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.repeatedSfixed32Array addInt32:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedSfixed32Array:(NSArray *)array {
  result.repeatedSfixed32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedSfixed32Values:(const int32_t *)values count:(NSUInteger)count {
  result.repeatedSfixed32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedSfixed32 {
  result.repeatedSfixed32Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedSfixed64 {
  return result.repeatedSfixed64Array;
}
- (int64_t)repeatedSfixed64AtIndex:(NSUInteger)index {
  return [result repeatedSfixed64AtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedSfixed64:(int64_t)value {
  if (result.repeatedSfixed64Array == nil) {
    result.repeatedSfixed64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.repeatedSfixed64Array addInt64:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedSfixed64Array:(NSArray *)array {
  result.repeatedSfixed64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedSfixed64Values:(const int64_t *)values count:(NSUInteger)count {
  result.repeatedSfixed64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedSfixed64 {
  result.repeatedSfixed64Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedFloat {
  return result.repeatedFloatArray;
}
- (Float32)repeatedFloatAtIndex:(NSUInteger)index {
  return [result repeatedFloatAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedFloat:(Float32)value {
  if (result.repeatedFloatArray == nil) {
    result.repeatedFloatArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeFloat];
  }
  [result.repeatedFloatArray addFloat:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedFloatArray:(NSArray *)array {
  result.repeatedFloatArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeFloat];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedFloatValues:(const Float32 *)values count:(NSUInteger)count {
  result.repeatedFloatArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeFloat];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedFloat {
  result.repeatedFloatArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedDouble {
  return result.repeatedDoubleArray;
}
- (Float64)repeatedDoubleAtIndex:(NSUInteger)index {
  return [result repeatedDoubleAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedDouble:(Float64)value {
  if (result.repeatedDoubleArray == nil) {
    result.repeatedDoubleArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeDouble];
  }
  [result.repeatedDoubleArray addDouble:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedDoubleArray:(NSArray *)array {
  result.repeatedDoubleArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeDouble];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedDoubleValues:(const Float64 *)values count:(NSUInteger)count {
  result.repeatedDoubleArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeDouble];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedDouble {
  result.repeatedDoubleArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedBool {
  return result.repeatedBoolArray;
}
- (BOOL)repeatedBoolAtIndex:(NSUInteger)index {
  return [result repeatedBoolAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedBool:(BOOL)value {
  if (result.repeatedBoolArray == nil) {
    result.repeatedBoolArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeBool];
  }
  [result.repeatedBoolArray addBool:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedBoolArray:(NSArray *)array {
  result.repeatedBoolArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeBool];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedBoolValues:(const BOOL *)values count:(NSUInteger)count {
  result.repeatedBoolArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeBool];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedBool {
  result.repeatedBoolArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedString {
  return result.repeatedStringArray;
}
- (NSString*)repeatedStringAtIndex:(NSUInteger)index {
  return [result repeatedStringAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedString:(NSString*)value {
  if (result.repeatedStringArray == nil) {
    result.repeatedStringArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedStringArray addObject:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedStringArray:(NSArray *)array {
  result.repeatedStringArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedStringValues:(const NSString* *)values count:(NSUInteger)count {
  result.repeatedStringArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedString {
  result.repeatedStringArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedBytes {
  return result.repeatedBytesArray;
}
- (NSData*)repeatedBytesAtIndex:(NSUInteger)index {
  return [result repeatedBytesAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedBytes:(NSData*)value {
  if (result.repeatedBytesArray == nil) {
    result.repeatedBytesArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedBytesArray addObject:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedBytesArray:(NSArray *)array {
  result.repeatedBytesArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedBytesValues:(const NSData* *)values count:(NSUInteger)count {
  result.repeatedBytesArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedBytes {
  result.repeatedBytesArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedGroup {
  return result.repeatedGroupArray;
}
- (TestAllTypes_RepeatedGroup*)repeatedGroupAtIndex:(NSUInteger)index {
  return [result repeatedGroupAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedGroup:(TestAllTypes_RepeatedGroup*)value {
  if (result.repeatedGroupArray == nil) {
    result.repeatedGroupArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedGroupArray addObject:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedGroupArray:(NSArray *)array {
  result.repeatedGroupArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedGroupValues:(const TestAllTypes_RepeatedGroup* *)values count:(NSUInteger)count {
  result.repeatedGroupArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedGroup {
  result.repeatedGroupArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedNestedMessage {
  return result.repeatedNestedMessageArray;
}
- (TestAllTypes_NestedMessage*)repeatedNestedMessageAtIndex:(NSUInteger)index {
  return [result repeatedNestedMessageAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedNestedMessage:(TestAllTypes_NestedMessage*)value {
  if (result.repeatedNestedMessageArray == nil) {
    result.repeatedNestedMessageArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedNestedMessageArray addObject:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedNestedMessageArray:(NSArray *)array {
  result.repeatedNestedMessageArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedNestedMessageValues:(const TestAllTypes_NestedMessage* *)values count:(NSUInteger)count {
  result.repeatedNestedMessageArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedNestedMessage {
  result.repeatedNestedMessageArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedForeignMessage {
  return result.repeatedForeignMessageArray;
}
- (ForeignMessage*)repeatedForeignMessageAtIndex:(NSUInteger)index {
  return [result repeatedForeignMessageAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedForeignMessage:(ForeignMessage*)value {
  if (result.repeatedForeignMessageArray == nil) {
    result.repeatedForeignMessageArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedForeignMessageArray addObject:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedForeignMessageArray:(NSArray *)array {
  result.repeatedForeignMessageArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedForeignMessageValues:(const ForeignMessage* *)values count:(NSUInteger)count {
  result.repeatedForeignMessageArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedForeignMessage {
  result.repeatedForeignMessageArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedImportMessage {
  return result.repeatedImportMessageArray;
}
- (ImportMessage*)repeatedImportMessageAtIndex:(NSUInteger)index {
  return [result repeatedImportMessageAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedImportMessage:(ImportMessage*)value {
  if (result.repeatedImportMessageArray == nil) {
    result.repeatedImportMessageArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedImportMessageArray addObject:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedImportMessageArray:(NSArray *)array {
  result.repeatedImportMessageArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedImportMessageValues:(const ImportMessage* *)values count:(NSUInteger)count {
  result.repeatedImportMessageArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedImportMessage {
  result.repeatedImportMessageArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedNestedEnum {
  return result.repeatedNestedEnumArray;
}
- (TestAllTypes_NestedEnum)repeatedNestedEnumAtIndex:(NSUInteger)index {
  return [result repeatedNestedEnumAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedNestedEnum:(TestAllTypes_NestedEnum)value {
  if (result.repeatedNestedEnumArray == nil) {
    result.repeatedNestedEnumArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.repeatedNestedEnumArray addInt32:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedNestedEnumArray:(NSArray *)array {
  result.repeatedNestedEnumArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedNestedEnumValues:(const TestAllTypes_NestedEnum *)values count:(NSUInteger)count {
  result.repeatedNestedEnumArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedNestedEnum {
  result.repeatedNestedEnumArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedForeignEnum {
  return result.repeatedForeignEnumArray;
}
- (ForeignEnum)repeatedForeignEnumAtIndex:(NSUInteger)index {
  return [result repeatedForeignEnumAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedForeignEnum:(ForeignEnum)value {
  if (result.repeatedForeignEnumArray == nil) {
    result.repeatedForeignEnumArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.repeatedForeignEnumArray addInt32:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedForeignEnumArray:(NSArray *)array {
  result.repeatedForeignEnumArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedForeignEnumValues:(const ForeignEnum *)values count:(NSUInteger)count {
  result.repeatedForeignEnumArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedForeignEnum {
  result.repeatedForeignEnumArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedImportEnum {
  return result.repeatedImportEnumArray;
}
- (ImportEnum)repeatedImportEnumAtIndex:(NSUInteger)index {
  return [result repeatedImportEnumAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedImportEnum:(ImportEnum)value {
  if (result.repeatedImportEnumArray == nil) {
    result.repeatedImportEnumArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.repeatedImportEnumArray addInt32:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedImportEnumArray:(NSArray *)array {
  result.repeatedImportEnumArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedImportEnumValues:(const ImportEnum *)values count:(NSUInteger)count {
  result.repeatedImportEnumArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedImportEnum {
  result.repeatedImportEnumArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedStringPiece {
  return result.repeatedStringPieceArray;
}
- (NSString*)repeatedStringPieceAtIndex:(NSUInteger)index {
  return [result repeatedStringPieceAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedStringPiece:(NSString*)value {
  if (result.repeatedStringPieceArray == nil) {
    result.repeatedStringPieceArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedStringPieceArray addObject:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedStringPieceArray:(NSArray *)array {
  result.repeatedStringPieceArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedStringPieceValues:(const NSString* *)values count:(NSUInteger)count {
  result.repeatedStringPieceArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedStringPiece {
  result.repeatedStringPieceArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedCord {
  return result.repeatedCordArray;
}
- (NSString*)repeatedCordAtIndex:(NSUInteger)index {
  return [result repeatedCordAtIndex:index];
}
- (TestAllTypes_Builder *)addRepeatedCord:(NSString*)value {
  if (result.repeatedCordArray == nil) {
    result.repeatedCordArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedCordArray addObject:value];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedCordArray:(NSArray *)array {
  result.repeatedCordArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)setRepeatedCordValues:(const NSString* *)values count:(NSUInteger)count {
  result.repeatedCordArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestAllTypes_Builder *)clearRepeatedCord {
  result.repeatedCordArray = nil;
  return self;
}
- (BOOL) hasDefaultInt32 {
  return result.hasDefaultInt32;
}
- (int32_t) defaultInt32 {
  return result.defaultInt32;
}
- (TestAllTypes_Builder*) setDefaultInt32:(int32_t) value {
  result.hasDefaultInt32 = YES;
  result.defaultInt32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultInt32 {
  result.hasDefaultInt32 = NO;
  result.defaultInt32 = 41;
  return self;
}
- (BOOL) hasDefaultInt64 {
  return result.hasDefaultInt64;
}
- (int64_t) defaultInt64 {
  return result.defaultInt64;
}
- (TestAllTypes_Builder*) setDefaultInt64:(int64_t) value {
  result.hasDefaultInt64 = YES;
  result.defaultInt64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultInt64 {
  result.hasDefaultInt64 = NO;
  result.defaultInt64 = 42L;
  return self;
}
- (BOOL) hasDefaultUint32 {
  return result.hasDefaultUint32;
}
- (uint32_t) defaultUint32 {
  return result.defaultUint32;
}
- (TestAllTypes_Builder*) setDefaultUint32:(uint32_t) value {
  result.hasDefaultUint32 = YES;
  result.defaultUint32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultUint32 {
  result.hasDefaultUint32 = NO;
  result.defaultUint32 = 43;
  return self;
}
- (BOOL) hasDefaultUint64 {
  return result.hasDefaultUint64;
}
- (uint64_t) defaultUint64 {
  return result.defaultUint64;
}
- (TestAllTypes_Builder*) setDefaultUint64:(uint64_t) value {
  result.hasDefaultUint64 = YES;
  result.defaultUint64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultUint64 {
  result.hasDefaultUint64 = NO;
  result.defaultUint64 = 44L;
  return self;
}
- (BOOL) hasDefaultSint32 {
  return result.hasDefaultSint32;
}
- (int32_t) defaultSint32 {
  return result.defaultSint32;
}
- (TestAllTypes_Builder*) setDefaultSint32:(int32_t) value {
  result.hasDefaultSint32 = YES;
  result.defaultSint32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultSint32 {
  result.hasDefaultSint32 = NO;
  result.defaultSint32 = -45;
  return self;
}
- (BOOL) hasDefaultSint64 {
  return result.hasDefaultSint64;
}
- (int64_t) defaultSint64 {
  return result.defaultSint64;
}
- (TestAllTypes_Builder*) setDefaultSint64:(int64_t) value {
  result.hasDefaultSint64 = YES;
  result.defaultSint64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultSint64 {
  result.hasDefaultSint64 = NO;
  result.defaultSint64 = 46L;
  return self;
}
- (BOOL) hasDefaultFixed32 {
  return result.hasDefaultFixed32;
}
- (uint32_t) defaultFixed32 {
  return result.defaultFixed32;
}
- (TestAllTypes_Builder*) setDefaultFixed32:(uint32_t) value {
  result.hasDefaultFixed32 = YES;
  result.defaultFixed32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultFixed32 {
  result.hasDefaultFixed32 = NO;
  result.defaultFixed32 = 47;
  return self;
}
- (BOOL) hasDefaultFixed64 {
  return result.hasDefaultFixed64;
}
- (uint64_t) defaultFixed64 {
  return result.defaultFixed64;
}
- (TestAllTypes_Builder*) setDefaultFixed64:(uint64_t) value {
  result.hasDefaultFixed64 = YES;
  result.defaultFixed64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultFixed64 {
  result.hasDefaultFixed64 = NO;
  result.defaultFixed64 = 48L;
  return self;
}
- (BOOL) hasDefaultSfixed32 {
  return result.hasDefaultSfixed32;
}
- (int32_t) defaultSfixed32 {
  return result.defaultSfixed32;
}
- (TestAllTypes_Builder*) setDefaultSfixed32:(int32_t) value {
  result.hasDefaultSfixed32 = YES;
  result.defaultSfixed32 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultSfixed32 {
  result.hasDefaultSfixed32 = NO;
  result.defaultSfixed32 = 49;
  return self;
}
- (BOOL) hasDefaultSfixed64 {
  return result.hasDefaultSfixed64;
}
- (int64_t) defaultSfixed64 {
  return result.defaultSfixed64;
}
- (TestAllTypes_Builder*) setDefaultSfixed64:(int64_t) value {
  result.hasDefaultSfixed64 = YES;
  result.defaultSfixed64 = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultSfixed64 {
  result.hasDefaultSfixed64 = NO;
  result.defaultSfixed64 = -50L;
  return self;
}
- (BOOL) hasDefaultFloat {
  return result.hasDefaultFloat;
}
- (Float32) defaultFloat {
  return result.defaultFloat;
}
- (TestAllTypes_Builder*) setDefaultFloat:(Float32) value {
  result.hasDefaultFloat = YES;
  result.defaultFloat = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultFloat {
  result.hasDefaultFloat = NO;
  result.defaultFloat = 51.5;
  return self;
}
- (BOOL) hasDefaultDouble {
  return result.hasDefaultDouble;
}
- (Float64) defaultDouble {
  return result.defaultDouble;
}
- (TestAllTypes_Builder*) setDefaultDouble:(Float64) value {
  result.hasDefaultDouble = YES;
  result.defaultDouble = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultDouble {
  result.hasDefaultDouble = NO;
  result.defaultDouble = 52000;
  return self;
}
- (BOOL) hasDefaultBool {
  return result.hasDefaultBool;
}
- (BOOL) defaultBool {
  return result.defaultBool;
}
- (TestAllTypes_Builder*) setDefaultBool:(BOOL) value {
  result.hasDefaultBool = YES;
  result.defaultBool = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultBool {
  result.hasDefaultBool = NO;
  result.defaultBool = YES;
  return self;
}
- (BOOL) hasDefaultString {
  return result.hasDefaultString;
}
- (NSString*) defaultString {
  return result.defaultString;
}
- (TestAllTypes_Builder*) setDefaultString:(NSString*) value {
  result.hasDefaultString = YES;
  result.defaultString = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultString {
  result.hasDefaultString = NO;
  result.defaultString = @"hello";
  return self;
}
- (BOOL) hasDefaultBytes {
  return result.hasDefaultBytes;
}
- (NSData*) defaultBytes {
  return result.defaultBytes;
}
- (TestAllTypes_Builder*) setDefaultBytes:(NSData*) value {
  result.hasDefaultBytes = YES;
  result.defaultBytes = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultBytes {
  result.hasDefaultBytes = NO;
  result.defaultBytes = [NSData dataWithBytes:"world" length:5];
  return self;
}
- (BOOL) hasDefaultNestedEnum {
  return result.hasDefaultNestedEnum;
}
- (TestAllTypes_NestedEnum) defaultNestedEnum {
  return result.defaultNestedEnum;
}
- (TestAllTypes_Builder*) setDefaultNestedEnum:(TestAllTypes_NestedEnum) value {
  result.hasDefaultNestedEnum = YES;
  result.defaultNestedEnum = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultNestedEnum {
  result.hasDefaultNestedEnum = NO;
  result.defaultNestedEnum = TestAllTypes_NestedEnumBar;
  return self;
}
- (BOOL) hasDefaultForeignEnum {
  return result.hasDefaultForeignEnum;
}
- (ForeignEnum) defaultForeignEnum {
  return result.defaultForeignEnum;
}
- (TestAllTypes_Builder*) setDefaultForeignEnum:(ForeignEnum) value {
  result.hasDefaultForeignEnum = YES;
  result.defaultForeignEnum = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultForeignEnum {
  result.hasDefaultForeignEnum = NO;
  result.defaultForeignEnum = ForeignEnumForeignBar;
  return self;
}
- (BOOL) hasDefaultImportEnum {
  return result.hasDefaultImportEnum;
}
- (ImportEnum) defaultImportEnum {
  return result.defaultImportEnum;
}
- (TestAllTypes_Builder*) setDefaultImportEnum:(ImportEnum) value {
  result.hasDefaultImportEnum = YES;
  result.defaultImportEnum = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultImportEnum {
  result.hasDefaultImportEnum = NO;
  result.defaultImportEnum = ImportEnumImportBar;
  return self;
}
- (BOOL) hasDefaultStringPiece {
  return result.hasDefaultStringPiece;
}
- (NSString*) defaultStringPiece {
  return result.defaultStringPiece;
}
- (TestAllTypes_Builder*) setDefaultStringPiece:(NSString*) value {
  result.hasDefaultStringPiece = YES;
  result.defaultStringPiece = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultStringPiece {
  result.hasDefaultStringPiece = NO;
  result.defaultStringPiece = @"abc";
  return self;
}
- (BOOL) hasDefaultCord {
  return result.hasDefaultCord;
}
- (NSString*) defaultCord {
  return result.defaultCord;
}
- (TestAllTypes_Builder*) setDefaultCord:(NSString*) value {
  result.hasDefaultCord = YES;
  result.defaultCord = value;
  return self;
}
- (TestAllTypes_Builder*) clearDefaultCord {
  result.hasDefaultCord = NO;
  result.defaultCord = @"123";
  return self;
}
@end

@interface TestDeprecatedFields ()
@property int32_t deprecatedInt32;
@end

@implementation TestDeprecatedFields

- (BOOL) hasDeprecatedInt32 {
  return !!hasDeprecatedInt32_;
}
- (void) setHasDeprecatedInt32:(BOOL) value {
  hasDeprecatedInt32_ = !!value;
}
@synthesize deprecatedInt32;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.deprecatedInt32 = 0;
  }
  return self;
}
static TestDeprecatedFields* defaultTestDeprecatedFieldsInstance = nil;
+ (void) initialize {
  if (self == [TestDeprecatedFields class]) {
    defaultTestDeprecatedFieldsInstance = [[TestDeprecatedFields alloc] init];
  }
}
+ (TestDeprecatedFields*) defaultInstance {
  return defaultTestDeprecatedFieldsInstance;
}
- (TestDeprecatedFields*) defaultInstance {
  return defaultTestDeprecatedFieldsInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasDeprecatedInt32) {
    [output writeInt32:1 value:self.deprecatedInt32];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasDeprecatedInt32) {
    size += computeInt32Size(1, self.deprecatedInt32);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestDeprecatedFields*) parseFromData:(NSData*) data {
  return (TestDeprecatedFields*)[[[TestDeprecatedFields builder] mergeFromData:data] build];
}
+ (TestDeprecatedFields*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDeprecatedFields*)[[[TestDeprecatedFields builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestDeprecatedFields*) parseFromInputStream:(NSInputStream*) input {
  return (TestDeprecatedFields*)[[[TestDeprecatedFields builder] mergeFromInputStream:input] build];
}
+ (TestDeprecatedFields*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDeprecatedFields*)[[[TestDeprecatedFields builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDeprecatedFields*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestDeprecatedFields*)[[[TestDeprecatedFields builder] mergeFromCodedInputStream:input] build];
}
+ (TestDeprecatedFields*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDeprecatedFields*)[[[TestDeprecatedFields builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDeprecatedFields_Builder*) builder {
  return [[[TestDeprecatedFields_Builder alloc] init] autorelease];
}
+ (TestDeprecatedFields_Builder*) builderWithPrototype:(TestDeprecatedFields*) prototype {
  return [[TestDeprecatedFields builder] mergeFrom:prototype];
}
- (TestDeprecatedFields_Builder*) builder {
  return [TestDeprecatedFields builder];
}
- (TestDeprecatedFields_Builder*) toBuilder {
  return [TestDeprecatedFields builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasDeprecatedInt32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"deprecatedInt32", [NSNumber numberWithInt:self.deprecatedInt32]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestDeprecatedFields class]]) {
    return NO;
  }
  TestDeprecatedFields *otherMessage = other;
  return
      self.hasDeprecatedInt32 == otherMessage.hasDeprecatedInt32 &&
      (!self.hasDeprecatedInt32 || self.deprecatedInt32 == otherMessage.deprecatedInt32) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasDeprecatedInt32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.deprecatedInt32] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestDeprecatedFields_Builder()
@property (retain) TestDeprecatedFields* result;
@end

@implementation TestDeprecatedFields_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestDeprecatedFields alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestDeprecatedFields_Builder*) clear {
  self.result = [[[TestDeprecatedFields alloc] init] autorelease];
  return self;
}
- (TestDeprecatedFields_Builder*) clone {
  return [TestDeprecatedFields builderWithPrototype:result];
}
- (TestDeprecatedFields*) defaultInstance {
  return [TestDeprecatedFields defaultInstance];
}
- (TestDeprecatedFields*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestDeprecatedFields*) buildPartial {
  TestDeprecatedFields* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestDeprecatedFields_Builder*) mergeFrom:(TestDeprecatedFields*) other {
  if (other == [TestDeprecatedFields defaultInstance]) {
    return self;
  }
  if (other.hasDeprecatedInt32) {
    [self setDeprecatedInt32:other.deprecatedInt32];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestDeprecatedFields_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestDeprecatedFields_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setDeprecatedInt32:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasDeprecatedInt32 {
  return result.hasDeprecatedInt32;
}
- (int32_t) deprecatedInt32 {
  return result.deprecatedInt32;
}
- (TestDeprecatedFields_Builder*) setDeprecatedInt32:(int32_t) value {
  result.hasDeprecatedInt32 = YES;
  result.deprecatedInt32 = value;
  return self;
}
- (TestDeprecatedFields_Builder*) clearDeprecatedInt32 {
  result.hasDeprecatedInt32 = NO;
  result.deprecatedInt32 = 0;
  return self;
}
@end

@interface ForeignMessage ()
@property int32_t c;
@end

@implementation ForeignMessage

- (BOOL) hasC {
  return !!hasC_;
}
- (void) setHasC:(BOOL) value {
  hasC_ = !!value;
}
@synthesize c;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.c = 0;
  }
  return self;
}
static ForeignMessage* defaultForeignMessageInstance = nil;
+ (void) initialize {
  if (self == [ForeignMessage class]) {
    defaultForeignMessageInstance = [[ForeignMessage alloc] init];
  }
}
+ (ForeignMessage*) defaultInstance {
  return defaultForeignMessageInstance;
}
- (ForeignMessage*) defaultInstance {
  return defaultForeignMessageInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasC) {
    [output writeInt32:1 value:self.c];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasC) {
    size += computeInt32Size(1, self.c);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (ForeignMessage*) parseFromData:(NSData*) data {
  return (ForeignMessage*)[[[ForeignMessage builder] mergeFromData:data] build];
}
+ (ForeignMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (ForeignMessage*)[[[ForeignMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (ForeignMessage*) parseFromInputStream:(NSInputStream*) input {
  return (ForeignMessage*)[[[ForeignMessage builder] mergeFromInputStream:input] build];
}
+ (ForeignMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (ForeignMessage*)[[[ForeignMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (ForeignMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (ForeignMessage*)[[[ForeignMessage builder] mergeFromCodedInputStream:input] build];
}
+ (ForeignMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (ForeignMessage*)[[[ForeignMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (ForeignMessage_Builder*) builder {
  return [[[ForeignMessage_Builder alloc] init] autorelease];
}
+ (ForeignMessage_Builder*) builderWithPrototype:(ForeignMessage*) prototype {
  return [[ForeignMessage builder] mergeFrom:prototype];
}
- (ForeignMessage_Builder*) builder {
  return [ForeignMessage builder];
}
- (ForeignMessage_Builder*) toBuilder {
  return [ForeignMessage builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasC) {
    [output appendFormat:@"%@%@: %@\n", indent, @"c", [NSNumber numberWithInt:self.c]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[ForeignMessage class]]) {
    return NO;
  }
  ForeignMessage *otherMessage = other;
  return
      self.hasC == otherMessage.hasC &&
      (!self.hasC || self.c == otherMessage.c) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasC) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.c] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface ForeignMessage_Builder()
@property (retain) ForeignMessage* result;
@end

@implementation ForeignMessage_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[ForeignMessage alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (ForeignMessage_Builder*) clear {
  self.result = [[[ForeignMessage alloc] init] autorelease];
  return self;
}
- (ForeignMessage_Builder*) clone {
  return [ForeignMessage builderWithPrototype:result];
}
- (ForeignMessage*) defaultInstance {
  return [ForeignMessage defaultInstance];
}
- (ForeignMessage*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (ForeignMessage*) buildPartial {
  ForeignMessage* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (ForeignMessage_Builder*) mergeFrom:(ForeignMessage*) other {
  if (other == [ForeignMessage defaultInstance]) {
    return self;
  }
  if (other.hasC) {
    [self setC:other.c];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (ForeignMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (ForeignMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setC:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasC {
  return result.hasC;
}
- (int32_t) c {
  return result.c;
}
- (ForeignMessage_Builder*) setC:(int32_t) value {
  result.hasC = YES;
  result.c = value;
  return self;
}
- (ForeignMessage_Builder*) clearC {
  result.hasC = NO;
  result.c = 0;
  return self;
}
@end

@interface TestAllExtensions ()
@end

@implementation TestAllExtensions

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static TestAllExtensions* defaultTestAllExtensionsInstance = nil;
+ (void) initialize {
  if (self == [TestAllExtensions class]) {
    defaultTestAllExtensionsInstance = [[TestAllExtensions alloc] init];
  }
}
+ (TestAllExtensions*) defaultInstance {
  return defaultTestAllExtensionsInstance;
}
- (TestAllExtensions*) defaultInstance {
  return defaultTestAllExtensionsInstance;
}
- (BOOL) isInitialized {
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self writeExtensionsToCodedOutputStream:output
                                      from:1
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestAllExtensions*) parseFromData:(NSData*) data {
  return (TestAllExtensions*)[[[TestAllExtensions builder] mergeFromData:data] build];
}
+ (TestAllExtensions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllExtensions*)[[[TestAllExtensions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestAllExtensions*) parseFromInputStream:(NSInputStream*) input {
  return (TestAllExtensions*)[[[TestAllExtensions builder] mergeFromInputStream:input] build];
}
+ (TestAllExtensions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllExtensions*)[[[TestAllExtensions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllExtensions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestAllExtensions*)[[[TestAllExtensions builder] mergeFromCodedInputStream:input] build];
}
+ (TestAllExtensions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestAllExtensions*)[[[TestAllExtensions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestAllExtensions_Builder*) builder {
  return [[[TestAllExtensions_Builder alloc] init] autorelease];
}
+ (TestAllExtensions_Builder*) builderWithPrototype:(TestAllExtensions*) prototype {
  return [[TestAllExtensions builder] mergeFrom:prototype];
}
- (TestAllExtensions_Builder*) builder {
  return [TestAllExtensions builder];
}
- (TestAllExtensions_Builder*) toBuilder {
  return [TestAllExtensions builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self writeExtensionDescriptionToMutableString:(NSMutableString*)output
                                            from:1
                                              to:536870912
                                      withIndent:indent];
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestAllExtensions class]]) {
    return NO;
  }
  TestAllExtensions *otherMessage = other;
  return
      [self isEqualExtensionsInOther:otherMessage from:1 to:536870912] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self hashExtensionsFrom:1 to:536870912];
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestAllExtensions_Builder()
@property (retain) TestAllExtensions* result;
@end

@implementation TestAllExtensions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestAllExtensions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (TestAllExtensions_Builder*) clear {
  self.result = [[[TestAllExtensions alloc] init] autorelease];
  return self;
}
- (TestAllExtensions_Builder*) clone {
  return [TestAllExtensions builderWithPrototype:result];
}
- (TestAllExtensions*) defaultInstance {
  return [TestAllExtensions defaultInstance];
}
- (TestAllExtensions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestAllExtensions*) buildPartial {
  TestAllExtensions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestAllExtensions_Builder*) mergeFrom:(TestAllExtensions*) other {
  if (other == [TestAllExtensions defaultInstance]) {
    return self;
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestAllExtensions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestAllExtensions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

@interface OptionalGroup_extension ()
@property int32_t a;
@end

@implementation OptionalGroup_extension

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = 0;
  }
  return self;
}
static OptionalGroup_extension* defaultOptionalGroup_extensionInstance = nil;
+ (void) initialize {
  if (self == [OptionalGroup_extension class]) {
    defaultOptionalGroup_extensionInstance = [[OptionalGroup_extension alloc] init];
  }
}
+ (OptionalGroup_extension*) defaultInstance {
  return defaultOptionalGroup_extensionInstance;
}
- (OptionalGroup_extension*) defaultInstance {
  return defaultOptionalGroup_extensionInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeInt32:17 value:self.a];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeInt32Size(17, self.a);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (OptionalGroup_extension*) parseFromData:(NSData*) data {
  return (OptionalGroup_extension*)[[[OptionalGroup_extension builder] mergeFromData:data] build];
}
+ (OptionalGroup_extension*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (OptionalGroup_extension*)[[[OptionalGroup_extension builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (OptionalGroup_extension*) parseFromInputStream:(NSInputStream*) input {
  return (OptionalGroup_extension*)[[[OptionalGroup_extension builder] mergeFromInputStream:input] build];
}
+ (OptionalGroup_extension*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (OptionalGroup_extension*)[[[OptionalGroup_extension builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (OptionalGroup_extension*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (OptionalGroup_extension*)[[[OptionalGroup_extension builder] mergeFromCodedInputStream:input] build];
}
+ (OptionalGroup_extension*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (OptionalGroup_extension*)[[[OptionalGroup_extension builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (OptionalGroup_extension_Builder*) builder {
  return [[[OptionalGroup_extension_Builder alloc] init] autorelease];
}
+ (OptionalGroup_extension_Builder*) builderWithPrototype:(OptionalGroup_extension*) prototype {
  return [[OptionalGroup_extension builder] mergeFrom:prototype];
}
- (OptionalGroup_extension_Builder*) builder {
  return [OptionalGroup_extension builder];
}
- (OptionalGroup_extension_Builder*) toBuilder {
  return [OptionalGroup_extension builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@: %@\n", indent, @"a", [NSNumber numberWithInt:self.a]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[OptionalGroup_extension class]]) {
    return NO;
  }
  OptionalGroup_extension *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || self.a == otherMessage.a) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.a] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface OptionalGroup_extension_Builder()
@property (retain) OptionalGroup_extension* result;
@end

@implementation OptionalGroup_extension_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[OptionalGroup_extension alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (OptionalGroup_extension_Builder*) clear {
  self.result = [[[OptionalGroup_extension alloc] init] autorelease];
  return self;
}
- (OptionalGroup_extension_Builder*) clone {
  return [OptionalGroup_extension builderWithPrototype:result];
}
- (OptionalGroup_extension*) defaultInstance {
  return [OptionalGroup_extension defaultInstance];
}
- (OptionalGroup_extension*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (OptionalGroup_extension*) buildPartial {
  OptionalGroup_extension* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (OptionalGroup_extension_Builder*) mergeFrom:(OptionalGroup_extension*) other {
  if (other == [OptionalGroup_extension defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self setA:other.a];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (OptionalGroup_extension_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (OptionalGroup_extension_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 136: {
        [self setA:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (int32_t) a {
  return result.a;
}
- (OptionalGroup_extension_Builder*) setA:(int32_t) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (OptionalGroup_extension_Builder*) clearA {
  result.hasA = NO;
  result.a = 0;
  return self;
}
@end

@interface RepeatedGroup_extension ()
@property int32_t a;
@end

@implementation RepeatedGroup_extension

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = 0;
  }
  return self;
}
static RepeatedGroup_extension* defaultRepeatedGroup_extensionInstance = nil;
+ (void) initialize {
  if (self == [RepeatedGroup_extension class]) {
    defaultRepeatedGroup_extensionInstance = [[RepeatedGroup_extension alloc] init];
  }
}
+ (RepeatedGroup_extension*) defaultInstance {
  return defaultRepeatedGroup_extensionInstance;
}
- (RepeatedGroup_extension*) defaultInstance {
  return defaultRepeatedGroup_extensionInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeInt32:47 value:self.a];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeInt32Size(47, self.a);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (RepeatedGroup_extension*) parseFromData:(NSData*) data {
  return (RepeatedGroup_extension*)[[[RepeatedGroup_extension builder] mergeFromData:data] build];
}
+ (RepeatedGroup_extension*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (RepeatedGroup_extension*)[[[RepeatedGroup_extension builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (RepeatedGroup_extension*) parseFromInputStream:(NSInputStream*) input {
  return (RepeatedGroup_extension*)[[[RepeatedGroup_extension builder] mergeFromInputStream:input] build];
}
+ (RepeatedGroup_extension*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (RepeatedGroup_extension*)[[[RepeatedGroup_extension builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (RepeatedGroup_extension*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (RepeatedGroup_extension*)[[[RepeatedGroup_extension builder] mergeFromCodedInputStream:input] build];
}
+ (RepeatedGroup_extension*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (RepeatedGroup_extension*)[[[RepeatedGroup_extension builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (RepeatedGroup_extension_Builder*) builder {
  return [[[RepeatedGroup_extension_Builder alloc] init] autorelease];
}
+ (RepeatedGroup_extension_Builder*) builderWithPrototype:(RepeatedGroup_extension*) prototype {
  return [[RepeatedGroup_extension builder] mergeFrom:prototype];
}
- (RepeatedGroup_extension_Builder*) builder {
  return [RepeatedGroup_extension builder];
}
- (RepeatedGroup_extension_Builder*) toBuilder {
  return [RepeatedGroup_extension builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@: %@\n", indent, @"a", [NSNumber numberWithInt:self.a]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[RepeatedGroup_extension class]]) {
    return NO;
  }
  RepeatedGroup_extension *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || self.a == otherMessage.a) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.a] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface RepeatedGroup_extension_Builder()
@property (retain) RepeatedGroup_extension* result;
@end

@implementation RepeatedGroup_extension_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[RepeatedGroup_extension alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (RepeatedGroup_extension_Builder*) clear {
  self.result = [[[RepeatedGroup_extension alloc] init] autorelease];
  return self;
}
- (RepeatedGroup_extension_Builder*) clone {
  return [RepeatedGroup_extension builderWithPrototype:result];
}
- (RepeatedGroup_extension*) defaultInstance {
  return [RepeatedGroup_extension defaultInstance];
}
- (RepeatedGroup_extension*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (RepeatedGroup_extension*) buildPartial {
  RepeatedGroup_extension* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (RepeatedGroup_extension_Builder*) mergeFrom:(RepeatedGroup_extension*) other {
  if (other == [RepeatedGroup_extension defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self setA:other.a];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (RepeatedGroup_extension_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (RepeatedGroup_extension_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 376: {
        [self setA:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (int32_t) a {
  return result.a;
}
- (RepeatedGroup_extension_Builder*) setA:(int32_t) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (RepeatedGroup_extension_Builder*) clearA {
  result.hasA = NO;
  result.a = 0;
  return self;
}
@end

@interface TestNestedExtension ()
@end

@implementation TestNestedExtension

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
+ (id<PBExtensionField>) test {
  return TestNestedExtension_test;
}
static TestNestedExtension* defaultTestNestedExtensionInstance = nil;
+ (void) initialize {
  if (self == [TestNestedExtension class]) {
    defaultTestNestedExtensionInstance = [[TestNestedExtension alloc] init];
  }
}
+ (TestNestedExtension*) defaultInstance {
  return defaultTestNestedExtensionInstance;
}
- (TestNestedExtension*) defaultInstance {
  return defaultTestNestedExtensionInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestNestedExtension*) parseFromData:(NSData*) data {
  return (TestNestedExtension*)[[[TestNestedExtension builder] mergeFromData:data] build];
}
+ (TestNestedExtension*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestNestedExtension*)[[[TestNestedExtension builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestNestedExtension*) parseFromInputStream:(NSInputStream*) input {
  return (TestNestedExtension*)[[[TestNestedExtension builder] mergeFromInputStream:input] build];
}
+ (TestNestedExtension*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestNestedExtension*)[[[TestNestedExtension builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestNestedExtension*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestNestedExtension*)[[[TestNestedExtension builder] mergeFromCodedInputStream:input] build];
}
+ (TestNestedExtension*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestNestedExtension*)[[[TestNestedExtension builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestNestedExtension_Builder*) builder {
  return [[[TestNestedExtension_Builder alloc] init] autorelease];
}
+ (TestNestedExtension_Builder*) builderWithPrototype:(TestNestedExtension*) prototype {
  return [[TestNestedExtension builder] mergeFrom:prototype];
}
- (TestNestedExtension_Builder*) builder {
  return [TestNestedExtension builder];
}
- (TestNestedExtension_Builder*) toBuilder {
  return [TestNestedExtension builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestNestedExtension class]]) {
    return NO;
  }
  TestNestedExtension *otherMessage = other;
  return
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestNestedExtension_Builder()
@property (retain) TestNestedExtension* result;
@end

@implementation TestNestedExtension_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestNestedExtension alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestNestedExtension_Builder*) clear {
  self.result = [[[TestNestedExtension alloc] init] autorelease];
  return self;
}
- (TestNestedExtension_Builder*) clone {
  return [TestNestedExtension builderWithPrototype:result];
}
- (TestNestedExtension*) defaultInstance {
  return [TestNestedExtension defaultInstance];
}
- (TestNestedExtension*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestNestedExtension*) buildPartial {
  TestNestedExtension* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestNestedExtension_Builder*) mergeFrom:(TestNestedExtension*) other {
  if (other == [TestNestedExtension defaultInstance]) {
    return self;
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestNestedExtension_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestNestedExtension_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

@interface TestRequired ()
@property int32_t a;
@property int32_t dummy2;
@property int32_t b;
@property int32_t dummy4;
@property int32_t dummy5;
@property int32_t dummy6;
@property int32_t dummy7;
@property int32_t dummy8;
@property int32_t dummy9;
@property int32_t dummy10;
@property int32_t dummy11;
@property int32_t dummy12;
@property int32_t dummy13;
@property int32_t dummy14;
@property int32_t dummy15;
@property int32_t dummy16;
@property int32_t dummy17;
@property int32_t dummy18;
@property int32_t dummy19;
@property int32_t dummy20;
@property int32_t dummy21;
@property int32_t dummy22;
@property int32_t dummy23;
@property int32_t dummy24;
@property int32_t dummy25;
@property int32_t dummy26;
@property int32_t dummy27;
@property int32_t dummy28;
@property int32_t dummy29;
@property int32_t dummy30;
@property int32_t dummy31;
@property int32_t dummy32;
@property int32_t c;
@end

@implementation TestRequired

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (BOOL) hasDummy2 {
  return !!hasDummy2_;
}
- (void) setHasDummy2:(BOOL) value {
  hasDummy2_ = !!value;
}
@synthesize dummy2;
- (BOOL) hasB {
  return !!hasB_;
}
- (void) setHasB:(BOOL) value {
  hasB_ = !!value;
}
@synthesize b;
- (BOOL) hasDummy4 {
  return !!hasDummy4_;
}
- (void) setHasDummy4:(BOOL) value {
  hasDummy4_ = !!value;
}
@synthesize dummy4;
- (BOOL) hasDummy5 {
  return !!hasDummy5_;
}
- (void) setHasDummy5:(BOOL) value {
  hasDummy5_ = !!value;
}
@synthesize dummy5;
- (BOOL) hasDummy6 {
  return !!hasDummy6_;
}
- (void) setHasDummy6:(BOOL) value {
  hasDummy6_ = !!value;
}
@synthesize dummy6;
- (BOOL) hasDummy7 {
  return !!hasDummy7_;
}
- (void) setHasDummy7:(BOOL) value {
  hasDummy7_ = !!value;
}
@synthesize dummy7;
- (BOOL) hasDummy8 {
  return !!hasDummy8_;
}
- (void) setHasDummy8:(BOOL) value {
  hasDummy8_ = !!value;
}
@synthesize dummy8;
- (BOOL) hasDummy9 {
  return !!hasDummy9_;
}
- (void) setHasDummy9:(BOOL) value {
  hasDummy9_ = !!value;
}
@synthesize dummy9;
- (BOOL) hasDummy10 {
  return !!hasDummy10_;
}
- (void) setHasDummy10:(BOOL) value {
  hasDummy10_ = !!value;
}
@synthesize dummy10;
- (BOOL) hasDummy11 {
  return !!hasDummy11_;
}
- (void) setHasDummy11:(BOOL) value {
  hasDummy11_ = !!value;
}
@synthesize dummy11;
- (BOOL) hasDummy12 {
  return !!hasDummy12_;
}
- (void) setHasDummy12:(BOOL) value {
  hasDummy12_ = !!value;
}
@synthesize dummy12;
- (BOOL) hasDummy13 {
  return !!hasDummy13_;
}
- (void) setHasDummy13:(BOOL) value {
  hasDummy13_ = !!value;
}
@synthesize dummy13;
- (BOOL) hasDummy14 {
  return !!hasDummy14_;
}
- (void) setHasDummy14:(BOOL) value {
  hasDummy14_ = !!value;
}
@synthesize dummy14;
- (BOOL) hasDummy15 {
  return !!hasDummy15_;
}
- (void) setHasDummy15:(BOOL) value {
  hasDummy15_ = !!value;
}
@synthesize dummy15;
- (BOOL) hasDummy16 {
  return !!hasDummy16_;
}
- (void) setHasDummy16:(BOOL) value {
  hasDummy16_ = !!value;
}
@synthesize dummy16;
- (BOOL) hasDummy17 {
  return !!hasDummy17_;
}
- (void) setHasDummy17:(BOOL) value {
  hasDummy17_ = !!value;
}
@synthesize dummy17;
- (BOOL) hasDummy18 {
  return !!hasDummy18_;
}
- (void) setHasDummy18:(BOOL) value {
  hasDummy18_ = !!value;
}
@synthesize dummy18;
- (BOOL) hasDummy19 {
  return !!hasDummy19_;
}
- (void) setHasDummy19:(BOOL) value {
  hasDummy19_ = !!value;
}
@synthesize dummy19;
- (BOOL) hasDummy20 {
  return !!hasDummy20_;
}
- (void) setHasDummy20:(BOOL) value {
  hasDummy20_ = !!value;
}
@synthesize dummy20;
- (BOOL) hasDummy21 {
  return !!hasDummy21_;
}
- (void) setHasDummy21:(BOOL) value {
  hasDummy21_ = !!value;
}
@synthesize dummy21;
- (BOOL) hasDummy22 {
  return !!hasDummy22_;
}
- (void) setHasDummy22:(BOOL) value {
  hasDummy22_ = !!value;
}
@synthesize dummy22;
- (BOOL) hasDummy23 {
  return !!hasDummy23_;
}
- (void) setHasDummy23:(BOOL) value {
  hasDummy23_ = !!value;
}
@synthesize dummy23;
- (BOOL) hasDummy24 {
  return !!hasDummy24_;
}
- (void) setHasDummy24:(BOOL) value {
  hasDummy24_ = !!value;
}
@synthesize dummy24;
- (BOOL) hasDummy25 {
  return !!hasDummy25_;
}
- (void) setHasDummy25:(BOOL) value {
  hasDummy25_ = !!value;
}
@synthesize dummy25;
- (BOOL) hasDummy26 {
  return !!hasDummy26_;
}
- (void) setHasDummy26:(BOOL) value {
  hasDummy26_ = !!value;
}
@synthesize dummy26;
- (BOOL) hasDummy27 {
  return !!hasDummy27_;
}
- (void) setHasDummy27:(BOOL) value {
  hasDummy27_ = !!value;
}
@synthesize dummy27;
- (BOOL) hasDummy28 {
  return !!hasDummy28_;
}
- (void) setHasDummy28:(BOOL) value {
  hasDummy28_ = !!value;
}
@synthesize dummy28;
- (BOOL) hasDummy29 {
  return !!hasDummy29_;
}
- (void) setHasDummy29:(BOOL) value {
  hasDummy29_ = !!value;
}
@synthesize dummy29;
- (BOOL) hasDummy30 {
  return !!hasDummy30_;
}
- (void) setHasDummy30:(BOOL) value {
  hasDummy30_ = !!value;
}
@synthesize dummy30;
- (BOOL) hasDummy31 {
  return !!hasDummy31_;
}
- (void) setHasDummy31:(BOOL) value {
  hasDummy31_ = !!value;
}
@synthesize dummy31;
- (BOOL) hasDummy32 {
  return !!hasDummy32_;
}
- (void) setHasDummy32:(BOOL) value {
  hasDummy32_ = !!value;
}
@synthesize dummy32;
- (BOOL) hasC {
  return !!hasC_;
}
- (void) setHasC:(BOOL) value {
  hasC_ = !!value;
}
@synthesize c;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = 0;
    self.dummy2 = 0;
    self.b = 0;
    self.dummy4 = 0;
    self.dummy5 = 0;
    self.dummy6 = 0;
    self.dummy7 = 0;
    self.dummy8 = 0;
    self.dummy9 = 0;
    self.dummy10 = 0;
    self.dummy11 = 0;
    self.dummy12 = 0;
    self.dummy13 = 0;
    self.dummy14 = 0;
    self.dummy15 = 0;
    self.dummy16 = 0;
    self.dummy17 = 0;
    self.dummy18 = 0;
    self.dummy19 = 0;
    self.dummy20 = 0;
    self.dummy21 = 0;
    self.dummy22 = 0;
    self.dummy23 = 0;
    self.dummy24 = 0;
    self.dummy25 = 0;
    self.dummy26 = 0;
    self.dummy27 = 0;
    self.dummy28 = 0;
    self.dummy29 = 0;
    self.dummy30 = 0;
    self.dummy31 = 0;
    self.dummy32 = 0;
    self.c = 0;
  }
  return self;
}
+ (id<PBExtensionField>) single {
  return TestRequired_single;
}
+ (id<PBExtensionField>) multi {
  return TestRequired_multi;
}
static TestRequired* defaultTestRequiredInstance = nil;
+ (void) initialize {
  if (self == [TestRequired class]) {
    defaultTestRequiredInstance = [[TestRequired alloc] init];
  }
}
+ (TestRequired*) defaultInstance {
  return defaultTestRequiredInstance;
}
- (TestRequired*) defaultInstance {
  return defaultTestRequiredInstance;
}
- (BOOL) isInitialized {
  if (!self.hasA) {
    return NO;
  }
  if (!self.hasB) {
    return NO;
  }
  if (!self.hasC) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeInt32:1 value:self.a];
  }
  if (self.hasDummy2) {
    [output writeInt32:2 value:self.dummy2];
  }
  if (self.hasB) {
    [output writeInt32:3 value:self.b];
  }
  if (self.hasDummy4) {
    [output writeInt32:4 value:self.dummy4];
  }
  if (self.hasDummy5) {
    [output writeInt32:5 value:self.dummy5];
  }
  if (self.hasDummy6) {
    [output writeInt32:6 value:self.dummy6];
  }
  if (self.hasDummy7) {
    [output writeInt32:7 value:self.dummy7];
  }
  if (self.hasDummy8) {
    [output writeInt32:8 value:self.dummy8];
  }
  if (self.hasDummy9) {
    [output writeInt32:9 value:self.dummy9];
  }
  if (self.hasDummy10) {
    [output writeInt32:10 value:self.dummy10];
  }
  if (self.hasDummy11) {
    [output writeInt32:11 value:self.dummy11];
  }
  if (self.hasDummy12) {
    [output writeInt32:12 value:self.dummy12];
  }
  if (self.hasDummy13) {
    [output writeInt32:13 value:self.dummy13];
  }
  if (self.hasDummy14) {
    [output writeInt32:14 value:self.dummy14];
  }
  if (self.hasDummy15) {
    [output writeInt32:15 value:self.dummy15];
  }
  if (self.hasDummy16) {
    [output writeInt32:16 value:self.dummy16];
  }
  if (self.hasDummy17) {
    [output writeInt32:17 value:self.dummy17];
  }
  if (self.hasDummy18) {
    [output writeInt32:18 value:self.dummy18];
  }
  if (self.hasDummy19) {
    [output writeInt32:19 value:self.dummy19];
  }
  if (self.hasDummy20) {
    [output writeInt32:20 value:self.dummy20];
  }
  if (self.hasDummy21) {
    [output writeInt32:21 value:self.dummy21];
  }
  if (self.hasDummy22) {
    [output writeInt32:22 value:self.dummy22];
  }
  if (self.hasDummy23) {
    [output writeInt32:23 value:self.dummy23];
  }
  if (self.hasDummy24) {
    [output writeInt32:24 value:self.dummy24];
  }
  if (self.hasDummy25) {
    [output writeInt32:25 value:self.dummy25];
  }
  if (self.hasDummy26) {
    [output writeInt32:26 value:self.dummy26];
  }
  if (self.hasDummy27) {
    [output writeInt32:27 value:self.dummy27];
  }
  if (self.hasDummy28) {
    [output writeInt32:28 value:self.dummy28];
  }
  if (self.hasDummy29) {
    [output writeInt32:29 value:self.dummy29];
  }
  if (self.hasDummy30) {
    [output writeInt32:30 value:self.dummy30];
  }
  if (self.hasDummy31) {
    [output writeInt32:31 value:self.dummy31];
  }
  if (self.hasDummy32) {
    [output writeInt32:32 value:self.dummy32];
  }
  if (self.hasC) {
    [output writeInt32:33 value:self.c];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeInt32Size(1, self.a);
  }
  if (self.hasDummy2) {
    size += computeInt32Size(2, self.dummy2);
  }
  if (self.hasB) {
    size += computeInt32Size(3, self.b);
  }
  if (self.hasDummy4) {
    size += computeInt32Size(4, self.dummy4);
  }
  if (self.hasDummy5) {
    size += computeInt32Size(5, self.dummy5);
  }
  if (self.hasDummy6) {
    size += computeInt32Size(6, self.dummy6);
  }
  if (self.hasDummy7) {
    size += computeInt32Size(7, self.dummy7);
  }
  if (self.hasDummy8) {
    size += computeInt32Size(8, self.dummy8);
  }
  if (self.hasDummy9) {
    size += computeInt32Size(9, self.dummy9);
  }
  if (self.hasDummy10) {
    size += computeInt32Size(10, self.dummy10);
  }
  if (self.hasDummy11) {
    size += computeInt32Size(11, self.dummy11);
  }
  if (self.hasDummy12) {
    size += computeInt32Size(12, self.dummy12);
  }
  if (self.hasDummy13) {
    size += computeInt32Size(13, self.dummy13);
  }
  if (self.hasDummy14) {
    size += computeInt32Size(14, self.dummy14);
  }
  if (self.hasDummy15) {
    size += computeInt32Size(15, self.dummy15);
  }
  if (self.hasDummy16) {
    size += computeInt32Size(16, self.dummy16);
  }
  if (self.hasDummy17) {
    size += computeInt32Size(17, self.dummy17);
  }
  if (self.hasDummy18) {
    size += computeInt32Size(18, self.dummy18);
  }
  if (self.hasDummy19) {
    size += computeInt32Size(19, self.dummy19);
  }
  if (self.hasDummy20) {
    size += computeInt32Size(20, self.dummy20);
  }
  if (self.hasDummy21) {
    size += computeInt32Size(21, self.dummy21);
  }
  if (self.hasDummy22) {
    size += computeInt32Size(22, self.dummy22);
  }
  if (self.hasDummy23) {
    size += computeInt32Size(23, self.dummy23);
  }
  if (self.hasDummy24) {
    size += computeInt32Size(24, self.dummy24);
  }
  if (self.hasDummy25) {
    size += computeInt32Size(25, self.dummy25);
  }
  if (self.hasDummy26) {
    size += computeInt32Size(26, self.dummy26);
  }
  if (self.hasDummy27) {
    size += computeInt32Size(27, self.dummy27);
  }
  if (self.hasDummy28) {
    size += computeInt32Size(28, self.dummy28);
  }
  if (self.hasDummy29) {
    size += computeInt32Size(29, self.dummy29);
  }
  if (self.hasDummy30) {
    size += computeInt32Size(30, self.dummy30);
  }
  if (self.hasDummy31) {
    size += computeInt32Size(31, self.dummy31);
  }
  if (self.hasDummy32) {
    size += computeInt32Size(32, self.dummy32);
  }
  if (self.hasC) {
    size += computeInt32Size(33, self.c);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestRequired*) parseFromData:(NSData*) data {
  return (TestRequired*)[[[TestRequired builder] mergeFromData:data] build];
}
+ (TestRequired*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRequired*)[[[TestRequired builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestRequired*) parseFromInputStream:(NSInputStream*) input {
  return (TestRequired*)[[[TestRequired builder] mergeFromInputStream:input] build];
}
+ (TestRequired*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRequired*)[[[TestRequired builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestRequired*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestRequired*)[[[TestRequired builder] mergeFromCodedInputStream:input] build];
}
+ (TestRequired*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRequired*)[[[TestRequired builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestRequired_Builder*) builder {
  return [[[TestRequired_Builder alloc] init] autorelease];
}
+ (TestRequired_Builder*) builderWithPrototype:(TestRequired*) prototype {
  return [[TestRequired builder] mergeFrom:prototype];
}
- (TestRequired_Builder*) builder {
  return [TestRequired builder];
}
- (TestRequired_Builder*) toBuilder {
  return [TestRequired builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@: %@\n", indent, @"a", [NSNumber numberWithInt:self.a]];
  }
  if (self.hasDummy2) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy2", [NSNumber numberWithInt:self.dummy2]];
  }
  if (self.hasB) {
    [output appendFormat:@"%@%@: %@\n", indent, @"b", [NSNumber numberWithInt:self.b]];
  }
  if (self.hasDummy4) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy4", [NSNumber numberWithInt:self.dummy4]];
  }
  if (self.hasDummy5) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy5", [NSNumber numberWithInt:self.dummy5]];
  }
  if (self.hasDummy6) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy6", [NSNumber numberWithInt:self.dummy6]];
  }
  if (self.hasDummy7) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy7", [NSNumber numberWithInt:self.dummy7]];
  }
  if (self.hasDummy8) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy8", [NSNumber numberWithInt:self.dummy8]];
  }
  if (self.hasDummy9) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy9", [NSNumber numberWithInt:self.dummy9]];
  }
  if (self.hasDummy10) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy10", [NSNumber numberWithInt:self.dummy10]];
  }
  if (self.hasDummy11) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy11", [NSNumber numberWithInt:self.dummy11]];
  }
  if (self.hasDummy12) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy12", [NSNumber numberWithInt:self.dummy12]];
  }
  if (self.hasDummy13) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy13", [NSNumber numberWithInt:self.dummy13]];
  }
  if (self.hasDummy14) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy14", [NSNumber numberWithInt:self.dummy14]];
  }
  if (self.hasDummy15) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy15", [NSNumber numberWithInt:self.dummy15]];
  }
  if (self.hasDummy16) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy16", [NSNumber numberWithInt:self.dummy16]];
  }
  if (self.hasDummy17) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy17", [NSNumber numberWithInt:self.dummy17]];
  }
  if (self.hasDummy18) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy18", [NSNumber numberWithInt:self.dummy18]];
  }
  if (self.hasDummy19) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy19", [NSNumber numberWithInt:self.dummy19]];
  }
  if (self.hasDummy20) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy20", [NSNumber numberWithInt:self.dummy20]];
  }
  if (self.hasDummy21) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy21", [NSNumber numberWithInt:self.dummy21]];
  }
  if (self.hasDummy22) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy22", [NSNumber numberWithInt:self.dummy22]];
  }
  if (self.hasDummy23) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy23", [NSNumber numberWithInt:self.dummy23]];
  }
  if (self.hasDummy24) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy24", [NSNumber numberWithInt:self.dummy24]];
  }
  if (self.hasDummy25) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy25", [NSNumber numberWithInt:self.dummy25]];
  }
  if (self.hasDummy26) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy26", [NSNumber numberWithInt:self.dummy26]];
  }
  if (self.hasDummy27) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy27", [NSNumber numberWithInt:self.dummy27]];
  }
  if (self.hasDummy28) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy28", [NSNumber numberWithInt:self.dummy28]];
  }
  if (self.hasDummy29) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy29", [NSNumber numberWithInt:self.dummy29]];
  }
  if (self.hasDummy30) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy30", [NSNumber numberWithInt:self.dummy30]];
  }
  if (self.hasDummy31) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy31", [NSNumber numberWithInt:self.dummy31]];
  }
  if (self.hasDummy32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy32", [NSNumber numberWithInt:self.dummy32]];
  }
  if (self.hasC) {
    [output appendFormat:@"%@%@: %@\n", indent, @"c", [NSNumber numberWithInt:self.c]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestRequired class]]) {
    return NO;
  }
  TestRequired *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || self.a == otherMessage.a) &&
      
      self.hasDummy2 == otherMessage.hasDummy2 &&
      (!self.hasDummy2 || self.dummy2 == otherMessage.dummy2) &&
      
      self.hasB == otherMessage.hasB &&
      (!self.hasB || self.b == otherMessage.b) &&
      
      self.hasDummy4 == otherMessage.hasDummy4 &&
      (!self.hasDummy4 || self.dummy4 == otherMessage.dummy4) &&
      
      self.hasDummy5 == otherMessage.hasDummy5 &&
      (!self.hasDummy5 || self.dummy5 == otherMessage.dummy5) &&
      
      self.hasDummy6 == otherMessage.hasDummy6 &&
      (!self.hasDummy6 || self.dummy6 == otherMessage.dummy6) &&
      
      self.hasDummy7 == otherMessage.hasDummy7 &&
      (!self.hasDummy7 || self.dummy7 == otherMessage.dummy7) &&
      
      self.hasDummy8 == otherMessage.hasDummy8 &&
      (!self.hasDummy8 || self.dummy8 == otherMessage.dummy8) &&
      
      self.hasDummy9 == otherMessage.hasDummy9 &&
      (!self.hasDummy9 || self.dummy9 == otherMessage.dummy9) &&
      
      self.hasDummy10 == otherMessage.hasDummy10 &&
      (!self.hasDummy10 || self.dummy10 == otherMessage.dummy10) &&
      
      self.hasDummy11 == otherMessage.hasDummy11 &&
      (!self.hasDummy11 || self.dummy11 == otherMessage.dummy11) &&
      
      self.hasDummy12 == otherMessage.hasDummy12 &&
      (!self.hasDummy12 || self.dummy12 == otherMessage.dummy12) &&
      
      self.hasDummy13 == otherMessage.hasDummy13 &&
      (!self.hasDummy13 || self.dummy13 == otherMessage.dummy13) &&
      
      self.hasDummy14 == otherMessage.hasDummy14 &&
      (!self.hasDummy14 || self.dummy14 == otherMessage.dummy14) &&
      
      self.hasDummy15 == otherMessage.hasDummy15 &&
      (!self.hasDummy15 || self.dummy15 == otherMessage.dummy15) &&
      
      self.hasDummy16 == otherMessage.hasDummy16 &&
      (!self.hasDummy16 || self.dummy16 == otherMessage.dummy16) &&
      
      self.hasDummy17 == otherMessage.hasDummy17 &&
      (!self.hasDummy17 || self.dummy17 == otherMessage.dummy17) &&
      
      self.hasDummy18 == otherMessage.hasDummy18 &&
      (!self.hasDummy18 || self.dummy18 == otherMessage.dummy18) &&
      
      self.hasDummy19 == otherMessage.hasDummy19 &&
      (!self.hasDummy19 || self.dummy19 == otherMessage.dummy19) &&
      
      self.hasDummy20 == otherMessage.hasDummy20 &&
      (!self.hasDummy20 || self.dummy20 == otherMessage.dummy20) &&
      
      self.hasDummy21 == otherMessage.hasDummy21 &&
      (!self.hasDummy21 || self.dummy21 == otherMessage.dummy21) &&
      
      self.hasDummy22 == otherMessage.hasDummy22 &&
      (!self.hasDummy22 || self.dummy22 == otherMessage.dummy22) &&
      
      self.hasDummy23 == otherMessage.hasDummy23 &&
      (!self.hasDummy23 || self.dummy23 == otherMessage.dummy23) &&
      
      self.hasDummy24 == otherMessage.hasDummy24 &&
      (!self.hasDummy24 || self.dummy24 == otherMessage.dummy24) &&
      
      self.hasDummy25 == otherMessage.hasDummy25 &&
      (!self.hasDummy25 || self.dummy25 == otherMessage.dummy25) &&
      
      self.hasDummy26 == otherMessage.hasDummy26 &&
      (!self.hasDummy26 || self.dummy26 == otherMessage.dummy26) &&
      
      self.hasDummy27 == otherMessage.hasDummy27 &&
      (!self.hasDummy27 || self.dummy27 == otherMessage.dummy27) &&
      
      self.hasDummy28 == otherMessage.hasDummy28 &&
      (!self.hasDummy28 || self.dummy28 == otherMessage.dummy28) &&
      
      self.hasDummy29 == otherMessage.hasDummy29 &&
      (!self.hasDummy29 || self.dummy29 == otherMessage.dummy29) &&
      
      self.hasDummy30 == otherMessage.hasDummy30 &&
      (!self.hasDummy30 || self.dummy30 == otherMessage.dummy30) &&
      
      self.hasDummy31 == otherMessage.hasDummy31 &&
      (!self.hasDummy31 || self.dummy31 == otherMessage.dummy31) &&
      
      self.hasDummy32 == otherMessage.hasDummy32 &&
      (!self.hasDummy32 || self.dummy32 == otherMessage.dummy32) &&
      
      self.hasC == otherMessage.hasC &&
      (!self.hasC || self.c == otherMessage.c) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.a] hash];
  }
  if (self.hasDummy2) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy2] hash];
  }
  if (self.hasB) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.b] hash];
  }
  if (self.hasDummy4) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy4] hash];
  }
  if (self.hasDummy5) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy5] hash];
  }
  if (self.hasDummy6) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy6] hash];
  }
  if (self.hasDummy7) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy7] hash];
  }
  if (self.hasDummy8) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy8] hash];
  }
  if (self.hasDummy9) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy9] hash];
  }
  if (self.hasDummy10) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy10] hash];
  }
  if (self.hasDummy11) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy11] hash];
  }
  if (self.hasDummy12) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy12] hash];
  }
  if (self.hasDummy13) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy13] hash];
  }
  if (self.hasDummy14) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy14] hash];
  }
  if (self.hasDummy15) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy15] hash];
  }
  if (self.hasDummy16) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy16] hash];
  }
  if (self.hasDummy17) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy17] hash];
  }
  if (self.hasDummy18) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy18] hash];
  }
  if (self.hasDummy19) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy19] hash];
  }
  if (self.hasDummy20) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy20] hash];
  }
  if (self.hasDummy21) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy21] hash];
  }
  if (self.hasDummy22) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy22] hash];
  }
  if (self.hasDummy23) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy23] hash];
  }
  if (self.hasDummy24) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy24] hash];
  }
  if (self.hasDummy25) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy25] hash];
  }
  if (self.hasDummy26) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy26] hash];
  }
  if (self.hasDummy27) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy27] hash];
  }
  if (self.hasDummy28) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy28] hash];
  }
  if (self.hasDummy29) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy29] hash];
  }
  if (self.hasDummy30) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy30] hash];
  }
  if (self.hasDummy31) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy31] hash];
  }
  if (self.hasDummy32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy32] hash];
  }
  if (self.hasC) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.c] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestRequired_Builder()
@property (retain) TestRequired* result;
@end

@implementation TestRequired_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestRequired alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestRequired_Builder*) clear {
  self.result = [[[TestRequired alloc] init] autorelease];
  return self;
}
- (TestRequired_Builder*) clone {
  return [TestRequired builderWithPrototype:result];
}
- (TestRequired*) defaultInstance {
  return [TestRequired defaultInstance];
}
- (TestRequired*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestRequired*) buildPartial {
  TestRequired* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestRequired_Builder*) mergeFrom:(TestRequired*) other {
  if (other == [TestRequired defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self setA:other.a];
  }
  if (other.hasDummy2) {
    [self setDummy2:other.dummy2];
  }
  if (other.hasB) {
    [self setB:other.b];
  }
  if (other.hasDummy4) {
    [self setDummy4:other.dummy4];
  }
  if (other.hasDummy5) {
    [self setDummy5:other.dummy5];
  }
  if (other.hasDummy6) {
    [self setDummy6:other.dummy6];
  }
  if (other.hasDummy7) {
    [self setDummy7:other.dummy7];
  }
  if (other.hasDummy8) {
    [self setDummy8:other.dummy8];
  }
  if (other.hasDummy9) {
    [self setDummy9:other.dummy9];
  }
  if (other.hasDummy10) {
    [self setDummy10:other.dummy10];
  }
  if (other.hasDummy11) {
    [self setDummy11:other.dummy11];
  }
  if (other.hasDummy12) {
    [self setDummy12:other.dummy12];
  }
  if (other.hasDummy13) {
    [self setDummy13:other.dummy13];
  }
  if (other.hasDummy14) {
    [self setDummy14:other.dummy14];
  }
  if (other.hasDummy15) {
    [self setDummy15:other.dummy15];
  }
  if (other.hasDummy16) {
    [self setDummy16:other.dummy16];
  }
  if (other.hasDummy17) {
    [self setDummy17:other.dummy17];
  }
  if (other.hasDummy18) {
    [self setDummy18:other.dummy18];
  }
  if (other.hasDummy19) {
    [self setDummy19:other.dummy19];
  }
  if (other.hasDummy20) {
    [self setDummy20:other.dummy20];
  }
  if (other.hasDummy21) {
    [self setDummy21:other.dummy21];
  }
  if (other.hasDummy22) {
    [self setDummy22:other.dummy22];
  }
  if (other.hasDummy23) {
    [self setDummy23:other.dummy23];
  }
  if (other.hasDummy24) {
    [self setDummy24:other.dummy24];
  }
  if (other.hasDummy25) {
    [self setDummy25:other.dummy25];
  }
  if (other.hasDummy26) {
    [self setDummy26:other.dummy26];
  }
  if (other.hasDummy27) {
    [self setDummy27:other.dummy27];
  }
  if (other.hasDummy28) {
    [self setDummy28:other.dummy28];
  }
  if (other.hasDummy29) {
    [self setDummy29:other.dummy29];
  }
  if (other.hasDummy30) {
    [self setDummy30:other.dummy30];
  }
  if (other.hasDummy31) {
    [self setDummy31:other.dummy31];
  }
  if (other.hasDummy32) {
    [self setDummy32:other.dummy32];
  }
  if (other.hasC) {
    [self setC:other.c];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestRequired_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestRequired_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setA:[input readInt32]];
        break;
      }
      case 16: {
        [self setDummy2:[input readInt32]];
        break;
      }
      case 24: {
        [self setB:[input readInt32]];
        break;
      }
      case 32: {
        [self setDummy4:[input readInt32]];
        break;
      }
      case 40: {
        [self setDummy5:[input readInt32]];
        break;
      }
      case 48: {
        [self setDummy6:[input readInt32]];
        break;
      }
      case 56: {
        [self setDummy7:[input readInt32]];
        break;
      }
      case 64: {
        [self setDummy8:[input readInt32]];
        break;
      }
      case 72: {
        [self setDummy9:[input readInt32]];
        break;
      }
      case 80: {
        [self setDummy10:[input readInt32]];
        break;
      }
      case 88: {
        [self setDummy11:[input readInt32]];
        break;
      }
      case 96: {
        [self setDummy12:[input readInt32]];
        break;
      }
      case 104: {
        [self setDummy13:[input readInt32]];
        break;
      }
      case 112: {
        [self setDummy14:[input readInt32]];
        break;
      }
      case 120: {
        [self setDummy15:[input readInt32]];
        break;
      }
      case 128: {
        [self setDummy16:[input readInt32]];
        break;
      }
      case 136: {
        [self setDummy17:[input readInt32]];
        break;
      }
      case 144: {
        [self setDummy18:[input readInt32]];
        break;
      }
      case 152: {
        [self setDummy19:[input readInt32]];
        break;
      }
      case 160: {
        [self setDummy20:[input readInt32]];
        break;
      }
      case 168: {
        [self setDummy21:[input readInt32]];
        break;
      }
      case 176: {
        [self setDummy22:[input readInt32]];
        break;
      }
      case 184: {
        [self setDummy23:[input readInt32]];
        break;
      }
      case 192: {
        [self setDummy24:[input readInt32]];
        break;
      }
      case 200: {
        [self setDummy25:[input readInt32]];
        break;
      }
      case 208: {
        [self setDummy26:[input readInt32]];
        break;
      }
      case 216: {
        [self setDummy27:[input readInt32]];
        break;
      }
      case 224: {
        [self setDummy28:[input readInt32]];
        break;
      }
      case 232: {
        [self setDummy29:[input readInt32]];
        break;
      }
      case 240: {
        [self setDummy30:[input readInt32]];
        break;
      }
      case 248: {
        [self setDummy31:[input readInt32]];
        break;
      }
      case 256: {
        [self setDummy32:[input readInt32]];
        break;
      }
      case 264: {
        [self setC:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (int32_t) a {
  return result.a;
}
- (TestRequired_Builder*) setA:(int32_t) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (TestRequired_Builder*) clearA {
  result.hasA = NO;
  result.a = 0;
  return self;
}
- (BOOL) hasDummy2 {
  return result.hasDummy2;
}
- (int32_t) dummy2 {
  return result.dummy2;
}
- (TestRequired_Builder*) setDummy2:(int32_t) value {
  result.hasDummy2 = YES;
  result.dummy2 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy2 {
  result.hasDummy2 = NO;
  result.dummy2 = 0;
  return self;
}
- (BOOL) hasB {
  return result.hasB;
}
- (int32_t) b {
  return result.b;
}
- (TestRequired_Builder*) setB:(int32_t) value {
  result.hasB = YES;
  result.b = value;
  return self;
}
- (TestRequired_Builder*) clearB {
  result.hasB = NO;
  result.b = 0;
  return self;
}
- (BOOL) hasDummy4 {
  return result.hasDummy4;
}
- (int32_t) dummy4 {
  return result.dummy4;
}
- (TestRequired_Builder*) setDummy4:(int32_t) value {
  result.hasDummy4 = YES;
  result.dummy4 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy4 {
  result.hasDummy4 = NO;
  result.dummy4 = 0;
  return self;
}
- (BOOL) hasDummy5 {
  return result.hasDummy5;
}
- (int32_t) dummy5 {
  return result.dummy5;
}
- (TestRequired_Builder*) setDummy5:(int32_t) value {
  result.hasDummy5 = YES;
  result.dummy5 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy5 {
  result.hasDummy5 = NO;
  result.dummy5 = 0;
  return self;
}
- (BOOL) hasDummy6 {
  return result.hasDummy6;
}
- (int32_t) dummy6 {
  return result.dummy6;
}
- (TestRequired_Builder*) setDummy6:(int32_t) value {
  result.hasDummy6 = YES;
  result.dummy6 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy6 {
  result.hasDummy6 = NO;
  result.dummy6 = 0;
  return self;
}
- (BOOL) hasDummy7 {
  return result.hasDummy7;
}
- (int32_t) dummy7 {
  return result.dummy7;
}
- (TestRequired_Builder*) setDummy7:(int32_t) value {
  result.hasDummy7 = YES;
  result.dummy7 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy7 {
  result.hasDummy7 = NO;
  result.dummy7 = 0;
  return self;
}
- (BOOL) hasDummy8 {
  return result.hasDummy8;
}
- (int32_t) dummy8 {
  return result.dummy8;
}
- (TestRequired_Builder*) setDummy8:(int32_t) value {
  result.hasDummy8 = YES;
  result.dummy8 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy8 {
  result.hasDummy8 = NO;
  result.dummy8 = 0;
  return self;
}
- (BOOL) hasDummy9 {
  return result.hasDummy9;
}
- (int32_t) dummy9 {
  return result.dummy9;
}
- (TestRequired_Builder*) setDummy9:(int32_t) value {
  result.hasDummy9 = YES;
  result.dummy9 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy9 {
  result.hasDummy9 = NO;
  result.dummy9 = 0;
  return self;
}
- (BOOL) hasDummy10 {
  return result.hasDummy10;
}
- (int32_t) dummy10 {
  return result.dummy10;
}
- (TestRequired_Builder*) setDummy10:(int32_t) value {
  result.hasDummy10 = YES;
  result.dummy10 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy10 {
  result.hasDummy10 = NO;
  result.dummy10 = 0;
  return self;
}
- (BOOL) hasDummy11 {
  return result.hasDummy11;
}
- (int32_t) dummy11 {
  return result.dummy11;
}
- (TestRequired_Builder*) setDummy11:(int32_t) value {
  result.hasDummy11 = YES;
  result.dummy11 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy11 {
  result.hasDummy11 = NO;
  result.dummy11 = 0;
  return self;
}
- (BOOL) hasDummy12 {
  return result.hasDummy12;
}
- (int32_t) dummy12 {
  return result.dummy12;
}
- (TestRequired_Builder*) setDummy12:(int32_t) value {
  result.hasDummy12 = YES;
  result.dummy12 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy12 {
  result.hasDummy12 = NO;
  result.dummy12 = 0;
  return self;
}
- (BOOL) hasDummy13 {
  return result.hasDummy13;
}
- (int32_t) dummy13 {
  return result.dummy13;
}
- (TestRequired_Builder*) setDummy13:(int32_t) value {
  result.hasDummy13 = YES;
  result.dummy13 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy13 {
  result.hasDummy13 = NO;
  result.dummy13 = 0;
  return self;
}
- (BOOL) hasDummy14 {
  return result.hasDummy14;
}
- (int32_t) dummy14 {
  return result.dummy14;
}
- (TestRequired_Builder*) setDummy14:(int32_t) value {
  result.hasDummy14 = YES;
  result.dummy14 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy14 {
  result.hasDummy14 = NO;
  result.dummy14 = 0;
  return self;
}
- (BOOL) hasDummy15 {
  return result.hasDummy15;
}
- (int32_t) dummy15 {
  return result.dummy15;
}
- (TestRequired_Builder*) setDummy15:(int32_t) value {
  result.hasDummy15 = YES;
  result.dummy15 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy15 {
  result.hasDummy15 = NO;
  result.dummy15 = 0;
  return self;
}
- (BOOL) hasDummy16 {
  return result.hasDummy16;
}
- (int32_t) dummy16 {
  return result.dummy16;
}
- (TestRequired_Builder*) setDummy16:(int32_t) value {
  result.hasDummy16 = YES;
  result.dummy16 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy16 {
  result.hasDummy16 = NO;
  result.dummy16 = 0;
  return self;
}
- (BOOL) hasDummy17 {
  return result.hasDummy17;
}
- (int32_t) dummy17 {
  return result.dummy17;
}
- (TestRequired_Builder*) setDummy17:(int32_t) value {
  result.hasDummy17 = YES;
  result.dummy17 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy17 {
  result.hasDummy17 = NO;
  result.dummy17 = 0;
  return self;
}
- (BOOL) hasDummy18 {
  return result.hasDummy18;
}
- (int32_t) dummy18 {
  return result.dummy18;
}
- (TestRequired_Builder*) setDummy18:(int32_t) value {
  result.hasDummy18 = YES;
  result.dummy18 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy18 {
  result.hasDummy18 = NO;
  result.dummy18 = 0;
  return self;
}
- (BOOL) hasDummy19 {
  return result.hasDummy19;
}
- (int32_t) dummy19 {
  return result.dummy19;
}
- (TestRequired_Builder*) setDummy19:(int32_t) value {
  result.hasDummy19 = YES;
  result.dummy19 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy19 {
  result.hasDummy19 = NO;
  result.dummy19 = 0;
  return self;
}
- (BOOL) hasDummy20 {
  return result.hasDummy20;
}
- (int32_t) dummy20 {
  return result.dummy20;
}
- (TestRequired_Builder*) setDummy20:(int32_t) value {
  result.hasDummy20 = YES;
  result.dummy20 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy20 {
  result.hasDummy20 = NO;
  result.dummy20 = 0;
  return self;
}
- (BOOL) hasDummy21 {
  return result.hasDummy21;
}
- (int32_t) dummy21 {
  return result.dummy21;
}
- (TestRequired_Builder*) setDummy21:(int32_t) value {
  result.hasDummy21 = YES;
  result.dummy21 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy21 {
  result.hasDummy21 = NO;
  result.dummy21 = 0;
  return self;
}
- (BOOL) hasDummy22 {
  return result.hasDummy22;
}
- (int32_t) dummy22 {
  return result.dummy22;
}
- (TestRequired_Builder*) setDummy22:(int32_t) value {
  result.hasDummy22 = YES;
  result.dummy22 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy22 {
  result.hasDummy22 = NO;
  result.dummy22 = 0;
  return self;
}
- (BOOL) hasDummy23 {
  return result.hasDummy23;
}
- (int32_t) dummy23 {
  return result.dummy23;
}
- (TestRequired_Builder*) setDummy23:(int32_t) value {
  result.hasDummy23 = YES;
  result.dummy23 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy23 {
  result.hasDummy23 = NO;
  result.dummy23 = 0;
  return self;
}
- (BOOL) hasDummy24 {
  return result.hasDummy24;
}
- (int32_t) dummy24 {
  return result.dummy24;
}
- (TestRequired_Builder*) setDummy24:(int32_t) value {
  result.hasDummy24 = YES;
  result.dummy24 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy24 {
  result.hasDummy24 = NO;
  result.dummy24 = 0;
  return self;
}
- (BOOL) hasDummy25 {
  return result.hasDummy25;
}
- (int32_t) dummy25 {
  return result.dummy25;
}
- (TestRequired_Builder*) setDummy25:(int32_t) value {
  result.hasDummy25 = YES;
  result.dummy25 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy25 {
  result.hasDummy25 = NO;
  result.dummy25 = 0;
  return self;
}
- (BOOL) hasDummy26 {
  return result.hasDummy26;
}
- (int32_t) dummy26 {
  return result.dummy26;
}
- (TestRequired_Builder*) setDummy26:(int32_t) value {
  result.hasDummy26 = YES;
  result.dummy26 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy26 {
  result.hasDummy26 = NO;
  result.dummy26 = 0;
  return self;
}
- (BOOL) hasDummy27 {
  return result.hasDummy27;
}
- (int32_t) dummy27 {
  return result.dummy27;
}
- (TestRequired_Builder*) setDummy27:(int32_t) value {
  result.hasDummy27 = YES;
  result.dummy27 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy27 {
  result.hasDummy27 = NO;
  result.dummy27 = 0;
  return self;
}
- (BOOL) hasDummy28 {
  return result.hasDummy28;
}
- (int32_t) dummy28 {
  return result.dummy28;
}
- (TestRequired_Builder*) setDummy28:(int32_t) value {
  result.hasDummy28 = YES;
  result.dummy28 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy28 {
  result.hasDummy28 = NO;
  result.dummy28 = 0;
  return self;
}
- (BOOL) hasDummy29 {
  return result.hasDummy29;
}
- (int32_t) dummy29 {
  return result.dummy29;
}
- (TestRequired_Builder*) setDummy29:(int32_t) value {
  result.hasDummy29 = YES;
  result.dummy29 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy29 {
  result.hasDummy29 = NO;
  result.dummy29 = 0;
  return self;
}
- (BOOL) hasDummy30 {
  return result.hasDummy30;
}
- (int32_t) dummy30 {
  return result.dummy30;
}
- (TestRequired_Builder*) setDummy30:(int32_t) value {
  result.hasDummy30 = YES;
  result.dummy30 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy30 {
  result.hasDummy30 = NO;
  result.dummy30 = 0;
  return self;
}
- (BOOL) hasDummy31 {
  return result.hasDummy31;
}
- (int32_t) dummy31 {
  return result.dummy31;
}
- (TestRequired_Builder*) setDummy31:(int32_t) value {
  result.hasDummy31 = YES;
  result.dummy31 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy31 {
  result.hasDummy31 = NO;
  result.dummy31 = 0;
  return self;
}
- (BOOL) hasDummy32 {
  return result.hasDummy32;
}
- (int32_t) dummy32 {
  return result.dummy32;
}
- (TestRequired_Builder*) setDummy32:(int32_t) value {
  result.hasDummy32 = YES;
  result.dummy32 = value;
  return self;
}
- (TestRequired_Builder*) clearDummy32 {
  result.hasDummy32 = NO;
  result.dummy32 = 0;
  return self;
}
- (BOOL) hasC {
  return result.hasC;
}
- (int32_t) c {
  return result.c;
}
- (TestRequired_Builder*) setC:(int32_t) value {
  result.hasC = YES;
  result.c = value;
  return self;
}
- (TestRequired_Builder*) clearC {
  result.hasC = NO;
  result.c = 0;
  return self;
}
@end

@interface TestRequiredForeign ()
@property (retain) TestRequired* optionalMessage;
@property (retain) PBAppendableArray * repeatedMessageArray;
@property int32_t dummy;
@end

@implementation TestRequiredForeign

- (BOOL) hasOptionalMessage {
  return !!hasOptionalMessage_;
}
- (void) setHasOptionalMessage:(BOOL) value {
  hasOptionalMessage_ = !!value;
}
@synthesize optionalMessage;
@synthesize repeatedMessageArray;
@dynamic repeatedMessage;
- (BOOL) hasDummy {
  return !!hasDummy_;
}
- (void) setHasDummy:(BOOL) value {
  hasDummy_ = !!value;
}
@synthesize dummy;
- (void) dealloc {
  self.optionalMessage = nil;
  self.repeatedMessageArray = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.optionalMessage = [TestRequired defaultInstance];
    self.dummy = 0;
  }
  return self;
}
static TestRequiredForeign* defaultTestRequiredForeignInstance = nil;
+ (void) initialize {
  if (self == [TestRequiredForeign class]) {
    defaultTestRequiredForeignInstance = [[TestRequiredForeign alloc] init];
  }
}
+ (TestRequiredForeign*) defaultInstance {
  return defaultTestRequiredForeignInstance;
}
- (TestRequiredForeign*) defaultInstance {
  return defaultTestRequiredForeignInstance;
}
- (PBArray *)repeatedMessage {
  return repeatedMessageArray;
}
- (TestRequired*)repeatedMessageAtIndex:(NSUInteger)index {
  return [repeatedMessageArray objectAtIndex:index];
}
- (BOOL) isInitialized {
  if (self.hasOptionalMessage) {
    if (!self.optionalMessage.isInitialized) {
      return NO;
    }
  }
  for (TestRequired* element in self.repeatedMessage) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasOptionalMessage) {
    [output writeMessage:1 value:self.optionalMessage];
  }
  for (TestRequired *element in self.repeatedMessageArray) {
    [output writeMessage:2 value:element];
  }
  if (self.hasDummy) {
    [output writeInt32:3 value:self.dummy];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasOptionalMessage) {
    size += computeMessageSize(1, self.optionalMessage);
  }
  for (TestRequired *element in self.repeatedMessageArray) {
    size += computeMessageSize(2, element);
  }
  if (self.hasDummy) {
    size += computeInt32Size(3, self.dummy);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestRequiredForeign*) parseFromData:(NSData*) data {
  return (TestRequiredForeign*)[[[TestRequiredForeign builder] mergeFromData:data] build];
}
+ (TestRequiredForeign*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRequiredForeign*)[[[TestRequiredForeign builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestRequiredForeign*) parseFromInputStream:(NSInputStream*) input {
  return (TestRequiredForeign*)[[[TestRequiredForeign builder] mergeFromInputStream:input] build];
}
+ (TestRequiredForeign*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRequiredForeign*)[[[TestRequiredForeign builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestRequiredForeign*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestRequiredForeign*)[[[TestRequiredForeign builder] mergeFromCodedInputStream:input] build];
}
+ (TestRequiredForeign*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRequiredForeign*)[[[TestRequiredForeign builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestRequiredForeign_Builder*) builder {
  return [[[TestRequiredForeign_Builder alloc] init] autorelease];
}
+ (TestRequiredForeign_Builder*) builderWithPrototype:(TestRequiredForeign*) prototype {
  return [[TestRequiredForeign builder] mergeFrom:prototype];
}
- (TestRequiredForeign_Builder*) builder {
  return [TestRequiredForeign builder];
}
- (TestRequiredForeign_Builder*) toBuilder {
  return [TestRequiredForeign builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasOptionalMessage) {
    [output appendFormat:@"%@%@ {\n", indent, @"optionalMessage"];
    [self.optionalMessage writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  for (TestRequired* element in self.repeatedMessageArray) {
    [output appendFormat:@"%@%@ {\n", indent, @"repeatedMessage"];
    [element writeDescriptionTo:output
                     withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasDummy) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dummy", [NSNumber numberWithInt:self.dummy]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestRequiredForeign class]]) {
    return NO;
  }
  TestRequiredForeign *otherMessage = other;
  return
      self.hasOptionalMessage == otherMessage.hasOptionalMessage &&
      (!self.hasOptionalMessage || [self.optionalMessage isEqual:otherMessage.optionalMessage]) &&
      
      [self.repeatedMessageArray isEqualToArray:otherMessage.repeatedMessageArray] &&
      
      self.hasDummy == otherMessage.hasDummy &&
      (!self.hasDummy || self.dummy == otherMessage.dummy) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasOptionalMessage) {
    hashCode = hashCode * 31 + [self.optionalMessage hash];
  }
  for (TestRequired* element in self.repeatedMessageArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  if (self.hasDummy) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dummy] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestRequiredForeign_Builder()
@property (retain) TestRequiredForeign* result;
@end

@implementation TestRequiredForeign_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestRequiredForeign alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestRequiredForeign_Builder*) clear {
  self.result = [[[TestRequiredForeign alloc] init] autorelease];
  return self;
}
- (TestRequiredForeign_Builder*) clone {
  return [TestRequiredForeign builderWithPrototype:result];
}
- (TestRequiredForeign*) defaultInstance {
  return [TestRequiredForeign defaultInstance];
}
- (TestRequiredForeign*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestRequiredForeign*) buildPartial {
  TestRequiredForeign* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestRequiredForeign_Builder*) mergeFrom:(TestRequiredForeign*) other {
  if (other == [TestRequiredForeign defaultInstance]) {
    return self;
  }
  if (other.hasOptionalMessage) {
    [self mergeOptionalMessage:other.optionalMessage];
  }
  if (other.repeatedMessageArray.count > 0) {
    if (result.repeatedMessageArray == nil) {
      result.repeatedMessageArray = [[other.repeatedMessageArray copyWithZone:[other.repeatedMessageArray zone]] autorelease];
    } else {
      [result.repeatedMessageArray appendArray:other.repeatedMessageArray];
    }
  }
  if (other.hasDummy) {
    [self setDummy:other.dummy];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestRequiredForeign_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestRequiredForeign_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 10: {
        TestRequired_Builder* subBuilder = [TestRequired builder];
        if (self.hasOptionalMessage) {
          [subBuilder mergeFrom:self.optionalMessage];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptionalMessage:[subBuilder buildPartial]];
        break;
      }
      case 18: {
        TestRequired_Builder* subBuilder = [TestRequired builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addRepeatedMessage:[subBuilder buildPartial]];
        break;
      }
      case 24: {
        [self setDummy:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasOptionalMessage {
  return result.hasOptionalMessage;
}
- (TestRequired*) optionalMessage {
  return result.optionalMessage;
}
- (TestRequiredForeign_Builder*) setOptionalMessage:(TestRequired*) value {
  result.hasOptionalMessage = YES;
  result.optionalMessage = value;
  return self;
}
- (TestRequiredForeign_Builder*) setOptionalMessageBuilder:(TestRequired_Builder*) builderForValue {
  return [self setOptionalMessage:[builderForValue build]];
}
- (TestRequiredForeign_Builder*) mergeOptionalMessage:(TestRequired*) value {
  if (result.hasOptionalMessage &&
      result.optionalMessage != [TestRequired defaultInstance]) {
    result.optionalMessage =
      [[[TestRequired builderWithPrototype:result.optionalMessage] mergeFrom:value] buildPartial];
  } else {
    result.optionalMessage = value;
  }
  result.hasOptionalMessage = YES;
  return self;
}
- (TestRequiredForeign_Builder*) clearOptionalMessage {
  result.hasOptionalMessage = NO;
  result.optionalMessage = [TestRequired defaultInstance];
  return self;
}
- (PBAppendableArray *)repeatedMessage {
  return result.repeatedMessageArray;
}
- (TestRequired*)repeatedMessageAtIndex:(NSUInteger)index {
  return [result repeatedMessageAtIndex:index];
}
- (TestRequiredForeign_Builder *)addRepeatedMessage:(TestRequired*)value {
  if (result.repeatedMessageArray == nil) {
    result.repeatedMessageArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedMessageArray addObject:value];
  return self;
}
- (TestRequiredForeign_Builder *)setRepeatedMessageArray:(NSArray *)array {
  result.repeatedMessageArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestRequiredForeign_Builder *)setRepeatedMessageValues:(const TestRequired* *)values count:(NSUInteger)count {
  result.repeatedMessageArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestRequiredForeign_Builder *)clearRepeatedMessage {
  result.repeatedMessageArray = nil;
  return self;
}
- (BOOL) hasDummy {
  return result.hasDummy;
}
- (int32_t) dummy {
  return result.dummy;
}
- (TestRequiredForeign_Builder*) setDummy:(int32_t) value {
  result.hasDummy = YES;
  result.dummy = value;
  return self;
}
- (TestRequiredForeign_Builder*) clearDummy {
  result.hasDummy = NO;
  result.dummy = 0;
  return self;
}
@end

@interface TestForeignNested ()
@property (retain) TestAllTypes_NestedMessage* foreignNested;
@end

@implementation TestForeignNested

- (BOOL) hasForeignNested {
  return !!hasForeignNested_;
}
- (void) setHasForeignNested:(BOOL) value {
  hasForeignNested_ = !!value;
}
@synthesize foreignNested;
- (void) dealloc {
  self.foreignNested = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.foreignNested = [TestAllTypes_NestedMessage defaultInstance];
  }
  return self;
}
static TestForeignNested* defaultTestForeignNestedInstance = nil;
+ (void) initialize {
  if (self == [TestForeignNested class]) {
    defaultTestForeignNestedInstance = [[TestForeignNested alloc] init];
  }
}
+ (TestForeignNested*) defaultInstance {
  return defaultTestForeignNestedInstance;
}
- (TestForeignNested*) defaultInstance {
  return defaultTestForeignNestedInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasForeignNested) {
    [output writeMessage:1 value:self.foreignNested];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasForeignNested) {
    size += computeMessageSize(1, self.foreignNested);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestForeignNested*) parseFromData:(NSData*) data {
  return (TestForeignNested*)[[[TestForeignNested builder] mergeFromData:data] build];
}
+ (TestForeignNested*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestForeignNested*)[[[TestForeignNested builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestForeignNested*) parseFromInputStream:(NSInputStream*) input {
  return (TestForeignNested*)[[[TestForeignNested builder] mergeFromInputStream:input] build];
}
+ (TestForeignNested*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestForeignNested*)[[[TestForeignNested builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestForeignNested*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestForeignNested*)[[[TestForeignNested builder] mergeFromCodedInputStream:input] build];
}
+ (TestForeignNested*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestForeignNested*)[[[TestForeignNested builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestForeignNested_Builder*) builder {
  return [[[TestForeignNested_Builder alloc] init] autorelease];
}
+ (TestForeignNested_Builder*) builderWithPrototype:(TestForeignNested*) prototype {
  return [[TestForeignNested builder] mergeFrom:prototype];
}
- (TestForeignNested_Builder*) builder {
  return [TestForeignNested builder];
}
- (TestForeignNested_Builder*) toBuilder {
  return [TestForeignNested builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasForeignNested) {
    [output appendFormat:@"%@%@ {\n", indent, @"foreignNested"];
    [self.foreignNested writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestForeignNested class]]) {
    return NO;
  }
  TestForeignNested *otherMessage = other;
  return
      self.hasForeignNested == otherMessage.hasForeignNested &&
      (!self.hasForeignNested || [self.foreignNested isEqual:otherMessage.foreignNested]) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasForeignNested) {
    hashCode = hashCode * 31 + [self.foreignNested hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestForeignNested_Builder()
@property (retain) TestForeignNested* result;
@end

@implementation TestForeignNested_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestForeignNested alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestForeignNested_Builder*) clear {
  self.result = [[[TestForeignNested alloc] init] autorelease];
  return self;
}
- (TestForeignNested_Builder*) clone {
  return [TestForeignNested builderWithPrototype:result];
}
- (TestForeignNested*) defaultInstance {
  return [TestForeignNested defaultInstance];
}
- (TestForeignNested*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestForeignNested*) buildPartial {
  TestForeignNested* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestForeignNested_Builder*) mergeFrom:(TestForeignNested*) other {
  if (other == [TestForeignNested defaultInstance]) {
    return self;
  }
  if (other.hasForeignNested) {
    [self mergeForeignNested:other.foreignNested];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestForeignNested_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestForeignNested_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 10: {
        TestAllTypes_NestedMessage_Builder* subBuilder = [TestAllTypes_NestedMessage builder];
        if (self.hasForeignNested) {
          [subBuilder mergeFrom:self.foreignNested];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setForeignNested:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasForeignNested {
  return result.hasForeignNested;
}
- (TestAllTypes_NestedMessage*) foreignNested {
  return result.foreignNested;
}
- (TestForeignNested_Builder*) setForeignNested:(TestAllTypes_NestedMessage*) value {
  result.hasForeignNested = YES;
  result.foreignNested = value;
  return self;
}
- (TestForeignNested_Builder*) setForeignNestedBuilder:(TestAllTypes_NestedMessage_Builder*) builderForValue {
  return [self setForeignNested:[builderForValue build]];
}
- (TestForeignNested_Builder*) mergeForeignNested:(TestAllTypes_NestedMessage*) value {
  if (result.hasForeignNested &&
      result.foreignNested != [TestAllTypes_NestedMessage defaultInstance]) {
    result.foreignNested =
      [[[TestAllTypes_NestedMessage builderWithPrototype:result.foreignNested] mergeFrom:value] buildPartial];
  } else {
    result.foreignNested = value;
  }
  result.hasForeignNested = YES;
  return self;
}
- (TestForeignNested_Builder*) clearForeignNested {
  result.hasForeignNested = NO;
  result.foreignNested = [TestAllTypes_NestedMessage defaultInstance];
  return self;
}
@end

@interface TestEmptyMessage ()
@end

@implementation TestEmptyMessage

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static TestEmptyMessage* defaultTestEmptyMessageInstance = nil;
+ (void) initialize {
  if (self == [TestEmptyMessage class]) {
    defaultTestEmptyMessageInstance = [[TestEmptyMessage alloc] init];
  }
}
+ (TestEmptyMessage*) defaultInstance {
  return defaultTestEmptyMessageInstance;
}
- (TestEmptyMessage*) defaultInstance {
  return defaultTestEmptyMessageInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestEmptyMessage*) parseFromData:(NSData*) data {
  return (TestEmptyMessage*)[[[TestEmptyMessage builder] mergeFromData:data] build];
}
+ (TestEmptyMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestEmptyMessage*)[[[TestEmptyMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestEmptyMessage*) parseFromInputStream:(NSInputStream*) input {
  return (TestEmptyMessage*)[[[TestEmptyMessage builder] mergeFromInputStream:input] build];
}
+ (TestEmptyMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestEmptyMessage*)[[[TestEmptyMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestEmptyMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestEmptyMessage*)[[[TestEmptyMessage builder] mergeFromCodedInputStream:input] build];
}
+ (TestEmptyMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestEmptyMessage*)[[[TestEmptyMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestEmptyMessage_Builder*) builder {
  return [[[TestEmptyMessage_Builder alloc] init] autorelease];
}
+ (TestEmptyMessage_Builder*) builderWithPrototype:(TestEmptyMessage*) prototype {
  return [[TestEmptyMessage builder] mergeFrom:prototype];
}
- (TestEmptyMessage_Builder*) builder {
  return [TestEmptyMessage builder];
}
- (TestEmptyMessage_Builder*) toBuilder {
  return [TestEmptyMessage builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestEmptyMessage class]]) {
    return NO;
  }
  TestEmptyMessage *otherMessage = other;
  return
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestEmptyMessage_Builder()
@property (retain) TestEmptyMessage* result;
@end

@implementation TestEmptyMessage_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestEmptyMessage alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestEmptyMessage_Builder*) clear {
  self.result = [[[TestEmptyMessage alloc] init] autorelease];
  return self;
}
- (TestEmptyMessage_Builder*) clone {
  return [TestEmptyMessage builderWithPrototype:result];
}
- (TestEmptyMessage*) defaultInstance {
  return [TestEmptyMessage defaultInstance];
}
- (TestEmptyMessage*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestEmptyMessage*) buildPartial {
  TestEmptyMessage* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestEmptyMessage_Builder*) mergeFrom:(TestEmptyMessage*) other {
  if (other == [TestEmptyMessage defaultInstance]) {
    return self;
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestEmptyMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestEmptyMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

@interface TestEmptyMessageWithExtensions ()
@end

@implementation TestEmptyMessageWithExtensions

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static TestEmptyMessageWithExtensions* defaultTestEmptyMessageWithExtensionsInstance = nil;
+ (void) initialize {
  if (self == [TestEmptyMessageWithExtensions class]) {
    defaultTestEmptyMessageWithExtensionsInstance = [[TestEmptyMessageWithExtensions alloc] init];
  }
}
+ (TestEmptyMessageWithExtensions*) defaultInstance {
  return defaultTestEmptyMessageWithExtensionsInstance;
}
- (TestEmptyMessageWithExtensions*) defaultInstance {
  return defaultTestEmptyMessageWithExtensionsInstance;
}
- (BOOL) isInitialized {
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self writeExtensionsToCodedOutputStream:output
                                      from:1
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestEmptyMessageWithExtensions*) parseFromData:(NSData*) data {
  return (TestEmptyMessageWithExtensions*)[[[TestEmptyMessageWithExtensions builder] mergeFromData:data] build];
}
+ (TestEmptyMessageWithExtensions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestEmptyMessageWithExtensions*)[[[TestEmptyMessageWithExtensions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestEmptyMessageWithExtensions*) parseFromInputStream:(NSInputStream*) input {
  return (TestEmptyMessageWithExtensions*)[[[TestEmptyMessageWithExtensions builder] mergeFromInputStream:input] build];
}
+ (TestEmptyMessageWithExtensions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestEmptyMessageWithExtensions*)[[[TestEmptyMessageWithExtensions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestEmptyMessageWithExtensions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestEmptyMessageWithExtensions*)[[[TestEmptyMessageWithExtensions builder] mergeFromCodedInputStream:input] build];
}
+ (TestEmptyMessageWithExtensions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestEmptyMessageWithExtensions*)[[[TestEmptyMessageWithExtensions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestEmptyMessageWithExtensions_Builder*) builder {
  return [[[TestEmptyMessageWithExtensions_Builder alloc] init] autorelease];
}
+ (TestEmptyMessageWithExtensions_Builder*) builderWithPrototype:(TestEmptyMessageWithExtensions*) prototype {
  return [[TestEmptyMessageWithExtensions builder] mergeFrom:prototype];
}
- (TestEmptyMessageWithExtensions_Builder*) builder {
  return [TestEmptyMessageWithExtensions builder];
}
- (TestEmptyMessageWithExtensions_Builder*) toBuilder {
  return [TestEmptyMessageWithExtensions builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self writeExtensionDescriptionToMutableString:(NSMutableString*)output
                                            from:1
                                              to:536870912
                                      withIndent:indent];
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestEmptyMessageWithExtensions class]]) {
    return NO;
  }
  TestEmptyMessageWithExtensions *otherMessage = other;
  return
      [self isEqualExtensionsInOther:otherMessage from:1 to:536870912] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self hashExtensionsFrom:1 to:536870912];
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestEmptyMessageWithExtensions_Builder()
@property (retain) TestEmptyMessageWithExtensions* result;
@end

@implementation TestEmptyMessageWithExtensions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestEmptyMessageWithExtensions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (TestEmptyMessageWithExtensions_Builder*) clear {
  self.result = [[[TestEmptyMessageWithExtensions alloc] init] autorelease];
  return self;
}
- (TestEmptyMessageWithExtensions_Builder*) clone {
  return [TestEmptyMessageWithExtensions builderWithPrototype:result];
}
- (TestEmptyMessageWithExtensions*) defaultInstance {
  return [TestEmptyMessageWithExtensions defaultInstance];
}
- (TestEmptyMessageWithExtensions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestEmptyMessageWithExtensions*) buildPartial {
  TestEmptyMessageWithExtensions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestEmptyMessageWithExtensions_Builder*) mergeFrom:(TestEmptyMessageWithExtensions*) other {
  if (other == [TestEmptyMessageWithExtensions defaultInstance]) {
    return self;
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestEmptyMessageWithExtensions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestEmptyMessageWithExtensions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

@interface TestMultipleExtensionRanges ()
@end

@implementation TestMultipleExtensionRanges

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static TestMultipleExtensionRanges* defaultTestMultipleExtensionRangesInstance = nil;
+ (void) initialize {
  if (self == [TestMultipleExtensionRanges class]) {
    defaultTestMultipleExtensionRangesInstance = [[TestMultipleExtensionRanges alloc] init];
  }
}
+ (TestMultipleExtensionRanges*) defaultInstance {
  return defaultTestMultipleExtensionRangesInstance;
}
- (TestMultipleExtensionRanges*) defaultInstance {
  return defaultTestMultipleExtensionRangesInstance;
}
- (BOOL) isInitialized {
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self writeExtensionsToCodedOutputStream:output
                                      from:42
                                        to:43];
  [self writeExtensionsToCodedOutputStream:output
                                      from:4143
                                        to:4244];
  [self writeExtensionsToCodedOutputStream:output
                                      from:65536
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestMultipleExtensionRanges*) parseFromData:(NSData*) data {
  return (TestMultipleExtensionRanges*)[[[TestMultipleExtensionRanges builder] mergeFromData:data] build];
}
+ (TestMultipleExtensionRanges*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestMultipleExtensionRanges*)[[[TestMultipleExtensionRanges builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestMultipleExtensionRanges*) parseFromInputStream:(NSInputStream*) input {
  return (TestMultipleExtensionRanges*)[[[TestMultipleExtensionRanges builder] mergeFromInputStream:input] build];
}
+ (TestMultipleExtensionRanges*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestMultipleExtensionRanges*)[[[TestMultipleExtensionRanges builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestMultipleExtensionRanges*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestMultipleExtensionRanges*)[[[TestMultipleExtensionRanges builder] mergeFromCodedInputStream:input] build];
}
+ (TestMultipleExtensionRanges*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestMultipleExtensionRanges*)[[[TestMultipleExtensionRanges builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestMultipleExtensionRanges_Builder*) builder {
  return [[[TestMultipleExtensionRanges_Builder alloc] init] autorelease];
}
+ (TestMultipleExtensionRanges_Builder*) builderWithPrototype:(TestMultipleExtensionRanges*) prototype {
  return [[TestMultipleExtensionRanges builder] mergeFrom:prototype];
}
- (TestMultipleExtensionRanges_Builder*) builder {
  return [TestMultipleExtensionRanges builder];
}
- (TestMultipleExtensionRanges_Builder*) toBuilder {
  return [TestMultipleExtensionRanges builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self writeExtensionDescriptionToMutableString:(NSMutableString*)output
                                            from:42
                                              to:43
                                      withIndent:indent];
  [self writeExtensionDescriptionToMutableString:(NSMutableString*)output
                                            from:4143
                                              to:4244
                                      withIndent:indent];
  [self writeExtensionDescriptionToMutableString:(NSMutableString*)output
                                            from:65536
                                              to:536870912
                                      withIndent:indent];
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestMultipleExtensionRanges class]]) {
    return NO;
  }
  TestMultipleExtensionRanges *otherMessage = other;
  return
      [self isEqualExtensionsInOther:otherMessage from:42 to:43] &&
      
      [self isEqualExtensionsInOther:otherMessage from:4143 to:4244] &&
      
      [self isEqualExtensionsInOther:otherMessage from:65536 to:536870912] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self hashExtensionsFrom:42 to:43];
  hashCode = hashCode * 31 + [self hashExtensionsFrom:4143 to:4244];
  hashCode = hashCode * 31 + [self hashExtensionsFrom:65536 to:536870912];
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestMultipleExtensionRanges_Builder()
@property (retain) TestMultipleExtensionRanges* result;
@end

@implementation TestMultipleExtensionRanges_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestMultipleExtensionRanges alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (TestMultipleExtensionRanges_Builder*) clear {
  self.result = [[[TestMultipleExtensionRanges alloc] init] autorelease];
  return self;
}
- (TestMultipleExtensionRanges_Builder*) clone {
  return [TestMultipleExtensionRanges builderWithPrototype:result];
}
- (TestMultipleExtensionRanges*) defaultInstance {
  return [TestMultipleExtensionRanges defaultInstance];
}
- (TestMultipleExtensionRanges*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestMultipleExtensionRanges*) buildPartial {
  TestMultipleExtensionRanges* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestMultipleExtensionRanges_Builder*) mergeFrom:(TestMultipleExtensionRanges*) other {
  if (other == [TestMultipleExtensionRanges defaultInstance]) {
    return self;
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestMultipleExtensionRanges_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestMultipleExtensionRanges_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

@interface TestReallyLargeTagNumber ()
@property int32_t a;
@property int32_t bb;
@end

@implementation TestReallyLargeTagNumber

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (BOOL) hasBb {
  return !!hasBb_;
}
- (void) setHasBb:(BOOL) value {
  hasBb_ = !!value;
}
@synthesize bb;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = 0;
    self.bb = 0;
  }
  return self;
}
static TestReallyLargeTagNumber* defaultTestReallyLargeTagNumberInstance = nil;
+ (void) initialize {
  if (self == [TestReallyLargeTagNumber class]) {
    defaultTestReallyLargeTagNumberInstance = [[TestReallyLargeTagNumber alloc] init];
  }
}
+ (TestReallyLargeTagNumber*) defaultInstance {
  return defaultTestReallyLargeTagNumberInstance;
}
- (TestReallyLargeTagNumber*) defaultInstance {
  return defaultTestReallyLargeTagNumberInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeInt32:1 value:self.a];
  }
  if (self.hasBb) {
    [output writeInt32:268435455 value:self.bb];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeInt32Size(1, self.a);
  }
  if (self.hasBb) {
    size += computeInt32Size(268435455, self.bb);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestReallyLargeTagNumber*) parseFromData:(NSData*) data {
  return (TestReallyLargeTagNumber*)[[[TestReallyLargeTagNumber builder] mergeFromData:data] build];
}
+ (TestReallyLargeTagNumber*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestReallyLargeTagNumber*)[[[TestReallyLargeTagNumber builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestReallyLargeTagNumber*) parseFromInputStream:(NSInputStream*) input {
  return (TestReallyLargeTagNumber*)[[[TestReallyLargeTagNumber builder] mergeFromInputStream:input] build];
}
+ (TestReallyLargeTagNumber*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestReallyLargeTagNumber*)[[[TestReallyLargeTagNumber builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestReallyLargeTagNumber*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestReallyLargeTagNumber*)[[[TestReallyLargeTagNumber builder] mergeFromCodedInputStream:input] build];
}
+ (TestReallyLargeTagNumber*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestReallyLargeTagNumber*)[[[TestReallyLargeTagNumber builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestReallyLargeTagNumber_Builder*) builder {
  return [[[TestReallyLargeTagNumber_Builder alloc] init] autorelease];
}
+ (TestReallyLargeTagNumber_Builder*) builderWithPrototype:(TestReallyLargeTagNumber*) prototype {
  return [[TestReallyLargeTagNumber builder] mergeFrom:prototype];
}
- (TestReallyLargeTagNumber_Builder*) builder {
  return [TestReallyLargeTagNumber builder];
}
- (TestReallyLargeTagNumber_Builder*) toBuilder {
  return [TestReallyLargeTagNumber builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@: %@\n", indent, @"a", [NSNumber numberWithInt:self.a]];
  }
  if (self.hasBb) {
    [output appendFormat:@"%@%@: %@\n", indent, @"bb", [NSNumber numberWithInt:self.bb]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestReallyLargeTagNumber class]]) {
    return NO;
  }
  TestReallyLargeTagNumber *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || self.a == otherMessage.a) &&
      
      self.hasBb == otherMessage.hasBb &&
      (!self.hasBb || self.bb == otherMessage.bb) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.a] hash];
  }
  if (self.hasBb) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.bb] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestReallyLargeTagNumber_Builder()
@property (retain) TestReallyLargeTagNumber* result;
@end

@implementation TestReallyLargeTagNumber_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestReallyLargeTagNumber alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestReallyLargeTagNumber_Builder*) clear {
  self.result = [[[TestReallyLargeTagNumber alloc] init] autorelease];
  return self;
}
- (TestReallyLargeTagNumber_Builder*) clone {
  return [TestReallyLargeTagNumber builderWithPrototype:result];
}
- (TestReallyLargeTagNumber*) defaultInstance {
  return [TestReallyLargeTagNumber defaultInstance];
}
- (TestReallyLargeTagNumber*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestReallyLargeTagNumber*) buildPartial {
  TestReallyLargeTagNumber* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestReallyLargeTagNumber_Builder*) mergeFrom:(TestReallyLargeTagNumber*) other {
  if (other == [TestReallyLargeTagNumber defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self setA:other.a];
  }
  if (other.hasBb) {
    [self setBb:other.bb];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestReallyLargeTagNumber_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestReallyLargeTagNumber_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setA:[input readInt32]];
        break;
      }
      case 2147483640: {
        [self setBb:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (int32_t) a {
  return result.a;
}
- (TestReallyLargeTagNumber_Builder*) setA:(int32_t) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (TestReallyLargeTagNumber_Builder*) clearA {
  result.hasA = NO;
  result.a = 0;
  return self;
}
- (BOOL) hasBb {
  return result.hasBb;
}
- (int32_t) bb {
  return result.bb;
}
- (TestReallyLargeTagNumber_Builder*) setBb:(int32_t) value {
  result.hasBb = YES;
  result.bb = value;
  return self;
}
- (TestReallyLargeTagNumber_Builder*) clearBb {
  result.hasBb = NO;
  result.bb = 0;
  return self;
}
@end

@interface TestRecursiveMessage ()
@property (retain) TestRecursiveMessage* a;
@property int32_t i;
@end

@implementation TestRecursiveMessage

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (BOOL) hasI {
  return !!hasI_;
}
- (void) setHasI:(BOOL) value {
  hasI_ = !!value;
}
@synthesize i;
- (void) dealloc {
  self.a = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = [TestRecursiveMessage defaultInstance];
    self.i = 0;
  }
  return self;
}
static TestRecursiveMessage* defaultTestRecursiveMessageInstance = nil;
+ (void) initialize {
  if (self == [TestRecursiveMessage class]) {
    defaultTestRecursiveMessageInstance = [[TestRecursiveMessage alloc] init];
  }
}
+ (TestRecursiveMessage*) defaultInstance {
  return defaultTestRecursiveMessageInstance;
}
- (TestRecursiveMessage*) defaultInstance {
  return defaultTestRecursiveMessageInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeMessage:1 value:self.a];
  }
  if (self.hasI) {
    [output writeInt32:2 value:self.i];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeMessageSize(1, self.a);
  }
  if (self.hasI) {
    size += computeInt32Size(2, self.i);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestRecursiveMessage*) parseFromData:(NSData*) data {
  return (TestRecursiveMessage*)[[[TestRecursiveMessage builder] mergeFromData:data] build];
}
+ (TestRecursiveMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRecursiveMessage*)[[[TestRecursiveMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestRecursiveMessage*) parseFromInputStream:(NSInputStream*) input {
  return (TestRecursiveMessage*)[[[TestRecursiveMessage builder] mergeFromInputStream:input] build];
}
+ (TestRecursiveMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRecursiveMessage*)[[[TestRecursiveMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestRecursiveMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestRecursiveMessage*)[[[TestRecursiveMessage builder] mergeFromCodedInputStream:input] build];
}
+ (TestRecursiveMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRecursiveMessage*)[[[TestRecursiveMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestRecursiveMessage_Builder*) builder {
  return [[[TestRecursiveMessage_Builder alloc] init] autorelease];
}
+ (TestRecursiveMessage_Builder*) builderWithPrototype:(TestRecursiveMessage*) prototype {
  return [[TestRecursiveMessage builder] mergeFrom:prototype];
}
- (TestRecursiveMessage_Builder*) builder {
  return [TestRecursiveMessage builder];
}
- (TestRecursiveMessage_Builder*) toBuilder {
  return [TestRecursiveMessage builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@ {\n", indent, @"a"];
    [self.a writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasI) {
    [output appendFormat:@"%@%@: %@\n", indent, @"i", [NSNumber numberWithInt:self.i]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestRecursiveMessage class]]) {
    return NO;
  }
  TestRecursiveMessage *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || [self.a isEqual:otherMessage.a]) &&
      
      self.hasI == otherMessage.hasI &&
      (!self.hasI || self.i == otherMessage.i) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [self.a hash];
  }
  if (self.hasI) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.i] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestRecursiveMessage_Builder()
@property (retain) TestRecursiveMessage* result;
@end

@implementation TestRecursiveMessage_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestRecursiveMessage alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestRecursiveMessage_Builder*) clear {
  self.result = [[[TestRecursiveMessage alloc] init] autorelease];
  return self;
}
- (TestRecursiveMessage_Builder*) clone {
  return [TestRecursiveMessage builderWithPrototype:result];
}
- (TestRecursiveMessage*) defaultInstance {
  return [TestRecursiveMessage defaultInstance];
}
- (TestRecursiveMessage*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestRecursiveMessage*) buildPartial {
  TestRecursiveMessage* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestRecursiveMessage_Builder*) mergeFrom:(TestRecursiveMessage*) other {
  if (other == [TestRecursiveMessage defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self mergeA:other.a];
  }
  if (other.hasI) {
    [self setI:other.i];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestRecursiveMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestRecursiveMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 10: {
        TestRecursiveMessage_Builder* subBuilder = [TestRecursiveMessage builder];
        if (self.hasA) {
          [subBuilder mergeFrom:self.a];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setA:[subBuilder buildPartial]];
        break;
      }
      case 16: {
        [self setI:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (TestRecursiveMessage*) a {
  return result.a;
}
- (TestRecursiveMessage_Builder*) setA:(TestRecursiveMessage*) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (TestRecursiveMessage_Builder*) setABuilder:(TestRecursiveMessage_Builder*) builderForValue {
  return [self setA:[builderForValue build]];
}
- (TestRecursiveMessage_Builder*) mergeA:(TestRecursiveMessage*) value {
  if (result.hasA &&
      result.a != [TestRecursiveMessage defaultInstance]) {
    result.a =
      [[[TestRecursiveMessage builderWithPrototype:result.a] mergeFrom:value] buildPartial];
  } else {
    result.a = value;
  }
  result.hasA = YES;
  return self;
}
- (TestRecursiveMessage_Builder*) clearA {
  result.hasA = NO;
  result.a = [TestRecursiveMessage defaultInstance];
  return self;
}
- (BOOL) hasI {
  return result.hasI;
}
- (int32_t) i {
  return result.i;
}
- (TestRecursiveMessage_Builder*) setI:(int32_t) value {
  result.hasI = YES;
  result.i = value;
  return self;
}
- (TestRecursiveMessage_Builder*) clearI {
  result.hasI = NO;
  result.i = 0;
  return self;
}
@end

@interface TestMutualRecursionA ()
@property (retain) TestMutualRecursionB* bb;
@end

@implementation TestMutualRecursionA

- (BOOL) hasBb {
  return !!hasBb_;
}
- (void) setHasBb:(BOOL) value {
  hasBb_ = !!value;
}
@synthesize bb;
- (void) dealloc {
  self.bb = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.bb = [TestMutualRecursionB defaultInstance];
  }
  return self;
}
static TestMutualRecursionA* defaultTestMutualRecursionAInstance = nil;
+ (void) initialize {
  if (self == [TestMutualRecursionA class]) {
    defaultTestMutualRecursionAInstance = [[TestMutualRecursionA alloc] init];
  }
}
+ (TestMutualRecursionA*) defaultInstance {
  return defaultTestMutualRecursionAInstance;
}
- (TestMutualRecursionA*) defaultInstance {
  return defaultTestMutualRecursionAInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasBb) {
    [output writeMessage:1 value:self.bb];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasBb) {
    size += computeMessageSize(1, self.bb);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestMutualRecursionA*) parseFromData:(NSData*) data {
  return (TestMutualRecursionA*)[[[TestMutualRecursionA builder] mergeFromData:data] build];
}
+ (TestMutualRecursionA*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestMutualRecursionA*)[[[TestMutualRecursionA builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestMutualRecursionA*) parseFromInputStream:(NSInputStream*) input {
  return (TestMutualRecursionA*)[[[TestMutualRecursionA builder] mergeFromInputStream:input] build];
}
+ (TestMutualRecursionA*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestMutualRecursionA*)[[[TestMutualRecursionA builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestMutualRecursionA*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestMutualRecursionA*)[[[TestMutualRecursionA builder] mergeFromCodedInputStream:input] build];
}
+ (TestMutualRecursionA*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestMutualRecursionA*)[[[TestMutualRecursionA builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestMutualRecursionA_Builder*) builder {
  return [[[TestMutualRecursionA_Builder alloc] init] autorelease];
}
+ (TestMutualRecursionA_Builder*) builderWithPrototype:(TestMutualRecursionA*) prototype {
  return [[TestMutualRecursionA builder] mergeFrom:prototype];
}
- (TestMutualRecursionA_Builder*) builder {
  return [TestMutualRecursionA builder];
}
- (TestMutualRecursionA_Builder*) toBuilder {
  return [TestMutualRecursionA builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasBb) {
    [output appendFormat:@"%@%@ {\n", indent, @"bb"];
    [self.bb writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestMutualRecursionA class]]) {
    return NO;
  }
  TestMutualRecursionA *otherMessage = other;
  return
      self.hasBb == otherMessage.hasBb &&
      (!self.hasBb || [self.bb isEqual:otherMessage.bb]) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasBb) {
    hashCode = hashCode * 31 + [self.bb hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestMutualRecursionA_Builder()
@property (retain) TestMutualRecursionA* result;
@end

@implementation TestMutualRecursionA_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestMutualRecursionA alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestMutualRecursionA_Builder*) clear {
  self.result = [[[TestMutualRecursionA alloc] init] autorelease];
  return self;
}
- (TestMutualRecursionA_Builder*) clone {
  return [TestMutualRecursionA builderWithPrototype:result];
}
- (TestMutualRecursionA*) defaultInstance {
  return [TestMutualRecursionA defaultInstance];
}
- (TestMutualRecursionA*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestMutualRecursionA*) buildPartial {
  TestMutualRecursionA* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestMutualRecursionA_Builder*) mergeFrom:(TestMutualRecursionA*) other {
  if (other == [TestMutualRecursionA defaultInstance]) {
    return self;
  }
  if (other.hasBb) {
    [self mergeBb:other.bb];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestMutualRecursionA_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestMutualRecursionA_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 10: {
        TestMutualRecursionB_Builder* subBuilder = [TestMutualRecursionB builder];
        if (self.hasBb) {
          [subBuilder mergeFrom:self.bb];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setBb:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasBb {
  return result.hasBb;
}
- (TestMutualRecursionB*) bb {
  return result.bb;
}
- (TestMutualRecursionA_Builder*) setBb:(TestMutualRecursionB*) value {
  result.hasBb = YES;
  result.bb = value;
  return self;
}
- (TestMutualRecursionA_Builder*) setBbBuilder:(TestMutualRecursionB_Builder*) builderForValue {
  return [self setBb:[builderForValue build]];
}
- (TestMutualRecursionA_Builder*) mergeBb:(TestMutualRecursionB*) value {
  if (result.hasBb &&
      result.bb != [TestMutualRecursionB defaultInstance]) {
    result.bb =
      [[[TestMutualRecursionB builderWithPrototype:result.bb] mergeFrom:value] buildPartial];
  } else {
    result.bb = value;
  }
  result.hasBb = YES;
  return self;
}
- (TestMutualRecursionA_Builder*) clearBb {
  result.hasBb = NO;
  result.bb = [TestMutualRecursionB defaultInstance];
  return self;
}
@end

@interface TestMutualRecursionB ()
@property (retain) TestMutualRecursionA* a;
@property int32_t optionalInt32;
@end

@implementation TestMutualRecursionB

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (BOOL) hasOptionalInt32 {
  return !!hasOptionalInt32_;
}
- (void) setHasOptionalInt32:(BOOL) value {
  hasOptionalInt32_ = !!value;
}
@synthesize optionalInt32;
- (void) dealloc {
  self.a = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = [TestMutualRecursionA defaultInstance];
    self.optionalInt32 = 0;
  }
  return self;
}
static TestMutualRecursionB* defaultTestMutualRecursionBInstance = nil;
+ (void) initialize {
  if (self == [TestMutualRecursionB class]) {
    defaultTestMutualRecursionBInstance = [[TestMutualRecursionB alloc] init];
  }
}
+ (TestMutualRecursionB*) defaultInstance {
  return defaultTestMutualRecursionBInstance;
}
- (TestMutualRecursionB*) defaultInstance {
  return defaultTestMutualRecursionBInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeMessage:1 value:self.a];
  }
  if (self.hasOptionalInt32) {
    [output writeInt32:2 value:self.optionalInt32];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeMessageSize(1, self.a);
  }
  if (self.hasOptionalInt32) {
    size += computeInt32Size(2, self.optionalInt32);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestMutualRecursionB*) parseFromData:(NSData*) data {
  return (TestMutualRecursionB*)[[[TestMutualRecursionB builder] mergeFromData:data] build];
}
+ (TestMutualRecursionB*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestMutualRecursionB*)[[[TestMutualRecursionB builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestMutualRecursionB*) parseFromInputStream:(NSInputStream*) input {
  return (TestMutualRecursionB*)[[[TestMutualRecursionB builder] mergeFromInputStream:input] build];
}
+ (TestMutualRecursionB*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestMutualRecursionB*)[[[TestMutualRecursionB builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestMutualRecursionB*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestMutualRecursionB*)[[[TestMutualRecursionB builder] mergeFromCodedInputStream:input] build];
}
+ (TestMutualRecursionB*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestMutualRecursionB*)[[[TestMutualRecursionB builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestMutualRecursionB_Builder*) builder {
  return [[[TestMutualRecursionB_Builder alloc] init] autorelease];
}
+ (TestMutualRecursionB_Builder*) builderWithPrototype:(TestMutualRecursionB*) prototype {
  return [[TestMutualRecursionB builder] mergeFrom:prototype];
}
- (TestMutualRecursionB_Builder*) builder {
  return [TestMutualRecursionB builder];
}
- (TestMutualRecursionB_Builder*) toBuilder {
  return [TestMutualRecursionB builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@ {\n", indent, @"a"];
    [self.a writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasOptionalInt32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"optionalInt32", [NSNumber numberWithInt:self.optionalInt32]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestMutualRecursionB class]]) {
    return NO;
  }
  TestMutualRecursionB *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || [self.a isEqual:otherMessage.a]) &&
      
      self.hasOptionalInt32 == otherMessage.hasOptionalInt32 &&
      (!self.hasOptionalInt32 || self.optionalInt32 == otherMessage.optionalInt32) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [self.a hash];
  }
  if (self.hasOptionalInt32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.optionalInt32] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestMutualRecursionB_Builder()
@property (retain) TestMutualRecursionB* result;
@end

@implementation TestMutualRecursionB_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestMutualRecursionB alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestMutualRecursionB_Builder*) clear {
  self.result = [[[TestMutualRecursionB alloc] init] autorelease];
  return self;
}
- (TestMutualRecursionB_Builder*) clone {
  return [TestMutualRecursionB builderWithPrototype:result];
}
- (TestMutualRecursionB*) defaultInstance {
  return [TestMutualRecursionB defaultInstance];
}
- (TestMutualRecursionB*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestMutualRecursionB*) buildPartial {
  TestMutualRecursionB* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestMutualRecursionB_Builder*) mergeFrom:(TestMutualRecursionB*) other {
  if (other == [TestMutualRecursionB defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self mergeA:other.a];
  }
  if (other.hasOptionalInt32) {
    [self setOptionalInt32:other.optionalInt32];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestMutualRecursionB_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestMutualRecursionB_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 10: {
        TestMutualRecursionA_Builder* subBuilder = [TestMutualRecursionA builder];
        if (self.hasA) {
          [subBuilder mergeFrom:self.a];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setA:[subBuilder buildPartial]];
        break;
      }
      case 16: {
        [self setOptionalInt32:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (TestMutualRecursionA*) a {
  return result.a;
}
- (TestMutualRecursionB_Builder*) setA:(TestMutualRecursionA*) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (TestMutualRecursionB_Builder*) setABuilder:(TestMutualRecursionA_Builder*) builderForValue {
  return [self setA:[builderForValue build]];
}
- (TestMutualRecursionB_Builder*) mergeA:(TestMutualRecursionA*) value {
  if (result.hasA &&
      result.a != [TestMutualRecursionA defaultInstance]) {
    result.a =
      [[[TestMutualRecursionA builderWithPrototype:result.a] mergeFrom:value] buildPartial];
  } else {
    result.a = value;
  }
  result.hasA = YES;
  return self;
}
- (TestMutualRecursionB_Builder*) clearA {
  result.hasA = NO;
  result.a = [TestMutualRecursionA defaultInstance];
  return self;
}
- (BOOL) hasOptionalInt32 {
  return result.hasOptionalInt32;
}
- (int32_t) optionalInt32 {
  return result.optionalInt32;
}
- (TestMutualRecursionB_Builder*) setOptionalInt32:(int32_t) value {
  result.hasOptionalInt32 = YES;
  result.optionalInt32 = value;
  return self;
}
- (TestMutualRecursionB_Builder*) clearOptionalInt32 {
  result.hasOptionalInt32 = NO;
  result.optionalInt32 = 0;
  return self;
}
@end

@interface TestDupFieldNumber ()
@property int32_t a;
@property (retain) TestDupFieldNumber_Foo* foo;
@property (retain) TestDupFieldNumber_Bar* bar;
@end

@implementation TestDupFieldNumber

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (BOOL) hasFoo {
  return !!hasFoo_;
}
- (void) setHasFoo:(BOOL) value {
  hasFoo_ = !!value;
}
@synthesize foo;
- (BOOL) hasBar {
  return !!hasBar_;
}
- (void) setHasBar:(BOOL) value {
  hasBar_ = !!value;
}
@synthesize bar;
- (void) dealloc {
  self.foo = nil;
  self.bar = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = 0;
    self.foo = [TestDupFieldNumber_Foo defaultInstance];
    self.bar = [TestDupFieldNumber_Bar defaultInstance];
  }
  return self;
}
static TestDupFieldNumber* defaultTestDupFieldNumberInstance = nil;
+ (void) initialize {
  if (self == [TestDupFieldNumber class]) {
    defaultTestDupFieldNumberInstance = [[TestDupFieldNumber alloc] init];
  }
}
+ (TestDupFieldNumber*) defaultInstance {
  return defaultTestDupFieldNumberInstance;
}
- (TestDupFieldNumber*) defaultInstance {
  return defaultTestDupFieldNumberInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeInt32:1 value:self.a];
  }
  if (self.hasFoo) {
    [output writeGroup:2 value:self.foo];
  }
  if (self.hasBar) {
    [output writeGroup:3 value:self.bar];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeInt32Size(1, self.a);
  }
  if (self.hasFoo) {
    size += computeGroupSize(2, self.foo);
  }
  if (self.hasBar) {
    size += computeGroupSize(3, self.bar);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestDupFieldNumber*) parseFromData:(NSData*) data {
  return (TestDupFieldNumber*)[[[TestDupFieldNumber builder] mergeFromData:data] build];
}
+ (TestDupFieldNumber*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDupFieldNumber*)[[[TestDupFieldNumber builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestDupFieldNumber*) parseFromInputStream:(NSInputStream*) input {
  return (TestDupFieldNumber*)[[[TestDupFieldNumber builder] mergeFromInputStream:input] build];
}
+ (TestDupFieldNumber*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDupFieldNumber*)[[[TestDupFieldNumber builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDupFieldNumber*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestDupFieldNumber*)[[[TestDupFieldNumber builder] mergeFromCodedInputStream:input] build];
}
+ (TestDupFieldNumber*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDupFieldNumber*)[[[TestDupFieldNumber builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDupFieldNumber_Builder*) builder {
  return [[[TestDupFieldNumber_Builder alloc] init] autorelease];
}
+ (TestDupFieldNumber_Builder*) builderWithPrototype:(TestDupFieldNumber*) prototype {
  return [[TestDupFieldNumber builder] mergeFrom:prototype];
}
- (TestDupFieldNumber_Builder*) builder {
  return [TestDupFieldNumber builder];
}
- (TestDupFieldNumber_Builder*) toBuilder {
  return [TestDupFieldNumber builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@: %@\n", indent, @"a", [NSNumber numberWithInt:self.a]];
  }
  if (self.hasFoo) {
    [output appendFormat:@"%@%@ {\n", indent, @"foo"];
    [self.foo writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasBar) {
    [output appendFormat:@"%@%@ {\n", indent, @"bar"];
    [self.bar writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestDupFieldNumber class]]) {
    return NO;
  }
  TestDupFieldNumber *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || self.a == otherMessage.a) &&
      
      self.hasFoo == otherMessage.hasFoo &&
      (!self.hasFoo || [self.foo isEqual:otherMessage.foo]) &&
      
      self.hasBar == otherMessage.hasBar &&
      (!self.hasBar || [self.bar isEqual:otherMessage.bar]) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.a] hash];
  }
  if (self.hasFoo) {
    hashCode = hashCode * 31 + [self.foo hash];
  }
  if (self.hasBar) {
    hashCode = hashCode * 31 + [self.bar hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestDupFieldNumber_Foo ()
@property int32_t a;
@end

@implementation TestDupFieldNumber_Foo

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = 0;
  }
  return self;
}
static TestDupFieldNumber_Foo* defaultTestDupFieldNumber_FooInstance = nil;
+ (void) initialize {
  if (self == [TestDupFieldNumber_Foo class]) {
    defaultTestDupFieldNumber_FooInstance = [[TestDupFieldNumber_Foo alloc] init];
  }
}
+ (TestDupFieldNumber_Foo*) defaultInstance {
  return defaultTestDupFieldNumber_FooInstance;
}
- (TestDupFieldNumber_Foo*) defaultInstance {
  return defaultTestDupFieldNumber_FooInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeInt32:1 value:self.a];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeInt32Size(1, self.a);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestDupFieldNumber_Foo*) parseFromData:(NSData*) data {
  return (TestDupFieldNumber_Foo*)[[[TestDupFieldNumber_Foo builder] mergeFromData:data] build];
}
+ (TestDupFieldNumber_Foo*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDupFieldNumber_Foo*)[[[TestDupFieldNumber_Foo builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestDupFieldNumber_Foo*) parseFromInputStream:(NSInputStream*) input {
  return (TestDupFieldNumber_Foo*)[[[TestDupFieldNumber_Foo builder] mergeFromInputStream:input] build];
}
+ (TestDupFieldNumber_Foo*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDupFieldNumber_Foo*)[[[TestDupFieldNumber_Foo builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDupFieldNumber_Foo*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestDupFieldNumber_Foo*)[[[TestDupFieldNumber_Foo builder] mergeFromCodedInputStream:input] build];
}
+ (TestDupFieldNumber_Foo*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDupFieldNumber_Foo*)[[[TestDupFieldNumber_Foo builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDupFieldNumber_Foo_Builder*) builder {
  return [[[TestDupFieldNumber_Foo_Builder alloc] init] autorelease];
}
+ (TestDupFieldNumber_Foo_Builder*) builderWithPrototype:(TestDupFieldNumber_Foo*) prototype {
  return [[TestDupFieldNumber_Foo builder] mergeFrom:prototype];
}
- (TestDupFieldNumber_Foo_Builder*) builder {
  return [TestDupFieldNumber_Foo builder];
}
- (TestDupFieldNumber_Foo_Builder*) toBuilder {
  return [TestDupFieldNumber_Foo builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@: %@\n", indent, @"a", [NSNumber numberWithInt:self.a]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestDupFieldNumber_Foo class]]) {
    return NO;
  }
  TestDupFieldNumber_Foo *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || self.a == otherMessage.a) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.a] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestDupFieldNumber_Foo_Builder()
@property (retain) TestDupFieldNumber_Foo* result;
@end

@implementation TestDupFieldNumber_Foo_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestDupFieldNumber_Foo alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestDupFieldNumber_Foo_Builder*) clear {
  self.result = [[[TestDupFieldNumber_Foo alloc] init] autorelease];
  return self;
}
- (TestDupFieldNumber_Foo_Builder*) clone {
  return [TestDupFieldNumber_Foo builderWithPrototype:result];
}
- (TestDupFieldNumber_Foo*) defaultInstance {
  return [TestDupFieldNumber_Foo defaultInstance];
}
- (TestDupFieldNumber_Foo*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestDupFieldNumber_Foo*) buildPartial {
  TestDupFieldNumber_Foo* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestDupFieldNumber_Foo_Builder*) mergeFrom:(TestDupFieldNumber_Foo*) other {
  if (other == [TestDupFieldNumber_Foo defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self setA:other.a];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestDupFieldNumber_Foo_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestDupFieldNumber_Foo_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setA:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (int32_t) a {
  return result.a;
}
- (TestDupFieldNumber_Foo_Builder*) setA:(int32_t) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (TestDupFieldNumber_Foo_Builder*) clearA {
  result.hasA = NO;
  result.a = 0;
  return self;
}
@end

@interface TestDupFieldNumber_Bar ()
@property int32_t a;
@end

@implementation TestDupFieldNumber_Bar

- (BOOL) hasA {
  return !!hasA_;
}
- (void) setHasA:(BOOL) value {
  hasA_ = !!value;
}
@synthesize a;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.a = 0;
  }
  return self;
}
static TestDupFieldNumber_Bar* defaultTestDupFieldNumber_BarInstance = nil;
+ (void) initialize {
  if (self == [TestDupFieldNumber_Bar class]) {
    defaultTestDupFieldNumber_BarInstance = [[TestDupFieldNumber_Bar alloc] init];
  }
}
+ (TestDupFieldNumber_Bar*) defaultInstance {
  return defaultTestDupFieldNumber_BarInstance;
}
- (TestDupFieldNumber_Bar*) defaultInstance {
  return defaultTestDupFieldNumber_BarInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasA) {
    [output writeInt32:1 value:self.a];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasA) {
    size += computeInt32Size(1, self.a);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestDupFieldNumber_Bar*) parseFromData:(NSData*) data {
  return (TestDupFieldNumber_Bar*)[[[TestDupFieldNumber_Bar builder] mergeFromData:data] build];
}
+ (TestDupFieldNumber_Bar*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDupFieldNumber_Bar*)[[[TestDupFieldNumber_Bar builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestDupFieldNumber_Bar*) parseFromInputStream:(NSInputStream*) input {
  return (TestDupFieldNumber_Bar*)[[[TestDupFieldNumber_Bar builder] mergeFromInputStream:input] build];
}
+ (TestDupFieldNumber_Bar*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDupFieldNumber_Bar*)[[[TestDupFieldNumber_Bar builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDupFieldNumber_Bar*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestDupFieldNumber_Bar*)[[[TestDupFieldNumber_Bar builder] mergeFromCodedInputStream:input] build];
}
+ (TestDupFieldNumber_Bar*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDupFieldNumber_Bar*)[[[TestDupFieldNumber_Bar builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDupFieldNumber_Bar_Builder*) builder {
  return [[[TestDupFieldNumber_Bar_Builder alloc] init] autorelease];
}
+ (TestDupFieldNumber_Bar_Builder*) builderWithPrototype:(TestDupFieldNumber_Bar*) prototype {
  return [[TestDupFieldNumber_Bar builder] mergeFrom:prototype];
}
- (TestDupFieldNumber_Bar_Builder*) builder {
  return [TestDupFieldNumber_Bar builder];
}
- (TestDupFieldNumber_Bar_Builder*) toBuilder {
  return [TestDupFieldNumber_Bar builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasA) {
    [output appendFormat:@"%@%@: %@\n", indent, @"a", [NSNumber numberWithInt:self.a]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestDupFieldNumber_Bar class]]) {
    return NO;
  }
  TestDupFieldNumber_Bar *otherMessage = other;
  return
      self.hasA == otherMessage.hasA &&
      (!self.hasA || self.a == otherMessage.a) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasA) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.a] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestDupFieldNumber_Bar_Builder()
@property (retain) TestDupFieldNumber_Bar* result;
@end

@implementation TestDupFieldNumber_Bar_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestDupFieldNumber_Bar alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestDupFieldNumber_Bar_Builder*) clear {
  self.result = [[[TestDupFieldNumber_Bar alloc] init] autorelease];
  return self;
}
- (TestDupFieldNumber_Bar_Builder*) clone {
  return [TestDupFieldNumber_Bar builderWithPrototype:result];
}
- (TestDupFieldNumber_Bar*) defaultInstance {
  return [TestDupFieldNumber_Bar defaultInstance];
}
- (TestDupFieldNumber_Bar*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestDupFieldNumber_Bar*) buildPartial {
  TestDupFieldNumber_Bar* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestDupFieldNumber_Bar_Builder*) mergeFrom:(TestDupFieldNumber_Bar*) other {
  if (other == [TestDupFieldNumber_Bar defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self setA:other.a];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestDupFieldNumber_Bar_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestDupFieldNumber_Bar_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setA:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (int32_t) a {
  return result.a;
}
- (TestDupFieldNumber_Bar_Builder*) setA:(int32_t) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (TestDupFieldNumber_Bar_Builder*) clearA {
  result.hasA = NO;
  result.a = 0;
  return self;
}
@end

@interface TestDupFieldNumber_Builder()
@property (retain) TestDupFieldNumber* result;
@end

@implementation TestDupFieldNumber_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestDupFieldNumber alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestDupFieldNumber_Builder*) clear {
  self.result = [[[TestDupFieldNumber alloc] init] autorelease];
  return self;
}
- (TestDupFieldNumber_Builder*) clone {
  return [TestDupFieldNumber builderWithPrototype:result];
}
- (TestDupFieldNumber*) defaultInstance {
  return [TestDupFieldNumber defaultInstance];
}
- (TestDupFieldNumber*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestDupFieldNumber*) buildPartial {
  TestDupFieldNumber* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestDupFieldNumber_Builder*) mergeFrom:(TestDupFieldNumber*) other {
  if (other == [TestDupFieldNumber defaultInstance]) {
    return self;
  }
  if (other.hasA) {
    [self setA:other.a];
  }
  if (other.hasFoo) {
    [self mergeFoo:other.foo];
  }
  if (other.hasBar) {
    [self mergeBar:other.bar];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestDupFieldNumber_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestDupFieldNumber_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setA:[input readInt32]];
        break;
      }
      case 19: {
        TestDupFieldNumber_Foo_Builder* subBuilder = [TestDupFieldNumber_Foo builder];
        if (self.hasFoo) {
          [subBuilder mergeFrom:self.foo];
        }
        [input readGroup:2 builder:subBuilder extensionRegistry:extensionRegistry];
        [self setFoo:[subBuilder buildPartial]];
        break;
      }
      case 27: {
        TestDupFieldNumber_Bar_Builder* subBuilder = [TestDupFieldNumber_Bar builder];
        if (self.hasBar) {
          [subBuilder mergeFrom:self.bar];
        }
        [input readGroup:3 builder:subBuilder extensionRegistry:extensionRegistry];
        [self setBar:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasA {
  return result.hasA;
}
- (int32_t) a {
  return result.a;
}
- (TestDupFieldNumber_Builder*) setA:(int32_t) value {
  result.hasA = YES;
  result.a = value;
  return self;
}
- (TestDupFieldNumber_Builder*) clearA {
  result.hasA = NO;
  result.a = 0;
  return self;
}
- (BOOL) hasFoo {
  return result.hasFoo;
}
- (TestDupFieldNumber_Foo*) foo {
  return result.foo;
}
- (TestDupFieldNumber_Builder*) setFoo:(TestDupFieldNumber_Foo*) value {
  result.hasFoo = YES;
  result.foo = value;
  return self;
}
- (TestDupFieldNumber_Builder*) setFooBuilder:(TestDupFieldNumber_Foo_Builder*) builderForValue {
  return [self setFoo:[builderForValue build]];
}
- (TestDupFieldNumber_Builder*) mergeFoo:(TestDupFieldNumber_Foo*) value {
  if (result.hasFoo &&
      result.foo != [TestDupFieldNumber_Foo defaultInstance]) {
    result.foo =
      [[[TestDupFieldNumber_Foo builderWithPrototype:result.foo] mergeFrom:value] buildPartial];
  } else {
    result.foo = value;
  }
  result.hasFoo = YES;
  return self;
}
- (TestDupFieldNumber_Builder*) clearFoo {
  result.hasFoo = NO;
  result.foo = [TestDupFieldNumber_Foo defaultInstance];
  return self;
}
- (BOOL) hasBar {
  return result.hasBar;
}
- (TestDupFieldNumber_Bar*) bar {
  return result.bar;
}
- (TestDupFieldNumber_Builder*) setBar:(TestDupFieldNumber_Bar*) value {
  result.hasBar = YES;
  result.bar = value;
  return self;
}
- (TestDupFieldNumber_Builder*) setBarBuilder:(TestDupFieldNumber_Bar_Builder*) builderForValue {
  return [self setBar:[builderForValue build]];
}
- (TestDupFieldNumber_Builder*) mergeBar:(TestDupFieldNumber_Bar*) value {
  if (result.hasBar &&
      result.bar != [TestDupFieldNumber_Bar defaultInstance]) {
    result.bar =
      [[[TestDupFieldNumber_Bar builderWithPrototype:result.bar] mergeFrom:value] buildPartial];
  } else {
    result.bar = value;
  }
  result.hasBar = YES;
  return self;
}
- (TestDupFieldNumber_Builder*) clearBar {
  result.hasBar = NO;
  result.bar = [TestDupFieldNumber_Bar defaultInstance];
  return self;
}
@end

@interface TestNestedMessageHasBits ()
@property (retain) TestNestedMessageHasBits_NestedMessage* optionalNestedMessage;
@end

@implementation TestNestedMessageHasBits

- (BOOL) hasOptionalNestedMessage {
  return !!hasOptionalNestedMessage_;
}
- (void) setHasOptionalNestedMessage:(BOOL) value {
  hasOptionalNestedMessage_ = !!value;
}
@synthesize optionalNestedMessage;
- (void) dealloc {
  self.optionalNestedMessage = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.optionalNestedMessage = [TestNestedMessageHasBits_NestedMessage defaultInstance];
  }
  return self;
}
static TestNestedMessageHasBits* defaultTestNestedMessageHasBitsInstance = nil;
+ (void) initialize {
  if (self == [TestNestedMessageHasBits class]) {
    defaultTestNestedMessageHasBitsInstance = [[TestNestedMessageHasBits alloc] init];
  }
}
+ (TestNestedMessageHasBits*) defaultInstance {
  return defaultTestNestedMessageHasBitsInstance;
}
- (TestNestedMessageHasBits*) defaultInstance {
  return defaultTestNestedMessageHasBitsInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasOptionalNestedMessage) {
    [output writeMessage:1 value:self.optionalNestedMessage];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasOptionalNestedMessage) {
    size += computeMessageSize(1, self.optionalNestedMessage);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestNestedMessageHasBits*) parseFromData:(NSData*) data {
  return (TestNestedMessageHasBits*)[[[TestNestedMessageHasBits builder] mergeFromData:data] build];
}
+ (TestNestedMessageHasBits*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestNestedMessageHasBits*)[[[TestNestedMessageHasBits builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestNestedMessageHasBits*) parseFromInputStream:(NSInputStream*) input {
  return (TestNestedMessageHasBits*)[[[TestNestedMessageHasBits builder] mergeFromInputStream:input] build];
}
+ (TestNestedMessageHasBits*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestNestedMessageHasBits*)[[[TestNestedMessageHasBits builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestNestedMessageHasBits*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestNestedMessageHasBits*)[[[TestNestedMessageHasBits builder] mergeFromCodedInputStream:input] build];
}
+ (TestNestedMessageHasBits*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestNestedMessageHasBits*)[[[TestNestedMessageHasBits builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestNestedMessageHasBits_Builder*) builder {
  return [[[TestNestedMessageHasBits_Builder alloc] init] autorelease];
}
+ (TestNestedMessageHasBits_Builder*) builderWithPrototype:(TestNestedMessageHasBits*) prototype {
  return [[TestNestedMessageHasBits builder] mergeFrom:prototype];
}
- (TestNestedMessageHasBits_Builder*) builder {
  return [TestNestedMessageHasBits builder];
}
- (TestNestedMessageHasBits_Builder*) toBuilder {
  return [TestNestedMessageHasBits builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasOptionalNestedMessage) {
    [output appendFormat:@"%@%@ {\n", indent, @"optionalNestedMessage"];
    [self.optionalNestedMessage writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestNestedMessageHasBits class]]) {
    return NO;
  }
  TestNestedMessageHasBits *otherMessage = other;
  return
      self.hasOptionalNestedMessage == otherMessage.hasOptionalNestedMessage &&
      (!self.hasOptionalNestedMessage || [self.optionalNestedMessage isEqual:otherMessage.optionalNestedMessage]) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasOptionalNestedMessage) {
    hashCode = hashCode * 31 + [self.optionalNestedMessage hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestNestedMessageHasBits_NestedMessage ()
@property (retain) PBAppendableArray * nestedmessageRepeatedInt32Array;
@property (retain) PBAppendableArray * nestedmessageRepeatedForeignmessageArray;
@end

@implementation TestNestedMessageHasBits_NestedMessage

@synthesize nestedmessageRepeatedInt32Array;
@dynamic nestedmessageRepeatedInt32;
@synthesize nestedmessageRepeatedForeignmessageArray;
@dynamic nestedmessageRepeatedForeignmessage;
- (void) dealloc {
  self.nestedmessageRepeatedInt32Array = nil;
  self.nestedmessageRepeatedForeignmessageArray = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static TestNestedMessageHasBits_NestedMessage* defaultTestNestedMessageHasBits_NestedMessageInstance = nil;
+ (void) initialize {
  if (self == [TestNestedMessageHasBits_NestedMessage class]) {
    defaultTestNestedMessageHasBits_NestedMessageInstance = [[TestNestedMessageHasBits_NestedMessage alloc] init];
  }
}
+ (TestNestedMessageHasBits_NestedMessage*) defaultInstance {
  return defaultTestNestedMessageHasBits_NestedMessageInstance;
}
- (TestNestedMessageHasBits_NestedMessage*) defaultInstance {
  return defaultTestNestedMessageHasBits_NestedMessageInstance;
}
- (PBArray *)nestedmessageRepeatedInt32 {
  return nestedmessageRepeatedInt32Array;
}
- (int32_t)nestedmessageRepeatedInt32AtIndex:(NSUInteger)index {
  return [nestedmessageRepeatedInt32Array int32AtIndex:index];
}
- (PBArray *)nestedmessageRepeatedForeignmessage {
  return nestedmessageRepeatedForeignmessageArray;
}
- (ForeignMessage*)nestedmessageRepeatedForeignmessageAtIndex:(NSUInteger)index {
  return [nestedmessageRepeatedForeignmessageArray objectAtIndex:index];
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  const NSUInteger nestedmessageRepeatedInt32ArrayCount = self.nestedmessageRepeatedInt32Array.count;
  if (nestedmessageRepeatedInt32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.nestedmessageRepeatedInt32Array.data;
    for (NSUInteger i = 0; i < nestedmessageRepeatedInt32ArrayCount; ++i) {
      [output writeInt32:1 value:values[i]];
    }
  }
  for (ForeignMessage *element in self.nestedmessageRepeatedForeignmessageArray) {
    [output writeMessage:2 value:element];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.nestedmessageRepeatedInt32Array.count;
    const int32_t *values = (const int32_t *)self.nestedmessageRepeatedInt32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 1 * count;
  }
  for (ForeignMessage *element in self.nestedmessageRepeatedForeignmessageArray) {
    size += computeMessageSize(2, element);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestNestedMessageHasBits_NestedMessage*) parseFromData:(NSData*) data {
  return (TestNestedMessageHasBits_NestedMessage*)[[[TestNestedMessageHasBits_NestedMessage builder] mergeFromData:data] build];
}
+ (TestNestedMessageHasBits_NestedMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestNestedMessageHasBits_NestedMessage*)[[[TestNestedMessageHasBits_NestedMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestNestedMessageHasBits_NestedMessage*) parseFromInputStream:(NSInputStream*) input {
  return (TestNestedMessageHasBits_NestedMessage*)[[[TestNestedMessageHasBits_NestedMessage builder] mergeFromInputStream:input] build];
}
+ (TestNestedMessageHasBits_NestedMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestNestedMessageHasBits_NestedMessage*)[[[TestNestedMessageHasBits_NestedMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestNestedMessageHasBits_NestedMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestNestedMessageHasBits_NestedMessage*)[[[TestNestedMessageHasBits_NestedMessage builder] mergeFromCodedInputStream:input] build];
}
+ (TestNestedMessageHasBits_NestedMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestNestedMessageHasBits_NestedMessage*)[[[TestNestedMessageHasBits_NestedMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestNestedMessageHasBits_NestedMessage_Builder*) builder {
  return [[[TestNestedMessageHasBits_NestedMessage_Builder alloc] init] autorelease];
}
+ (TestNestedMessageHasBits_NestedMessage_Builder*) builderWithPrototype:(TestNestedMessageHasBits_NestedMessage*) prototype {
  return [[TestNestedMessageHasBits_NestedMessage builder] mergeFrom:prototype];
}
- (TestNestedMessageHasBits_NestedMessage_Builder*) builder {
  return [TestNestedMessageHasBits_NestedMessage builder];
}
- (TestNestedMessageHasBits_NestedMessage_Builder*) toBuilder {
  return [TestNestedMessageHasBits_NestedMessage builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  for (NSNumber* value in self.nestedmessageRepeatedInt32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"nestedmessageRepeatedInt32", value];
  }
  for (ForeignMessage* element in self.nestedmessageRepeatedForeignmessageArray) {
    [output appendFormat:@"%@%@ {\n", indent, @"nestedmessageRepeatedForeignmessage"];
    [element writeDescriptionTo:output
                     withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestNestedMessageHasBits_NestedMessage class]]) {
    return NO;
  }
  TestNestedMessageHasBits_NestedMessage *otherMessage = other;
  return
      [self.nestedmessageRepeatedInt32Array isEqualToArray:otherMessage.nestedmessageRepeatedInt32Array] &&
      
      [self.nestedmessageRepeatedForeignmessageArray isEqualToArray:otherMessage.nestedmessageRepeatedForeignmessageArray] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  for (NSNumber* value in self.nestedmessageRepeatedInt32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (ForeignMessage* element in self.nestedmessageRepeatedForeignmessageArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestNestedMessageHasBits_NestedMessage_Builder()
@property (retain) TestNestedMessageHasBits_NestedMessage* result;
@end

@implementation TestNestedMessageHasBits_NestedMessage_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestNestedMessageHasBits_NestedMessage alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestNestedMessageHasBits_NestedMessage_Builder*) clear {
  self.result = [[[TestNestedMessageHasBits_NestedMessage alloc] init] autorelease];
  return self;
}
- (TestNestedMessageHasBits_NestedMessage_Builder*) clone {
  return [TestNestedMessageHasBits_NestedMessage builderWithPrototype:result];
}
- (TestNestedMessageHasBits_NestedMessage*) defaultInstance {
  return [TestNestedMessageHasBits_NestedMessage defaultInstance];
}
- (TestNestedMessageHasBits_NestedMessage*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestNestedMessageHasBits_NestedMessage*) buildPartial {
  TestNestedMessageHasBits_NestedMessage* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestNestedMessageHasBits_NestedMessage_Builder*) mergeFrom:(TestNestedMessageHasBits_NestedMessage*) other {
  if (other == [TestNestedMessageHasBits_NestedMessage defaultInstance]) {
    return self;
  }
  if (other.nestedmessageRepeatedInt32Array.count > 0) {
    if (result.nestedmessageRepeatedInt32Array == nil) {
      result.nestedmessageRepeatedInt32Array = [[other.nestedmessageRepeatedInt32Array copyWithZone:[other.nestedmessageRepeatedInt32Array zone]] autorelease];
    } else {
      [result.nestedmessageRepeatedInt32Array appendArray:other.nestedmessageRepeatedInt32Array];
    }
  }
  if (other.nestedmessageRepeatedForeignmessageArray.count > 0) {
    if (result.nestedmessageRepeatedForeignmessageArray == nil) {
      result.nestedmessageRepeatedForeignmessageArray = [[other.nestedmessageRepeatedForeignmessageArray copyWithZone:[other.nestedmessageRepeatedForeignmessageArray zone]] autorelease];
    } else {
      [result.nestedmessageRepeatedForeignmessageArray appendArray:other.nestedmessageRepeatedForeignmessageArray];
    }
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestNestedMessageHasBits_NestedMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestNestedMessageHasBits_NestedMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self addNestedmessageRepeatedInt32:[input readInt32]];
        break;
      }
      case 18: {
        ForeignMessage_Builder* subBuilder = [ForeignMessage builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addNestedmessageRepeatedForeignmessage:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (PBAppendableArray *)nestedmessageRepeatedInt32 {
  return result.nestedmessageRepeatedInt32Array;
}
- (int32_t)nestedmessageRepeatedInt32AtIndex:(NSUInteger)index {
  return [result nestedmessageRepeatedInt32AtIndex:index];
}
- (TestNestedMessageHasBits_NestedMessage_Builder *)addNestedmessageRepeatedInt32:(int32_t)value {
  if (result.nestedmessageRepeatedInt32Array == nil) {
    result.nestedmessageRepeatedInt32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.nestedmessageRepeatedInt32Array addInt32:value];
  return self;
}
- (TestNestedMessageHasBits_NestedMessage_Builder *)setNestedmessageRepeatedInt32Array:(NSArray *)array {
  result.nestedmessageRepeatedInt32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestNestedMessageHasBits_NestedMessage_Builder *)setNestedmessageRepeatedInt32Values:(const int32_t *)values count:(NSUInteger)count {
  result.nestedmessageRepeatedInt32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestNestedMessageHasBits_NestedMessage_Builder *)clearNestedmessageRepeatedInt32 {
  result.nestedmessageRepeatedInt32Array = nil;
  return self;
}
- (PBAppendableArray *)nestedmessageRepeatedForeignmessage {
  return result.nestedmessageRepeatedForeignmessageArray;
}
- (ForeignMessage*)nestedmessageRepeatedForeignmessageAtIndex:(NSUInteger)index {
  return [result nestedmessageRepeatedForeignmessageAtIndex:index];
}
- (TestNestedMessageHasBits_NestedMessage_Builder *)addNestedmessageRepeatedForeignmessage:(ForeignMessage*)value {
  if (result.nestedmessageRepeatedForeignmessageArray == nil) {
    result.nestedmessageRepeatedForeignmessageArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.nestedmessageRepeatedForeignmessageArray addObject:value];
  return self;
}
- (TestNestedMessageHasBits_NestedMessage_Builder *)setNestedmessageRepeatedForeignmessageArray:(NSArray *)array {
  result.nestedmessageRepeatedForeignmessageArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestNestedMessageHasBits_NestedMessage_Builder *)setNestedmessageRepeatedForeignmessageValues:(const ForeignMessage* *)values count:(NSUInteger)count {
  result.nestedmessageRepeatedForeignmessageArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestNestedMessageHasBits_NestedMessage_Builder *)clearNestedmessageRepeatedForeignmessage {
  result.nestedmessageRepeatedForeignmessageArray = nil;
  return self;
}
@end

@interface TestNestedMessageHasBits_Builder()
@property (retain) TestNestedMessageHasBits* result;
@end

@implementation TestNestedMessageHasBits_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestNestedMessageHasBits alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestNestedMessageHasBits_Builder*) clear {
  self.result = [[[TestNestedMessageHasBits alloc] init] autorelease];
  return self;
}
- (TestNestedMessageHasBits_Builder*) clone {
  return [TestNestedMessageHasBits builderWithPrototype:result];
}
- (TestNestedMessageHasBits*) defaultInstance {
  return [TestNestedMessageHasBits defaultInstance];
}
- (TestNestedMessageHasBits*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestNestedMessageHasBits*) buildPartial {
  TestNestedMessageHasBits* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestNestedMessageHasBits_Builder*) mergeFrom:(TestNestedMessageHasBits*) other {
  if (other == [TestNestedMessageHasBits defaultInstance]) {
    return self;
  }
  if (other.hasOptionalNestedMessage) {
    [self mergeOptionalNestedMessage:other.optionalNestedMessage];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestNestedMessageHasBits_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestNestedMessageHasBits_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 10: {
        TestNestedMessageHasBits_NestedMessage_Builder* subBuilder = [TestNestedMessageHasBits_NestedMessage builder];
        if (self.hasOptionalNestedMessage) {
          [subBuilder mergeFrom:self.optionalNestedMessage];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptionalNestedMessage:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasOptionalNestedMessage {
  return result.hasOptionalNestedMessage;
}
- (TestNestedMessageHasBits_NestedMessage*) optionalNestedMessage {
  return result.optionalNestedMessage;
}
- (TestNestedMessageHasBits_Builder*) setOptionalNestedMessage:(TestNestedMessageHasBits_NestedMessage*) value {
  result.hasOptionalNestedMessage = YES;
  result.optionalNestedMessage = value;
  return self;
}
- (TestNestedMessageHasBits_Builder*) setOptionalNestedMessageBuilder:(TestNestedMessageHasBits_NestedMessage_Builder*) builderForValue {
  return [self setOptionalNestedMessage:[builderForValue build]];
}
- (TestNestedMessageHasBits_Builder*) mergeOptionalNestedMessage:(TestNestedMessageHasBits_NestedMessage*) value {
  if (result.hasOptionalNestedMessage &&
      result.optionalNestedMessage != [TestNestedMessageHasBits_NestedMessage defaultInstance]) {
    result.optionalNestedMessage =
      [[[TestNestedMessageHasBits_NestedMessage builderWithPrototype:result.optionalNestedMessage] mergeFrom:value] buildPartial];
  } else {
    result.optionalNestedMessage = value;
  }
  result.hasOptionalNestedMessage = YES;
  return self;
}
- (TestNestedMessageHasBits_Builder*) clearOptionalNestedMessage {
  result.hasOptionalNestedMessage = NO;
  result.optionalNestedMessage = [TestNestedMessageHasBits_NestedMessage defaultInstance];
  return self;
}
@end

@interface TestCamelCaseFieldNames ()
@property int32_t primitiveField;
@property (retain) NSString* stringField;
@property ForeignEnum enumField;
@property (retain) ForeignMessage* messageField;
@property (retain) NSString* stringPieceField;
@property (retain) NSString* cordField;
@property (retain) PBAppendableArray * repeatedPrimitiveFieldArray;
@property (retain) PBAppendableArray * repeatedStringFieldArray;
@property (retain) PBAppendableArray * repeatedEnumFieldArray;
@property (retain) PBAppendableArray * repeatedMessageFieldArray;
@property (retain) PBAppendableArray * repeatedStringPieceFieldArray;
@property (retain) PBAppendableArray * repeatedCordFieldArray;
@end

@implementation TestCamelCaseFieldNames

- (BOOL) hasPrimitiveField {
  return !!hasPrimitiveField_;
}
- (void) setHasPrimitiveField:(BOOL) value {
  hasPrimitiveField_ = !!value;
}
@synthesize primitiveField;
- (BOOL) hasStringField {
  return !!hasStringField_;
}
- (void) setHasStringField:(BOOL) value {
  hasStringField_ = !!value;
}
@synthesize stringField;
- (BOOL) hasEnumField {
  return !!hasEnumField_;
}
- (void) setHasEnumField:(BOOL) value {
  hasEnumField_ = !!value;
}
@synthesize enumField;
- (BOOL) hasMessageField {
  return !!hasMessageField_;
}
- (void) setHasMessageField:(BOOL) value {
  hasMessageField_ = !!value;
}
@synthesize messageField;
- (BOOL) hasStringPieceField {
  return !!hasStringPieceField_;
}
- (void) setHasStringPieceField:(BOOL) value {
  hasStringPieceField_ = !!value;
}
@synthesize stringPieceField;
- (BOOL) hasCordField {
  return !!hasCordField_;
}
- (void) setHasCordField:(BOOL) value {
  hasCordField_ = !!value;
}
@synthesize cordField;
@synthesize repeatedPrimitiveFieldArray;
@dynamic repeatedPrimitiveField;
@synthesize repeatedStringFieldArray;
@dynamic repeatedStringField;
@synthesize repeatedEnumFieldArray;
@dynamic repeatedEnumField;
@synthesize repeatedMessageFieldArray;
@dynamic repeatedMessageField;
@synthesize repeatedStringPieceFieldArray;
@dynamic repeatedStringPieceField;
@synthesize repeatedCordFieldArray;
@dynamic repeatedCordField;
- (void) dealloc {
  self.stringField = nil;
  self.messageField = nil;
  self.stringPieceField = nil;
  self.cordField = nil;
  self.repeatedPrimitiveFieldArray = nil;
  self.repeatedStringFieldArray = nil;
  self.repeatedEnumFieldArray = nil;
  self.repeatedMessageFieldArray = nil;
  self.repeatedStringPieceFieldArray = nil;
  self.repeatedCordFieldArray = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.primitiveField = 0;
    self.stringField = @"";
    self.enumField = ForeignEnumForeignFoo;
    self.messageField = [ForeignMessage defaultInstance];
    self.stringPieceField = @"";
    self.cordField = @"";
  }
  return self;
}
static TestCamelCaseFieldNames* defaultTestCamelCaseFieldNamesInstance = nil;
+ (void) initialize {
  if (self == [TestCamelCaseFieldNames class]) {
    defaultTestCamelCaseFieldNamesInstance = [[TestCamelCaseFieldNames alloc] init];
  }
}
+ (TestCamelCaseFieldNames*) defaultInstance {
  return defaultTestCamelCaseFieldNamesInstance;
}
- (TestCamelCaseFieldNames*) defaultInstance {
  return defaultTestCamelCaseFieldNamesInstance;
}
- (PBArray *)repeatedPrimitiveField {
  return repeatedPrimitiveFieldArray;
}
- (int32_t)repeatedPrimitiveFieldAtIndex:(NSUInteger)index {
  return [repeatedPrimitiveFieldArray int32AtIndex:index];
}
- (PBArray *)repeatedStringField {
  return repeatedStringFieldArray;
}
- (NSString*)repeatedStringFieldAtIndex:(NSUInteger)index {
  return [repeatedStringFieldArray objectAtIndex:index];
}
- (PBArray *)repeatedEnumField {
  return repeatedEnumFieldArray;
}
- (ForeignEnum)repeatedEnumFieldAtIndex:(NSUInteger)index {
  return [repeatedEnumFieldArray int32AtIndex:index];
}
- (PBArray *)repeatedMessageField {
  return repeatedMessageFieldArray;
}
- (ForeignMessage*)repeatedMessageFieldAtIndex:(NSUInteger)index {
  return [repeatedMessageFieldArray objectAtIndex:index];
}
- (PBArray *)repeatedStringPieceField {
  return repeatedStringPieceFieldArray;
}
- (NSString*)repeatedStringPieceFieldAtIndex:(NSUInteger)index {
  return [repeatedStringPieceFieldArray objectAtIndex:index];
}
- (PBArray *)repeatedCordField {
  return repeatedCordFieldArray;
}
- (NSString*)repeatedCordFieldAtIndex:(NSUInteger)index {
  return [repeatedCordFieldArray objectAtIndex:index];
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasPrimitiveField) {
    [output writeInt32:1 value:self.primitiveField];
  }
  if (self.hasStringField) {
    [output writeString:2 value:self.stringField];
  }
  if (self.hasEnumField) {
    [output writeEnum:3 value:self.enumField];
  }
  if (self.hasMessageField) {
    [output writeMessage:4 value:self.messageField];
  }
  if (self.hasStringPieceField) {
    [output writeString:5 value:self.stringPieceField];
  }
  if (self.hasCordField) {
    [output writeString:6 value:self.cordField];
  }
  const NSUInteger repeatedPrimitiveFieldArrayCount = self.repeatedPrimitiveFieldArray.count;
  if (repeatedPrimitiveFieldArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.repeatedPrimitiveFieldArray.data;
    for (NSUInteger i = 0; i < repeatedPrimitiveFieldArrayCount; ++i) {
      [output writeInt32:7 value:values[i]];
    }
  }
  const NSUInteger repeatedStringFieldArrayCount = self.repeatedStringFieldArray.count;
  if (repeatedStringFieldArrayCount > 0) {
    const NSString* *values = (const NSString* *)self.repeatedStringFieldArray.data;
    for (NSUInteger i = 0; i < repeatedStringFieldArrayCount; ++i) {
      [output writeString:8 value:values[i]];
    }
  }
  const NSUInteger repeatedEnumFieldArrayCount = self.repeatedEnumFieldArray.count;
  const ForeignEnum *repeatedEnumFieldArrayValues = (const ForeignEnum *)self.repeatedEnumFieldArray.data;
  for (NSUInteger i = 0; i < repeatedEnumFieldArrayCount; ++i) {
    [output writeEnum:9 value:repeatedEnumFieldArrayValues[i]];
  }
  for (ForeignMessage *element in self.repeatedMessageFieldArray) {
    [output writeMessage:10 value:element];
  }
  const NSUInteger repeatedStringPieceFieldArrayCount = self.repeatedStringPieceFieldArray.count;
  if (repeatedStringPieceFieldArrayCount > 0) {
    const NSString* *values = (const NSString* *)self.repeatedStringPieceFieldArray.data;
    for (NSUInteger i = 0; i < repeatedStringPieceFieldArrayCount; ++i) {
      [output writeString:11 value:values[i]];
    }
  }
  const NSUInteger repeatedCordFieldArrayCount = self.repeatedCordFieldArray.count;
  if (repeatedCordFieldArrayCount > 0) {
    const NSString* *values = (const NSString* *)self.repeatedCordFieldArray.data;
    for (NSUInteger i = 0; i < repeatedCordFieldArrayCount; ++i) {
      [output writeString:12 value:values[i]];
    }
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasPrimitiveField) {
    size += computeInt32Size(1, self.primitiveField);
  }
  if (self.hasStringField) {
    size += computeStringSize(2, self.stringField);
  }
  if (self.hasEnumField) {
    size += computeEnumSize(3, self.enumField);
  }
  if (self.hasMessageField) {
    size += computeMessageSize(4, self.messageField);
  }
  if (self.hasStringPieceField) {
    size += computeStringSize(5, self.stringPieceField);
  }
  if (self.hasCordField) {
    size += computeStringSize(6, self.cordField);
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedPrimitiveFieldArray.count;
    const int32_t *values = (const int32_t *)self.repeatedPrimitiveFieldArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 1 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedStringFieldArray.count;
    const NSString* *values = (const NSString* *)self.repeatedStringFieldArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeStringSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 1 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedEnumFieldArray.count;
    const ForeignEnum *values = (const ForeignEnum *)self.repeatedEnumFieldArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeEnumSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 1 * count;
  }
  for (ForeignMessage *element in self.repeatedMessageFieldArray) {
    size += computeMessageSize(10, element);
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedStringPieceFieldArray.count;
    const NSString* *values = (const NSString* *)self.repeatedStringPieceFieldArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeStringSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 1 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedCordFieldArray.count;
    const NSString* *values = (const NSString* *)self.repeatedCordFieldArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeStringSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 1 * count;
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestCamelCaseFieldNames*) parseFromData:(NSData*) data {
  return (TestCamelCaseFieldNames*)[[[TestCamelCaseFieldNames builder] mergeFromData:data] build];
}
+ (TestCamelCaseFieldNames*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestCamelCaseFieldNames*)[[[TestCamelCaseFieldNames builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestCamelCaseFieldNames*) parseFromInputStream:(NSInputStream*) input {
  return (TestCamelCaseFieldNames*)[[[TestCamelCaseFieldNames builder] mergeFromInputStream:input] build];
}
+ (TestCamelCaseFieldNames*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestCamelCaseFieldNames*)[[[TestCamelCaseFieldNames builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestCamelCaseFieldNames*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestCamelCaseFieldNames*)[[[TestCamelCaseFieldNames builder] mergeFromCodedInputStream:input] build];
}
+ (TestCamelCaseFieldNames*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestCamelCaseFieldNames*)[[[TestCamelCaseFieldNames builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestCamelCaseFieldNames_Builder*) builder {
  return [[[TestCamelCaseFieldNames_Builder alloc] init] autorelease];
}
+ (TestCamelCaseFieldNames_Builder*) builderWithPrototype:(TestCamelCaseFieldNames*) prototype {
  return [[TestCamelCaseFieldNames builder] mergeFrom:prototype];
}
- (TestCamelCaseFieldNames_Builder*) builder {
  return [TestCamelCaseFieldNames builder];
}
- (TestCamelCaseFieldNames_Builder*) toBuilder {
  return [TestCamelCaseFieldNames builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasPrimitiveField) {
    [output appendFormat:@"%@%@: %@\n", indent, @"primitiveField", [NSNumber numberWithInt:self.primitiveField]];
  }
  if (self.hasStringField) {
    [output appendFormat:@"%@%@: %@\n", indent, @"stringField", self.stringField];
  }
  if (self.hasEnumField) {
    [output appendFormat:@"%@%@: %d\n", indent, @"enumField", self.enumField];
  }
  if (self.hasMessageField) {
    [output appendFormat:@"%@%@ {\n", indent, @"messageField"];
    [self.messageField writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasStringPieceField) {
    [output appendFormat:@"%@%@: %@\n", indent, @"stringPieceField", self.stringPieceField];
  }
  if (self.hasCordField) {
    [output appendFormat:@"%@%@: %@\n", indent, @"cordField", self.cordField];
  }
  for (NSNumber* value in self.repeatedPrimitiveFieldArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedPrimitiveField", value];
  }
  for (NSString* element in self.repeatedStringFieldArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedStringField", element];
  }
  for (NSNumber* element in self.repeatedEnumFieldArray) {
    [output appendFormat:@"%@%@: %d\n", indent, @"repeatedEnumField", element.intValue];
  }
  for (ForeignMessage* element in self.repeatedMessageFieldArray) {
    [output appendFormat:@"%@%@ {\n", indent, @"repeatedMessageField"];
    [element writeDescriptionTo:output
                     withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  for (NSString* element in self.repeatedStringPieceFieldArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedStringPieceField", element];
  }
  for (NSString* element in self.repeatedCordFieldArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedCordField", element];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestCamelCaseFieldNames class]]) {
    return NO;
  }
  TestCamelCaseFieldNames *otherMessage = other;
  return
      self.hasPrimitiveField == otherMessage.hasPrimitiveField &&
      (!self.hasPrimitiveField || self.primitiveField == otherMessage.primitiveField) &&
      
      self.hasStringField == otherMessage.hasStringField &&
      (!self.hasStringField || [self.stringField isEqual:otherMessage.stringField]) &&
      
      self.hasEnumField == otherMessage.hasEnumField &&
      (!self.hasEnumField || self.enumField != otherMessage.enumField) &&
      
      self.hasMessageField == otherMessage.hasMessageField &&
      (!self.hasMessageField || [self.messageField isEqual:otherMessage.messageField]) &&
      
      self.hasStringPieceField == otherMessage.hasStringPieceField &&
      (!self.hasStringPieceField || [self.stringPieceField isEqual:otherMessage.stringPieceField]) &&
      
      self.hasCordField == otherMessage.hasCordField &&
      (!self.hasCordField || [self.cordField isEqual:otherMessage.cordField]) &&
      
      [self.repeatedPrimitiveFieldArray isEqualToArray:otherMessage.repeatedPrimitiveFieldArray] &&
      
      [self.repeatedStringFieldArray isEqualToArray:otherMessage.repeatedStringFieldArray] &&
      
      [self.repeatedEnumFieldArray isEqualToArray:otherMessage.repeatedEnumFieldArray] &&
      
      [self.repeatedMessageFieldArray isEqualToArray:otherMessage.repeatedMessageFieldArray] &&
      
      [self.repeatedStringPieceFieldArray isEqualToArray:otherMessage.repeatedStringPieceFieldArray] &&
      
      [self.repeatedCordFieldArray isEqualToArray:otherMessage.repeatedCordFieldArray] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasPrimitiveField) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.primitiveField] hash];
  }
  if (self.hasStringField) {
    hashCode = hashCode * 31 + [self.stringField hash];
  }
  if (self.hasEnumField) {
    hashCode = hashCode * 31 + self.enumField;
  }
  if (self.hasMessageField) {
    hashCode = hashCode * 31 + [self.messageField hash];
  }
  if (self.hasStringPieceField) {
    hashCode = hashCode * 31 + [self.stringPieceField hash];
  }
  if (self.hasCordField) {
    hashCode = hashCode * 31 + [self.cordField hash];
  }
  for (NSNumber* value in self.repeatedPrimitiveFieldArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSString* element in self.repeatedStringFieldArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (NSNumber* element in self.repeatedEnumFieldArray) {
    hashCode = hashCode * 31 + element.intValue;
  }
  for (ForeignMessage* element in self.repeatedMessageFieldArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (NSString* element in self.repeatedStringPieceFieldArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (NSString* element in self.repeatedCordFieldArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestCamelCaseFieldNames_Builder()
@property (retain) TestCamelCaseFieldNames* result;
@end

@implementation TestCamelCaseFieldNames_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestCamelCaseFieldNames alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestCamelCaseFieldNames_Builder*) clear {
  self.result = [[[TestCamelCaseFieldNames alloc] init] autorelease];
  return self;
}
- (TestCamelCaseFieldNames_Builder*) clone {
  return [TestCamelCaseFieldNames builderWithPrototype:result];
}
- (TestCamelCaseFieldNames*) defaultInstance {
  return [TestCamelCaseFieldNames defaultInstance];
}
- (TestCamelCaseFieldNames*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestCamelCaseFieldNames*) buildPartial {
  TestCamelCaseFieldNames* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestCamelCaseFieldNames_Builder*) mergeFrom:(TestCamelCaseFieldNames*) other {
  if (other == [TestCamelCaseFieldNames defaultInstance]) {
    return self;
  }
  if (other.hasPrimitiveField) {
    [self setPrimitiveField:other.primitiveField];
  }
  if (other.hasStringField) {
    [self setStringField:other.stringField];
  }
  if (other.hasEnumField) {
    [self setEnumField:other.enumField];
  }
  if (other.hasMessageField) {
    [self mergeMessageField:other.messageField];
  }
  if (other.hasStringPieceField) {
    [self setStringPieceField:other.stringPieceField];
  }
  if (other.hasCordField) {
    [self setCordField:other.cordField];
  }
  if (other.repeatedPrimitiveFieldArray.count > 0) {
    if (result.repeatedPrimitiveFieldArray == nil) {
      result.repeatedPrimitiveFieldArray = [[other.repeatedPrimitiveFieldArray copyWithZone:[other.repeatedPrimitiveFieldArray zone]] autorelease];
    } else {
      [result.repeatedPrimitiveFieldArray appendArray:other.repeatedPrimitiveFieldArray];
    }
  }
  if (other.repeatedStringFieldArray.count > 0) {
    if (result.repeatedStringFieldArray == nil) {
      result.repeatedStringFieldArray = [[other.repeatedStringFieldArray copyWithZone:[other.repeatedStringFieldArray zone]] autorelease];
    } else {
      [result.repeatedStringFieldArray appendArray:other.repeatedStringFieldArray];
    }
  }
  if (other.repeatedEnumFieldArray.count > 0) {
    if (result.repeatedEnumFieldArray == nil) {
      result.repeatedEnumFieldArray = [[other.repeatedEnumFieldArray copyWithZone:[other.repeatedEnumFieldArray zone]] autorelease];
    } else {
      [result.repeatedEnumFieldArray appendArray:other.repeatedEnumFieldArray];
    }
  }
  if (other.repeatedMessageFieldArray.count > 0) {
    if (result.repeatedMessageFieldArray == nil) {
      result.repeatedMessageFieldArray = [[other.repeatedMessageFieldArray copyWithZone:[other.repeatedMessageFieldArray zone]] autorelease];
    } else {
      [result.repeatedMessageFieldArray appendArray:other.repeatedMessageFieldArray];
    }
  }
  if (other.repeatedStringPieceFieldArray.count > 0) {
    if (result.repeatedStringPieceFieldArray == nil) {
      result.repeatedStringPieceFieldArray = [[other.repeatedStringPieceFieldArray copyWithZone:[other.repeatedStringPieceFieldArray zone]] autorelease];
    } else {
      [result.repeatedStringPieceFieldArray appendArray:other.repeatedStringPieceFieldArray];
    }
  }
  if (other.repeatedCordFieldArray.count > 0) {
    if (result.repeatedCordFieldArray == nil) {
      result.repeatedCordFieldArray = [[other.repeatedCordFieldArray copyWithZone:[other.repeatedCordFieldArray zone]] autorelease];
    } else {
      [result.repeatedCordFieldArray appendArray:other.repeatedCordFieldArray];
    }
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestCamelCaseFieldNames_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestCamelCaseFieldNames_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setPrimitiveField:[input readInt32]];
        break;
      }
      case 18: {
        [self setStringField:[input readString]];
        break;
      }
      case 24: {
        int32_t value = [input readEnum];
        if (ForeignEnumIsValidValue(value)) {
          [self setEnumField:value];
        } else {
          [unknownFields mergeVarintField:3 value:value];
        }
        break;
      }
      case 34: {
        ForeignMessage_Builder* subBuilder = [ForeignMessage builder];
        if (self.hasMessageField) {
          [subBuilder mergeFrom:self.messageField];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setMessageField:[subBuilder buildPartial]];
        break;
      }
      case 42: {
        [self setStringPieceField:[input readString]];
        break;
      }
      case 50: {
        [self setCordField:[input readString]];
        break;
      }
      case 56: {
        [self addRepeatedPrimitiveField:[input readInt32]];
        break;
      }
      case 66: {
        [self addRepeatedStringField:[input readString]];
        break;
      }
      case 72: {
        int32_t value = [input readEnum];
        if (ForeignEnumIsValidValue(value)) {
          [self addRepeatedEnumField:value];
        } else {
          [unknownFields mergeVarintField:9 value:value];
        }
        break;
      }
      case 82: {
        ForeignMessage_Builder* subBuilder = [ForeignMessage builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addRepeatedMessageField:[subBuilder buildPartial]];
        break;
      }
      case 90: {
        [self addRepeatedStringPieceField:[input readString]];
        break;
      }
      case 98: {
        [self addRepeatedCordField:[input readString]];
        break;
      }
    }
  }
}
- (BOOL) hasPrimitiveField {
  return result.hasPrimitiveField;
}
- (int32_t) primitiveField {
  return result.primitiveField;
}
- (TestCamelCaseFieldNames_Builder*) setPrimitiveField:(int32_t) value {
  result.hasPrimitiveField = YES;
  result.primitiveField = value;
  return self;
}
- (TestCamelCaseFieldNames_Builder*) clearPrimitiveField {
  result.hasPrimitiveField = NO;
  result.primitiveField = 0;
  return self;
}
- (BOOL) hasStringField {
  return result.hasStringField;
}
- (NSString*) stringField {
  return result.stringField;
}
- (TestCamelCaseFieldNames_Builder*) setStringField:(NSString*) value {
  result.hasStringField = YES;
  result.stringField = value;
  return self;
}
- (TestCamelCaseFieldNames_Builder*) clearStringField {
  result.hasStringField = NO;
  result.stringField = @"";
  return self;
}
- (BOOL) hasEnumField {
  return result.hasEnumField;
}
- (ForeignEnum) enumField {
  return result.enumField;
}
- (TestCamelCaseFieldNames_Builder*) setEnumField:(ForeignEnum) value {
  result.hasEnumField = YES;
  result.enumField = value;
  return self;
}
- (TestCamelCaseFieldNames_Builder*) clearEnumField {
  result.hasEnumField = NO;
  result.enumField = ForeignEnumForeignFoo;
  return self;
}
- (BOOL) hasMessageField {
  return result.hasMessageField;
}
- (ForeignMessage*) messageField {
  return result.messageField;
}
- (TestCamelCaseFieldNames_Builder*) setMessageField:(ForeignMessage*) value {
  result.hasMessageField = YES;
  result.messageField = value;
  return self;
}
- (TestCamelCaseFieldNames_Builder*) setMessageFieldBuilder:(ForeignMessage_Builder*) builderForValue {
  return [self setMessageField:[builderForValue build]];
}
- (TestCamelCaseFieldNames_Builder*) mergeMessageField:(ForeignMessage*) value {
  if (result.hasMessageField &&
      result.messageField != [ForeignMessage defaultInstance]) {
    result.messageField =
      [[[ForeignMessage builderWithPrototype:result.messageField] mergeFrom:value] buildPartial];
  } else {
    result.messageField = value;
  }
  result.hasMessageField = YES;
  return self;
}
- (TestCamelCaseFieldNames_Builder*) clearMessageField {
  result.hasMessageField = NO;
  result.messageField = [ForeignMessage defaultInstance];
  return self;
}
- (BOOL) hasStringPieceField {
  return result.hasStringPieceField;
}
- (NSString*) stringPieceField {
  return result.stringPieceField;
}
- (TestCamelCaseFieldNames_Builder*) setStringPieceField:(NSString*) value {
  result.hasStringPieceField = YES;
  result.stringPieceField = value;
  return self;
}
- (TestCamelCaseFieldNames_Builder*) clearStringPieceField {
  result.hasStringPieceField = NO;
  result.stringPieceField = @"";
  return self;
}
- (BOOL) hasCordField {
  return result.hasCordField;
}
- (NSString*) cordField {
  return result.cordField;
}
- (TestCamelCaseFieldNames_Builder*) setCordField:(NSString*) value {
  result.hasCordField = YES;
  result.cordField = value;
  return self;
}
- (TestCamelCaseFieldNames_Builder*) clearCordField {
  result.hasCordField = NO;
  result.cordField = @"";
  return self;
}
- (PBAppendableArray *)repeatedPrimitiveField {
  return result.repeatedPrimitiveFieldArray;
}
- (int32_t)repeatedPrimitiveFieldAtIndex:(NSUInteger)index {
  return [result repeatedPrimitiveFieldAtIndex:index];
}
- (TestCamelCaseFieldNames_Builder *)addRepeatedPrimitiveField:(int32_t)value {
  if (result.repeatedPrimitiveFieldArray == nil) {
    result.repeatedPrimitiveFieldArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.repeatedPrimitiveFieldArray addInt32:value];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedPrimitiveFieldArray:(NSArray *)array {
  result.repeatedPrimitiveFieldArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedPrimitiveFieldValues:(const int32_t *)values count:(NSUInteger)count {
  result.repeatedPrimitiveFieldArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)clearRepeatedPrimitiveField {
  result.repeatedPrimitiveFieldArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedStringField {
  return result.repeatedStringFieldArray;
}
- (NSString*)repeatedStringFieldAtIndex:(NSUInteger)index {
  return [result repeatedStringFieldAtIndex:index];
}
- (TestCamelCaseFieldNames_Builder *)addRepeatedStringField:(NSString*)value {
  if (result.repeatedStringFieldArray == nil) {
    result.repeatedStringFieldArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedStringFieldArray addObject:value];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedStringFieldArray:(NSArray *)array {
  result.repeatedStringFieldArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedStringFieldValues:(const NSString* *)values count:(NSUInteger)count {
  result.repeatedStringFieldArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)clearRepeatedStringField {
  result.repeatedStringFieldArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedEnumField {
  return result.repeatedEnumFieldArray;
}
- (ForeignEnum)repeatedEnumFieldAtIndex:(NSUInteger)index {
  return [result repeatedEnumFieldAtIndex:index];
}
- (TestCamelCaseFieldNames_Builder *)addRepeatedEnumField:(ForeignEnum)value {
  if (result.repeatedEnumFieldArray == nil) {
    result.repeatedEnumFieldArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.repeatedEnumFieldArray addInt32:value];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedEnumFieldArray:(NSArray *)array {
  result.repeatedEnumFieldArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedEnumFieldValues:(const ForeignEnum *)values count:(NSUInteger)count {
  result.repeatedEnumFieldArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)clearRepeatedEnumField {
  result.repeatedEnumFieldArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedMessageField {
  return result.repeatedMessageFieldArray;
}
- (ForeignMessage*)repeatedMessageFieldAtIndex:(NSUInteger)index {
  return [result repeatedMessageFieldAtIndex:index];
}
- (TestCamelCaseFieldNames_Builder *)addRepeatedMessageField:(ForeignMessage*)value {
  if (result.repeatedMessageFieldArray == nil) {
    result.repeatedMessageFieldArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedMessageFieldArray addObject:value];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedMessageFieldArray:(NSArray *)array {
  result.repeatedMessageFieldArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedMessageFieldValues:(const ForeignMessage* *)values count:(NSUInteger)count {
  result.repeatedMessageFieldArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)clearRepeatedMessageField {
  result.repeatedMessageFieldArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedStringPieceField {
  return result.repeatedStringPieceFieldArray;
}
- (NSString*)repeatedStringPieceFieldAtIndex:(NSUInteger)index {
  return [result repeatedStringPieceFieldAtIndex:index];
}
- (TestCamelCaseFieldNames_Builder *)addRepeatedStringPieceField:(NSString*)value {
  if (result.repeatedStringPieceFieldArray == nil) {
    result.repeatedStringPieceFieldArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedStringPieceFieldArray addObject:value];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedStringPieceFieldArray:(NSArray *)array {
  result.repeatedStringPieceFieldArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedStringPieceFieldValues:(const NSString* *)values count:(NSUInteger)count {
  result.repeatedStringPieceFieldArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)clearRepeatedStringPieceField {
  result.repeatedStringPieceFieldArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedCordField {
  return result.repeatedCordFieldArray;
}
- (NSString*)repeatedCordFieldAtIndex:(NSUInteger)index {
  return [result repeatedCordFieldAtIndex:index];
}
- (TestCamelCaseFieldNames_Builder *)addRepeatedCordField:(NSString*)value {
  if (result.repeatedCordFieldArray == nil) {
    result.repeatedCordFieldArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedCordFieldArray addObject:value];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedCordFieldArray:(NSArray *)array {
  result.repeatedCordFieldArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)setRepeatedCordFieldValues:(const NSString* *)values count:(NSUInteger)count {
  result.repeatedCordFieldArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestCamelCaseFieldNames_Builder *)clearRepeatedCordField {
  result.repeatedCordFieldArray = nil;
  return self;
}
@end

@interface TestFieldOrderings ()
@property (retain) NSString* myString;
@property int64_t myInt;
@property Float32 myFloat;
@end

@implementation TestFieldOrderings

- (BOOL) hasMyString {
  return !!hasMyString_;
}
- (void) setHasMyString:(BOOL) value {
  hasMyString_ = !!value;
}
@synthesize myString;
- (BOOL) hasMyInt {
  return !!hasMyInt_;
}
- (void) setHasMyInt:(BOOL) value {
  hasMyInt_ = !!value;
}
@synthesize myInt;
- (BOOL) hasMyFloat {
  return !!hasMyFloat_;
}
- (void) setHasMyFloat:(BOOL) value {
  hasMyFloat_ = !!value;
}
@synthesize myFloat;
- (void) dealloc {
  self.myString = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.myString = @"";
    self.myInt = 0L;
    self.myFloat = 0;
  }
  return self;
}
static TestFieldOrderings* defaultTestFieldOrderingsInstance = nil;
+ (void) initialize {
  if (self == [TestFieldOrderings class]) {
    defaultTestFieldOrderingsInstance = [[TestFieldOrderings alloc] init];
  }
}
+ (TestFieldOrderings*) defaultInstance {
  return defaultTestFieldOrderingsInstance;
}
- (TestFieldOrderings*) defaultInstance {
  return defaultTestFieldOrderingsInstance;
}
- (BOOL) isInitialized {
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasMyInt) {
    [output writeInt64:1 value:self.myInt];
  }
  [self writeExtensionsToCodedOutputStream:output
                                      from:2
                                        to:11];
  if (self.hasMyString) {
    [output writeString:11 value:self.myString];
  }
  [self writeExtensionsToCodedOutputStream:output
                                      from:12
                                        to:101];
  if (self.hasMyFloat) {
    [output writeFloat:101 value:self.myFloat];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasMyInt) {
    size += computeInt64Size(1, self.myInt);
  }
  if (self.hasMyString) {
    size += computeStringSize(11, self.myString);
  }
  if (self.hasMyFloat) {
    size += computeFloatSize(101, self.myFloat);
  }
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestFieldOrderings*) parseFromData:(NSData*) data {
  return (TestFieldOrderings*)[[[TestFieldOrderings builder] mergeFromData:data] build];
}
+ (TestFieldOrderings*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestFieldOrderings*)[[[TestFieldOrderings builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestFieldOrderings*) parseFromInputStream:(NSInputStream*) input {
  return (TestFieldOrderings*)[[[TestFieldOrderings builder] mergeFromInputStream:input] build];
}
+ (TestFieldOrderings*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestFieldOrderings*)[[[TestFieldOrderings builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestFieldOrderings*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestFieldOrderings*)[[[TestFieldOrderings builder] mergeFromCodedInputStream:input] build];
}
+ (TestFieldOrderings*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestFieldOrderings*)[[[TestFieldOrderings builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestFieldOrderings_Builder*) builder {
  return [[[TestFieldOrderings_Builder alloc] init] autorelease];
}
+ (TestFieldOrderings_Builder*) builderWithPrototype:(TestFieldOrderings*) prototype {
  return [[TestFieldOrderings builder] mergeFrom:prototype];
}
- (TestFieldOrderings_Builder*) builder {
  return [TestFieldOrderings builder];
}
- (TestFieldOrderings_Builder*) toBuilder {
  return [TestFieldOrderings builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasMyInt) {
    [output appendFormat:@"%@%@: %@\n", indent, @"myInt", [NSNumber numberWithLongLong:self.myInt]];
  }
  [self writeExtensionDescriptionToMutableString:(NSMutableString*)output
                                            from:2
                                              to:11
                                      withIndent:indent];
  if (self.hasMyString) {
    [output appendFormat:@"%@%@: %@\n", indent, @"myString", self.myString];
  }
  [self writeExtensionDescriptionToMutableString:(NSMutableString*)output
                                            from:12
                                              to:101
                                      withIndent:indent];
  if (self.hasMyFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"myFloat", [NSNumber numberWithFloat:self.myFloat]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestFieldOrderings class]]) {
    return NO;
  }
  TestFieldOrderings *otherMessage = other;
  return
      self.hasMyInt == otherMessage.hasMyInt &&
      (!self.hasMyInt || self.myInt == otherMessage.myInt) &&
      
      [self isEqualExtensionsInOther:otherMessage from:2 to:11] &&
      
      self.hasMyString == otherMessage.hasMyString &&
      (!self.hasMyString || [self.myString isEqual:otherMessage.myString]) &&
      
      [self isEqualExtensionsInOther:otherMessage from:12 to:101] &&
      
      self.hasMyFloat == otherMessage.hasMyFloat &&
      (!self.hasMyFloat || self.myFloat == otherMessage.myFloat) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasMyInt) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.myInt] hash];
  }
  hashCode = hashCode * 31 + [self hashExtensionsFrom:2 to:11];
  if (self.hasMyString) {
    hashCode = hashCode * 31 + [self.myString hash];
  }
  hashCode = hashCode * 31 + [self hashExtensionsFrom:12 to:101];
  if (self.hasMyFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.myFloat] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestFieldOrderings_Builder()
@property (retain) TestFieldOrderings* result;
@end

@implementation TestFieldOrderings_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestFieldOrderings alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (TestFieldOrderings_Builder*) clear {
  self.result = [[[TestFieldOrderings alloc] init] autorelease];
  return self;
}
- (TestFieldOrderings_Builder*) clone {
  return [TestFieldOrderings builderWithPrototype:result];
}
- (TestFieldOrderings*) defaultInstance {
  return [TestFieldOrderings defaultInstance];
}
- (TestFieldOrderings*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestFieldOrderings*) buildPartial {
  TestFieldOrderings* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestFieldOrderings_Builder*) mergeFrom:(TestFieldOrderings*) other {
  if (other == [TestFieldOrderings defaultInstance]) {
    return self;
  }
  if (other.hasMyString) {
    [self setMyString:other.myString];
  }
  if (other.hasMyInt) {
    [self setMyInt:other.myInt];
  }
  if (other.hasMyFloat) {
    [self setMyFloat:other.myFloat];
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestFieldOrderings_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestFieldOrderings_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        [self setMyInt:[input readInt64]];
        break;
      }
      case 90: {
        [self setMyString:[input readString]];
        break;
      }
      case 813: {
        [self setMyFloat:[input readFloat]];
        break;
      }
    }
  }
}
- (BOOL) hasMyString {
  return result.hasMyString;
}
- (NSString*) myString {
  return result.myString;
}
- (TestFieldOrderings_Builder*) setMyString:(NSString*) value {
  result.hasMyString = YES;
  result.myString = value;
  return self;
}
- (TestFieldOrderings_Builder*) clearMyString {
  result.hasMyString = NO;
  result.myString = @"";
  return self;
}
- (BOOL) hasMyInt {
  return result.hasMyInt;
}
- (int64_t) myInt {
  return result.myInt;
}
- (TestFieldOrderings_Builder*) setMyInt:(int64_t) value {
  result.hasMyInt = YES;
  result.myInt = value;
  return self;
}
- (TestFieldOrderings_Builder*) clearMyInt {
  result.hasMyInt = NO;
  result.myInt = 0L;
  return self;
}
- (BOOL) hasMyFloat {
  return result.hasMyFloat;
}
- (Float32) myFloat {
  return result.myFloat;
}
- (TestFieldOrderings_Builder*) setMyFloat:(Float32) value {
  result.hasMyFloat = YES;
  result.myFloat = value;
  return self;
}
- (TestFieldOrderings_Builder*) clearMyFloat {
  result.hasMyFloat = NO;
  result.myFloat = 0;
  return self;
}
@end

@interface TestExtremeDefaultValues ()
@property (retain) NSData* escapedBytes;
@property uint32_t largeUint32;
@property uint64_t largeUint64;
@property int32_t smallInt32;
@property int64_t smallInt64;
@property (retain) NSString* utf8String;
@property Float32 zeroFloat;
@property Float32 oneFloat;
@property Float32 smallFloat;
@property Float32 negativeOneFloat;
@property Float32 negativeFloat;
@property Float32 largeFloat;
@property Float32 smallNegativeFloat;
@property Float64 infDouble;
@property Float64 negInfDouble;
@property Float64 nanDouble;
@property Float32 infFloat;
@property Float32 negInfFloat;
@property Float32 nanFloat;
@property (retain) NSString* cppTrigraph;
@end

@implementation TestExtremeDefaultValues

- (BOOL) hasEscapedBytes {
  return !!hasEscapedBytes_;
}
- (void) setHasEscapedBytes:(BOOL) value {
  hasEscapedBytes_ = !!value;
}
@synthesize escapedBytes;
- (BOOL) hasLargeUint32 {
  return !!hasLargeUint32_;
}
- (void) setHasLargeUint32:(BOOL) value {
  hasLargeUint32_ = !!value;
}
@synthesize largeUint32;
- (BOOL) hasLargeUint64 {
  return !!hasLargeUint64_;
}
- (void) setHasLargeUint64:(BOOL) value {
  hasLargeUint64_ = !!value;
}
@synthesize largeUint64;
- (BOOL) hasSmallInt32 {
  return !!hasSmallInt32_;
}
- (void) setHasSmallInt32:(BOOL) value {
  hasSmallInt32_ = !!value;
}
@synthesize smallInt32;
- (BOOL) hasSmallInt64 {
  return !!hasSmallInt64_;
}
- (void) setHasSmallInt64:(BOOL) value {
  hasSmallInt64_ = !!value;
}
@synthesize smallInt64;
- (BOOL) hasUtf8String {
  return !!hasUtf8String_;
}
- (void) setHasUtf8String:(BOOL) value {
  hasUtf8String_ = !!value;
}
@synthesize utf8String;
- (BOOL) hasZeroFloat {
  return !!hasZeroFloat_;
}
- (void) setHasZeroFloat:(BOOL) value {
  hasZeroFloat_ = !!value;
}
@synthesize zeroFloat;
- (BOOL) hasOneFloat {
  return !!hasOneFloat_;
}
- (void) setHasOneFloat:(BOOL) value {
  hasOneFloat_ = !!value;
}
@synthesize oneFloat;
- (BOOL) hasSmallFloat {
  return !!hasSmallFloat_;
}
- (void) setHasSmallFloat:(BOOL) value {
  hasSmallFloat_ = !!value;
}
@synthesize smallFloat;
- (BOOL) hasNegativeOneFloat {
  return !!hasNegativeOneFloat_;
}
- (void) setHasNegativeOneFloat:(BOOL) value {
  hasNegativeOneFloat_ = !!value;
}
@synthesize negativeOneFloat;
- (BOOL) hasNegativeFloat {
  return !!hasNegativeFloat_;
}
- (void) setHasNegativeFloat:(BOOL) value {
  hasNegativeFloat_ = !!value;
}
@synthesize negativeFloat;
- (BOOL) hasLargeFloat {
  return !!hasLargeFloat_;
}
- (void) setHasLargeFloat:(BOOL) value {
  hasLargeFloat_ = !!value;
}
@synthesize largeFloat;
- (BOOL) hasSmallNegativeFloat {
  return !!hasSmallNegativeFloat_;
}
- (void) setHasSmallNegativeFloat:(BOOL) value {
  hasSmallNegativeFloat_ = !!value;
}
@synthesize smallNegativeFloat;
- (BOOL) hasInfDouble {
  return !!hasInfDouble_;
}
- (void) setHasInfDouble:(BOOL) value {
  hasInfDouble_ = !!value;
}
@synthesize infDouble;
- (BOOL) hasNegInfDouble {
  return !!hasNegInfDouble_;
}
- (void) setHasNegInfDouble:(BOOL) value {
  hasNegInfDouble_ = !!value;
}
@synthesize negInfDouble;
- (BOOL) hasNanDouble {
  return !!hasNanDouble_;
}
- (void) setHasNanDouble:(BOOL) value {
  hasNanDouble_ = !!value;
}
@synthesize nanDouble;
- (BOOL) hasInfFloat {
  return !!hasInfFloat_;
}
- (void) setHasInfFloat:(BOOL) value {
  hasInfFloat_ = !!value;
}
@synthesize infFloat;
- (BOOL) hasNegInfFloat {
  return !!hasNegInfFloat_;
}
- (void) setHasNegInfFloat:(BOOL) value {
  hasNegInfFloat_ = !!value;
}
@synthesize negInfFloat;
- (BOOL) hasNanFloat {
  return !!hasNanFloat_;
}
- (void) setHasNanFloat:(BOOL) value {
  hasNanFloat_ = !!value;
}
@synthesize nanFloat;
- (BOOL) hasCppTrigraph {
  return !!hasCppTrigraph_;
}
- (void) setHasCppTrigraph:(BOOL) value {
  hasCppTrigraph_ = !!value;
}
@synthesize cppTrigraph;
- (void) dealloc {
  self.escapedBytes = nil;
  self.utf8String = nil;
  self.cppTrigraph = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.escapedBytes = [NSData dataWithBytes:"\000\001\007\010\014\n\r\t\013\\\'\"\376" length:13];
    self.largeUint32 = -1;
    self.largeUint64 = -1L;
    self.smallInt32 = -2147483647;
    self.smallInt64 = -9223372036854775807L;
    self.utf8String = [NSString stringWithUTF8String:"\341\210\264"];
    self.zeroFloat = 0;
    self.oneFloat = 1;
    self.smallFloat = 1.5;
    self.negativeOneFloat = -1;
    self.negativeFloat = -1.5;
    self.largeFloat = 2e+08;
    self.smallNegativeFloat = -8e-28;
    self.infDouble = HUGE_VAL;
    self.negInfDouble = -HUGE_VAL;
    self.nanDouble = NAN;
    self.infFloat = HUGE_VALF;
    self.negInfFloat = -HUGE_VALF;
    self.nanFloat = NAN;
    self.cppTrigraph = @"\? \? \?\? \?\? \?\?\? \?\?/ \?\?-";
  }
  return self;
}
static TestExtremeDefaultValues* defaultTestExtremeDefaultValuesInstance = nil;
+ (void) initialize {
  if (self == [TestExtremeDefaultValues class]) {
    defaultTestExtremeDefaultValuesInstance = [[TestExtremeDefaultValues alloc] init];
  }
}
+ (TestExtremeDefaultValues*) defaultInstance {
  return defaultTestExtremeDefaultValuesInstance;
}
- (TestExtremeDefaultValues*) defaultInstance {
  return defaultTestExtremeDefaultValuesInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasEscapedBytes) {
    [output writeData:1 value:self.escapedBytes];
  }
  if (self.hasLargeUint32) {
    [output writeUInt32:2 value:self.largeUint32];
  }
  if (self.hasLargeUint64) {
    [output writeUInt64:3 value:self.largeUint64];
  }
  if (self.hasSmallInt32) {
    [output writeInt32:4 value:self.smallInt32];
  }
  if (self.hasSmallInt64) {
    [output writeInt64:5 value:self.smallInt64];
  }
  if (self.hasUtf8String) {
    [output writeString:6 value:self.utf8String];
  }
  if (self.hasZeroFloat) {
    [output writeFloat:7 value:self.zeroFloat];
  }
  if (self.hasOneFloat) {
    [output writeFloat:8 value:self.oneFloat];
  }
  if (self.hasSmallFloat) {
    [output writeFloat:9 value:self.smallFloat];
  }
  if (self.hasNegativeOneFloat) {
    [output writeFloat:10 value:self.negativeOneFloat];
  }
  if (self.hasNegativeFloat) {
    [output writeFloat:11 value:self.negativeFloat];
  }
  if (self.hasLargeFloat) {
    [output writeFloat:12 value:self.largeFloat];
  }
  if (self.hasSmallNegativeFloat) {
    [output writeFloat:13 value:self.smallNegativeFloat];
  }
  if (self.hasInfDouble) {
    [output writeDouble:14 value:self.infDouble];
  }
  if (self.hasNegInfDouble) {
    [output writeDouble:15 value:self.negInfDouble];
  }
  if (self.hasNanDouble) {
    [output writeDouble:16 value:self.nanDouble];
  }
  if (self.hasInfFloat) {
    [output writeFloat:17 value:self.infFloat];
  }
  if (self.hasNegInfFloat) {
    [output writeFloat:18 value:self.negInfFloat];
  }
  if (self.hasNanFloat) {
    [output writeFloat:19 value:self.nanFloat];
  }
  if (self.hasCppTrigraph) {
    [output writeString:20 value:self.cppTrigraph];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasEscapedBytes) {
    size += computeDataSize(1, self.escapedBytes);
  }
  if (self.hasLargeUint32) {
    size += computeUInt32Size(2, self.largeUint32);
  }
  if (self.hasLargeUint64) {
    size += computeUInt64Size(3, self.largeUint64);
  }
  if (self.hasSmallInt32) {
    size += computeInt32Size(4, self.smallInt32);
  }
  if (self.hasSmallInt64) {
    size += computeInt64Size(5, self.smallInt64);
  }
  if (self.hasUtf8String) {
    size += computeStringSize(6, self.utf8String);
  }
  if (self.hasZeroFloat) {
    size += computeFloatSize(7, self.zeroFloat);
  }
  if (self.hasOneFloat) {
    size += computeFloatSize(8, self.oneFloat);
  }
  if (self.hasSmallFloat) {
    size += computeFloatSize(9, self.smallFloat);
  }
  if (self.hasNegativeOneFloat) {
    size += computeFloatSize(10, self.negativeOneFloat);
  }
  if (self.hasNegativeFloat) {
    size += computeFloatSize(11, self.negativeFloat);
  }
  if (self.hasLargeFloat) {
    size += computeFloatSize(12, self.largeFloat);
  }
  if (self.hasSmallNegativeFloat) {
    size += computeFloatSize(13, self.smallNegativeFloat);
  }
  if (self.hasInfDouble) {
    size += computeDoubleSize(14, self.infDouble);
  }
  if (self.hasNegInfDouble) {
    size += computeDoubleSize(15, self.negInfDouble);
  }
  if (self.hasNanDouble) {
    size += computeDoubleSize(16, self.nanDouble);
  }
  if (self.hasInfFloat) {
    size += computeFloatSize(17, self.infFloat);
  }
  if (self.hasNegInfFloat) {
    size += computeFloatSize(18, self.negInfFloat);
  }
  if (self.hasNanFloat) {
    size += computeFloatSize(19, self.nanFloat);
  }
  if (self.hasCppTrigraph) {
    size += computeStringSize(20, self.cppTrigraph);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestExtremeDefaultValues*) parseFromData:(NSData*) data {
  return (TestExtremeDefaultValues*)[[[TestExtremeDefaultValues builder] mergeFromData:data] build];
}
+ (TestExtremeDefaultValues*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestExtremeDefaultValues*)[[[TestExtremeDefaultValues builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestExtremeDefaultValues*) parseFromInputStream:(NSInputStream*) input {
  return (TestExtremeDefaultValues*)[[[TestExtremeDefaultValues builder] mergeFromInputStream:input] build];
}
+ (TestExtremeDefaultValues*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestExtremeDefaultValues*)[[[TestExtremeDefaultValues builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestExtremeDefaultValues*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestExtremeDefaultValues*)[[[TestExtremeDefaultValues builder] mergeFromCodedInputStream:input] build];
}
+ (TestExtremeDefaultValues*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestExtremeDefaultValues*)[[[TestExtremeDefaultValues builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestExtremeDefaultValues_Builder*) builder {
  return [[[TestExtremeDefaultValues_Builder alloc] init] autorelease];
}
+ (TestExtremeDefaultValues_Builder*) builderWithPrototype:(TestExtremeDefaultValues*) prototype {
  return [[TestExtremeDefaultValues builder] mergeFrom:prototype];
}
- (TestExtremeDefaultValues_Builder*) builder {
  return [TestExtremeDefaultValues builder];
}
- (TestExtremeDefaultValues_Builder*) toBuilder {
  return [TestExtremeDefaultValues builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasEscapedBytes) {
    [output appendFormat:@"%@%@: %@\n", indent, @"escapedBytes", self.escapedBytes];
  }
  if (self.hasLargeUint32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"largeUint32", [NSNumber numberWithInt:self.largeUint32]];
  }
  if (self.hasLargeUint64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"largeUint64", [NSNumber numberWithLongLong:self.largeUint64]];
  }
  if (self.hasSmallInt32) {
    [output appendFormat:@"%@%@: %@\n", indent, @"smallInt32", [NSNumber numberWithInt:self.smallInt32]];
  }
  if (self.hasSmallInt64) {
    [output appendFormat:@"%@%@: %@\n", indent, @"smallInt64", [NSNumber numberWithLongLong:self.smallInt64]];
  }
  if (self.hasUtf8String) {
    [output appendFormat:@"%@%@: %@\n", indent, @"utf8String", self.utf8String];
  }
  if (self.hasZeroFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"zeroFloat", [NSNumber numberWithFloat:self.zeroFloat]];
  }
  if (self.hasOneFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"oneFloat", [NSNumber numberWithFloat:self.oneFloat]];
  }
  if (self.hasSmallFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"smallFloat", [NSNumber numberWithFloat:self.smallFloat]];
  }
  if (self.hasNegativeOneFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"negativeOneFloat", [NSNumber numberWithFloat:self.negativeOneFloat]];
  }
  if (self.hasNegativeFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"negativeFloat", [NSNumber numberWithFloat:self.negativeFloat]];
  }
  if (self.hasLargeFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"largeFloat", [NSNumber numberWithFloat:self.largeFloat]];
  }
  if (self.hasSmallNegativeFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"smallNegativeFloat", [NSNumber numberWithFloat:self.smallNegativeFloat]];
  }
  if (self.hasInfDouble) {
    [output appendFormat:@"%@%@: %@\n", indent, @"infDouble", [NSNumber numberWithDouble:self.infDouble]];
  }
  if (self.hasNegInfDouble) {
    [output appendFormat:@"%@%@: %@\n", indent, @"negInfDouble", [NSNumber numberWithDouble:self.negInfDouble]];
  }
  if (self.hasNanDouble) {
    [output appendFormat:@"%@%@: %@\n", indent, @"nanDouble", [NSNumber numberWithDouble:self.nanDouble]];
  }
  if (self.hasInfFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"infFloat", [NSNumber numberWithFloat:self.infFloat]];
  }
  if (self.hasNegInfFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"negInfFloat", [NSNumber numberWithFloat:self.negInfFloat]];
  }
  if (self.hasNanFloat) {
    [output appendFormat:@"%@%@: %@\n", indent, @"nanFloat", [NSNumber numberWithFloat:self.nanFloat]];
  }
  if (self.hasCppTrigraph) {
    [output appendFormat:@"%@%@: %@\n", indent, @"cppTrigraph", self.cppTrigraph];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestExtremeDefaultValues class]]) {
    return NO;
  }
  TestExtremeDefaultValues *otherMessage = other;
  return
      self.hasEscapedBytes == otherMessage.hasEscapedBytes &&
      (!self.hasEscapedBytes || [self.escapedBytes isEqual:otherMessage.escapedBytes]) &&
      
      self.hasLargeUint32 == otherMessage.hasLargeUint32 &&
      (!self.hasLargeUint32 || self.largeUint32 == otherMessage.largeUint32) &&
      
      self.hasLargeUint64 == otherMessage.hasLargeUint64 &&
      (!self.hasLargeUint64 || self.largeUint64 == otherMessage.largeUint64) &&
      
      self.hasSmallInt32 == otherMessage.hasSmallInt32 &&
      (!self.hasSmallInt32 || self.smallInt32 == otherMessage.smallInt32) &&
      
      self.hasSmallInt64 == otherMessage.hasSmallInt64 &&
      (!self.hasSmallInt64 || self.smallInt64 == otherMessage.smallInt64) &&
      
      self.hasUtf8String == otherMessage.hasUtf8String &&
      (!self.hasUtf8String || [self.utf8String isEqual:otherMessage.utf8String]) &&
      
      self.hasZeroFloat == otherMessage.hasZeroFloat &&
      (!self.hasZeroFloat || self.zeroFloat == otherMessage.zeroFloat) &&
      
      self.hasOneFloat == otherMessage.hasOneFloat &&
      (!self.hasOneFloat || self.oneFloat == otherMessage.oneFloat) &&
      
      self.hasSmallFloat == otherMessage.hasSmallFloat &&
      (!self.hasSmallFloat || self.smallFloat == otherMessage.smallFloat) &&
      
      self.hasNegativeOneFloat == otherMessage.hasNegativeOneFloat &&
      (!self.hasNegativeOneFloat || self.negativeOneFloat == otherMessage.negativeOneFloat) &&
      
      self.hasNegativeFloat == otherMessage.hasNegativeFloat &&
      (!self.hasNegativeFloat || self.negativeFloat == otherMessage.negativeFloat) &&
      
      self.hasLargeFloat == otherMessage.hasLargeFloat &&
      (!self.hasLargeFloat || self.largeFloat == otherMessage.largeFloat) &&
      
      self.hasSmallNegativeFloat == otherMessage.hasSmallNegativeFloat &&
      (!self.hasSmallNegativeFloat || self.smallNegativeFloat == otherMessage.smallNegativeFloat) &&
      
      self.hasInfDouble == otherMessage.hasInfDouble &&
      (!self.hasInfDouble || self.infDouble == otherMessage.infDouble) &&
      
      self.hasNegInfDouble == otherMessage.hasNegInfDouble &&
      (!self.hasNegInfDouble || self.negInfDouble == otherMessage.negInfDouble) &&
      
      self.hasNanDouble == otherMessage.hasNanDouble &&
      (!self.hasNanDouble || self.nanDouble == otherMessage.nanDouble) &&
      
      self.hasInfFloat == otherMessage.hasInfFloat &&
      (!self.hasInfFloat || self.infFloat == otherMessage.infFloat) &&
      
      self.hasNegInfFloat == otherMessage.hasNegInfFloat &&
      (!self.hasNegInfFloat || self.negInfFloat == otherMessage.negInfFloat) &&
      
      self.hasNanFloat == otherMessage.hasNanFloat &&
      (!self.hasNanFloat || self.nanFloat == otherMessage.nanFloat) &&
      
      self.hasCppTrigraph == otherMessage.hasCppTrigraph &&
      (!self.hasCppTrigraph || [self.cppTrigraph isEqual:otherMessage.cppTrigraph]) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasEscapedBytes) {
    hashCode = hashCode * 31 + [self.escapedBytes hash];
  }
  if (self.hasLargeUint32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.largeUint32] hash];
  }
  if (self.hasLargeUint64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.largeUint64] hash];
  }
  if (self.hasSmallInt32) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.smallInt32] hash];
  }
  if (self.hasSmallInt64) {
    hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.smallInt64] hash];
  }
  if (self.hasUtf8String) {
    hashCode = hashCode * 31 + [self.utf8String hash];
  }
  if (self.hasZeroFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.zeroFloat] hash];
  }
  if (self.hasOneFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.oneFloat] hash];
  }
  if (self.hasSmallFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.smallFloat] hash];
  }
  if (self.hasNegativeOneFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.negativeOneFloat] hash];
  }
  if (self.hasNegativeFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.negativeFloat] hash];
  }
  if (self.hasLargeFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.largeFloat] hash];
  }
  if (self.hasSmallNegativeFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.smallNegativeFloat] hash];
  }
  if (self.hasInfDouble) {
    hashCode = hashCode * 31 + [[NSNumber numberWithDouble:self.infDouble] hash];
  }
  if (self.hasNegInfDouble) {
    hashCode = hashCode * 31 + [[NSNumber numberWithDouble:self.negInfDouble] hash];
  }
  if (self.hasNanDouble) {
    hashCode = hashCode * 31 + [[NSNumber numberWithDouble:self.nanDouble] hash];
  }
  if (self.hasInfFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.infFloat] hash];
  }
  if (self.hasNegInfFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.negInfFloat] hash];
  }
  if (self.hasNanFloat) {
    hashCode = hashCode * 31 + [[NSNumber numberWithFloat:self.nanFloat] hash];
  }
  if (self.hasCppTrigraph) {
    hashCode = hashCode * 31 + [self.cppTrigraph hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestExtremeDefaultValues_Builder()
@property (retain) TestExtremeDefaultValues* result;
@end

@implementation TestExtremeDefaultValues_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestExtremeDefaultValues alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestExtremeDefaultValues_Builder*) clear {
  self.result = [[[TestExtremeDefaultValues alloc] init] autorelease];
  return self;
}
- (TestExtremeDefaultValues_Builder*) clone {
  return [TestExtremeDefaultValues builderWithPrototype:result];
}
- (TestExtremeDefaultValues*) defaultInstance {
  return [TestExtremeDefaultValues defaultInstance];
}
- (TestExtremeDefaultValues*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestExtremeDefaultValues*) buildPartial {
  TestExtremeDefaultValues* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestExtremeDefaultValues_Builder*) mergeFrom:(TestExtremeDefaultValues*) other {
  if (other == [TestExtremeDefaultValues defaultInstance]) {
    return self;
  }
  if (other.hasEscapedBytes) {
    [self setEscapedBytes:other.escapedBytes];
  }
  if (other.hasLargeUint32) {
    [self setLargeUint32:other.largeUint32];
  }
  if (other.hasLargeUint64) {
    [self setLargeUint64:other.largeUint64];
  }
  if (other.hasSmallInt32) {
    [self setSmallInt32:other.smallInt32];
  }
  if (other.hasSmallInt64) {
    [self setSmallInt64:other.smallInt64];
  }
  if (other.hasUtf8String) {
    [self setUtf8String:other.utf8String];
  }
  if (other.hasZeroFloat) {
    [self setZeroFloat:other.zeroFloat];
  }
  if (other.hasOneFloat) {
    [self setOneFloat:other.oneFloat];
  }
  if (other.hasSmallFloat) {
    [self setSmallFloat:other.smallFloat];
  }
  if (other.hasNegativeOneFloat) {
    [self setNegativeOneFloat:other.negativeOneFloat];
  }
  if (other.hasNegativeFloat) {
    [self setNegativeFloat:other.negativeFloat];
  }
  if (other.hasLargeFloat) {
    [self setLargeFloat:other.largeFloat];
  }
  if (other.hasSmallNegativeFloat) {
    [self setSmallNegativeFloat:other.smallNegativeFloat];
  }
  if (other.hasInfDouble) {
    [self setInfDouble:other.infDouble];
  }
  if (other.hasNegInfDouble) {
    [self setNegInfDouble:other.negInfDouble];
  }
  if (other.hasNanDouble) {
    [self setNanDouble:other.nanDouble];
  }
  if (other.hasInfFloat) {
    [self setInfFloat:other.infFloat];
  }
  if (other.hasNegInfFloat) {
    [self setNegInfFloat:other.negInfFloat];
  }
  if (other.hasNanFloat) {
    [self setNanFloat:other.nanFloat];
  }
  if (other.hasCppTrigraph) {
    [self setCppTrigraph:other.cppTrigraph];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestExtremeDefaultValues_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestExtremeDefaultValues_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 10: {
        [self setEscapedBytes:[input readData]];
        break;
      }
      case 16: {
        [self setLargeUint32:[input readUInt32]];
        break;
      }
      case 24: {
        [self setLargeUint64:[input readUInt64]];
        break;
      }
      case 32: {
        [self setSmallInt32:[input readInt32]];
        break;
      }
      case 40: {
        [self setSmallInt64:[input readInt64]];
        break;
      }
      case 50: {
        [self setUtf8String:[input readString]];
        break;
      }
      case 61: {
        [self setZeroFloat:[input readFloat]];
        break;
      }
      case 69: {
        [self setOneFloat:[input readFloat]];
        break;
      }
      case 77: {
        [self setSmallFloat:[input readFloat]];
        break;
      }
      case 85: {
        [self setNegativeOneFloat:[input readFloat]];
        break;
      }
      case 93: {
        [self setNegativeFloat:[input readFloat]];
        break;
      }
      case 101: {
        [self setLargeFloat:[input readFloat]];
        break;
      }
      case 109: {
        [self setSmallNegativeFloat:[input readFloat]];
        break;
      }
      case 113: {
        [self setInfDouble:[input readDouble]];
        break;
      }
      case 121: {
        [self setNegInfDouble:[input readDouble]];
        break;
      }
      case 129: {
        [self setNanDouble:[input readDouble]];
        break;
      }
      case 141: {
        [self setInfFloat:[input readFloat]];
        break;
      }
      case 149: {
        [self setNegInfFloat:[input readFloat]];
        break;
      }
      case 157: {
        [self setNanFloat:[input readFloat]];
        break;
      }
      case 162: {
        [self setCppTrigraph:[input readString]];
        break;
      }
    }
  }
}
- (BOOL) hasEscapedBytes {
  return result.hasEscapedBytes;
}
- (NSData*) escapedBytes {
  return result.escapedBytes;
}
- (TestExtremeDefaultValues_Builder*) setEscapedBytes:(NSData*) value {
  result.hasEscapedBytes = YES;
  result.escapedBytes = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearEscapedBytes {
  result.hasEscapedBytes = NO;
  result.escapedBytes = [NSData dataWithBytes:"\000\001\007\010\014\n\r\t\013\\\'\"\376" length:13];
  return self;
}
- (BOOL) hasLargeUint32 {
  return result.hasLargeUint32;
}
- (uint32_t) largeUint32 {
  return result.largeUint32;
}
- (TestExtremeDefaultValues_Builder*) setLargeUint32:(uint32_t) value {
  result.hasLargeUint32 = YES;
  result.largeUint32 = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearLargeUint32 {
  result.hasLargeUint32 = NO;
  result.largeUint32 = -1;
  return self;
}
- (BOOL) hasLargeUint64 {
  return result.hasLargeUint64;
}
- (uint64_t) largeUint64 {
  return result.largeUint64;
}
- (TestExtremeDefaultValues_Builder*) setLargeUint64:(uint64_t) value {
  result.hasLargeUint64 = YES;
  result.largeUint64 = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearLargeUint64 {
  result.hasLargeUint64 = NO;
  result.largeUint64 = -1L;
  return self;
}
- (BOOL) hasSmallInt32 {
  return result.hasSmallInt32;
}
- (int32_t) smallInt32 {
  return result.smallInt32;
}
- (TestExtremeDefaultValues_Builder*) setSmallInt32:(int32_t) value {
  result.hasSmallInt32 = YES;
  result.smallInt32 = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearSmallInt32 {
  result.hasSmallInt32 = NO;
  result.smallInt32 = -2147483647;
  return self;
}
- (BOOL) hasSmallInt64 {
  return result.hasSmallInt64;
}
- (int64_t) smallInt64 {
  return result.smallInt64;
}
- (TestExtremeDefaultValues_Builder*) setSmallInt64:(int64_t) value {
  result.hasSmallInt64 = YES;
  result.smallInt64 = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearSmallInt64 {
  result.hasSmallInt64 = NO;
  result.smallInt64 = -9223372036854775807L;
  return self;
}
- (BOOL) hasUtf8String {
  return result.hasUtf8String;
}
- (NSString*) utf8String {
  return result.utf8String;
}
- (TestExtremeDefaultValues_Builder*) setUtf8String:(NSString*) value {
  result.hasUtf8String = YES;
  result.utf8String = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearUtf8String {
  result.hasUtf8String = NO;
  result.utf8String = [NSString stringWithUTF8String:"\341\210\264"];
  return self;
}
- (BOOL) hasZeroFloat {
  return result.hasZeroFloat;
}
- (Float32) zeroFloat {
  return result.zeroFloat;
}
- (TestExtremeDefaultValues_Builder*) setZeroFloat:(Float32) value {
  result.hasZeroFloat = YES;
  result.zeroFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearZeroFloat {
  result.hasZeroFloat = NO;
  result.zeroFloat = 0;
  return self;
}
- (BOOL) hasOneFloat {
  return result.hasOneFloat;
}
- (Float32) oneFloat {
  return result.oneFloat;
}
- (TestExtremeDefaultValues_Builder*) setOneFloat:(Float32) value {
  result.hasOneFloat = YES;
  result.oneFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearOneFloat {
  result.hasOneFloat = NO;
  result.oneFloat = 1;
  return self;
}
- (BOOL) hasSmallFloat {
  return result.hasSmallFloat;
}
- (Float32) smallFloat {
  return result.smallFloat;
}
- (TestExtremeDefaultValues_Builder*) setSmallFloat:(Float32) value {
  result.hasSmallFloat = YES;
  result.smallFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearSmallFloat {
  result.hasSmallFloat = NO;
  result.smallFloat = 1.5;
  return self;
}
- (BOOL) hasNegativeOneFloat {
  return result.hasNegativeOneFloat;
}
- (Float32) negativeOneFloat {
  return result.negativeOneFloat;
}
- (TestExtremeDefaultValues_Builder*) setNegativeOneFloat:(Float32) value {
  result.hasNegativeOneFloat = YES;
  result.negativeOneFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearNegativeOneFloat {
  result.hasNegativeOneFloat = NO;
  result.negativeOneFloat = -1;
  return self;
}
- (BOOL) hasNegativeFloat {
  return result.hasNegativeFloat;
}
- (Float32) negativeFloat {
  return result.negativeFloat;
}
- (TestExtremeDefaultValues_Builder*) setNegativeFloat:(Float32) value {
  result.hasNegativeFloat = YES;
  result.negativeFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearNegativeFloat {
  result.hasNegativeFloat = NO;
  result.negativeFloat = -1.5;
  return self;
}
- (BOOL) hasLargeFloat {
  return result.hasLargeFloat;
}
- (Float32) largeFloat {
  return result.largeFloat;
}
- (TestExtremeDefaultValues_Builder*) setLargeFloat:(Float32) value {
  result.hasLargeFloat = YES;
  result.largeFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearLargeFloat {
  result.hasLargeFloat = NO;
  result.largeFloat = 2e+08;
  return self;
}
- (BOOL) hasSmallNegativeFloat {
  return result.hasSmallNegativeFloat;
}
- (Float32) smallNegativeFloat {
  return result.smallNegativeFloat;
}
- (TestExtremeDefaultValues_Builder*) setSmallNegativeFloat:(Float32) value {
  result.hasSmallNegativeFloat = YES;
  result.smallNegativeFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearSmallNegativeFloat {
  result.hasSmallNegativeFloat = NO;
  result.smallNegativeFloat = -8e-28;
  return self;
}
- (BOOL) hasInfDouble {
  return result.hasInfDouble;
}
- (Float64) infDouble {
  return result.infDouble;
}
- (TestExtremeDefaultValues_Builder*) setInfDouble:(Float64) value {
  result.hasInfDouble = YES;
  result.infDouble = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearInfDouble {
  result.hasInfDouble = NO;
  result.infDouble = HUGE_VAL;
  return self;
}
- (BOOL) hasNegInfDouble {
  return result.hasNegInfDouble;
}
- (Float64) negInfDouble {
  return result.negInfDouble;
}
- (TestExtremeDefaultValues_Builder*) setNegInfDouble:(Float64) value {
  result.hasNegInfDouble = YES;
  result.negInfDouble = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearNegInfDouble {
  result.hasNegInfDouble = NO;
  result.negInfDouble = -HUGE_VAL;
  return self;
}
- (BOOL) hasNanDouble {
  return result.hasNanDouble;
}
- (Float64) nanDouble {
  return result.nanDouble;
}
- (TestExtremeDefaultValues_Builder*) setNanDouble:(Float64) value {
  result.hasNanDouble = YES;
  result.nanDouble = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearNanDouble {
  result.hasNanDouble = NO;
  result.nanDouble = NAN;
  return self;
}
- (BOOL) hasInfFloat {
  return result.hasInfFloat;
}
- (Float32) infFloat {
  return result.infFloat;
}
- (TestExtremeDefaultValues_Builder*) setInfFloat:(Float32) value {
  result.hasInfFloat = YES;
  result.infFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearInfFloat {
  result.hasInfFloat = NO;
  result.infFloat = HUGE_VALF;
  return self;
}
- (BOOL) hasNegInfFloat {
  return result.hasNegInfFloat;
}
- (Float32) negInfFloat {
  return result.negInfFloat;
}
- (TestExtremeDefaultValues_Builder*) setNegInfFloat:(Float32) value {
  result.hasNegInfFloat = YES;
  result.negInfFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearNegInfFloat {
  result.hasNegInfFloat = NO;
  result.negInfFloat = -HUGE_VALF;
  return self;
}
- (BOOL) hasNanFloat {
  return result.hasNanFloat;
}
- (Float32) nanFloat {
  return result.nanFloat;
}
- (TestExtremeDefaultValues_Builder*) setNanFloat:(Float32) value {
  result.hasNanFloat = YES;
  result.nanFloat = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearNanFloat {
  result.hasNanFloat = NO;
  result.nanFloat = NAN;
  return self;
}
- (BOOL) hasCppTrigraph {
  return result.hasCppTrigraph;
}
- (NSString*) cppTrigraph {
  return result.cppTrigraph;
}
- (TestExtremeDefaultValues_Builder*) setCppTrigraph:(NSString*) value {
  result.hasCppTrigraph = YES;
  result.cppTrigraph = value;
  return self;
}
- (TestExtremeDefaultValues_Builder*) clearCppTrigraph {
  result.hasCppTrigraph = NO;
  result.cppTrigraph = @"\? \? \?\? \?\? \?\?\? \?\?/ \?\?-";
  return self;
}
@end

@interface SparseEnumMessage ()
@property TestSparseEnum sparseEnum;
@end

@implementation SparseEnumMessage

- (BOOL) hasSparseEnum {
  return !!hasSparseEnum_;
}
- (void) setHasSparseEnum:(BOOL) value {
  hasSparseEnum_ = !!value;
}
@synthesize sparseEnum;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.sparseEnum = TestSparseEnumSparseA;
  }
  return self;
}
static SparseEnumMessage* defaultSparseEnumMessageInstance = nil;
+ (void) initialize {
  if (self == [SparseEnumMessage class]) {
    defaultSparseEnumMessageInstance = [[SparseEnumMessage alloc] init];
  }
}
+ (SparseEnumMessage*) defaultInstance {
  return defaultSparseEnumMessageInstance;
}
- (SparseEnumMessage*) defaultInstance {
  return defaultSparseEnumMessageInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasSparseEnum) {
    [output writeEnum:1 value:self.sparseEnum];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasSparseEnum) {
    size += computeEnumSize(1, self.sparseEnum);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (SparseEnumMessage*) parseFromData:(NSData*) data {
  return (SparseEnumMessage*)[[[SparseEnumMessage builder] mergeFromData:data] build];
}
+ (SparseEnumMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (SparseEnumMessage*)[[[SparseEnumMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (SparseEnumMessage*) parseFromInputStream:(NSInputStream*) input {
  return (SparseEnumMessage*)[[[SparseEnumMessage builder] mergeFromInputStream:input] build];
}
+ (SparseEnumMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (SparseEnumMessage*)[[[SparseEnumMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (SparseEnumMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (SparseEnumMessage*)[[[SparseEnumMessage builder] mergeFromCodedInputStream:input] build];
}
+ (SparseEnumMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (SparseEnumMessage*)[[[SparseEnumMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (SparseEnumMessage_Builder*) builder {
  return [[[SparseEnumMessage_Builder alloc] init] autorelease];
}
+ (SparseEnumMessage_Builder*) builderWithPrototype:(SparseEnumMessage*) prototype {
  return [[SparseEnumMessage builder] mergeFrom:prototype];
}
- (SparseEnumMessage_Builder*) builder {
  return [SparseEnumMessage builder];
}
- (SparseEnumMessage_Builder*) toBuilder {
  return [SparseEnumMessage builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasSparseEnum) {
    [output appendFormat:@"%@%@: %d\n", indent, @"sparseEnum", self.sparseEnum];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[SparseEnumMessage class]]) {
    return NO;
  }
  SparseEnumMessage *otherMessage = other;
  return
      self.hasSparseEnum == otherMessage.hasSparseEnum &&
      (!self.hasSparseEnum || self.sparseEnum != otherMessage.sparseEnum) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasSparseEnum) {
    hashCode = hashCode * 31 + self.sparseEnum;
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface SparseEnumMessage_Builder()
@property (retain) SparseEnumMessage* result;
@end

@implementation SparseEnumMessage_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[SparseEnumMessage alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (SparseEnumMessage_Builder*) clear {
  self.result = [[[SparseEnumMessage alloc] init] autorelease];
  return self;
}
- (SparseEnumMessage_Builder*) clone {
  return [SparseEnumMessage builderWithPrototype:result];
}
- (SparseEnumMessage*) defaultInstance {
  return [SparseEnumMessage defaultInstance];
}
- (SparseEnumMessage*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (SparseEnumMessage*) buildPartial {
  SparseEnumMessage* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (SparseEnumMessage_Builder*) mergeFrom:(SparseEnumMessage*) other {
  if (other == [SparseEnumMessage defaultInstance]) {
    return self;
  }
  if (other.hasSparseEnum) {
    [self setSparseEnum:other.sparseEnum];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (SparseEnumMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (SparseEnumMessage_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 8: {
        int32_t value = [input readEnum];
        if (TestSparseEnumIsValidValue(value)) {
          [self setSparseEnum:value];
        } else {
          [unknownFields mergeVarintField:1 value:value];
        }
        break;
      }
    }
  }
}
- (BOOL) hasSparseEnum {
  return result.hasSparseEnum;
}
- (TestSparseEnum) sparseEnum {
  return result.sparseEnum;
}
- (SparseEnumMessage_Builder*) setSparseEnum:(TestSparseEnum) value {
  result.hasSparseEnum = YES;
  result.sparseEnum = value;
  return self;
}
- (SparseEnumMessage_Builder*) clearSparseEnum {
  result.hasSparseEnum = NO;
  result.sparseEnum = TestSparseEnumSparseA;
  return self;
}
@end

@interface OneString ()
@property (retain) NSString* data;
@end

@implementation OneString

- (BOOL) hasData {
  return !!hasData_;
}
- (void) setHasData:(BOOL) value {
  hasData_ = !!value;
}
@synthesize data;
- (void) dealloc {
  self.data = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.data = @"";
  }
  return self;
}
static OneString* defaultOneStringInstance = nil;
+ (void) initialize {
  if (self == [OneString class]) {
    defaultOneStringInstance = [[OneString alloc] init];
  }
}
+ (OneString*) defaultInstance {
  return defaultOneStringInstance;
}
- (OneString*) defaultInstance {
  return defaultOneStringInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasData) {
    [output writeString:1 value:self.data];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasData) {
    size += computeStringSize(1, self.data);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (OneString*) parseFromData:(NSData*) data {
  return (OneString*)[[[OneString builder] mergeFromData:data] build];
}
+ (OneString*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (OneString*)[[[OneString builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (OneString*) parseFromInputStream:(NSInputStream*) input {
  return (OneString*)[[[OneString builder] mergeFromInputStream:input] build];
}
+ (OneString*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (OneString*)[[[OneString builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (OneString*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (OneString*)[[[OneString builder] mergeFromCodedInputStream:input] build];
}
+ (OneString*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (OneString*)[[[OneString builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (OneString_Builder*) builder {
  return [[[OneString_Builder alloc] init] autorelease];
}
+ (OneString_Builder*) builderWithPrototype:(OneString*) prototype {
  return [[OneString builder] mergeFrom:prototype];
}
- (OneString_Builder*) builder {
  return [OneString builder];
}
- (OneString_Builder*) toBuilder {
  return [OneString builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasData) {
    [output appendFormat:@"%@%@: %@\n", indent, @"data", self.data];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[OneString class]]) {
    return NO;
  }
  OneString *otherMessage = other;
  return
      self.hasData == otherMessage.hasData &&
      (!self.hasData || [self.data isEqual:otherMessage.data]) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasData) {
    hashCode = hashCode * 31 + [self.data hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface OneString_Builder()
@property (retain) OneString* result;
@end

@implementation OneString_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[OneString alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (OneString_Builder*) clear {
  self.result = [[[OneString alloc] init] autorelease];
  return self;
}
- (OneString_Builder*) clone {
  return [OneString builderWithPrototype:result];
}
- (OneString*) defaultInstance {
  return [OneString defaultInstance];
}
- (OneString*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (OneString*) buildPartial {
  OneString* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (OneString_Builder*) mergeFrom:(OneString*) other {
  if (other == [OneString defaultInstance]) {
    return self;
  }
  if (other.hasData) {
    [self setData:other.data];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (OneString_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (OneString_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 10: {
        [self setData:[input readString]];
        break;
      }
    }
  }
}
- (BOOL) hasData {
  return result.hasData;
}
- (NSString*) data {
  return result.data;
}
- (OneString_Builder*) setData:(NSString*) value {
  result.hasData = YES;
  result.data = value;
  return self;
}
- (OneString_Builder*) clearData {
  result.hasData = NO;
  result.data = @"";
  return self;
}
@end

@interface OneBytes ()
@property (retain) NSData* data;
@end

@implementation OneBytes

- (BOOL) hasData {
  return !!hasData_;
}
- (void) setHasData:(BOOL) value {
  hasData_ = !!value;
}
@synthesize data;
- (void) dealloc {
  self.data = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.data = [NSData data];
  }
  return self;
}
static OneBytes* defaultOneBytesInstance = nil;
+ (void) initialize {
  if (self == [OneBytes class]) {
    defaultOneBytesInstance = [[OneBytes alloc] init];
  }
}
+ (OneBytes*) defaultInstance {
  return defaultOneBytesInstance;
}
- (OneBytes*) defaultInstance {
  return defaultOneBytesInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasData) {
    [output writeData:1 value:self.data];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasData) {
    size += computeDataSize(1, self.data);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (OneBytes*) parseFromData:(NSData*) data {
  return (OneBytes*)[[[OneBytes builder] mergeFromData:data] build];
}
+ (OneBytes*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (OneBytes*)[[[OneBytes builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (OneBytes*) parseFromInputStream:(NSInputStream*) input {
  return (OneBytes*)[[[OneBytes builder] mergeFromInputStream:input] build];
}
+ (OneBytes*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (OneBytes*)[[[OneBytes builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (OneBytes*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (OneBytes*)[[[OneBytes builder] mergeFromCodedInputStream:input] build];
}
+ (OneBytes*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (OneBytes*)[[[OneBytes builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (OneBytes_Builder*) builder {
  return [[[OneBytes_Builder alloc] init] autorelease];
}
+ (OneBytes_Builder*) builderWithPrototype:(OneBytes*) prototype {
  return [[OneBytes builder] mergeFrom:prototype];
}
- (OneBytes_Builder*) builder {
  return [OneBytes builder];
}
- (OneBytes_Builder*) toBuilder {
  return [OneBytes builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasData) {
    [output appendFormat:@"%@%@: %@\n", indent, @"data", self.data];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[OneBytes class]]) {
    return NO;
  }
  OneBytes *otherMessage = other;
  return
      self.hasData == otherMessage.hasData &&
      (!self.hasData || [self.data isEqual:otherMessage.data]) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasData) {
    hashCode = hashCode * 31 + [self.data hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface OneBytes_Builder()
@property (retain) OneBytes* result;
@end

@implementation OneBytes_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[OneBytes alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (OneBytes_Builder*) clear {
  self.result = [[[OneBytes alloc] init] autorelease];
  return self;
}
- (OneBytes_Builder*) clone {
  return [OneBytes builderWithPrototype:result];
}
- (OneBytes*) defaultInstance {
  return [OneBytes defaultInstance];
}
- (OneBytes*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (OneBytes*) buildPartial {
  OneBytes* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (OneBytes_Builder*) mergeFrom:(OneBytes*) other {
  if (other == [OneBytes defaultInstance]) {
    return self;
  }
  if (other.hasData) {
    [self setData:other.data];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (OneBytes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (OneBytes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 10: {
        [self setData:[input readData]];
        break;
      }
    }
  }
}
- (BOOL) hasData {
  return result.hasData;
}
- (NSData*) data {
  return result.data;
}
- (OneBytes_Builder*) setData:(NSData*) value {
  result.hasData = YES;
  result.data = value;
  return self;
}
- (OneBytes_Builder*) clearData {
  result.hasData = NO;
  result.data = [NSData data];
  return self;
}
@end

@interface TestPackedTypes ()
@property (retain) PBAppendableArray * packedInt32Array;
@property (retain) PBAppendableArray * packedInt64Array;
@property (retain) PBAppendableArray * packedUint32Array;
@property (retain) PBAppendableArray * packedUint64Array;
@property (retain) PBAppendableArray * packedSint32Array;
@property (retain) PBAppendableArray * packedSint64Array;
@property (retain) PBAppendableArray * packedFixed32Array;
@property (retain) PBAppendableArray * packedFixed64Array;
@property (retain) PBAppendableArray * packedSfixed32Array;
@property (retain) PBAppendableArray * packedSfixed64Array;
@property (retain) PBAppendableArray * packedFloatArray;
@property (retain) PBAppendableArray * packedDoubleArray;
@property (retain) PBAppendableArray * packedBoolArray;
@property (retain) PBAppendableArray * packedEnumArray;
@end

@implementation TestPackedTypes

@synthesize packedInt32Array;
@dynamic packedInt32;
@synthesize packedInt64Array;
@dynamic packedInt64;
@synthesize packedUint32Array;
@dynamic packedUint32;
@synthesize packedUint64Array;
@dynamic packedUint64;
@synthesize packedSint32Array;
@dynamic packedSint32;
@synthesize packedSint64Array;
@dynamic packedSint64;
@synthesize packedFixed32Array;
@dynamic packedFixed32;
@synthesize packedFixed64Array;
@dynamic packedFixed64;
@synthesize packedSfixed32Array;
@dynamic packedSfixed32;
@synthesize packedSfixed64Array;
@dynamic packedSfixed64;
@synthesize packedFloatArray;
@dynamic packedFloat;
@synthesize packedDoubleArray;
@dynamic packedDouble;
@synthesize packedBoolArray;
@dynamic packedBool;
@synthesize packedEnumArray;
@dynamic packedEnum;
- (void) dealloc {
  self.packedInt32Array = nil;
  self.packedInt64Array = nil;
  self.packedUint32Array = nil;
  self.packedUint64Array = nil;
  self.packedSint32Array = nil;
  self.packedSint64Array = nil;
  self.packedFixed32Array = nil;
  self.packedFixed64Array = nil;
  self.packedSfixed32Array = nil;
  self.packedSfixed64Array = nil;
  self.packedFloatArray = nil;
  self.packedDoubleArray = nil;
  self.packedBoolArray = nil;
  self.packedEnumArray = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static TestPackedTypes* defaultTestPackedTypesInstance = nil;
+ (void) initialize {
  if (self == [TestPackedTypes class]) {
    defaultTestPackedTypesInstance = [[TestPackedTypes alloc] init];
  }
}
+ (TestPackedTypes*) defaultInstance {
  return defaultTestPackedTypesInstance;
}
- (TestPackedTypes*) defaultInstance {
  return defaultTestPackedTypesInstance;
}
- (PBArray *)packedInt32 {
  return packedInt32Array;
}
- (int32_t)packedInt32AtIndex:(NSUInteger)index {
  return [packedInt32Array int32AtIndex:index];
}
- (PBArray *)packedInt64 {
  return packedInt64Array;
}
- (int64_t)packedInt64AtIndex:(NSUInteger)index {
  return [packedInt64Array int64AtIndex:index];
}
- (PBArray *)packedUint32 {
  return packedUint32Array;
}
- (uint32_t)packedUint32AtIndex:(NSUInteger)index {
  return [packedUint32Array uint32AtIndex:index];
}
- (PBArray *)packedUint64 {
  return packedUint64Array;
}
- (uint64_t)packedUint64AtIndex:(NSUInteger)index {
  return [packedUint64Array uint64AtIndex:index];
}
- (PBArray *)packedSint32 {
  return packedSint32Array;
}
- (int32_t)packedSint32AtIndex:(NSUInteger)index {
  return [packedSint32Array int32AtIndex:index];
}
- (PBArray *)packedSint64 {
  return packedSint64Array;
}
- (int64_t)packedSint64AtIndex:(NSUInteger)index {
  return [packedSint64Array int64AtIndex:index];
}
- (PBArray *)packedFixed32 {
  return packedFixed32Array;
}
- (uint32_t)packedFixed32AtIndex:(NSUInteger)index {
  return [packedFixed32Array uint32AtIndex:index];
}
- (PBArray *)packedFixed64 {
  return packedFixed64Array;
}
- (uint64_t)packedFixed64AtIndex:(NSUInteger)index {
  return [packedFixed64Array uint64AtIndex:index];
}
- (PBArray *)packedSfixed32 {
  return packedSfixed32Array;
}
- (int32_t)packedSfixed32AtIndex:(NSUInteger)index {
  return [packedSfixed32Array int32AtIndex:index];
}
- (PBArray *)packedSfixed64 {
  return packedSfixed64Array;
}
- (int64_t)packedSfixed64AtIndex:(NSUInteger)index {
  return [packedSfixed64Array int64AtIndex:index];
}
- (PBArray *)packedFloat {
  return packedFloatArray;
}
- (Float32)packedFloatAtIndex:(NSUInteger)index {
  return [packedFloatArray floatAtIndex:index];
}
- (PBArray *)packedDouble {
  return packedDoubleArray;
}
- (Float64)packedDoubleAtIndex:(NSUInteger)index {
  return [packedDoubleArray doubleAtIndex:index];
}
- (PBArray *)packedBool {
  return packedBoolArray;
}
- (BOOL)packedBoolAtIndex:(NSUInteger)index {
  return [packedBoolArray boolAtIndex:index];
}
- (PBArray *)packedEnum {
  return packedEnumArray;
}
- (ForeignEnum)packedEnumAtIndex:(NSUInteger)index {
  return [packedEnumArray int32AtIndex:index];
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  const NSUInteger packedInt32ArrayCount = self.packedInt32Array.count;
  if (packedInt32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.packedInt32Array.data;
    [output writeRawVarint32:722];
    [output writeRawVarint32:packedInt32MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedInt32ArrayCount; ++i) {
      [output writeInt32NoTag:values[i]];
    }
  }
  const NSUInteger packedInt64ArrayCount = self.packedInt64Array.count;
  if (packedInt64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.packedInt64Array.data;
    [output writeRawVarint32:730];
    [output writeRawVarint32:packedInt64MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedInt64ArrayCount; ++i) {
      [output writeInt64NoTag:values[i]];
    }
  }
  const NSUInteger packedUint32ArrayCount = self.packedUint32Array.count;
  if (packedUint32ArrayCount > 0) {
    const uint32_t *values = (const uint32_t *)self.packedUint32Array.data;
    [output writeRawVarint32:738];
    [output writeRawVarint32:packedUint32MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedUint32ArrayCount; ++i) {
      [output writeUInt32NoTag:values[i]];
    }
  }
  const NSUInteger packedUint64ArrayCount = self.packedUint64Array.count;
  if (packedUint64ArrayCount > 0) {
    const uint64_t *values = (const uint64_t *)self.packedUint64Array.data;
    [output writeRawVarint32:746];
    [output writeRawVarint32:packedUint64MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedUint64ArrayCount; ++i) {
      [output writeUInt64NoTag:values[i]];
    }
  }
  const NSUInteger packedSint32ArrayCount = self.packedSint32Array.count;
  if (packedSint32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.packedSint32Array.data;
    [output writeRawVarint32:754];
    [output writeRawVarint32:packedSint32MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedSint32ArrayCount; ++i) {
      [output writeSInt32NoTag:values[i]];
    }
  }
  const NSUInteger packedSint64ArrayCount = self.packedSint64Array.count;
  if (packedSint64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.packedSint64Array.data;
    [output writeRawVarint32:762];
    [output writeRawVarint32:packedSint64MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedSint64ArrayCount; ++i) {
      [output writeSInt64NoTag:values[i]];
    }
  }
  const NSUInteger packedFixed32ArrayCount = self.packedFixed32Array.count;
  if (packedFixed32ArrayCount > 0) {
    const uint32_t *values = (const uint32_t *)self.packedFixed32Array.data;
    [output writeRawVarint32:770];
    [output writeRawVarint32:packedFixed32MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedFixed32ArrayCount; ++i) {
      [output writeFixed32NoTag:values[i]];
    }
  }
  const NSUInteger packedFixed64ArrayCount = self.packedFixed64Array.count;
  if (packedFixed64ArrayCount > 0) {
    const uint64_t *values = (const uint64_t *)self.packedFixed64Array.data;
    [output writeRawVarint32:778];
    [output writeRawVarint32:packedFixed64MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedFixed64ArrayCount; ++i) {
      [output writeFixed64NoTag:values[i]];
    }
  }
  const NSUInteger packedSfixed32ArrayCount = self.packedSfixed32Array.count;
  if (packedSfixed32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.packedSfixed32Array.data;
    [output writeRawVarint32:786];
    [output writeRawVarint32:packedSfixed32MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedSfixed32ArrayCount; ++i) {
      [output writeSFixed32NoTag:values[i]];
    }
  }
  const NSUInteger packedSfixed64ArrayCount = self.packedSfixed64Array.count;
  if (packedSfixed64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.packedSfixed64Array.data;
    [output writeRawVarint32:794];
    [output writeRawVarint32:packedSfixed64MemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedSfixed64ArrayCount; ++i) {
      [output writeSFixed64NoTag:values[i]];
    }
  }
  const NSUInteger packedFloatArrayCount = self.packedFloatArray.count;
  if (packedFloatArrayCount > 0) {
    const Float32 *values = (const Float32 *)self.packedFloatArray.data;
    [output writeRawVarint32:802];
    [output writeRawVarint32:packedFloatMemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedFloatArrayCount; ++i) {
      [output writeFloatNoTag:values[i]];
    }
  }
  const NSUInteger packedDoubleArrayCount = self.packedDoubleArray.count;
  if (packedDoubleArrayCount > 0) {
    const Float64 *values = (const Float64 *)self.packedDoubleArray.data;
    [output writeRawVarint32:810];
    [output writeRawVarint32:packedDoubleMemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedDoubleArrayCount; ++i) {
      [output writeDoubleNoTag:values[i]];
    }
  }
  const NSUInteger packedBoolArrayCount = self.packedBoolArray.count;
  if (packedBoolArrayCount > 0) {
    const BOOL *values = (const BOOL *)self.packedBoolArray.data;
    [output writeRawVarint32:818];
    [output writeRawVarint32:packedBoolMemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedBoolArrayCount; ++i) {
      [output writeBoolNoTag:values[i]];
    }
  }
  const NSUInteger packedEnumArrayCount = self.packedEnumArray.count;
  const ForeignEnum *packedEnumArrayValues = (const ForeignEnum *)self.packedEnumArray.data;
  if (self.packedEnumArray.count > 0) {
    [output writeRawVarint32:826];
    [output writeRawVarint32:packedEnumMemoizedSerializedSize];
  }
  for (NSUInteger i = 0; i < packedEnumArrayCount; ++i) {
    [output writeEnumNoTag:packedEnumArrayValues[i]];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedInt32Array.count;
    const int32_t *values = (const int32_t *)self.packedInt32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedInt32MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedInt64Array.count;
    const int64_t *values = (const int64_t *)self.packedInt64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedInt64MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedUint32Array.count;
    const uint32_t *values = (const uint32_t *)self.packedUint32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeUInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedUint32MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedUint64Array.count;
    const uint64_t *values = (const uint64_t *)self.packedUint64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeUInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedUint64MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedSint32Array.count;
    const int32_t *values = (const int32_t *)self.packedSint32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeSInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedSint32MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedSint64Array.count;
    const int64_t *values = (const int64_t *)self.packedSint64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeSInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedSint64MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedFixed32Array.count;
    dataSize = 4 * count;
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedFixed32MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedFixed64Array.count;
    dataSize = 8 * count;
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedFixed64MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedSfixed32Array.count;
    dataSize = 4 * count;
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedSfixed32MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedSfixed64Array.count;
    dataSize = 8 * count;
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedSfixed64MemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedFloatArray.count;
    dataSize = 4 * count;
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedFloatMemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedDoubleArray.count;
    dataSize = 8 * count;
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedDoubleMemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedBoolArray.count;
    dataSize = 1 * count;
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedBoolMemoizedSerializedSize = dataSize;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedEnumArray.count;
    const ForeignEnum *values = (const ForeignEnum *)self.packedEnumArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeEnumSizeNoTag(values[i]);
    }
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeRawVarint32Size(dataSize);
    }
    packedEnumMemoizedSerializedSize = dataSize;
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestPackedTypes*) parseFromData:(NSData*) data {
  return (TestPackedTypes*)[[[TestPackedTypes builder] mergeFromData:data] build];
}
+ (TestPackedTypes*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestPackedTypes*)[[[TestPackedTypes builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestPackedTypes*) parseFromInputStream:(NSInputStream*) input {
  return (TestPackedTypes*)[[[TestPackedTypes builder] mergeFromInputStream:input] build];
}
+ (TestPackedTypes*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestPackedTypes*)[[[TestPackedTypes builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestPackedTypes*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestPackedTypes*)[[[TestPackedTypes builder] mergeFromCodedInputStream:input] build];
}
+ (TestPackedTypes*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestPackedTypes*)[[[TestPackedTypes builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestPackedTypes_Builder*) builder {
  return [[[TestPackedTypes_Builder alloc] init] autorelease];
}
+ (TestPackedTypes_Builder*) builderWithPrototype:(TestPackedTypes*) prototype {
  return [[TestPackedTypes builder] mergeFrom:prototype];
}
- (TestPackedTypes_Builder*) builder {
  return [TestPackedTypes builder];
}
- (TestPackedTypes_Builder*) toBuilder {
  return [TestPackedTypes builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  for (NSNumber* value in self.packedInt32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedInt32", value];
  }
  for (NSNumber* value in self.packedInt64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedInt64", value];
  }
  for (NSNumber* value in self.packedUint32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedUint32", value];
  }
  for (NSNumber* value in self.packedUint64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedUint64", value];
  }
  for (NSNumber* value in self.packedSint32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedSint32", value];
  }
  for (NSNumber* value in self.packedSint64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedSint64", value];
  }
  for (NSNumber* value in self.packedFixed32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedFixed32", value];
  }
  for (NSNumber* value in self.packedFixed64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedFixed64", value];
  }
  for (NSNumber* value in self.packedSfixed32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedSfixed32", value];
  }
  for (NSNumber* value in self.packedSfixed64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedSfixed64", value];
  }
  for (NSNumber* value in self.packedFloatArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedFloat", value];
  }
  for (NSNumber* value in self.packedDoubleArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedDouble", value];
  }
  for (NSNumber* value in self.packedBoolArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedBool", value];
  }
  for (NSNumber* element in self.packedEnumArray) {
    [output appendFormat:@"%@%@: %d\n", indent, @"packedEnum", element.intValue];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestPackedTypes class]]) {
    return NO;
  }
  TestPackedTypes *otherMessage = other;
  return
      [self.packedInt32Array isEqualToArray:otherMessage.packedInt32Array] &&
      
      [self.packedInt64Array isEqualToArray:otherMessage.packedInt64Array] &&
      
      [self.packedUint32Array isEqualToArray:otherMessage.packedUint32Array] &&
      
      [self.packedUint64Array isEqualToArray:otherMessage.packedUint64Array] &&
      
      [self.packedSint32Array isEqualToArray:otherMessage.packedSint32Array] &&
      
      [self.packedSint64Array isEqualToArray:otherMessage.packedSint64Array] &&
      
      [self.packedFixed32Array isEqualToArray:otherMessage.packedFixed32Array] &&
      
      [self.packedFixed64Array isEqualToArray:otherMessage.packedFixed64Array] &&
      
      [self.packedSfixed32Array isEqualToArray:otherMessage.packedSfixed32Array] &&
      
      [self.packedSfixed64Array isEqualToArray:otherMessage.packedSfixed64Array] &&
      
      [self.packedFloatArray isEqualToArray:otherMessage.packedFloatArray] &&
      
      [self.packedDoubleArray isEqualToArray:otherMessage.packedDoubleArray] &&
      
      [self.packedBoolArray isEqualToArray:otherMessage.packedBoolArray] &&
      
      [self.packedEnumArray isEqualToArray:otherMessage.packedEnumArray] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  for (NSNumber* value in self.packedInt32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedInt64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedUint32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedUint64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedSint32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedSint64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedFixed32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedFixed64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedSfixed32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedSfixed64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedFloatArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedDoubleArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.packedBoolArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* element in self.packedEnumArray) {
    hashCode = hashCode * 31 + element.intValue;
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestPackedTypes_Builder()
@property (retain) TestPackedTypes* result;
@end

@implementation TestPackedTypes_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestPackedTypes alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestPackedTypes_Builder*) clear {
  self.result = [[[TestPackedTypes alloc] init] autorelease];
  return self;
}
- (TestPackedTypes_Builder*) clone {
  return [TestPackedTypes builderWithPrototype:result];
}
- (TestPackedTypes*) defaultInstance {
  return [TestPackedTypes defaultInstance];
}
- (TestPackedTypes*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestPackedTypes*) buildPartial {
  TestPackedTypes* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestPackedTypes_Builder*) mergeFrom:(TestPackedTypes*) other {
  if (other == [TestPackedTypes defaultInstance]) {
    return self;
  }
  if (other.packedInt32Array.count > 0) {
    if (result.packedInt32Array == nil) {
      result.packedInt32Array = [[other.packedInt32Array copyWithZone:[other.packedInt32Array zone]] autorelease];
    } else {
      [result.packedInt32Array appendArray:other.packedInt32Array];
    }
  }
  if (other.packedInt64Array.count > 0) {
    if (result.packedInt64Array == nil) {
      result.packedInt64Array = [[other.packedInt64Array copyWithZone:[other.packedInt64Array zone]] autorelease];
    } else {
      [result.packedInt64Array appendArray:other.packedInt64Array];
    }
  }
  if (other.packedUint32Array.count > 0) {
    if (result.packedUint32Array == nil) {
      result.packedUint32Array = [[other.packedUint32Array copyWithZone:[other.packedUint32Array zone]] autorelease];
    } else {
      [result.packedUint32Array appendArray:other.packedUint32Array];
    }
  }
  if (other.packedUint64Array.count > 0) {
    if (result.packedUint64Array == nil) {
      result.packedUint64Array = [[other.packedUint64Array copyWithZone:[other.packedUint64Array zone]] autorelease];
    } else {
      [result.packedUint64Array appendArray:other.packedUint64Array];
    }
  }
  if (other.packedSint32Array.count > 0) {
    if (result.packedSint32Array == nil) {
      result.packedSint32Array = [[other.packedSint32Array copyWithZone:[other.packedSint32Array zone]] autorelease];
    } else {
      [result.packedSint32Array appendArray:other.packedSint32Array];
    }
  }
  if (other.packedSint64Array.count > 0) {
    if (result.packedSint64Array == nil) {
      result.packedSint64Array = [[other.packedSint64Array copyWithZone:[other.packedSint64Array zone]] autorelease];
    } else {
      [result.packedSint64Array appendArray:other.packedSint64Array];
    }
  }
  if (other.packedFixed32Array.count > 0) {
    if (result.packedFixed32Array == nil) {
      result.packedFixed32Array = [[other.packedFixed32Array copyWithZone:[other.packedFixed32Array zone]] autorelease];
    } else {
      [result.packedFixed32Array appendArray:other.packedFixed32Array];
    }
  }
  if (other.packedFixed64Array.count > 0) {
    if (result.packedFixed64Array == nil) {
      result.packedFixed64Array = [[other.packedFixed64Array copyWithZone:[other.packedFixed64Array zone]] autorelease];
    } else {
      [result.packedFixed64Array appendArray:other.packedFixed64Array];
    }
  }
  if (other.packedSfixed32Array.count > 0) {
    if (result.packedSfixed32Array == nil) {
      result.packedSfixed32Array = [[other.packedSfixed32Array copyWithZone:[other.packedSfixed32Array zone]] autorelease];
    } else {
      [result.packedSfixed32Array appendArray:other.packedSfixed32Array];
    }
  }
  if (other.packedSfixed64Array.count > 0) {
    if (result.packedSfixed64Array == nil) {
      result.packedSfixed64Array = [[other.packedSfixed64Array copyWithZone:[other.packedSfixed64Array zone]] autorelease];
    } else {
      [result.packedSfixed64Array appendArray:other.packedSfixed64Array];
    }
  }
  if (other.packedFloatArray.count > 0) {
    if (result.packedFloatArray == nil) {
      result.packedFloatArray = [[other.packedFloatArray copyWithZone:[other.packedFloatArray zone]] autorelease];
    } else {
      [result.packedFloatArray appendArray:other.packedFloatArray];
    }
  }
  if (other.packedDoubleArray.count > 0) {
    if (result.packedDoubleArray == nil) {
      result.packedDoubleArray = [[other.packedDoubleArray copyWithZone:[other.packedDoubleArray zone]] autorelease];
    } else {
      [result.packedDoubleArray appendArray:other.packedDoubleArray];
    }
  }
  if (other.packedBoolArray.count > 0) {
    if (result.packedBoolArray == nil) {
      result.packedBoolArray = [[other.packedBoolArray copyWithZone:[other.packedBoolArray zone]] autorelease];
    } else {
      [result.packedBoolArray appendArray:other.packedBoolArray];
    }
  }
  if (other.packedEnumArray.count > 0) {
    if (result.packedEnumArray == nil) {
      result.packedEnumArray = [[other.packedEnumArray copyWithZone:[other.packedEnumArray zone]] autorelease];
    } else {
      [result.packedEnumArray appendArray:other.packedEnumArray];
    }
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestPackedTypes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestPackedTypes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 722: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedInt32Array == nil) {
          result.packedInt32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedInt32Array addInt32:[input readInt32]];
        }
        [input popLimit:limit];
        break;
      }
      case 730: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedInt64Array == nil) {
          result.packedInt64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedInt64Array addInt64:[input readInt64]];
        }
        [input popLimit:limit];
        break;
      }
      case 738: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedUint32Array == nil) {
          result.packedUint32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt32];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedUint32Array addUint32:[input readUInt32]];
        }
        [input popLimit:limit];
        break;
      }
      case 746: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedUint64Array == nil) {
          result.packedUint64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedUint64Array addUint64:[input readUInt64]];
        }
        [input popLimit:limit];
        break;
      }
      case 754: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedSint32Array == nil) {
          result.packedSint32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedSint32Array addInt32:[input readSInt32]];
        }
        [input popLimit:limit];
        break;
      }
      case 762: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedSint64Array == nil) {
          result.packedSint64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedSint64Array addInt64:[input readSInt64]];
        }
        [input popLimit:limit];
        break;
      }
      case 770: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedFixed32Array == nil) {
          result.packedFixed32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt32];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedFixed32Array addUint32:[input readFixed32]];
        }
        [input popLimit:limit];
        break;
      }
      case 778: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedFixed64Array == nil) {
          result.packedFixed64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedFixed64Array addUint64:[input readFixed64]];
        }
        [input popLimit:limit];
        break;
      }
      case 786: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedSfixed32Array == nil) {
          result.packedSfixed32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedSfixed32Array addInt32:[input readSFixed32]];
        }
        [input popLimit:limit];
        break;
      }
      case 794: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedSfixed64Array == nil) {
          result.packedSfixed64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedSfixed64Array addInt64:[input readSFixed64]];
        }
        [input popLimit:limit];
        break;
      }
      case 802: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedFloatArray == nil) {
          result.packedFloatArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeFloat];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedFloatArray addFloat:[input readFloat]];
        }
        [input popLimit:limit];
        break;
      }
      case 810: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedDoubleArray == nil) {
          result.packedDoubleArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeDouble];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedDoubleArray addDouble:[input readDouble]];
        }
        [input popLimit:limit];
        break;
      }
      case 818: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedBoolArray == nil) {
          result.packedBoolArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeBool];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedBoolArray addBool:[input readBool]];
        }
        [input popLimit:limit];
        break;
      }
      case 826: {
        int32_t length = [input readRawVarint32];
        int32_t oldLimit = [input pushLimit:length];
        while (input.bytesUntilLimit > 0) {
          int32_t value = [input readEnum];
          if (ForeignEnumIsValidValue(value)) {
            [self addPackedEnum:value];
          } else {
            [unknownFields mergeVarintField:103 value:value];
          }
        }
        [input popLimit:oldLimit];
        break;
      }
    }
  }
}
- (PBAppendableArray *)packedInt32 {
  return result.packedInt32Array;
}
- (int32_t)packedInt32AtIndex:(NSUInteger)index {
  return [result packedInt32AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedInt32:(int32_t)value {
  if (result.packedInt32Array == nil) {
    result.packedInt32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.packedInt32Array addInt32:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedInt32Array:(NSArray *)array {
  result.packedInt32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestPackedTypes_Builder *)setPackedInt32Values:(const int32_t *)values count:(NSUInteger)count {
  result.packedInt32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedInt32 {
  result.packedInt32Array = nil;
  return self;
}
- (PBAppendableArray *)packedInt64 {
  return result.packedInt64Array;
}
- (int64_t)packedInt64AtIndex:(NSUInteger)index {
  return [result packedInt64AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedInt64:(int64_t)value {
  if (result.packedInt64Array == nil) {
    result.packedInt64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.packedInt64Array addInt64:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedInt64Array:(NSArray *)array {
  result.packedInt64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestPackedTypes_Builder *)setPackedInt64Values:(const int64_t *)values count:(NSUInteger)count {
  result.packedInt64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedInt64 {
  result.packedInt64Array = nil;
  return self;
}
- (PBAppendableArray *)packedUint32 {
  return result.packedUint32Array;
}
- (uint32_t)packedUint32AtIndex:(NSUInteger)index {
  return [result packedUint32AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedUint32:(uint32_t)value {
  if (result.packedUint32Array == nil) {
    result.packedUint32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt32];
  }
  [result.packedUint32Array addUint32:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedUint32Array:(NSArray *)array {
  result.packedUint32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestPackedTypes_Builder *)setPackedUint32Values:(const uint32_t *)values count:(NSUInteger)count {
  result.packedUint32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedUint32 {
  result.packedUint32Array = nil;
  return self;
}
- (PBAppendableArray *)packedUint64 {
  return result.packedUint64Array;
}
- (uint64_t)packedUint64AtIndex:(NSUInteger)index {
  return [result packedUint64AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedUint64:(uint64_t)value {
  if (result.packedUint64Array == nil) {
    result.packedUint64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
  }
  [result.packedUint64Array addUint64:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedUint64Array:(NSArray *)array {
  result.packedUint64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestPackedTypes_Builder *)setPackedUint64Values:(const uint64_t *)values count:(NSUInteger)count {
  result.packedUint64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedUint64 {
  result.packedUint64Array = nil;
  return self;
}
- (PBAppendableArray *)packedSint32 {
  return result.packedSint32Array;
}
- (int32_t)packedSint32AtIndex:(NSUInteger)index {
  return [result packedSint32AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedSint32:(int32_t)value {
  if (result.packedSint32Array == nil) {
    result.packedSint32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.packedSint32Array addInt32:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedSint32Array:(NSArray *)array {
  result.packedSint32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestPackedTypes_Builder *)setPackedSint32Values:(const int32_t *)values count:(NSUInteger)count {
  result.packedSint32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedSint32 {
  result.packedSint32Array = nil;
  return self;
}
- (PBAppendableArray *)packedSint64 {
  return result.packedSint64Array;
}
- (int64_t)packedSint64AtIndex:(NSUInteger)index {
  return [result packedSint64AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedSint64:(int64_t)value {
  if (result.packedSint64Array == nil) {
    result.packedSint64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.packedSint64Array addInt64:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedSint64Array:(NSArray *)array {
  result.packedSint64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestPackedTypes_Builder *)setPackedSint64Values:(const int64_t *)values count:(NSUInteger)count {
  result.packedSint64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedSint64 {
  result.packedSint64Array = nil;
  return self;
}
- (PBAppendableArray *)packedFixed32 {
  return result.packedFixed32Array;
}
- (uint32_t)packedFixed32AtIndex:(NSUInteger)index {
  return [result packedFixed32AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedFixed32:(uint32_t)value {
  if (result.packedFixed32Array == nil) {
    result.packedFixed32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt32];
  }
  [result.packedFixed32Array addUint32:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedFixed32Array:(NSArray *)array {
  result.packedFixed32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestPackedTypes_Builder *)setPackedFixed32Values:(const uint32_t *)values count:(NSUInteger)count {
  result.packedFixed32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedFixed32 {
  result.packedFixed32Array = nil;
  return self;
}
- (PBAppendableArray *)packedFixed64 {
  return result.packedFixed64Array;
}
- (uint64_t)packedFixed64AtIndex:(NSUInteger)index {
  return [result packedFixed64AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedFixed64:(uint64_t)value {
  if (result.packedFixed64Array == nil) {
    result.packedFixed64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
  }
  [result.packedFixed64Array addUint64:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedFixed64Array:(NSArray *)array {
  result.packedFixed64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestPackedTypes_Builder *)setPackedFixed64Values:(const uint64_t *)values count:(NSUInteger)count {
  result.packedFixed64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedFixed64 {
  result.packedFixed64Array = nil;
  return self;
}
- (PBAppendableArray *)packedSfixed32 {
  return result.packedSfixed32Array;
}
- (int32_t)packedSfixed32AtIndex:(NSUInteger)index {
  return [result packedSfixed32AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedSfixed32:(int32_t)value {
  if (result.packedSfixed32Array == nil) {
    result.packedSfixed32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.packedSfixed32Array addInt32:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedSfixed32Array:(NSArray *)array {
  result.packedSfixed32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestPackedTypes_Builder *)setPackedSfixed32Values:(const int32_t *)values count:(NSUInteger)count {
  result.packedSfixed32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedSfixed32 {
  result.packedSfixed32Array = nil;
  return self;
}
- (PBAppendableArray *)packedSfixed64 {
  return result.packedSfixed64Array;
}
- (int64_t)packedSfixed64AtIndex:(NSUInteger)index {
  return [result packedSfixed64AtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedSfixed64:(int64_t)value {
  if (result.packedSfixed64Array == nil) {
    result.packedSfixed64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.packedSfixed64Array addInt64:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedSfixed64Array:(NSArray *)array {
  result.packedSfixed64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestPackedTypes_Builder *)setPackedSfixed64Values:(const int64_t *)values count:(NSUInteger)count {
  result.packedSfixed64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedSfixed64 {
  result.packedSfixed64Array = nil;
  return self;
}
- (PBAppendableArray *)packedFloat {
  return result.packedFloatArray;
}
- (Float32)packedFloatAtIndex:(NSUInteger)index {
  return [result packedFloatAtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedFloat:(Float32)value {
  if (result.packedFloatArray == nil) {
    result.packedFloatArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeFloat];
  }
  [result.packedFloatArray addFloat:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedFloatArray:(NSArray *)array {
  result.packedFloatArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeFloat];
  return self;
}
- (TestPackedTypes_Builder *)setPackedFloatValues:(const Float32 *)values count:(NSUInteger)count {
  result.packedFloatArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeFloat];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedFloat {
  result.packedFloatArray = nil;
  return self;
}
- (PBAppendableArray *)packedDouble {
  return result.packedDoubleArray;
}
- (Float64)packedDoubleAtIndex:(NSUInteger)index {
  return [result packedDoubleAtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedDouble:(Float64)value {
  if (result.packedDoubleArray == nil) {
    result.packedDoubleArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeDouble];
  }
  [result.packedDoubleArray addDouble:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedDoubleArray:(NSArray *)array {
  result.packedDoubleArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeDouble];
  return self;
}
- (TestPackedTypes_Builder *)setPackedDoubleValues:(const Float64 *)values count:(NSUInteger)count {
  result.packedDoubleArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeDouble];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedDouble {
  result.packedDoubleArray = nil;
  return self;
}
- (PBAppendableArray *)packedBool {
  return result.packedBoolArray;
}
- (BOOL)packedBoolAtIndex:(NSUInteger)index {
  return [result packedBoolAtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedBool:(BOOL)value {
  if (result.packedBoolArray == nil) {
    result.packedBoolArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeBool];
  }
  [result.packedBoolArray addBool:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedBoolArray:(NSArray *)array {
  result.packedBoolArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeBool];
  return self;
}
- (TestPackedTypes_Builder *)setPackedBoolValues:(const BOOL *)values count:(NSUInteger)count {
  result.packedBoolArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeBool];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedBool {
  result.packedBoolArray = nil;
  return self;
}
- (PBAppendableArray *)packedEnum {
  return result.packedEnumArray;
}
- (ForeignEnum)packedEnumAtIndex:(NSUInteger)index {
  return [result packedEnumAtIndex:index];
}
- (TestPackedTypes_Builder *)addPackedEnum:(ForeignEnum)value {
  if (result.packedEnumArray == nil) {
    result.packedEnumArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.packedEnumArray addInt32:value];
  return self;
}
- (TestPackedTypes_Builder *)setPackedEnumArray:(NSArray *)array {
  result.packedEnumArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestPackedTypes_Builder *)setPackedEnumValues:(const ForeignEnum *)values count:(NSUInteger)count {
  result.packedEnumArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestPackedTypes_Builder *)clearPackedEnum {
  result.packedEnumArray = nil;
  return self;
}
@end

@interface TestUnpackedTypes ()
@property (retain) PBAppendableArray * unpackedInt32Array;
@property (retain) PBAppendableArray * unpackedInt64Array;
@property (retain) PBAppendableArray * unpackedUint32Array;
@property (retain) PBAppendableArray * unpackedUint64Array;
@property (retain) PBAppendableArray * unpackedSint32Array;
@property (retain) PBAppendableArray * unpackedSint64Array;
@property (retain) PBAppendableArray * unpackedFixed32Array;
@property (retain) PBAppendableArray * unpackedFixed64Array;
@property (retain) PBAppendableArray * unpackedSfixed32Array;
@property (retain) PBAppendableArray * unpackedSfixed64Array;
@property (retain) PBAppendableArray * unpackedFloatArray;
@property (retain) PBAppendableArray * unpackedDoubleArray;
@property (retain) PBAppendableArray * unpackedBoolArray;
@property (retain) PBAppendableArray * unpackedEnumArray;
@end

@implementation TestUnpackedTypes

@synthesize unpackedInt32Array;
@dynamic unpackedInt32;
@synthesize unpackedInt64Array;
@dynamic unpackedInt64;
@synthesize unpackedUint32Array;
@dynamic unpackedUint32;
@synthesize unpackedUint64Array;
@dynamic unpackedUint64;
@synthesize unpackedSint32Array;
@dynamic unpackedSint32;
@synthesize unpackedSint64Array;
@dynamic unpackedSint64;
@synthesize unpackedFixed32Array;
@dynamic unpackedFixed32;
@synthesize unpackedFixed64Array;
@dynamic unpackedFixed64;
@synthesize unpackedSfixed32Array;
@dynamic unpackedSfixed32;
@synthesize unpackedSfixed64Array;
@dynamic unpackedSfixed64;
@synthesize unpackedFloatArray;
@dynamic unpackedFloat;
@synthesize unpackedDoubleArray;
@dynamic unpackedDouble;
@synthesize unpackedBoolArray;
@dynamic unpackedBool;
@synthesize unpackedEnumArray;
@dynamic unpackedEnum;
- (void) dealloc {
  self.unpackedInt32Array = nil;
  self.unpackedInt64Array = nil;
  self.unpackedUint32Array = nil;
  self.unpackedUint64Array = nil;
  self.unpackedSint32Array = nil;
  self.unpackedSint64Array = nil;
  self.unpackedFixed32Array = nil;
  self.unpackedFixed64Array = nil;
  self.unpackedSfixed32Array = nil;
  self.unpackedSfixed64Array = nil;
  self.unpackedFloatArray = nil;
  self.unpackedDoubleArray = nil;
  self.unpackedBoolArray = nil;
  self.unpackedEnumArray = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static TestUnpackedTypes* defaultTestUnpackedTypesInstance = nil;
+ (void) initialize {
  if (self == [TestUnpackedTypes class]) {
    defaultTestUnpackedTypesInstance = [[TestUnpackedTypes alloc] init];
  }
}
+ (TestUnpackedTypes*) defaultInstance {
  return defaultTestUnpackedTypesInstance;
}
- (TestUnpackedTypes*) defaultInstance {
  return defaultTestUnpackedTypesInstance;
}
- (PBArray *)unpackedInt32 {
  return unpackedInt32Array;
}
- (int32_t)unpackedInt32AtIndex:(NSUInteger)index {
  return [unpackedInt32Array int32AtIndex:index];
}
- (PBArray *)unpackedInt64 {
  return unpackedInt64Array;
}
- (int64_t)unpackedInt64AtIndex:(NSUInteger)index {
  return [unpackedInt64Array int64AtIndex:index];
}
- (PBArray *)unpackedUint32 {
  return unpackedUint32Array;
}
- (uint32_t)unpackedUint32AtIndex:(NSUInteger)index {
  return [unpackedUint32Array uint32AtIndex:index];
}
- (PBArray *)unpackedUint64 {
  return unpackedUint64Array;
}
- (uint64_t)unpackedUint64AtIndex:(NSUInteger)index {
  return [unpackedUint64Array uint64AtIndex:index];
}
- (PBArray *)unpackedSint32 {
  return unpackedSint32Array;
}
- (int32_t)unpackedSint32AtIndex:(NSUInteger)index {
  return [unpackedSint32Array int32AtIndex:index];
}
- (PBArray *)unpackedSint64 {
  return unpackedSint64Array;
}
- (int64_t)unpackedSint64AtIndex:(NSUInteger)index {
  return [unpackedSint64Array int64AtIndex:index];
}
- (PBArray *)unpackedFixed32 {
  return unpackedFixed32Array;
}
- (uint32_t)unpackedFixed32AtIndex:(NSUInteger)index {
  return [unpackedFixed32Array uint32AtIndex:index];
}
- (PBArray *)unpackedFixed64 {
  return unpackedFixed64Array;
}
- (uint64_t)unpackedFixed64AtIndex:(NSUInteger)index {
  return [unpackedFixed64Array uint64AtIndex:index];
}
- (PBArray *)unpackedSfixed32 {
  return unpackedSfixed32Array;
}
- (int32_t)unpackedSfixed32AtIndex:(NSUInteger)index {
  return [unpackedSfixed32Array int32AtIndex:index];
}
- (PBArray *)unpackedSfixed64 {
  return unpackedSfixed64Array;
}
- (int64_t)unpackedSfixed64AtIndex:(NSUInteger)index {
  return [unpackedSfixed64Array int64AtIndex:index];
}
- (PBArray *)unpackedFloat {
  return unpackedFloatArray;
}
- (Float32)unpackedFloatAtIndex:(NSUInteger)index {
  return [unpackedFloatArray floatAtIndex:index];
}
- (PBArray *)unpackedDouble {
  return unpackedDoubleArray;
}
- (Float64)unpackedDoubleAtIndex:(NSUInteger)index {
  return [unpackedDoubleArray doubleAtIndex:index];
}
- (PBArray *)unpackedBool {
  return unpackedBoolArray;
}
- (BOOL)unpackedBoolAtIndex:(NSUInteger)index {
  return [unpackedBoolArray boolAtIndex:index];
}
- (PBArray *)unpackedEnum {
  return unpackedEnumArray;
}
- (ForeignEnum)unpackedEnumAtIndex:(NSUInteger)index {
  return [unpackedEnumArray int32AtIndex:index];
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  const NSUInteger unpackedInt32ArrayCount = self.unpackedInt32Array.count;
  if (unpackedInt32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.unpackedInt32Array.data;
    for (NSUInteger i = 0; i < unpackedInt32ArrayCount; ++i) {
      [output writeInt32:90 value:values[i]];
    }
  }
  const NSUInteger unpackedInt64ArrayCount = self.unpackedInt64Array.count;
  if (unpackedInt64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.unpackedInt64Array.data;
    for (NSUInteger i = 0; i < unpackedInt64ArrayCount; ++i) {
      [output writeInt64:91 value:values[i]];
    }
  }
  const NSUInteger unpackedUint32ArrayCount = self.unpackedUint32Array.count;
  if (unpackedUint32ArrayCount > 0) {
    const uint32_t *values = (const uint32_t *)self.unpackedUint32Array.data;
    for (NSUInteger i = 0; i < unpackedUint32ArrayCount; ++i) {
      [output writeUInt32:92 value:values[i]];
    }
  }
  const NSUInteger unpackedUint64ArrayCount = self.unpackedUint64Array.count;
  if (unpackedUint64ArrayCount > 0) {
    const uint64_t *values = (const uint64_t *)self.unpackedUint64Array.data;
    for (NSUInteger i = 0; i < unpackedUint64ArrayCount; ++i) {
      [output writeUInt64:93 value:values[i]];
    }
  }
  const NSUInteger unpackedSint32ArrayCount = self.unpackedSint32Array.count;
  if (unpackedSint32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.unpackedSint32Array.data;
    for (NSUInteger i = 0; i < unpackedSint32ArrayCount; ++i) {
      [output writeSInt32:94 value:values[i]];
    }
  }
  const NSUInteger unpackedSint64ArrayCount = self.unpackedSint64Array.count;
  if (unpackedSint64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.unpackedSint64Array.data;
    for (NSUInteger i = 0; i < unpackedSint64ArrayCount; ++i) {
      [output writeSInt64:95 value:values[i]];
    }
  }
  const NSUInteger unpackedFixed32ArrayCount = self.unpackedFixed32Array.count;
  if (unpackedFixed32ArrayCount > 0) {
    const uint32_t *values = (const uint32_t *)self.unpackedFixed32Array.data;
    for (NSUInteger i = 0; i < unpackedFixed32ArrayCount; ++i) {
      [output writeFixed32:96 value:values[i]];
    }
  }
  const NSUInteger unpackedFixed64ArrayCount = self.unpackedFixed64Array.count;
  if (unpackedFixed64ArrayCount > 0) {
    const uint64_t *values = (const uint64_t *)self.unpackedFixed64Array.data;
    for (NSUInteger i = 0; i < unpackedFixed64ArrayCount; ++i) {
      [output writeFixed64:97 value:values[i]];
    }
  }
  const NSUInteger unpackedSfixed32ArrayCount = self.unpackedSfixed32Array.count;
  if (unpackedSfixed32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.unpackedSfixed32Array.data;
    for (NSUInteger i = 0; i < unpackedSfixed32ArrayCount; ++i) {
      [output writeSFixed32:98 value:values[i]];
    }
  }
  const NSUInteger unpackedSfixed64ArrayCount = self.unpackedSfixed64Array.count;
  if (unpackedSfixed64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.unpackedSfixed64Array.data;
    for (NSUInteger i = 0; i < unpackedSfixed64ArrayCount; ++i) {
      [output writeSFixed64:99 value:values[i]];
    }
  }
  const NSUInteger unpackedFloatArrayCount = self.unpackedFloatArray.count;
  if (unpackedFloatArrayCount > 0) {
    const Float32 *values = (const Float32 *)self.unpackedFloatArray.data;
    for (NSUInteger i = 0; i < unpackedFloatArrayCount; ++i) {
      [output writeFloat:100 value:values[i]];
    }
  }
  const NSUInteger unpackedDoubleArrayCount = self.unpackedDoubleArray.count;
  if (unpackedDoubleArrayCount > 0) {
    const Float64 *values = (const Float64 *)self.unpackedDoubleArray.data;
    for (NSUInteger i = 0; i < unpackedDoubleArrayCount; ++i) {
      [output writeDouble:101 value:values[i]];
    }
  }
  const NSUInteger unpackedBoolArrayCount = self.unpackedBoolArray.count;
  if (unpackedBoolArrayCount > 0) {
    const BOOL *values = (const BOOL *)self.unpackedBoolArray.data;
    for (NSUInteger i = 0; i < unpackedBoolArrayCount; ++i) {
      [output writeBool:102 value:values[i]];
    }
  }
  const NSUInteger unpackedEnumArrayCount = self.unpackedEnumArray.count;
  const ForeignEnum *unpackedEnumArrayValues = (const ForeignEnum *)self.unpackedEnumArray.data;
  for (NSUInteger i = 0; i < unpackedEnumArrayCount; ++i) {
    [output writeEnum:103 value:unpackedEnumArrayValues[i]];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedInt32Array.count;
    const int32_t *values = (const int32_t *)self.unpackedInt32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedInt64Array.count;
    const int64_t *values = (const int64_t *)self.unpackedInt64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedUint32Array.count;
    const uint32_t *values = (const uint32_t *)self.unpackedUint32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeUInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedUint64Array.count;
    const uint64_t *values = (const uint64_t *)self.unpackedUint64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeUInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedSint32Array.count;
    const int32_t *values = (const int32_t *)self.unpackedSint32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeSInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedSint64Array.count;
    const int64_t *values = (const int64_t *)self.unpackedSint64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeSInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedFixed32Array.count;
    dataSize = 4 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedFixed64Array.count;
    dataSize = 8 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedSfixed32Array.count;
    dataSize = 4 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedSfixed64Array.count;
    dataSize = 8 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedFloatArray.count;
    dataSize = 4 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedDoubleArray.count;
    dataSize = 8 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedBoolArray.count;
    dataSize = 1 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.unpackedEnumArray.count;
    const ForeignEnum *values = (const ForeignEnum *)self.unpackedEnumArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeEnumSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestUnpackedTypes*) parseFromData:(NSData*) data {
  return (TestUnpackedTypes*)[[[TestUnpackedTypes builder] mergeFromData:data] build];
}
+ (TestUnpackedTypes*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestUnpackedTypes*)[[[TestUnpackedTypes builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestUnpackedTypes*) parseFromInputStream:(NSInputStream*) input {
  return (TestUnpackedTypes*)[[[TestUnpackedTypes builder] mergeFromInputStream:input] build];
}
+ (TestUnpackedTypes*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestUnpackedTypes*)[[[TestUnpackedTypes builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestUnpackedTypes*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestUnpackedTypes*)[[[TestUnpackedTypes builder] mergeFromCodedInputStream:input] build];
}
+ (TestUnpackedTypes*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestUnpackedTypes*)[[[TestUnpackedTypes builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestUnpackedTypes_Builder*) builder {
  return [[[TestUnpackedTypes_Builder alloc] init] autorelease];
}
+ (TestUnpackedTypes_Builder*) builderWithPrototype:(TestUnpackedTypes*) prototype {
  return [[TestUnpackedTypes builder] mergeFrom:prototype];
}
- (TestUnpackedTypes_Builder*) builder {
  return [TestUnpackedTypes builder];
}
- (TestUnpackedTypes_Builder*) toBuilder {
  return [TestUnpackedTypes builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  for (NSNumber* value in self.unpackedInt32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedInt32", value];
  }
  for (NSNumber* value in self.unpackedInt64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedInt64", value];
  }
  for (NSNumber* value in self.unpackedUint32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedUint32", value];
  }
  for (NSNumber* value in self.unpackedUint64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedUint64", value];
  }
  for (NSNumber* value in self.unpackedSint32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedSint32", value];
  }
  for (NSNumber* value in self.unpackedSint64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedSint64", value];
  }
  for (NSNumber* value in self.unpackedFixed32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedFixed32", value];
  }
  for (NSNumber* value in self.unpackedFixed64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedFixed64", value];
  }
  for (NSNumber* value in self.unpackedSfixed32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedSfixed32", value];
  }
  for (NSNumber* value in self.unpackedSfixed64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedSfixed64", value];
  }
  for (NSNumber* value in self.unpackedFloatArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedFloat", value];
  }
  for (NSNumber* value in self.unpackedDoubleArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedDouble", value];
  }
  for (NSNumber* value in self.unpackedBoolArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"unpackedBool", value];
  }
  for (NSNumber* element in self.unpackedEnumArray) {
    [output appendFormat:@"%@%@: %d\n", indent, @"unpackedEnum", element.intValue];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestUnpackedTypes class]]) {
    return NO;
  }
  TestUnpackedTypes *otherMessage = other;
  return
      [self.unpackedInt32Array isEqualToArray:otherMessage.unpackedInt32Array] &&
      
      [self.unpackedInt64Array isEqualToArray:otherMessage.unpackedInt64Array] &&
      
      [self.unpackedUint32Array isEqualToArray:otherMessage.unpackedUint32Array] &&
      
      [self.unpackedUint64Array isEqualToArray:otherMessage.unpackedUint64Array] &&
      
      [self.unpackedSint32Array isEqualToArray:otherMessage.unpackedSint32Array] &&
      
      [self.unpackedSint64Array isEqualToArray:otherMessage.unpackedSint64Array] &&
      
      [self.unpackedFixed32Array isEqualToArray:otherMessage.unpackedFixed32Array] &&
      
      [self.unpackedFixed64Array isEqualToArray:otherMessage.unpackedFixed64Array] &&
      
      [self.unpackedSfixed32Array isEqualToArray:otherMessage.unpackedSfixed32Array] &&
      
      [self.unpackedSfixed64Array isEqualToArray:otherMessage.unpackedSfixed64Array] &&
      
      [self.unpackedFloatArray isEqualToArray:otherMessage.unpackedFloatArray] &&
      
      [self.unpackedDoubleArray isEqualToArray:otherMessage.unpackedDoubleArray] &&
      
      [self.unpackedBoolArray isEqualToArray:otherMessage.unpackedBoolArray] &&
      
      [self.unpackedEnumArray isEqualToArray:otherMessage.unpackedEnumArray] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  for (NSNumber* value in self.unpackedInt32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedInt64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedUint32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedUint64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedSint32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedSint64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedFixed32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedFixed64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedSfixed32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedSfixed64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedFloatArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedDoubleArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.unpackedBoolArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* element in self.unpackedEnumArray) {
    hashCode = hashCode * 31 + element.intValue;
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestUnpackedTypes_Builder()
@property (retain) TestUnpackedTypes* result;
@end

@implementation TestUnpackedTypes_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestUnpackedTypes alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestUnpackedTypes_Builder*) clear {
  self.result = [[[TestUnpackedTypes alloc] init] autorelease];
  return self;
}
- (TestUnpackedTypes_Builder*) clone {
  return [TestUnpackedTypes builderWithPrototype:result];
}
- (TestUnpackedTypes*) defaultInstance {
  return [TestUnpackedTypes defaultInstance];
}
- (TestUnpackedTypes*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestUnpackedTypes*) buildPartial {
  TestUnpackedTypes* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestUnpackedTypes_Builder*) mergeFrom:(TestUnpackedTypes*) other {
  if (other == [TestUnpackedTypes defaultInstance]) {
    return self;
  }
  if (other.unpackedInt32Array.count > 0) {
    if (result.unpackedInt32Array == nil) {
      result.unpackedInt32Array = [[other.unpackedInt32Array copyWithZone:[other.unpackedInt32Array zone]] autorelease];
    } else {
      [result.unpackedInt32Array appendArray:other.unpackedInt32Array];
    }
  }
  if (other.unpackedInt64Array.count > 0) {
    if (result.unpackedInt64Array == nil) {
      result.unpackedInt64Array = [[other.unpackedInt64Array copyWithZone:[other.unpackedInt64Array zone]] autorelease];
    } else {
      [result.unpackedInt64Array appendArray:other.unpackedInt64Array];
    }
  }
  if (other.unpackedUint32Array.count > 0) {
    if (result.unpackedUint32Array == nil) {
      result.unpackedUint32Array = [[other.unpackedUint32Array copyWithZone:[other.unpackedUint32Array zone]] autorelease];
    } else {
      [result.unpackedUint32Array appendArray:other.unpackedUint32Array];
    }
  }
  if (other.unpackedUint64Array.count > 0) {
    if (result.unpackedUint64Array == nil) {
      result.unpackedUint64Array = [[other.unpackedUint64Array copyWithZone:[other.unpackedUint64Array zone]] autorelease];
    } else {
      [result.unpackedUint64Array appendArray:other.unpackedUint64Array];
    }
  }
  if (other.unpackedSint32Array.count > 0) {
    if (result.unpackedSint32Array == nil) {
      result.unpackedSint32Array = [[other.unpackedSint32Array copyWithZone:[other.unpackedSint32Array zone]] autorelease];
    } else {
      [result.unpackedSint32Array appendArray:other.unpackedSint32Array];
    }
  }
  if (other.unpackedSint64Array.count > 0) {
    if (result.unpackedSint64Array == nil) {
      result.unpackedSint64Array = [[other.unpackedSint64Array copyWithZone:[other.unpackedSint64Array zone]] autorelease];
    } else {
      [result.unpackedSint64Array appendArray:other.unpackedSint64Array];
    }
  }
  if (other.unpackedFixed32Array.count > 0) {
    if (result.unpackedFixed32Array == nil) {
      result.unpackedFixed32Array = [[other.unpackedFixed32Array copyWithZone:[other.unpackedFixed32Array zone]] autorelease];
    } else {
      [result.unpackedFixed32Array appendArray:other.unpackedFixed32Array];
    }
  }
  if (other.unpackedFixed64Array.count > 0) {
    if (result.unpackedFixed64Array == nil) {
      result.unpackedFixed64Array = [[other.unpackedFixed64Array copyWithZone:[other.unpackedFixed64Array zone]] autorelease];
    } else {
      [result.unpackedFixed64Array appendArray:other.unpackedFixed64Array];
    }
  }
  if (other.unpackedSfixed32Array.count > 0) {
    if (result.unpackedSfixed32Array == nil) {
      result.unpackedSfixed32Array = [[other.unpackedSfixed32Array copyWithZone:[other.unpackedSfixed32Array zone]] autorelease];
    } else {
      [result.unpackedSfixed32Array appendArray:other.unpackedSfixed32Array];
    }
  }
  if (other.unpackedSfixed64Array.count > 0) {
    if (result.unpackedSfixed64Array == nil) {
      result.unpackedSfixed64Array = [[other.unpackedSfixed64Array copyWithZone:[other.unpackedSfixed64Array zone]] autorelease];
    } else {
      [result.unpackedSfixed64Array appendArray:other.unpackedSfixed64Array];
    }
  }
  if (other.unpackedFloatArray.count > 0) {
    if (result.unpackedFloatArray == nil) {
      result.unpackedFloatArray = [[other.unpackedFloatArray copyWithZone:[other.unpackedFloatArray zone]] autorelease];
    } else {
      [result.unpackedFloatArray appendArray:other.unpackedFloatArray];
    }
  }
  if (other.unpackedDoubleArray.count > 0) {
    if (result.unpackedDoubleArray == nil) {
      result.unpackedDoubleArray = [[other.unpackedDoubleArray copyWithZone:[other.unpackedDoubleArray zone]] autorelease];
    } else {
      [result.unpackedDoubleArray appendArray:other.unpackedDoubleArray];
    }
  }
  if (other.unpackedBoolArray.count > 0) {
    if (result.unpackedBoolArray == nil) {
      result.unpackedBoolArray = [[other.unpackedBoolArray copyWithZone:[other.unpackedBoolArray zone]] autorelease];
    } else {
      [result.unpackedBoolArray appendArray:other.unpackedBoolArray];
    }
  }
  if (other.unpackedEnumArray.count > 0) {
    if (result.unpackedEnumArray == nil) {
      result.unpackedEnumArray = [[other.unpackedEnumArray copyWithZone:[other.unpackedEnumArray zone]] autorelease];
    } else {
      [result.unpackedEnumArray appendArray:other.unpackedEnumArray];
    }
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestUnpackedTypes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestUnpackedTypes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 720: {
        [self addUnpackedInt32:[input readInt32]];
        break;
      }
      case 728: {
        [self addUnpackedInt64:[input readInt64]];
        break;
      }
      case 736: {
        [self addUnpackedUint32:[input readUInt32]];
        break;
      }
      case 744: {
        [self addUnpackedUint64:[input readUInt64]];
        break;
      }
      case 752: {
        [self addUnpackedSint32:[input readSInt32]];
        break;
      }
      case 760: {
        [self addUnpackedSint64:[input readSInt64]];
        break;
      }
      case 773: {
        [self addUnpackedFixed32:[input readFixed32]];
        break;
      }
      case 777: {
        [self addUnpackedFixed64:[input readFixed64]];
        break;
      }
      case 789: {
        [self addUnpackedSfixed32:[input readSFixed32]];
        break;
      }
      case 793: {
        [self addUnpackedSfixed64:[input readSFixed64]];
        break;
      }
      case 805: {
        [self addUnpackedFloat:[input readFloat]];
        break;
      }
      case 809: {
        [self addUnpackedDouble:[input readDouble]];
        break;
      }
      case 816: {
        [self addUnpackedBool:[input readBool]];
        break;
      }
      case 824: {
        int32_t value = [input readEnum];
        if (ForeignEnumIsValidValue(value)) {
          [self addUnpackedEnum:value];
        } else {
          [unknownFields mergeVarintField:103 value:value];
        }
        break;
      }
    }
  }
}
- (PBAppendableArray *)unpackedInt32 {
  return result.unpackedInt32Array;
}
- (int32_t)unpackedInt32AtIndex:(NSUInteger)index {
  return [result unpackedInt32AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedInt32:(int32_t)value {
  if (result.unpackedInt32Array == nil) {
    result.unpackedInt32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.unpackedInt32Array addInt32:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedInt32Array:(NSArray *)array {
  result.unpackedInt32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedInt32Values:(const int32_t *)values count:(NSUInteger)count {
  result.unpackedInt32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedInt32 {
  result.unpackedInt32Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedInt64 {
  return result.unpackedInt64Array;
}
- (int64_t)unpackedInt64AtIndex:(NSUInteger)index {
  return [result unpackedInt64AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedInt64:(int64_t)value {
  if (result.unpackedInt64Array == nil) {
    result.unpackedInt64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.unpackedInt64Array addInt64:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedInt64Array:(NSArray *)array {
  result.unpackedInt64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedInt64Values:(const int64_t *)values count:(NSUInteger)count {
  result.unpackedInt64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedInt64 {
  result.unpackedInt64Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedUint32 {
  return result.unpackedUint32Array;
}
- (uint32_t)unpackedUint32AtIndex:(NSUInteger)index {
  return [result unpackedUint32AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedUint32:(uint32_t)value {
  if (result.unpackedUint32Array == nil) {
    result.unpackedUint32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt32];
  }
  [result.unpackedUint32Array addUint32:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedUint32Array:(NSArray *)array {
  result.unpackedUint32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedUint32Values:(const uint32_t *)values count:(NSUInteger)count {
  result.unpackedUint32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedUint32 {
  result.unpackedUint32Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedUint64 {
  return result.unpackedUint64Array;
}
- (uint64_t)unpackedUint64AtIndex:(NSUInteger)index {
  return [result unpackedUint64AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedUint64:(uint64_t)value {
  if (result.unpackedUint64Array == nil) {
    result.unpackedUint64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
  }
  [result.unpackedUint64Array addUint64:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedUint64Array:(NSArray *)array {
  result.unpackedUint64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedUint64Values:(const uint64_t *)values count:(NSUInteger)count {
  result.unpackedUint64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedUint64 {
  result.unpackedUint64Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedSint32 {
  return result.unpackedSint32Array;
}
- (int32_t)unpackedSint32AtIndex:(NSUInteger)index {
  return [result unpackedSint32AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedSint32:(int32_t)value {
  if (result.unpackedSint32Array == nil) {
    result.unpackedSint32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.unpackedSint32Array addInt32:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedSint32Array:(NSArray *)array {
  result.unpackedSint32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedSint32Values:(const int32_t *)values count:(NSUInteger)count {
  result.unpackedSint32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedSint32 {
  result.unpackedSint32Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedSint64 {
  return result.unpackedSint64Array;
}
- (int64_t)unpackedSint64AtIndex:(NSUInteger)index {
  return [result unpackedSint64AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedSint64:(int64_t)value {
  if (result.unpackedSint64Array == nil) {
    result.unpackedSint64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.unpackedSint64Array addInt64:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedSint64Array:(NSArray *)array {
  result.unpackedSint64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedSint64Values:(const int64_t *)values count:(NSUInteger)count {
  result.unpackedSint64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedSint64 {
  result.unpackedSint64Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedFixed32 {
  return result.unpackedFixed32Array;
}
- (uint32_t)unpackedFixed32AtIndex:(NSUInteger)index {
  return [result unpackedFixed32AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedFixed32:(uint32_t)value {
  if (result.unpackedFixed32Array == nil) {
    result.unpackedFixed32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt32];
  }
  [result.unpackedFixed32Array addUint32:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedFixed32Array:(NSArray *)array {
  result.unpackedFixed32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedFixed32Values:(const uint32_t *)values count:(NSUInteger)count {
  result.unpackedFixed32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedFixed32 {
  result.unpackedFixed32Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedFixed64 {
  return result.unpackedFixed64Array;
}
- (uint64_t)unpackedFixed64AtIndex:(NSUInteger)index {
  return [result unpackedFixed64AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedFixed64:(uint64_t)value {
  if (result.unpackedFixed64Array == nil) {
    result.unpackedFixed64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
  }
  [result.unpackedFixed64Array addUint64:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedFixed64Array:(NSArray *)array {
  result.unpackedFixed64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedFixed64Values:(const uint64_t *)values count:(NSUInteger)count {
  result.unpackedFixed64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedFixed64 {
  result.unpackedFixed64Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedSfixed32 {
  return result.unpackedSfixed32Array;
}
- (int32_t)unpackedSfixed32AtIndex:(NSUInteger)index {
  return [result unpackedSfixed32AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedSfixed32:(int32_t)value {
  if (result.unpackedSfixed32Array == nil) {
    result.unpackedSfixed32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.unpackedSfixed32Array addInt32:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedSfixed32Array:(NSArray *)array {
  result.unpackedSfixed32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedSfixed32Values:(const int32_t *)values count:(NSUInteger)count {
  result.unpackedSfixed32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedSfixed32 {
  result.unpackedSfixed32Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedSfixed64 {
  return result.unpackedSfixed64Array;
}
- (int64_t)unpackedSfixed64AtIndex:(NSUInteger)index {
  return [result unpackedSfixed64AtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedSfixed64:(int64_t)value {
  if (result.unpackedSfixed64Array == nil) {
    result.unpackedSfixed64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.unpackedSfixed64Array addInt64:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedSfixed64Array:(NSArray *)array {
  result.unpackedSfixed64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedSfixed64Values:(const int64_t *)values count:(NSUInteger)count {
  result.unpackedSfixed64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedSfixed64 {
  result.unpackedSfixed64Array = nil;
  return self;
}
- (PBAppendableArray *)unpackedFloat {
  return result.unpackedFloatArray;
}
- (Float32)unpackedFloatAtIndex:(NSUInteger)index {
  return [result unpackedFloatAtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedFloat:(Float32)value {
  if (result.unpackedFloatArray == nil) {
    result.unpackedFloatArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeFloat];
  }
  [result.unpackedFloatArray addFloat:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedFloatArray:(NSArray *)array {
  result.unpackedFloatArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeFloat];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedFloatValues:(const Float32 *)values count:(NSUInteger)count {
  result.unpackedFloatArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeFloat];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedFloat {
  result.unpackedFloatArray = nil;
  return self;
}
- (PBAppendableArray *)unpackedDouble {
  return result.unpackedDoubleArray;
}
- (Float64)unpackedDoubleAtIndex:(NSUInteger)index {
  return [result unpackedDoubleAtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedDouble:(Float64)value {
  if (result.unpackedDoubleArray == nil) {
    result.unpackedDoubleArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeDouble];
  }
  [result.unpackedDoubleArray addDouble:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedDoubleArray:(NSArray *)array {
  result.unpackedDoubleArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeDouble];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedDoubleValues:(const Float64 *)values count:(NSUInteger)count {
  result.unpackedDoubleArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeDouble];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedDouble {
  result.unpackedDoubleArray = nil;
  return self;
}
- (PBAppendableArray *)unpackedBool {
  return result.unpackedBoolArray;
}
- (BOOL)unpackedBoolAtIndex:(NSUInteger)index {
  return [result unpackedBoolAtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedBool:(BOOL)value {
  if (result.unpackedBoolArray == nil) {
    result.unpackedBoolArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeBool];
  }
  [result.unpackedBoolArray addBool:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedBoolArray:(NSArray *)array {
  result.unpackedBoolArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeBool];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedBoolValues:(const BOOL *)values count:(NSUInteger)count {
  result.unpackedBoolArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeBool];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedBool {
  result.unpackedBoolArray = nil;
  return self;
}
- (PBAppendableArray *)unpackedEnum {
  return result.unpackedEnumArray;
}
- (ForeignEnum)unpackedEnumAtIndex:(NSUInteger)index {
  return [result unpackedEnumAtIndex:index];
}
- (TestUnpackedTypes_Builder *)addUnpackedEnum:(ForeignEnum)value {
  if (result.unpackedEnumArray == nil) {
    result.unpackedEnumArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.unpackedEnumArray addInt32:value];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedEnumArray:(NSArray *)array {
  result.unpackedEnumArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)setUnpackedEnumValues:(const ForeignEnum *)values count:(NSUInteger)count {
  result.unpackedEnumArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestUnpackedTypes_Builder *)clearUnpackedEnum {
  result.unpackedEnumArray = nil;
  return self;
}
@end

@interface TestPackedExtensions ()
@end

@implementation TestPackedExtensions

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static TestPackedExtensions* defaultTestPackedExtensionsInstance = nil;
+ (void) initialize {
  if (self == [TestPackedExtensions class]) {
    defaultTestPackedExtensionsInstance = [[TestPackedExtensions alloc] init];
  }
}
+ (TestPackedExtensions*) defaultInstance {
  return defaultTestPackedExtensionsInstance;
}
- (TestPackedExtensions*) defaultInstance {
  return defaultTestPackedExtensionsInstance;
}
- (BOOL) isInitialized {
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self writeExtensionsToCodedOutputStream:output
                                      from:1
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestPackedExtensions*) parseFromData:(NSData*) data {
  return (TestPackedExtensions*)[[[TestPackedExtensions builder] mergeFromData:data] build];
}
+ (TestPackedExtensions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestPackedExtensions*)[[[TestPackedExtensions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestPackedExtensions*) parseFromInputStream:(NSInputStream*) input {
  return (TestPackedExtensions*)[[[TestPackedExtensions builder] mergeFromInputStream:input] build];
}
+ (TestPackedExtensions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestPackedExtensions*)[[[TestPackedExtensions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestPackedExtensions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestPackedExtensions*)[[[TestPackedExtensions builder] mergeFromCodedInputStream:input] build];
}
+ (TestPackedExtensions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestPackedExtensions*)[[[TestPackedExtensions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestPackedExtensions_Builder*) builder {
  return [[[TestPackedExtensions_Builder alloc] init] autorelease];
}
+ (TestPackedExtensions_Builder*) builderWithPrototype:(TestPackedExtensions*) prototype {
  return [[TestPackedExtensions builder] mergeFrom:prototype];
}
- (TestPackedExtensions_Builder*) builder {
  return [TestPackedExtensions builder];
}
- (TestPackedExtensions_Builder*) toBuilder {
  return [TestPackedExtensions builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self writeExtensionDescriptionToMutableString:(NSMutableString*)output
                                            from:1
                                              to:536870912
                                      withIndent:indent];
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestPackedExtensions class]]) {
    return NO;
  }
  TestPackedExtensions *otherMessage = other;
  return
      [self isEqualExtensionsInOther:otherMessage from:1 to:536870912] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self hashExtensionsFrom:1 to:536870912];
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestPackedExtensions_Builder()
@property (retain) TestPackedExtensions* result;
@end

@implementation TestPackedExtensions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestPackedExtensions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (TestPackedExtensions_Builder*) clear {
  self.result = [[[TestPackedExtensions alloc] init] autorelease];
  return self;
}
- (TestPackedExtensions_Builder*) clone {
  return [TestPackedExtensions builderWithPrototype:result];
}
- (TestPackedExtensions*) defaultInstance {
  return [TestPackedExtensions defaultInstance];
}
- (TestPackedExtensions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestPackedExtensions*) buildPartial {
  TestPackedExtensions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestPackedExtensions_Builder*) mergeFrom:(TestPackedExtensions*) other {
  if (other == [TestPackedExtensions defaultInstance]) {
    return self;
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestPackedExtensions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestPackedExtensions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

@interface TestDynamicExtensions ()
@property uint32_t scalarExtension;
@property ForeignEnum enumExtension;
@property TestDynamicExtensions_DynamicEnumType dynamicEnumExtension;
@property (retain) ForeignMessage* messageExtension;
@property (retain) TestDynamicExtensions_DynamicMessageType* dynamicMessageExtension;
@property (retain) PBAppendableArray * repeatedExtensionArray;
@property (retain) PBAppendableArray * packedExtensionArray;
@end

@implementation TestDynamicExtensions

- (BOOL) hasScalarExtension {
  return !!hasScalarExtension_;
}
- (void) setHasScalarExtension:(BOOL) value {
  hasScalarExtension_ = !!value;
}
@synthesize scalarExtension;
- (BOOL) hasEnumExtension {
  return !!hasEnumExtension_;
}
- (void) setHasEnumExtension:(BOOL) value {
  hasEnumExtension_ = !!value;
}
@synthesize enumExtension;
- (BOOL) hasDynamicEnumExtension {
  return !!hasDynamicEnumExtension_;
}
- (void) setHasDynamicEnumExtension:(BOOL) value {
  hasDynamicEnumExtension_ = !!value;
}
@synthesize dynamicEnumExtension;
- (BOOL) hasMessageExtension {
  return !!hasMessageExtension_;
}
- (void) setHasMessageExtension:(BOOL) value {
  hasMessageExtension_ = !!value;
}
@synthesize messageExtension;
- (BOOL) hasDynamicMessageExtension {
  return !!hasDynamicMessageExtension_;
}
- (void) setHasDynamicMessageExtension:(BOOL) value {
  hasDynamicMessageExtension_ = !!value;
}
@synthesize dynamicMessageExtension;
@synthesize repeatedExtensionArray;
@dynamic repeatedExtension;
@synthesize packedExtensionArray;
@dynamic packedExtension;
- (void) dealloc {
  self.messageExtension = nil;
  self.dynamicMessageExtension = nil;
  self.repeatedExtensionArray = nil;
  self.packedExtensionArray = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.scalarExtension = 0;
    self.enumExtension = ForeignEnumForeignFoo;
    self.dynamicEnumExtension = TestDynamicExtensions_DynamicEnumTypeDynamicFoo;
    self.messageExtension = [ForeignMessage defaultInstance];
    self.dynamicMessageExtension = [TestDynamicExtensions_DynamicMessageType defaultInstance];
  }
  return self;
}
static TestDynamicExtensions* defaultTestDynamicExtensionsInstance = nil;
+ (void) initialize {
  if (self == [TestDynamicExtensions class]) {
    defaultTestDynamicExtensionsInstance = [[TestDynamicExtensions alloc] init];
  }
}
+ (TestDynamicExtensions*) defaultInstance {
  return defaultTestDynamicExtensionsInstance;
}
- (TestDynamicExtensions*) defaultInstance {
  return defaultTestDynamicExtensionsInstance;
}
- (PBArray *)repeatedExtension {
  return repeatedExtensionArray;
}
- (NSString*)repeatedExtensionAtIndex:(NSUInteger)index {
  return [repeatedExtensionArray objectAtIndex:index];
}
- (PBArray *)packedExtension {
  return packedExtensionArray;
}
- (int32_t)packedExtensionAtIndex:(NSUInteger)index {
  return [packedExtensionArray int32AtIndex:index];
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasScalarExtension) {
    [output writeFixed32:2000 value:self.scalarExtension];
  }
  if (self.hasEnumExtension) {
    [output writeEnum:2001 value:self.enumExtension];
  }
  if (self.hasDynamicEnumExtension) {
    [output writeEnum:2002 value:self.dynamicEnumExtension];
  }
  if (self.hasMessageExtension) {
    [output writeMessage:2003 value:self.messageExtension];
  }
  if (self.hasDynamicMessageExtension) {
    [output writeMessage:2004 value:self.dynamicMessageExtension];
  }
  const NSUInteger repeatedExtensionArrayCount = self.repeatedExtensionArray.count;
  if (repeatedExtensionArrayCount > 0) {
    const NSString* *values = (const NSString* *)self.repeatedExtensionArray.data;
    for (NSUInteger i = 0; i < repeatedExtensionArrayCount; ++i) {
      [output writeString:2005 value:values[i]];
    }
  }
  const NSUInteger packedExtensionArrayCount = self.packedExtensionArray.count;
  if (packedExtensionArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.packedExtensionArray.data;
    [output writeRawVarint32:16050];
    [output writeRawVarint32:packedExtensionMemoizedSerializedSize];
    for (NSUInteger i = 0; i < packedExtensionArrayCount; ++i) {
      [output writeSInt32NoTag:values[i]];
    }
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasScalarExtension) {
    size += computeFixed32Size(2000, self.scalarExtension);
  }
  if (self.hasEnumExtension) {
    size += computeEnumSize(2001, self.enumExtension);
  }
  if (self.hasDynamicEnumExtension) {
    size += computeEnumSize(2002, self.dynamicEnumExtension);
  }
  if (self.hasMessageExtension) {
    size += computeMessageSize(2003, self.messageExtension);
  }
  if (self.hasDynamicMessageExtension) {
    size += computeMessageSize(2004, self.dynamicMessageExtension);
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedExtensionArray.count;
    const NSString* *values = (const NSString* *)self.repeatedExtensionArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeStringSizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.packedExtensionArray.count;
    const int32_t *values = (const int32_t *)self.packedExtensionArray.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeSInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    if (count > 0) {
      size += 2;
      size += computeInt32SizeNoTag(dataSize);
    }
    packedExtensionMemoizedSerializedSize = dataSize;
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestDynamicExtensions*) parseFromData:(NSData*) data {
  return (TestDynamicExtensions*)[[[TestDynamicExtensions builder] mergeFromData:data] build];
}
+ (TestDynamicExtensions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDynamicExtensions*)[[[TestDynamicExtensions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestDynamicExtensions*) parseFromInputStream:(NSInputStream*) input {
  return (TestDynamicExtensions*)[[[TestDynamicExtensions builder] mergeFromInputStream:input] build];
}
+ (TestDynamicExtensions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDynamicExtensions*)[[[TestDynamicExtensions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDynamicExtensions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestDynamicExtensions*)[[[TestDynamicExtensions builder] mergeFromCodedInputStream:input] build];
}
+ (TestDynamicExtensions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDynamicExtensions*)[[[TestDynamicExtensions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDynamicExtensions_Builder*) builder {
  return [[[TestDynamicExtensions_Builder alloc] init] autorelease];
}
+ (TestDynamicExtensions_Builder*) builderWithPrototype:(TestDynamicExtensions*) prototype {
  return [[TestDynamicExtensions builder] mergeFrom:prototype];
}
- (TestDynamicExtensions_Builder*) builder {
  return [TestDynamicExtensions builder];
}
- (TestDynamicExtensions_Builder*) toBuilder {
  return [TestDynamicExtensions builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasScalarExtension) {
    [output appendFormat:@"%@%@: %@\n", indent, @"scalarExtension", [NSNumber numberWithInt:self.scalarExtension]];
  }
  if (self.hasEnumExtension) {
    [output appendFormat:@"%@%@: %d\n", indent, @"enumExtension", self.enumExtension];
  }
  if (self.hasDynamicEnumExtension) {
    [output appendFormat:@"%@%@: %d\n", indent, @"dynamicEnumExtension", self.dynamicEnumExtension];
  }
  if (self.hasMessageExtension) {
    [output appendFormat:@"%@%@ {\n", indent, @"messageExtension"];
    [self.messageExtension writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  if (self.hasDynamicMessageExtension) {
    [output appendFormat:@"%@%@ {\n", indent, @"dynamicMessageExtension"];
    [self.dynamicMessageExtension writeDescriptionTo:output
                         withIndent:[NSString stringWithFormat:@"%@  ", indent]];
    [output appendFormat:@"%@}\n", indent];
  }
  for (NSString* element in self.repeatedExtensionArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedExtension", element];
  }
  for (NSNumber* value in self.packedExtensionArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"packedExtension", value];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestDynamicExtensions class]]) {
    return NO;
  }
  TestDynamicExtensions *otherMessage = other;
  return
      self.hasScalarExtension == otherMessage.hasScalarExtension &&
      (!self.hasScalarExtension || self.scalarExtension == otherMessage.scalarExtension) &&
      
      self.hasEnumExtension == otherMessage.hasEnumExtension &&
      (!self.hasEnumExtension || self.enumExtension != otherMessage.enumExtension) &&
      
      self.hasDynamicEnumExtension == otherMessage.hasDynamicEnumExtension &&
      (!self.hasDynamicEnumExtension || self.dynamicEnumExtension != otherMessage.dynamicEnumExtension) &&
      
      self.hasMessageExtension == otherMessage.hasMessageExtension &&
      (!self.hasMessageExtension || [self.messageExtension isEqual:otherMessage.messageExtension]) &&
      
      self.hasDynamicMessageExtension == otherMessage.hasDynamicMessageExtension &&
      (!self.hasDynamicMessageExtension || [self.dynamicMessageExtension isEqual:otherMessage.dynamicMessageExtension]) &&
      
      [self.repeatedExtensionArray isEqualToArray:otherMessage.repeatedExtensionArray] &&
      
      [self.packedExtensionArray isEqualToArray:otherMessage.packedExtensionArray] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasScalarExtension) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.scalarExtension] hash];
  }
  if (self.hasEnumExtension) {
    hashCode = hashCode * 31 + self.enumExtension;
  }
  if (self.hasDynamicEnumExtension) {
    hashCode = hashCode * 31 + self.dynamicEnumExtension;
  }
  if (self.hasMessageExtension) {
    hashCode = hashCode * 31 + [self.messageExtension hash];
  }
  if (self.hasDynamicMessageExtension) {
    hashCode = hashCode * 31 + [self.dynamicMessageExtension hash];
  }
  for (NSString* element in self.repeatedExtensionArray) {
    hashCode = hashCode * 31 + [element hash];
  }
  for (NSNumber* value in self.packedExtensionArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

BOOL TestDynamicExtensions_DynamicEnumTypeIsValidValue(TestDynamicExtensions_DynamicEnumType value) {
  switch (value) {
    case TestDynamicExtensions_DynamicEnumTypeDynamicFoo:
    case TestDynamicExtensions_DynamicEnumTypeDynamicBar:
    case TestDynamicExtensions_DynamicEnumTypeDynamicBaz:
      return YES;
    default:
      return NO;
  }
}
@interface TestDynamicExtensions_DynamicMessageType ()
@property int32_t dynamicField;
@end

@implementation TestDynamicExtensions_DynamicMessageType

- (BOOL) hasDynamicField {
  return !!hasDynamicField_;
}
- (void) setHasDynamicField:(BOOL) value {
  hasDynamicField_ = !!value;
}
@synthesize dynamicField;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.dynamicField = 0;
  }
  return self;
}
static TestDynamicExtensions_DynamicMessageType* defaultTestDynamicExtensions_DynamicMessageTypeInstance = nil;
+ (void) initialize {
  if (self == [TestDynamicExtensions_DynamicMessageType class]) {
    defaultTestDynamicExtensions_DynamicMessageTypeInstance = [[TestDynamicExtensions_DynamicMessageType alloc] init];
  }
}
+ (TestDynamicExtensions_DynamicMessageType*) defaultInstance {
  return defaultTestDynamicExtensions_DynamicMessageTypeInstance;
}
- (TestDynamicExtensions_DynamicMessageType*) defaultInstance {
  return defaultTestDynamicExtensions_DynamicMessageTypeInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasDynamicField) {
    [output writeInt32:2100 value:self.dynamicField];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasDynamicField) {
    size += computeInt32Size(2100, self.dynamicField);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestDynamicExtensions_DynamicMessageType*) parseFromData:(NSData*) data {
  return (TestDynamicExtensions_DynamicMessageType*)[[[TestDynamicExtensions_DynamicMessageType builder] mergeFromData:data] build];
}
+ (TestDynamicExtensions_DynamicMessageType*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDynamicExtensions_DynamicMessageType*)[[[TestDynamicExtensions_DynamicMessageType builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestDynamicExtensions_DynamicMessageType*) parseFromInputStream:(NSInputStream*) input {
  return (TestDynamicExtensions_DynamicMessageType*)[[[TestDynamicExtensions_DynamicMessageType builder] mergeFromInputStream:input] build];
}
+ (TestDynamicExtensions_DynamicMessageType*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDynamicExtensions_DynamicMessageType*)[[[TestDynamicExtensions_DynamicMessageType builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDynamicExtensions_DynamicMessageType*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestDynamicExtensions_DynamicMessageType*)[[[TestDynamicExtensions_DynamicMessageType builder] mergeFromCodedInputStream:input] build];
}
+ (TestDynamicExtensions_DynamicMessageType*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestDynamicExtensions_DynamicMessageType*)[[[TestDynamicExtensions_DynamicMessageType builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestDynamicExtensions_DynamicMessageType_Builder*) builder {
  return [[[TestDynamicExtensions_DynamicMessageType_Builder alloc] init] autorelease];
}
+ (TestDynamicExtensions_DynamicMessageType_Builder*) builderWithPrototype:(TestDynamicExtensions_DynamicMessageType*) prototype {
  return [[TestDynamicExtensions_DynamicMessageType builder] mergeFrom:prototype];
}
- (TestDynamicExtensions_DynamicMessageType_Builder*) builder {
  return [TestDynamicExtensions_DynamicMessageType builder];
}
- (TestDynamicExtensions_DynamicMessageType_Builder*) toBuilder {
  return [TestDynamicExtensions_DynamicMessageType builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  if (self.hasDynamicField) {
    [output appendFormat:@"%@%@: %@\n", indent, @"dynamicField", [NSNumber numberWithInt:self.dynamicField]];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestDynamicExtensions_DynamicMessageType class]]) {
    return NO;
  }
  TestDynamicExtensions_DynamicMessageType *otherMessage = other;
  return
      self.hasDynamicField == otherMessage.hasDynamicField &&
      (!self.hasDynamicField || self.dynamicField == otherMessage.dynamicField) &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  if (self.hasDynamicField) {
    hashCode = hashCode * 31 + [[NSNumber numberWithInt:self.dynamicField] hash];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestDynamicExtensions_DynamicMessageType_Builder()
@property (retain) TestDynamicExtensions_DynamicMessageType* result;
@end

@implementation TestDynamicExtensions_DynamicMessageType_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestDynamicExtensions_DynamicMessageType alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestDynamicExtensions_DynamicMessageType_Builder*) clear {
  self.result = [[[TestDynamicExtensions_DynamicMessageType alloc] init] autorelease];
  return self;
}
- (TestDynamicExtensions_DynamicMessageType_Builder*) clone {
  return [TestDynamicExtensions_DynamicMessageType builderWithPrototype:result];
}
- (TestDynamicExtensions_DynamicMessageType*) defaultInstance {
  return [TestDynamicExtensions_DynamicMessageType defaultInstance];
}
- (TestDynamicExtensions_DynamicMessageType*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestDynamicExtensions_DynamicMessageType*) buildPartial {
  TestDynamicExtensions_DynamicMessageType* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestDynamicExtensions_DynamicMessageType_Builder*) mergeFrom:(TestDynamicExtensions_DynamicMessageType*) other {
  if (other == [TestDynamicExtensions_DynamicMessageType defaultInstance]) {
    return self;
  }
  if (other.hasDynamicField) {
    [self setDynamicField:other.dynamicField];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestDynamicExtensions_DynamicMessageType_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestDynamicExtensions_DynamicMessageType_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 16800: {
        [self setDynamicField:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasDynamicField {
  return result.hasDynamicField;
}
- (int32_t) dynamicField {
  return result.dynamicField;
}
- (TestDynamicExtensions_DynamicMessageType_Builder*) setDynamicField:(int32_t) value {
  result.hasDynamicField = YES;
  result.dynamicField = value;
  return self;
}
- (TestDynamicExtensions_DynamicMessageType_Builder*) clearDynamicField {
  result.hasDynamicField = NO;
  result.dynamicField = 0;
  return self;
}
@end

@interface TestDynamicExtensions_Builder()
@property (retain) TestDynamicExtensions* result;
@end

@implementation TestDynamicExtensions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestDynamicExtensions alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestDynamicExtensions_Builder*) clear {
  self.result = [[[TestDynamicExtensions alloc] init] autorelease];
  return self;
}
- (TestDynamicExtensions_Builder*) clone {
  return [TestDynamicExtensions builderWithPrototype:result];
}
- (TestDynamicExtensions*) defaultInstance {
  return [TestDynamicExtensions defaultInstance];
}
- (TestDynamicExtensions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestDynamicExtensions*) buildPartial {
  TestDynamicExtensions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestDynamicExtensions_Builder*) mergeFrom:(TestDynamicExtensions*) other {
  if (other == [TestDynamicExtensions defaultInstance]) {
    return self;
  }
  if (other.hasScalarExtension) {
    [self setScalarExtension:other.scalarExtension];
  }
  if (other.hasEnumExtension) {
    [self setEnumExtension:other.enumExtension];
  }
  if (other.hasDynamicEnumExtension) {
    [self setDynamicEnumExtension:other.dynamicEnumExtension];
  }
  if (other.hasMessageExtension) {
    [self mergeMessageExtension:other.messageExtension];
  }
  if (other.hasDynamicMessageExtension) {
    [self mergeDynamicMessageExtension:other.dynamicMessageExtension];
  }
  if (other.repeatedExtensionArray.count > 0) {
    if (result.repeatedExtensionArray == nil) {
      result.repeatedExtensionArray = [[other.repeatedExtensionArray copyWithZone:[other.repeatedExtensionArray zone]] autorelease];
    } else {
      [result.repeatedExtensionArray appendArray:other.repeatedExtensionArray];
    }
  }
  if (other.packedExtensionArray.count > 0) {
    if (result.packedExtensionArray == nil) {
      result.packedExtensionArray = [[other.packedExtensionArray copyWithZone:[other.packedExtensionArray zone]] autorelease];
    } else {
      [result.packedExtensionArray appendArray:other.packedExtensionArray];
    }
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestDynamicExtensions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestDynamicExtensions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 16005: {
        [self setScalarExtension:[input readFixed32]];
        break;
      }
      case 16008: {
        int32_t value = [input readEnum];
        if (ForeignEnumIsValidValue(value)) {
          [self setEnumExtension:value];
        } else {
          [unknownFields mergeVarintField:2001 value:value];
        }
        break;
      }
      case 16016: {
        int32_t value = [input readEnum];
        if (TestDynamicExtensions_DynamicEnumTypeIsValidValue(value)) {
          [self setDynamicEnumExtension:value];
        } else {
          [unknownFields mergeVarintField:2002 value:value];
        }
        break;
      }
      case 16026: {
        ForeignMessage_Builder* subBuilder = [ForeignMessage builder];
        if (self.hasMessageExtension) {
          [subBuilder mergeFrom:self.messageExtension];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setMessageExtension:[subBuilder buildPartial]];
        break;
      }
      case 16034: {
        TestDynamicExtensions_DynamicMessageType_Builder* subBuilder = [TestDynamicExtensions_DynamicMessageType builder];
        if (self.hasDynamicMessageExtension) {
          [subBuilder mergeFrom:self.dynamicMessageExtension];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setDynamicMessageExtension:[subBuilder buildPartial]];
        break;
      }
      case 16042: {
        [self addRepeatedExtension:[input readString]];
        break;
      }
      case 16050: {
        int32_t length = [input readRawVarint32];
        int32_t limit = [input pushLimit:length];
        if (result.packedExtensionArray == nil) {
          result.packedExtensionArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
        }
        while (input.bytesUntilLimit > 0) {
          [result.packedExtensionArray addInt32:[input readSInt32]];
        }
        [input popLimit:limit];
        break;
      }
    }
  }
}
- (BOOL) hasScalarExtension {
  return result.hasScalarExtension;
}
- (uint32_t) scalarExtension {
  return result.scalarExtension;
}
- (TestDynamicExtensions_Builder*) setScalarExtension:(uint32_t) value {
  result.hasScalarExtension = YES;
  result.scalarExtension = value;
  return self;
}
- (TestDynamicExtensions_Builder*) clearScalarExtension {
  result.hasScalarExtension = NO;
  result.scalarExtension = 0;
  return self;
}
- (BOOL) hasEnumExtension {
  return result.hasEnumExtension;
}
- (ForeignEnum) enumExtension {
  return result.enumExtension;
}
- (TestDynamicExtensions_Builder*) setEnumExtension:(ForeignEnum) value {
  result.hasEnumExtension = YES;
  result.enumExtension = value;
  return self;
}
- (TestDynamicExtensions_Builder*) clearEnumExtension {
  result.hasEnumExtension = NO;
  result.enumExtension = ForeignEnumForeignFoo;
  return self;
}
- (BOOL) hasDynamicEnumExtension {
  return result.hasDynamicEnumExtension;
}
- (TestDynamicExtensions_DynamicEnumType) dynamicEnumExtension {
  return result.dynamicEnumExtension;
}
- (TestDynamicExtensions_Builder*) setDynamicEnumExtension:(TestDynamicExtensions_DynamicEnumType) value {
  result.hasDynamicEnumExtension = YES;
  result.dynamicEnumExtension = value;
  return self;
}
- (TestDynamicExtensions_Builder*) clearDynamicEnumExtension {
  result.hasDynamicEnumExtension = NO;
  result.dynamicEnumExtension = TestDynamicExtensions_DynamicEnumTypeDynamicFoo;
  return self;
}
- (BOOL) hasMessageExtension {
  return result.hasMessageExtension;
}
- (ForeignMessage*) messageExtension {
  return result.messageExtension;
}
- (TestDynamicExtensions_Builder*) setMessageExtension:(ForeignMessage*) value {
  result.hasMessageExtension = YES;
  result.messageExtension = value;
  return self;
}
- (TestDynamicExtensions_Builder*) setMessageExtensionBuilder:(ForeignMessage_Builder*) builderForValue {
  return [self setMessageExtension:[builderForValue build]];
}
- (TestDynamicExtensions_Builder*) mergeMessageExtension:(ForeignMessage*) value {
  if (result.hasMessageExtension &&
      result.messageExtension != [ForeignMessage defaultInstance]) {
    result.messageExtension =
      [[[ForeignMessage builderWithPrototype:result.messageExtension] mergeFrom:value] buildPartial];
  } else {
    result.messageExtension = value;
  }
  result.hasMessageExtension = YES;
  return self;
}
- (TestDynamicExtensions_Builder*) clearMessageExtension {
  result.hasMessageExtension = NO;
  result.messageExtension = [ForeignMessage defaultInstance];
  return self;
}
- (BOOL) hasDynamicMessageExtension {
  return result.hasDynamicMessageExtension;
}
- (TestDynamicExtensions_DynamicMessageType*) dynamicMessageExtension {
  return result.dynamicMessageExtension;
}
- (TestDynamicExtensions_Builder*) setDynamicMessageExtension:(TestDynamicExtensions_DynamicMessageType*) value {
  result.hasDynamicMessageExtension = YES;
  result.dynamicMessageExtension = value;
  return self;
}
- (TestDynamicExtensions_Builder*) setDynamicMessageExtensionBuilder:(TestDynamicExtensions_DynamicMessageType_Builder*) builderForValue {
  return [self setDynamicMessageExtension:[builderForValue build]];
}
- (TestDynamicExtensions_Builder*) mergeDynamicMessageExtension:(TestDynamicExtensions_DynamicMessageType*) value {
  if (result.hasDynamicMessageExtension &&
      result.dynamicMessageExtension != [TestDynamicExtensions_DynamicMessageType defaultInstance]) {
    result.dynamicMessageExtension =
      [[[TestDynamicExtensions_DynamicMessageType builderWithPrototype:result.dynamicMessageExtension] mergeFrom:value] buildPartial];
  } else {
    result.dynamicMessageExtension = value;
  }
  result.hasDynamicMessageExtension = YES;
  return self;
}
- (TestDynamicExtensions_Builder*) clearDynamicMessageExtension {
  result.hasDynamicMessageExtension = NO;
  result.dynamicMessageExtension = [TestDynamicExtensions_DynamicMessageType defaultInstance];
  return self;
}
- (PBAppendableArray *)repeatedExtension {
  return result.repeatedExtensionArray;
}
- (NSString*)repeatedExtensionAtIndex:(NSUInteger)index {
  return [result repeatedExtensionAtIndex:index];
}
- (TestDynamicExtensions_Builder *)addRepeatedExtension:(NSString*)value {
  if (result.repeatedExtensionArray == nil) {
    result.repeatedExtensionArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeObject];
  }
  [result.repeatedExtensionArray addObject:value];
  return self;
}
- (TestDynamicExtensions_Builder *)setRepeatedExtensionArray:(NSArray *)array {
  result.repeatedExtensionArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeObject];
  return self;
}
- (TestDynamicExtensions_Builder *)setRepeatedExtensionValues:(const NSString* *)values count:(NSUInteger)count {
  result.repeatedExtensionArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeObject];
  return self;
}
- (TestDynamicExtensions_Builder *)clearRepeatedExtension {
  result.repeatedExtensionArray = nil;
  return self;
}
- (PBAppendableArray *)packedExtension {
  return result.packedExtensionArray;
}
- (int32_t)packedExtensionAtIndex:(NSUInteger)index {
  return [result packedExtensionAtIndex:index];
}
- (TestDynamicExtensions_Builder *)addPackedExtension:(int32_t)value {
  if (result.packedExtensionArray == nil) {
    result.packedExtensionArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.packedExtensionArray addInt32:value];
  return self;
}
- (TestDynamicExtensions_Builder *)setPackedExtensionArray:(NSArray *)array {
  result.packedExtensionArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestDynamicExtensions_Builder *)setPackedExtensionValues:(const int32_t *)values count:(NSUInteger)count {
  result.packedExtensionArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestDynamicExtensions_Builder *)clearPackedExtension {
  result.packedExtensionArray = nil;
  return self;
}
@end

@interface TestRepeatedScalarDifferentTagSizes ()
@property (retain) PBAppendableArray * repeatedFixed32Array;
@property (retain) PBAppendableArray * repeatedInt32Array;
@property (retain) PBAppendableArray * repeatedFixed64Array;
@property (retain) PBAppendableArray * repeatedInt64Array;
@property (retain) PBAppendableArray * repeatedFloatArray;
@property (retain) PBAppendableArray * repeatedUint64Array;
@end

@implementation TestRepeatedScalarDifferentTagSizes

@synthesize repeatedFixed32Array;
@dynamic repeatedFixed32;
@synthesize repeatedInt32Array;
@dynamic repeatedInt32;
@synthesize repeatedFixed64Array;
@dynamic repeatedFixed64;
@synthesize repeatedInt64Array;
@dynamic repeatedInt64;
@synthesize repeatedFloatArray;
@dynamic repeatedFloat;
@synthesize repeatedUint64Array;
@dynamic repeatedUint64;
- (void) dealloc {
  self.repeatedFixed32Array = nil;
  self.repeatedInt32Array = nil;
  self.repeatedFixed64Array = nil;
  self.repeatedInt64Array = nil;
  self.repeatedFloatArray = nil;
  self.repeatedUint64Array = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static TestRepeatedScalarDifferentTagSizes* defaultTestRepeatedScalarDifferentTagSizesInstance = nil;
+ (void) initialize {
  if (self == [TestRepeatedScalarDifferentTagSizes class]) {
    defaultTestRepeatedScalarDifferentTagSizesInstance = [[TestRepeatedScalarDifferentTagSizes alloc] init];
  }
}
+ (TestRepeatedScalarDifferentTagSizes*) defaultInstance {
  return defaultTestRepeatedScalarDifferentTagSizesInstance;
}
- (TestRepeatedScalarDifferentTagSizes*) defaultInstance {
  return defaultTestRepeatedScalarDifferentTagSizesInstance;
}
- (PBArray *)repeatedFixed32 {
  return repeatedFixed32Array;
}
- (uint32_t)repeatedFixed32AtIndex:(NSUInteger)index {
  return [repeatedFixed32Array uint32AtIndex:index];
}
- (PBArray *)repeatedInt32 {
  return repeatedInt32Array;
}
- (int32_t)repeatedInt32AtIndex:(NSUInteger)index {
  return [repeatedInt32Array int32AtIndex:index];
}
- (PBArray *)repeatedFixed64 {
  return repeatedFixed64Array;
}
- (uint64_t)repeatedFixed64AtIndex:(NSUInteger)index {
  return [repeatedFixed64Array uint64AtIndex:index];
}
- (PBArray *)repeatedInt64 {
  return repeatedInt64Array;
}
- (int64_t)repeatedInt64AtIndex:(NSUInteger)index {
  return [repeatedInt64Array int64AtIndex:index];
}
- (PBArray *)repeatedFloat {
  return repeatedFloatArray;
}
- (Float32)repeatedFloatAtIndex:(NSUInteger)index {
  return [repeatedFloatArray floatAtIndex:index];
}
- (PBArray *)repeatedUint64 {
  return repeatedUint64Array;
}
- (uint64_t)repeatedUint64AtIndex:(NSUInteger)index {
  return [repeatedUint64Array uint64AtIndex:index];
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  const NSUInteger repeatedFixed32ArrayCount = self.repeatedFixed32Array.count;
  if (repeatedFixed32ArrayCount > 0) {
    const uint32_t *values = (const uint32_t *)self.repeatedFixed32Array.data;
    for (NSUInteger i = 0; i < repeatedFixed32ArrayCount; ++i) {
      [output writeFixed32:12 value:values[i]];
    }
  }
  const NSUInteger repeatedInt32ArrayCount = self.repeatedInt32Array.count;
  if (repeatedInt32ArrayCount > 0) {
    const int32_t *values = (const int32_t *)self.repeatedInt32Array.data;
    for (NSUInteger i = 0; i < repeatedInt32ArrayCount; ++i) {
      [output writeInt32:13 value:values[i]];
    }
  }
  const NSUInteger repeatedFixed64ArrayCount = self.repeatedFixed64Array.count;
  if (repeatedFixed64ArrayCount > 0) {
    const uint64_t *values = (const uint64_t *)self.repeatedFixed64Array.data;
    for (NSUInteger i = 0; i < repeatedFixed64ArrayCount; ++i) {
      [output writeFixed64:2046 value:values[i]];
    }
  }
  const NSUInteger repeatedInt64ArrayCount = self.repeatedInt64Array.count;
  if (repeatedInt64ArrayCount > 0) {
    const int64_t *values = (const int64_t *)self.repeatedInt64Array.data;
    for (NSUInteger i = 0; i < repeatedInt64ArrayCount; ++i) {
      [output writeInt64:2047 value:values[i]];
    }
  }
  const NSUInteger repeatedFloatArrayCount = self.repeatedFloatArray.count;
  if (repeatedFloatArrayCount > 0) {
    const Float32 *values = (const Float32 *)self.repeatedFloatArray.data;
    for (NSUInteger i = 0; i < repeatedFloatArrayCount; ++i) {
      [output writeFloat:262142 value:values[i]];
    }
  }
  const NSUInteger repeatedUint64ArrayCount = self.repeatedUint64Array.count;
  if (repeatedUint64ArrayCount > 0) {
    const uint64_t *values = (const uint64_t *)self.repeatedUint64Array.data;
    for (NSUInteger i = 0; i < repeatedUint64ArrayCount; ++i) {
      [output writeUInt64:262143 value:values[i]];
    }
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedFixed32Array.count;
    dataSize = 4 * count;
    size += dataSize;
    size += 1 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedInt32Array.count;
    const int32_t *values = (const int32_t *)self.repeatedInt32Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt32SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 1 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedFixed64Array.count;
    dataSize = 8 * count;
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedInt64Array.count;
    const int64_t *values = (const int64_t *)self.repeatedInt64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 2 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedFloatArray.count;
    dataSize = 4 * count;
    size += dataSize;
    size += 3 * count;
  }
  {
    int32_t dataSize = 0;
    const NSUInteger count = self.repeatedUint64Array.count;
    const uint64_t *values = (const uint64_t *)self.repeatedUint64Array.data;
    for (NSUInteger i = 0; i < count; ++i) {
      dataSize += computeUInt64SizeNoTag(values[i]);
    }
    size += dataSize;
    size += 3 * count;
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (TestRepeatedScalarDifferentTagSizes*) parseFromData:(NSData*) data {
  return (TestRepeatedScalarDifferentTagSizes*)[[[TestRepeatedScalarDifferentTagSizes builder] mergeFromData:data] build];
}
+ (TestRepeatedScalarDifferentTagSizes*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRepeatedScalarDifferentTagSizes*)[[[TestRepeatedScalarDifferentTagSizes builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (TestRepeatedScalarDifferentTagSizes*) parseFromInputStream:(NSInputStream*) input {
  return (TestRepeatedScalarDifferentTagSizes*)[[[TestRepeatedScalarDifferentTagSizes builder] mergeFromInputStream:input] build];
}
+ (TestRepeatedScalarDifferentTagSizes*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRepeatedScalarDifferentTagSizes*)[[[TestRepeatedScalarDifferentTagSizes builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestRepeatedScalarDifferentTagSizes*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (TestRepeatedScalarDifferentTagSizes*)[[[TestRepeatedScalarDifferentTagSizes builder] mergeFromCodedInputStream:input] build];
}
+ (TestRepeatedScalarDifferentTagSizes*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (TestRepeatedScalarDifferentTagSizes*)[[[TestRepeatedScalarDifferentTagSizes builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (TestRepeatedScalarDifferentTagSizes_Builder*) builder {
  return [[[TestRepeatedScalarDifferentTagSizes_Builder alloc] init] autorelease];
}
+ (TestRepeatedScalarDifferentTagSizes_Builder*) builderWithPrototype:(TestRepeatedScalarDifferentTagSizes*) prototype {
  return [[TestRepeatedScalarDifferentTagSizes builder] mergeFrom:prototype];
}
- (TestRepeatedScalarDifferentTagSizes_Builder*) builder {
  return [TestRepeatedScalarDifferentTagSizes builder];
}
- (TestRepeatedScalarDifferentTagSizes_Builder*) toBuilder {
  return [TestRepeatedScalarDifferentTagSizes builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  for (NSNumber* value in self.repeatedFixed32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedFixed32", value];
  }
  for (NSNumber* value in self.repeatedInt32Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedInt32", value];
  }
  for (NSNumber* value in self.repeatedFixed64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedFixed64", value];
  }
  for (NSNumber* value in self.repeatedInt64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedInt64", value];
  }
  for (NSNumber* value in self.repeatedFloatArray) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedFloat", value];
  }
  for (NSNumber* value in self.repeatedUint64Array) {
    [output appendFormat:@"%@%@: %@\n", indent, @"repeatedUint64", value];
  }
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[TestRepeatedScalarDifferentTagSizes class]]) {
    return NO;
  }
  TestRepeatedScalarDifferentTagSizes *otherMessage = other;
  return
      [self.repeatedFixed32Array isEqualToArray:otherMessage.repeatedFixed32Array] &&
      
      [self.repeatedInt32Array isEqualToArray:otherMessage.repeatedInt32Array] &&
      
      [self.repeatedFixed64Array isEqualToArray:otherMessage.repeatedFixed64Array] &&
      
      [self.repeatedInt64Array isEqualToArray:otherMessage.repeatedInt64Array] &&
      
      [self.repeatedFloatArray isEqualToArray:otherMessage.repeatedFloatArray] &&
      
      [self.repeatedUint64Array isEqualToArray:otherMessage.repeatedUint64Array] &&
      
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  for (NSNumber* value in self.repeatedFixed32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedInt32Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedFixed64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedInt64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedFloatArray) {
    hashCode = hashCode * 31 + [value intValue];
  }
  for (NSNumber* value in self.repeatedUint64Array) {
    hashCode = hashCode * 31 + [value intValue];
  }
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface TestRepeatedScalarDifferentTagSizes_Builder()
@property (retain) TestRepeatedScalarDifferentTagSizes* result;
@end

@implementation TestRepeatedScalarDifferentTagSizes_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[TestRepeatedScalarDifferentTagSizes alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (TestRepeatedScalarDifferentTagSizes_Builder*) clear {
  self.result = [[[TestRepeatedScalarDifferentTagSizes alloc] init] autorelease];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder*) clone {
  return [TestRepeatedScalarDifferentTagSizes builderWithPrototype:result];
}
- (TestRepeatedScalarDifferentTagSizes*) defaultInstance {
  return [TestRepeatedScalarDifferentTagSizes defaultInstance];
}
- (TestRepeatedScalarDifferentTagSizes*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (TestRepeatedScalarDifferentTagSizes*) buildPartial {
  TestRepeatedScalarDifferentTagSizes* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (TestRepeatedScalarDifferentTagSizes_Builder*) mergeFrom:(TestRepeatedScalarDifferentTagSizes*) other {
  if (other == [TestRepeatedScalarDifferentTagSizes defaultInstance]) {
    return self;
  }
  if (other.repeatedFixed32Array.count > 0) {
    if (result.repeatedFixed32Array == nil) {
      result.repeatedFixed32Array = [[other.repeatedFixed32Array copyWithZone:[other.repeatedFixed32Array zone]] autorelease];
    } else {
      [result.repeatedFixed32Array appendArray:other.repeatedFixed32Array];
    }
  }
  if (other.repeatedInt32Array.count > 0) {
    if (result.repeatedInt32Array == nil) {
      result.repeatedInt32Array = [[other.repeatedInt32Array copyWithZone:[other.repeatedInt32Array zone]] autorelease];
    } else {
      [result.repeatedInt32Array appendArray:other.repeatedInt32Array];
    }
  }
  if (other.repeatedFixed64Array.count > 0) {
    if (result.repeatedFixed64Array == nil) {
      result.repeatedFixed64Array = [[other.repeatedFixed64Array copyWithZone:[other.repeatedFixed64Array zone]] autorelease];
    } else {
      [result.repeatedFixed64Array appendArray:other.repeatedFixed64Array];
    }
  }
  if (other.repeatedInt64Array.count > 0) {
    if (result.repeatedInt64Array == nil) {
      result.repeatedInt64Array = [[other.repeatedInt64Array copyWithZone:[other.repeatedInt64Array zone]] autorelease];
    } else {
      [result.repeatedInt64Array appendArray:other.repeatedInt64Array];
    }
  }
  if (other.repeatedFloatArray.count > 0) {
    if (result.repeatedFloatArray == nil) {
      result.repeatedFloatArray = [[other.repeatedFloatArray copyWithZone:[other.repeatedFloatArray zone]] autorelease];
    } else {
      [result.repeatedFloatArray appendArray:other.repeatedFloatArray];
    }
  }
  if (other.repeatedUint64Array.count > 0) {
    if (result.repeatedUint64Array == nil) {
      result.repeatedUint64Array = [[other.repeatedUint64Array copyWithZone:[other.repeatedUint64Array zone]] autorelease];
    } else {
      [result.repeatedUint64Array appendArray:other.repeatedUint64Array];
    }
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (TestRepeatedScalarDifferentTagSizes_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
      case 101: {
        [self addRepeatedFixed32:[input readFixed32]];
        break;
      }
      case 104: {
        [self addRepeatedInt32:[input readInt32]];
        break;
      }
      case 16369: {
        [self addRepeatedFixed64:[input readFixed64]];
        break;
      }
      case 16376: {
        [self addRepeatedInt64:[input readInt64]];
        break;
      }
      case 2097141: {
        [self addRepeatedFloat:[input readFloat]];
        break;
      }
      case 2097144: {
        [self addRepeatedUint64:[input readUInt64]];
        break;
      }
    }
  }
}
- (PBAppendableArray *)repeatedFixed32 {
  return result.repeatedFixed32Array;
}
- (uint32_t)repeatedFixed32AtIndex:(NSUInteger)index {
  return [result repeatedFixed32AtIndex:index];
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)addRepeatedFixed32:(uint32_t)value {
  if (result.repeatedFixed32Array == nil) {
    result.repeatedFixed32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt32];
  }
  [result.repeatedFixed32Array addUint32:value];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedFixed32Array:(NSArray *)array {
  result.repeatedFixed32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedFixed32Values:(const uint32_t *)values count:(NSUInteger)count {
  result.repeatedFixed32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt32];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)clearRepeatedFixed32 {
  result.repeatedFixed32Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedInt32 {
  return result.repeatedInt32Array;
}
- (int32_t)repeatedInt32AtIndex:(NSUInteger)index {
  return [result repeatedInt32AtIndex:index];
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)addRepeatedInt32:(int32_t)value {
  if (result.repeatedInt32Array == nil) {
    result.repeatedInt32Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt32];
  }
  [result.repeatedInt32Array addInt32:value];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedInt32Array:(NSArray *)array {
  result.repeatedInt32Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedInt32Values:(const int32_t *)values count:(NSUInteger)count {
  result.repeatedInt32Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt32];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)clearRepeatedInt32 {
  result.repeatedInt32Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedFixed64 {
  return result.repeatedFixed64Array;
}
- (uint64_t)repeatedFixed64AtIndex:(NSUInteger)index {
  return [result repeatedFixed64AtIndex:index];
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)addRepeatedFixed64:(uint64_t)value {
  if (result.repeatedFixed64Array == nil) {
    result.repeatedFixed64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
  }
  [result.repeatedFixed64Array addUint64:value];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedFixed64Array:(NSArray *)array {
  result.repeatedFixed64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedFixed64Values:(const uint64_t *)values count:(NSUInteger)count {
  result.repeatedFixed64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)clearRepeatedFixed64 {
  result.repeatedFixed64Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedInt64 {
  return result.repeatedInt64Array;
}
- (int64_t)repeatedInt64AtIndex:(NSUInteger)index {
  return [result repeatedInt64AtIndex:index];
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)addRepeatedInt64:(int64_t)value {
  if (result.repeatedInt64Array == nil) {
    result.repeatedInt64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeInt64];
  }
  [result.repeatedInt64Array addInt64:value];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedInt64Array:(NSArray *)array {
  result.repeatedInt64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedInt64Values:(const int64_t *)values count:(NSUInteger)count {
  result.repeatedInt64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeInt64];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)clearRepeatedInt64 {
  result.repeatedInt64Array = nil;
  return self;
}
- (PBAppendableArray *)repeatedFloat {
  return result.repeatedFloatArray;
}
- (Float32)repeatedFloatAtIndex:(NSUInteger)index {
  return [result repeatedFloatAtIndex:index];
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)addRepeatedFloat:(Float32)value {
  if (result.repeatedFloatArray == nil) {
    result.repeatedFloatArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeFloat];
  }
  [result.repeatedFloatArray addFloat:value];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedFloatArray:(NSArray *)array {
  result.repeatedFloatArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeFloat];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedFloatValues:(const Float32 *)values count:(NSUInteger)count {
  result.repeatedFloatArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeFloat];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)clearRepeatedFloat {
  result.repeatedFloatArray = nil;
  return self;
}
- (PBAppendableArray *)repeatedUint64 {
  return result.repeatedUint64Array;
}
- (uint64_t)repeatedUint64AtIndex:(NSUInteger)index {
  return [result repeatedUint64AtIndex:index];
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)addRepeatedUint64:(uint64_t)value {
  if (result.repeatedUint64Array == nil) {
    result.repeatedUint64Array = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64];
  }
  [result.repeatedUint64Array addUint64:value];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedUint64Array:(NSArray *)array {
  result.repeatedUint64Array = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)setRepeatedUint64Values:(const uint64_t *)values count:(NSUInteger)count {
  result.repeatedUint64Array = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt64];
  return self;
}
- (TestRepeatedScalarDifferentTagSizes_Builder *)clearRepeatedUint64 {
  result.repeatedUint64Array = nil;
  return self;
}
@end

@interface FooRequest ()
@end

@implementation FooRequest

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static FooRequest* defaultFooRequestInstance = nil;
+ (void) initialize {
  if (self == [FooRequest class]) {
    defaultFooRequestInstance = [[FooRequest alloc] init];
  }
}
+ (FooRequest*) defaultInstance {
  return defaultFooRequestInstance;
}
- (FooRequest*) defaultInstance {
  return defaultFooRequestInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (FooRequest*) parseFromData:(NSData*) data {
  return (FooRequest*)[[[FooRequest builder] mergeFromData:data] build];
}
+ (FooRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (FooRequest*)[[[FooRequest builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (FooRequest*) parseFromInputStream:(NSInputStream*) input {
  return (FooRequest*)[[[FooRequest builder] mergeFromInputStream:input] build];
}
+ (FooRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (FooRequest*)[[[FooRequest builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (FooRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (FooRequest*)[[[FooRequest builder] mergeFromCodedInputStream:input] build];
}
+ (FooRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (FooRequest*)[[[FooRequest builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (FooRequest_Builder*) builder {
  return [[[FooRequest_Builder alloc] init] autorelease];
}
+ (FooRequest_Builder*) builderWithPrototype:(FooRequest*) prototype {
  return [[FooRequest builder] mergeFrom:prototype];
}
- (FooRequest_Builder*) builder {
  return [FooRequest builder];
}
- (FooRequest_Builder*) toBuilder {
  return [FooRequest builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[FooRequest class]]) {
    return NO;
  }
  FooRequest *otherMessage = other;
  return
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface FooRequest_Builder()
@property (retain) FooRequest* result;
@end

@implementation FooRequest_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[FooRequest alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (FooRequest_Builder*) clear {
  self.result = [[[FooRequest alloc] init] autorelease];
  return self;
}
- (FooRequest_Builder*) clone {
  return [FooRequest builderWithPrototype:result];
}
- (FooRequest*) defaultInstance {
  return [FooRequest defaultInstance];
}
- (FooRequest*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (FooRequest*) buildPartial {
  FooRequest* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (FooRequest_Builder*) mergeFrom:(FooRequest*) other {
  if (other == [FooRequest defaultInstance]) {
    return self;
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (FooRequest_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (FooRequest_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

@interface FooResponse ()
@end

@implementation FooResponse

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static FooResponse* defaultFooResponseInstance = nil;
+ (void) initialize {
  if (self == [FooResponse class]) {
    defaultFooResponseInstance = [[FooResponse alloc] init];
  }
}
+ (FooResponse*) defaultInstance {
  return defaultFooResponseInstance;
}
- (FooResponse*) defaultInstance {
  return defaultFooResponseInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (FooResponse*) parseFromData:(NSData*) data {
  return (FooResponse*)[[[FooResponse builder] mergeFromData:data] build];
}
+ (FooResponse*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (FooResponse*)[[[FooResponse builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (FooResponse*) parseFromInputStream:(NSInputStream*) input {
  return (FooResponse*)[[[FooResponse builder] mergeFromInputStream:input] build];
}
+ (FooResponse*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (FooResponse*)[[[FooResponse builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (FooResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (FooResponse*)[[[FooResponse builder] mergeFromCodedInputStream:input] build];
}
+ (FooResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (FooResponse*)[[[FooResponse builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (FooResponse_Builder*) builder {
  return [[[FooResponse_Builder alloc] init] autorelease];
}
+ (FooResponse_Builder*) builderWithPrototype:(FooResponse*) prototype {
  return [[FooResponse builder] mergeFrom:prototype];
}
- (FooResponse_Builder*) builder {
  return [FooResponse builder];
}
- (FooResponse_Builder*) toBuilder {
  return [FooResponse builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[FooResponse class]]) {
    return NO;
  }
  FooResponse *otherMessage = other;
  return
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface FooResponse_Builder()
@property (retain) FooResponse* result;
@end

@implementation FooResponse_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[FooResponse alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (FooResponse_Builder*) clear {
  self.result = [[[FooResponse alloc] init] autorelease];
  return self;
}
- (FooResponse_Builder*) clone {
  return [FooResponse builderWithPrototype:result];
}
- (FooResponse*) defaultInstance {
  return [FooResponse defaultInstance];
}
- (FooResponse*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (FooResponse*) buildPartial {
  FooResponse* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (FooResponse_Builder*) mergeFrom:(FooResponse*) other {
  if (other == [FooResponse defaultInstance]) {
    return self;
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (FooResponse_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (FooResponse_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

@interface BarRequest ()
@end

@implementation BarRequest

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static BarRequest* defaultBarRequestInstance = nil;
+ (void) initialize {
  if (self == [BarRequest class]) {
    defaultBarRequestInstance = [[BarRequest alloc] init];
  }
}
+ (BarRequest*) defaultInstance {
  return defaultBarRequestInstance;
}
- (BarRequest*) defaultInstance {
  return defaultBarRequestInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (BarRequest*) parseFromData:(NSData*) data {
  return (BarRequest*)[[[BarRequest builder] mergeFromData:data] build];
}
+ (BarRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (BarRequest*)[[[BarRequest builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (BarRequest*) parseFromInputStream:(NSInputStream*) input {
  return (BarRequest*)[[[BarRequest builder] mergeFromInputStream:input] build];
}
+ (BarRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (BarRequest*)[[[BarRequest builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (BarRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (BarRequest*)[[[BarRequest builder] mergeFromCodedInputStream:input] build];
}
+ (BarRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (BarRequest*)[[[BarRequest builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (BarRequest_Builder*) builder {
  return [[[BarRequest_Builder alloc] init] autorelease];
}
+ (BarRequest_Builder*) builderWithPrototype:(BarRequest*) prototype {
  return [[BarRequest builder] mergeFrom:prototype];
}
- (BarRequest_Builder*) builder {
  return [BarRequest builder];
}
- (BarRequest_Builder*) toBuilder {
  return [BarRequest builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[BarRequest class]]) {
    return NO;
  }
  BarRequest *otherMessage = other;
  return
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface BarRequest_Builder()
@property (retain) BarRequest* result;
@end

@implementation BarRequest_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[BarRequest alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (BarRequest_Builder*) clear {
  self.result = [[[BarRequest alloc] init] autorelease];
  return self;
}
- (BarRequest_Builder*) clone {
  return [BarRequest builderWithPrototype:result];
}
- (BarRequest*) defaultInstance {
  return [BarRequest defaultInstance];
}
- (BarRequest*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (BarRequest*) buildPartial {
  BarRequest* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (BarRequest_Builder*) mergeFrom:(BarRequest*) other {
  if (other == [BarRequest defaultInstance]) {
    return self;
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (BarRequest_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (BarRequest_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

@interface BarResponse ()
@end

@implementation BarResponse

- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static BarResponse* defaultBarResponseInstance = nil;
+ (void) initialize {
  if (self == [BarResponse class]) {
    defaultBarResponseInstance = [[BarResponse alloc] init];
  }
}
+ (BarResponse*) defaultInstance {
  return defaultBarResponseInstance;
}
- (BarResponse*) defaultInstance {
  return defaultBarResponseInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (BarResponse*) parseFromData:(NSData*) data {
  return (BarResponse*)[[[BarResponse builder] mergeFromData:data] build];
}
+ (BarResponse*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (BarResponse*)[[[BarResponse builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (BarResponse*) parseFromInputStream:(NSInputStream*) input {
  return (BarResponse*)[[[BarResponse builder] mergeFromInputStream:input] build];
}
+ (BarResponse*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (BarResponse*)[[[BarResponse builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (BarResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (BarResponse*)[[[BarResponse builder] mergeFromCodedInputStream:input] build];
}
+ (BarResponse*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (BarResponse*)[[[BarResponse builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (BarResponse_Builder*) builder {
  return [[[BarResponse_Builder alloc] init] autorelease];
}
+ (BarResponse_Builder*) builderWithPrototype:(BarResponse*) prototype {
  return [[BarResponse builder] mergeFrom:prototype];
}
- (BarResponse_Builder*) builder {
  return [BarResponse builder];
}
- (BarResponse_Builder*) toBuilder {
  return [BarResponse builderWithPrototype:self];
}
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
  [self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (BOOL) isEqual:(id)other {
  if (other == self) {
    return YES;
  }
  if (![other isKindOfClass:[BarResponse class]]) {
    return NO;
  }
  BarResponse *otherMessage = other;
  return
      (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
  NSUInteger hashCode = 7;
  hashCode = hashCode * 31 + [self.unknownFields hash];
  return hashCode;
}
@end

@interface BarResponse_Builder()
@property (retain) BarResponse* result;
@end

@implementation BarResponse_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[BarResponse alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (BarResponse_Builder*) clear {
  self.result = [[[BarResponse alloc] init] autorelease];
  return self;
}
- (BarResponse_Builder*) clone {
  return [BarResponse builderWithPrototype:result];
}
- (BarResponse*) defaultInstance {
  return [BarResponse defaultInstance];
}
- (BarResponse*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (BarResponse*) buildPartial {
  BarResponse* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (BarResponse_Builder*) mergeFrom:(BarResponse*) other {
  if (other == [BarResponse defaultInstance]) {
    return self;
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (BarResponse_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (BarResponse_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t tag = [input readTag];
    switch (tag) {
      case 0:
        [self setUnknownFields:[unknownFields build]];
        return self;
      default: {
        if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) {
          [self setUnknownFields:[unknownFields build]];
          return self;
        }
        break;
      }
    }
  }
}
@end

