// Generated by the protocol buffer compiler.  DO NOT EDIT!

#import "Descriptor.pb.h"

@implementation PBDescriptorRoot
static PBExtensionRegistry* extensionRegistry = nil;
+ (PBExtensionRegistry*) extensionRegistry {
  return extensionRegistry;
}

+ (void) initialize {
  if (self == [PBDescriptorRoot class]) {
    PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry];
    [self registerAllExtensions:registry];
    extensionRegistry = [registry retain];
  }
}
+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry {
}
@end

@interface PBFileDescriptorSet ()
@property (retain) NSMutableArray* mutableFileList;
@end

@implementation PBFileDescriptorSet

@synthesize mutableFileList;
- (void) dealloc {
  self.mutableFileList = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static PBFileDescriptorSet* defaultPBFileDescriptorSetInstance = nil;
+ (void) initialize {
  if (self == [PBFileDescriptorSet class]) {
    defaultPBFileDescriptorSetInstance = [[PBFileDescriptorSet alloc] init];
  }
}
+ (PBFileDescriptorSet*) defaultInstance {
  return defaultPBFileDescriptorSetInstance;
}
- (PBFileDescriptorSet*) defaultInstance {
  return defaultPBFileDescriptorSetInstance;
}
- (NSArray*) fileList {
  return mutableFileList;
}
- (PBFileDescriptorProto*) fileAtIndex:(int32_t) index {
  id value = [mutableFileList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBFileDescriptorProto* element in self.fileList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  for (PBFileDescriptorProto* element in self.fileList) {
    [output writeMessage:1 value:element];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  for (PBFileDescriptorProto* element in self.fileList) {
    size += computeMessageSize(1, element);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBFileDescriptorSet*) parseFromData:(NSData*) data {
  return (PBFileDescriptorSet*)[[[PBFileDescriptorSet builder] mergeFromData:data] build];
}
+ (PBFileDescriptorSet*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFileDescriptorSet*)[[[PBFileDescriptorSet builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBFileDescriptorSet*) parseFromInputStream:(NSInputStream*) input {
  return (PBFileDescriptorSet*)[[[PBFileDescriptorSet builder] mergeFromInputStream:input] build];
}
+ (PBFileDescriptorSet*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFileDescriptorSet*)[[[PBFileDescriptorSet builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFileDescriptorSet*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBFileDescriptorSet*)[[[PBFileDescriptorSet builder] mergeFromCodedInputStream:input] build];
}
+ (PBFileDescriptorSet*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFileDescriptorSet*)[[[PBFileDescriptorSet builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFileDescriptorSet_Builder*) builder {
  return [[[PBFileDescriptorSet_Builder alloc] init] autorelease];
}
+ (PBFileDescriptorSet_Builder*) builderWithPrototype:(PBFileDescriptorSet*) prototype {
  return [[PBFileDescriptorSet builder] mergeFrom:prototype];
}
- (PBFileDescriptorSet_Builder*) builder {
  return [PBFileDescriptorSet builder];
}
@end

@interface PBFileDescriptorSet_Builder()
@property (retain) PBFileDescriptorSet* result;
@end

@implementation PBFileDescriptorSet_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBFileDescriptorSet alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBFileDescriptorSet_Builder*) clear {
  self.result = [[[PBFileDescriptorSet alloc] init] autorelease];
  return self;
}
- (PBFileDescriptorSet_Builder*) clone {
  return [PBFileDescriptorSet builderWithPrototype:result];
}
- (PBFileDescriptorSet*) defaultInstance {
  return [PBFileDescriptorSet defaultInstance];
}
- (PBFileDescriptorSet*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBFileDescriptorSet*) buildPartial {
  PBFileDescriptorSet* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBFileDescriptorSet_Builder*) mergeFrom:(PBFileDescriptorSet*) other {
  if (other == [PBFileDescriptorSet defaultInstance]) {
    return self;
  }
  if (other.mutableFileList.count > 0) {
    if (result.mutableFileList == nil) {
      result.mutableFileList = [NSMutableArray array];
    }
    [result.mutableFileList addObjectsFromArray:other.mutableFileList];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBFileDescriptorSet_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBFileDescriptorSet_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: {
        PBFileDescriptorProto_Builder* subBuilder = [PBFileDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addFile:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (NSArray*) fileList {
  if (result.mutableFileList == nil) { return [NSArray array]; }
  return result.mutableFileList;
}
- (PBFileDescriptorProto*) fileAtIndex:(int32_t) index {
  return [result fileAtIndex:index];
}
- (PBFileDescriptorSet_Builder*) replaceFileAtIndex:(int32_t) index with:(PBFileDescriptorProto*) value {
  [result.mutableFileList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBFileDescriptorSet_Builder*) addAllFile:(NSArray*) values {
  if (result.mutableFileList == nil) {
    result.mutableFileList = [NSMutableArray array];
  }
  [result.mutableFileList addObjectsFromArray:values];
  return self;
}
- (PBFileDescriptorSet_Builder*) clearFileList {
  result.mutableFileList = nil;
  return self;
}
- (PBFileDescriptorSet_Builder*) addFile:(PBFileDescriptorProto*) value {
  if (result.mutableFileList == nil) {
    result.mutableFileList = [NSMutableArray array];
  }
  [result.mutableFileList addObject:value];
  return self;
}
@end

@interface PBFileDescriptorProto ()
@property (retain) NSString* name;
@property (retain) NSString* package;
@property (retain) NSMutableArray* mutableDependencyList;
@property (retain) NSMutableArray* mutableMessageTypeList;
@property (retain) NSMutableArray* mutableEnumTypeList;
@property (retain) NSMutableArray* mutableServiceList;
@property (retain) NSMutableArray* mutableExtensionList;
@property (retain) PBFileOptions* options;
@end

@implementation PBFileDescriptorProto

- (BOOL) hasName {
  return !!hasName_;
}
- (void) setHasName:(BOOL) value {
  hasName_ = !!value;
}
@synthesize name;
- (BOOL) hasPackage {
  return !!hasPackage_;
}
- (void) setHasPackage:(BOOL) value {
  hasPackage_ = !!value;
}
@synthesize package;
@synthesize mutableDependencyList;
@synthesize mutableMessageTypeList;
@synthesize mutableEnumTypeList;
@synthesize mutableServiceList;
@synthesize mutableExtensionList;
- (BOOL) hasOptions {
  return !!hasOptions_;
}
- (void) setHasOptions:(BOOL) value {
  hasOptions_ = !!value;
}
@synthesize options;
- (void) dealloc {
  self.name = nil;
  self.package = nil;
  self.mutableDependencyList = nil;
  self.mutableMessageTypeList = nil;
  self.mutableEnumTypeList = nil;
  self.mutableServiceList = nil;
  self.mutableExtensionList = nil;
  self.options = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.name = @"";
    self.package = @"";
    self.options = [PBFileOptions defaultInstance];
  }
  return self;
}
static PBFileDescriptorProto* defaultPBFileDescriptorProtoInstance = nil;
+ (void) initialize {
  if (self == [PBFileDescriptorProto class]) {
    defaultPBFileDescriptorProtoInstance = [[PBFileDescriptorProto alloc] init];
  }
}
+ (PBFileDescriptorProto*) defaultInstance {
  return defaultPBFileDescriptorProtoInstance;
}
- (PBFileDescriptorProto*) defaultInstance {
  return defaultPBFileDescriptorProtoInstance;
}
- (NSArray*) dependencyList {
  return mutableDependencyList;
}
- (NSString*) dependencyAtIndex:(int32_t) index {
  id value = [mutableDependencyList objectAtIndex:index];
  return value;
}
- (NSArray*) messageTypeList {
  return mutableMessageTypeList;
}
- (PBDescriptorProto*) messageTypeAtIndex:(int32_t) index {
  id value = [mutableMessageTypeList objectAtIndex:index];
  return value;
}
- (NSArray*) enumTypeList {
  return mutableEnumTypeList;
}
- (PBEnumDescriptorProto*) enumTypeAtIndex:(int32_t) index {
  id value = [mutableEnumTypeList objectAtIndex:index];
  return value;
}
- (NSArray*) serviceList {
  return mutableServiceList;
}
- (PBServiceDescriptorProto*) serviceAtIndex:(int32_t) index {
  id value = [mutableServiceList objectAtIndex:index];
  return value;
}
- (NSArray*) extensionList {
  return mutableExtensionList;
}
- (PBFieldDescriptorProto*) extensionAtIndex:(int32_t) index {
  id value = [mutableExtensionList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBDescriptorProto* element in self.messageTypeList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  for (PBEnumDescriptorProto* element in self.enumTypeList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  for (PBServiceDescriptorProto* element in self.serviceList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  for (PBFieldDescriptorProto* element in self.extensionList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (self.hasOptions) {
    if (!self.options.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasName) {
    [output writeString:1 value:self.name];
  }
  if (self.hasPackage) {
    [output writeString:2 value:self.package];
  }
  for (NSString* element in self.mutableDependencyList) {
    [output writeString:3 value:element];
  }
  for (PBDescriptorProto* element in self.messageTypeList) {
    [output writeMessage:4 value:element];
  }
  for (PBEnumDescriptorProto* element in self.enumTypeList) {
    [output writeMessage:5 value:element];
  }
  for (PBServiceDescriptorProto* element in self.serviceList) {
    [output writeMessage:6 value:element];
  }
  for (PBFieldDescriptorProto* element in self.extensionList) {
    [output writeMessage:7 value:element];
  }
  if (self.hasOptions) {
    [output writeMessage:8 value:self.options];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasName) {
    size += computeStringSize(1, self.name);
  }
  if (self.hasPackage) {
    size += computeStringSize(2, self.package);
  }
  {
    int32_t dataSize = 0;
    for (NSString* element in self.mutableDependencyList) {
      dataSize += computeStringSizeNoTag(element);
    }
    size += dataSize;
    size += 1 * self.mutableDependencyList.count;
  }
  for (PBDescriptorProto* element in self.messageTypeList) {
    size += computeMessageSize(4, element);
  }
  for (PBEnumDescriptorProto* element in self.enumTypeList) {
    size += computeMessageSize(5, element);
  }
  for (PBServiceDescriptorProto* element in self.serviceList) {
    size += computeMessageSize(6, element);
  }
  for (PBFieldDescriptorProto* element in self.extensionList) {
    size += computeMessageSize(7, element);
  }
  if (self.hasOptions) {
    size += computeMessageSize(8, self.options);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBFileDescriptorProto*) parseFromData:(NSData*) data {
  return (PBFileDescriptorProto*)[[[PBFileDescriptorProto builder] mergeFromData:data] build];
}
+ (PBFileDescriptorProto*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFileDescriptorProto*)[[[PBFileDescriptorProto builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBFileDescriptorProto*) parseFromInputStream:(NSInputStream*) input {
  return (PBFileDescriptorProto*)[[[PBFileDescriptorProto builder] mergeFromInputStream:input] build];
}
+ (PBFileDescriptorProto*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFileDescriptorProto*)[[[PBFileDescriptorProto builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFileDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBFileDescriptorProto*)[[[PBFileDescriptorProto builder] mergeFromCodedInputStream:input] build];
}
+ (PBFileDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFileDescriptorProto*)[[[PBFileDescriptorProto builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFileDescriptorProto_Builder*) builder {
  return [[[PBFileDescriptorProto_Builder alloc] init] autorelease];
}
+ (PBFileDescriptorProto_Builder*) builderWithPrototype:(PBFileDescriptorProto*) prototype {
  return [[PBFileDescriptorProto builder] mergeFrom:prototype];
}
- (PBFileDescriptorProto_Builder*) builder {
  return [PBFileDescriptorProto builder];
}
@end

@interface PBFileDescriptorProto_Builder()
@property (retain) PBFileDescriptorProto* result;
@end

@implementation PBFileDescriptorProto_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBFileDescriptorProto alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBFileDescriptorProto_Builder*) clear {
  self.result = [[[PBFileDescriptorProto alloc] init] autorelease];
  return self;
}
- (PBFileDescriptorProto_Builder*) clone {
  return [PBFileDescriptorProto builderWithPrototype:result];
}
- (PBFileDescriptorProto*) defaultInstance {
  return [PBFileDescriptorProto defaultInstance];
}
- (PBFileDescriptorProto*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBFileDescriptorProto*) buildPartial {
  PBFileDescriptorProto* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBFileDescriptorProto_Builder*) mergeFrom:(PBFileDescriptorProto*) other {
  if (other == [PBFileDescriptorProto defaultInstance]) {
    return self;
  }
  if (other.hasName) {
    [self setName:other.name];
  }
  if (other.hasPackage) {
    [self setPackage:other.package];
  }
  if (other.mutableDependencyList.count > 0) {
    if (result.mutableDependencyList == nil) {
      result.mutableDependencyList = [NSMutableArray array];
    }
    [result.mutableDependencyList addObjectsFromArray:other.mutableDependencyList];
  }
  if (other.mutableMessageTypeList.count > 0) {
    if (result.mutableMessageTypeList == nil) {
      result.mutableMessageTypeList = [NSMutableArray array];
    }
    [result.mutableMessageTypeList addObjectsFromArray:other.mutableMessageTypeList];
  }
  if (other.mutableEnumTypeList.count > 0) {
    if (result.mutableEnumTypeList == nil) {
      result.mutableEnumTypeList = [NSMutableArray array];
    }
    [result.mutableEnumTypeList addObjectsFromArray:other.mutableEnumTypeList];
  }
  if (other.mutableServiceList.count > 0) {
    if (result.mutableServiceList == nil) {
      result.mutableServiceList = [NSMutableArray array];
    }
    [result.mutableServiceList addObjectsFromArray:other.mutableServiceList];
  }
  if (other.mutableExtensionList.count > 0) {
    if (result.mutableExtensionList == nil) {
      result.mutableExtensionList = [NSMutableArray array];
    }
    [result.mutableExtensionList addObjectsFromArray:other.mutableExtensionList];
  }
  if (other.hasOptions) {
    [self mergeOptions:other.options];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBFileDescriptorProto_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBFileDescriptorProto_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 setName:[input readString]];
        break;
      }
      case 18: {
        [self setPackage:[input readString]];
        break;
      }
      case 26: {
        [self addDependency:[input readString]];
        break;
      }
      case 34: {
        PBDescriptorProto_Builder* subBuilder = [PBDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addMessageType:[subBuilder buildPartial]];
        break;
      }
      case 42: {
        PBEnumDescriptorProto_Builder* subBuilder = [PBEnumDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addEnumType:[subBuilder buildPartial]];
        break;
      }
      case 50: {
        PBServiceDescriptorProto_Builder* subBuilder = [PBServiceDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addService:[subBuilder buildPartial]];
        break;
      }
      case 58: {
        PBFieldDescriptorProto_Builder* subBuilder = [PBFieldDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addExtension:[subBuilder buildPartial]];
        break;
      }
      case 66: {
        PBFileOptions_Builder* subBuilder = [PBFileOptions builder];
        if (self.hasOptions) {
          [subBuilder mergeFrom:self.options];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptions:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasName {
  return result.hasName;
}
- (NSString*) name {
  return result.name;
}
- (PBFileDescriptorProto_Builder*) setName:(NSString*) value {
  result.hasName = YES;
  result.name = value;
  return self;
}
- (PBFileDescriptorProto_Builder*) clearName {
  result.hasName = NO;
  result.name = @"";
  return self;
}
- (BOOL) hasPackage {
  return result.hasPackage;
}
- (NSString*) package {
  return result.package;
}
- (PBFileDescriptorProto_Builder*) setPackage:(NSString*) value {
  result.hasPackage = YES;
  result.package = value;
  return self;
}
- (PBFileDescriptorProto_Builder*) clearPackage {
  result.hasPackage = NO;
  result.package = @"";
  return self;
}
- (NSArray*) dependencyList {
  if (result.mutableDependencyList == nil) {
    return [NSArray array];
  }
  return result.mutableDependencyList;
}
- (NSString*) dependencyAtIndex:(int32_t) index {
  return [result dependencyAtIndex:index];
}
- (PBFileDescriptorProto_Builder*) replaceDependencyAtIndex:(int32_t) index with:(NSString*) value {
  [result.mutableDependencyList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBFileDescriptorProto_Builder*) addDependency:(NSString*) value {
  if (result.mutableDependencyList == nil) {
    result.mutableDependencyList = [NSMutableArray array];
  }
  [result.mutableDependencyList addObject:value];
  return self;
}
- (PBFileDescriptorProto_Builder*) addAllDependency:(NSArray*) values {
  if (result.mutableDependencyList == nil) {
    result.mutableDependencyList = [NSMutableArray array];
  }
  [result.mutableDependencyList addObjectsFromArray:values];
  return self;
}
- (PBFileDescriptorProto_Builder*) clearDependencyList {
  result.mutableDependencyList = nil;
  return self;
}
- (NSArray*) messageTypeList {
  if (result.mutableMessageTypeList == nil) { return [NSArray array]; }
  return result.mutableMessageTypeList;
}
- (PBDescriptorProto*) messageTypeAtIndex:(int32_t) index {
  return [result messageTypeAtIndex:index];
}
- (PBFileDescriptorProto_Builder*) replaceMessageTypeAtIndex:(int32_t) index with:(PBDescriptorProto*) value {
  [result.mutableMessageTypeList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBFileDescriptorProto_Builder*) addAllMessageType:(NSArray*) values {
  if (result.mutableMessageTypeList == nil) {
    result.mutableMessageTypeList = [NSMutableArray array];
  }
  [result.mutableMessageTypeList addObjectsFromArray:values];
  return self;
}
- (PBFileDescriptorProto_Builder*) clearMessageTypeList {
  result.mutableMessageTypeList = nil;
  return self;
}
- (PBFileDescriptorProto_Builder*) addMessageType:(PBDescriptorProto*) value {
  if (result.mutableMessageTypeList == nil) {
    result.mutableMessageTypeList = [NSMutableArray array];
  }
  [result.mutableMessageTypeList addObject:value];
  return self;
}
- (NSArray*) enumTypeList {
  if (result.mutableEnumTypeList == nil) { return [NSArray array]; }
  return result.mutableEnumTypeList;
}
- (PBEnumDescriptorProto*) enumTypeAtIndex:(int32_t) index {
  return [result enumTypeAtIndex:index];
}
- (PBFileDescriptorProto_Builder*) replaceEnumTypeAtIndex:(int32_t) index with:(PBEnumDescriptorProto*) value {
  [result.mutableEnumTypeList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBFileDescriptorProto_Builder*) addAllEnumType:(NSArray*) values {
  if (result.mutableEnumTypeList == nil) {
    result.mutableEnumTypeList = [NSMutableArray array];
  }
  [result.mutableEnumTypeList addObjectsFromArray:values];
  return self;
}
- (PBFileDescriptorProto_Builder*) clearEnumTypeList {
  result.mutableEnumTypeList = nil;
  return self;
}
- (PBFileDescriptorProto_Builder*) addEnumType:(PBEnumDescriptorProto*) value {
  if (result.mutableEnumTypeList == nil) {
    result.mutableEnumTypeList = [NSMutableArray array];
  }
  [result.mutableEnumTypeList addObject:value];
  return self;
}
- (NSArray*) serviceList {
  if (result.mutableServiceList == nil) { return [NSArray array]; }
  return result.mutableServiceList;
}
- (PBServiceDescriptorProto*) serviceAtIndex:(int32_t) index {
  return [result serviceAtIndex:index];
}
- (PBFileDescriptorProto_Builder*) replaceServiceAtIndex:(int32_t) index with:(PBServiceDescriptorProto*) value {
  [result.mutableServiceList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBFileDescriptorProto_Builder*) addAllService:(NSArray*) values {
  if (result.mutableServiceList == nil) {
    result.mutableServiceList = [NSMutableArray array];
  }
  [result.mutableServiceList addObjectsFromArray:values];
  return self;
}
- (PBFileDescriptorProto_Builder*) clearServiceList {
  result.mutableServiceList = nil;
  return self;
}
- (PBFileDescriptorProto_Builder*) addService:(PBServiceDescriptorProto*) value {
  if (result.mutableServiceList == nil) {
    result.mutableServiceList = [NSMutableArray array];
  }
  [result.mutableServiceList addObject:value];
  return self;
}
- (NSArray*) extensionList {
  if (result.mutableExtensionList == nil) { return [NSArray array]; }
  return result.mutableExtensionList;
}
- (PBFieldDescriptorProto*) extensionAtIndex:(int32_t) index {
  return [result extensionAtIndex:index];
}
- (PBFileDescriptorProto_Builder*) replaceExtensionAtIndex:(int32_t) index with:(PBFieldDescriptorProto*) value {
  [result.mutableExtensionList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBFileDescriptorProto_Builder*) addAllExtension:(NSArray*) values {
  if (result.mutableExtensionList == nil) {
    result.mutableExtensionList = [NSMutableArray array];
  }
  [result.mutableExtensionList addObjectsFromArray:values];
  return self;
}
- (PBFileDescriptorProto_Builder*) clearExtensionList {
  result.mutableExtensionList = nil;
  return self;
}
- (PBFileDescriptorProto_Builder*) addExtension:(PBFieldDescriptorProto*) value {
  if (result.mutableExtensionList == nil) {
    result.mutableExtensionList = [NSMutableArray array];
  }
  [result.mutableExtensionList addObject:value];
  return self;
}
- (BOOL) hasOptions {
  return result.hasOptions;
}
- (PBFileOptions*) options {
  return result.options;
}
- (PBFileDescriptorProto_Builder*) setOptions:(PBFileOptions*) value {
  result.hasOptions = YES;
  result.options = value;
  return self;
}
- (PBFileDescriptorProto_Builder*) setOptionsBuilder:(PBFileOptions_Builder*) builderForValue {
  return [self setOptions:[builderForValue build]];
}
- (PBFileDescriptorProto_Builder*) mergeOptions:(PBFileOptions*) value {
  if (result.hasOptions &&
      result.options != [PBFileOptions defaultInstance]) {
    result.options =
      [[[PBFileOptions builderWithPrototype:result.options] mergeFrom:value] buildPartial];
  } else {
    result.options = value;
  }
  result.hasOptions = YES;
  return self;
}
- (PBFileDescriptorProto_Builder*) clearOptions {
  result.hasOptions = NO;
  result.options = [PBFileOptions defaultInstance];
  return self;
}
@end

@interface PBDescriptorProto ()
@property (retain) NSString* name;
@property (retain) NSMutableArray* mutableFieldList;
@property (retain) NSMutableArray* mutableExtensionList;
@property (retain) NSMutableArray* mutableNestedTypeList;
@property (retain) NSMutableArray* mutableEnumTypeList;
@property (retain) NSMutableArray* mutableExtensionRangeList;
@property (retain) PBMessageOptions* options;
@end

@implementation PBDescriptorProto

- (BOOL) hasName {
  return !!hasName_;
}
- (void) setHasName:(BOOL) value {
  hasName_ = !!value;
}
@synthesize name;
@synthesize mutableFieldList;
@synthesize mutableExtensionList;
@synthesize mutableNestedTypeList;
@synthesize mutableEnumTypeList;
@synthesize mutableExtensionRangeList;
- (BOOL) hasOptions {
  return !!hasOptions_;
}
- (void) setHasOptions:(BOOL) value {
  hasOptions_ = !!value;
}
@synthesize options;
- (void) dealloc {
  self.name = nil;
  self.mutableFieldList = nil;
  self.mutableExtensionList = nil;
  self.mutableNestedTypeList = nil;
  self.mutableEnumTypeList = nil;
  self.mutableExtensionRangeList = nil;
  self.options = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.name = @"";
    self.options = [PBMessageOptions defaultInstance];
  }
  return self;
}
static PBDescriptorProto* defaultPBDescriptorProtoInstance = nil;
+ (void) initialize {
  if (self == [PBDescriptorProto class]) {
    defaultPBDescriptorProtoInstance = [[PBDescriptorProto alloc] init];
  }
}
+ (PBDescriptorProto*) defaultInstance {
  return defaultPBDescriptorProtoInstance;
}
- (PBDescriptorProto*) defaultInstance {
  return defaultPBDescriptorProtoInstance;
}
- (NSArray*) fieldList {
  return mutableFieldList;
}
- (PBFieldDescriptorProto*) fieldAtIndex:(int32_t) index {
  id value = [mutableFieldList objectAtIndex:index];
  return value;
}
- (NSArray*) extensionList {
  return mutableExtensionList;
}
- (PBFieldDescriptorProto*) extensionAtIndex:(int32_t) index {
  id value = [mutableExtensionList objectAtIndex:index];
  return value;
}
- (NSArray*) nestedTypeList {
  return mutableNestedTypeList;
}
- (PBDescriptorProto*) nestedTypeAtIndex:(int32_t) index {
  id value = [mutableNestedTypeList objectAtIndex:index];
  return value;
}
- (NSArray*) enumTypeList {
  return mutableEnumTypeList;
}
- (PBEnumDescriptorProto*) enumTypeAtIndex:(int32_t) index {
  id value = [mutableEnumTypeList objectAtIndex:index];
  return value;
}
- (NSArray*) extensionRangeList {
  return mutableExtensionRangeList;
}
- (PBDescriptorProto_ExtensionRange*) extensionRangeAtIndex:(int32_t) index {
  id value = [mutableExtensionRangeList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBFieldDescriptorProto* element in self.fieldList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  for (PBFieldDescriptorProto* element in self.extensionList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  for (PBDescriptorProto* element in self.nestedTypeList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  for (PBEnumDescriptorProto* element in self.enumTypeList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (self.hasOptions) {
    if (!self.options.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasName) {
    [output writeString:1 value:self.name];
  }
  for (PBFieldDescriptorProto* element in self.fieldList) {
    [output writeMessage:2 value:element];
  }
  for (PBDescriptorProto* element in self.nestedTypeList) {
    [output writeMessage:3 value:element];
  }
  for (PBEnumDescriptorProto* element in self.enumTypeList) {
    [output writeMessage:4 value:element];
  }
  for (PBDescriptorProto_ExtensionRange* element in self.extensionRangeList) {
    [output writeMessage:5 value:element];
  }
  for (PBFieldDescriptorProto* element in self.extensionList) {
    [output writeMessage:6 value:element];
  }
  if (self.hasOptions) {
    [output writeMessage:7 value:self.options];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasName) {
    size += computeStringSize(1, self.name);
  }
  for (PBFieldDescriptorProto* element in self.fieldList) {
    size += computeMessageSize(2, element);
  }
  for (PBDescriptorProto* element in self.nestedTypeList) {
    size += computeMessageSize(3, element);
  }
  for (PBEnumDescriptorProto* element in self.enumTypeList) {
    size += computeMessageSize(4, element);
  }
  for (PBDescriptorProto_ExtensionRange* element in self.extensionRangeList) {
    size += computeMessageSize(5, element);
  }
  for (PBFieldDescriptorProto* element in self.extensionList) {
    size += computeMessageSize(6, element);
  }
  if (self.hasOptions) {
    size += computeMessageSize(7, self.options);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBDescriptorProto*) parseFromData:(NSData*) data {
  return (PBDescriptorProto*)[[[PBDescriptorProto builder] mergeFromData:data] build];
}
+ (PBDescriptorProto*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBDescriptorProto*)[[[PBDescriptorProto builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBDescriptorProto*) parseFromInputStream:(NSInputStream*) input {
  return (PBDescriptorProto*)[[[PBDescriptorProto builder] mergeFromInputStream:input] build];
}
+ (PBDescriptorProto*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBDescriptorProto*)[[[PBDescriptorProto builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBDescriptorProto*)[[[PBDescriptorProto builder] mergeFromCodedInputStream:input] build];
}
+ (PBDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBDescriptorProto*)[[[PBDescriptorProto builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBDescriptorProto_Builder*) builder {
  return [[[PBDescriptorProto_Builder alloc] init] autorelease];
}
+ (PBDescriptorProto_Builder*) builderWithPrototype:(PBDescriptorProto*) prototype {
  return [[PBDescriptorProto builder] mergeFrom:prototype];
}
- (PBDescriptorProto_Builder*) builder {
  return [PBDescriptorProto builder];
}
@end

@interface PBDescriptorProto_ExtensionRange ()
@property int32_t start;
@property int32_t end;
@end

@implementation PBDescriptorProto_ExtensionRange

- (BOOL) hasStart {
  return !!hasStart_;
}
- (void) setHasStart:(BOOL) value {
  hasStart_ = !!value;
}
@synthesize start;
- (BOOL) hasEnd {
  return !!hasEnd_;
}
- (void) setHasEnd:(BOOL) value {
  hasEnd_ = !!value;
}
@synthesize end;
- (void) dealloc {
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.start = 0;
    self.end = 0;
  }
  return self;
}
static PBDescriptorProto_ExtensionRange* defaultPBDescriptorProto_ExtensionRangeInstance = nil;
+ (void) initialize {
  if (self == [PBDescriptorProto_ExtensionRange class]) {
    defaultPBDescriptorProto_ExtensionRangeInstance = [[PBDescriptorProto_ExtensionRange alloc] init];
  }
}
+ (PBDescriptorProto_ExtensionRange*) defaultInstance {
  return defaultPBDescriptorProto_ExtensionRangeInstance;
}
- (PBDescriptorProto_ExtensionRange*) defaultInstance {
  return defaultPBDescriptorProto_ExtensionRangeInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasStart) {
    [output writeInt32:1 value:self.start];
  }
  if (self.hasEnd) {
    [output writeInt32:2 value:self.end];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasStart) {
    size += computeInt32Size(1, self.start);
  }
  if (self.hasEnd) {
    size += computeInt32Size(2, self.end);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBDescriptorProto_ExtensionRange*) parseFromData:(NSData*) data {
  return (PBDescriptorProto_ExtensionRange*)[[[PBDescriptorProto_ExtensionRange builder] mergeFromData:data] build];
}
+ (PBDescriptorProto_ExtensionRange*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBDescriptorProto_ExtensionRange*)[[[PBDescriptorProto_ExtensionRange builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBDescriptorProto_ExtensionRange*) parseFromInputStream:(NSInputStream*) input {
  return (PBDescriptorProto_ExtensionRange*)[[[PBDescriptorProto_ExtensionRange builder] mergeFromInputStream:input] build];
}
+ (PBDescriptorProto_ExtensionRange*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBDescriptorProto_ExtensionRange*)[[[PBDescriptorProto_ExtensionRange builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBDescriptorProto_ExtensionRange*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBDescriptorProto_ExtensionRange*)[[[PBDescriptorProto_ExtensionRange builder] mergeFromCodedInputStream:input] build];
}
+ (PBDescriptorProto_ExtensionRange*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBDescriptorProto_ExtensionRange*)[[[PBDescriptorProto_ExtensionRange builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBDescriptorProto_ExtensionRange_Builder*) builder {
  return [[[PBDescriptorProto_ExtensionRange_Builder alloc] init] autorelease];
}
+ (PBDescriptorProto_ExtensionRange_Builder*) builderWithPrototype:(PBDescriptorProto_ExtensionRange*) prototype {
  return [[PBDescriptorProto_ExtensionRange builder] mergeFrom:prototype];
}
- (PBDescriptorProto_ExtensionRange_Builder*) builder {
  return [PBDescriptorProto_ExtensionRange builder];
}
@end

@interface PBDescriptorProto_ExtensionRange_Builder()
@property (retain) PBDescriptorProto_ExtensionRange* result;
@end

@implementation PBDescriptorProto_ExtensionRange_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBDescriptorProto_ExtensionRange alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBDescriptorProto_ExtensionRange_Builder*) clear {
  self.result = [[[PBDescriptorProto_ExtensionRange alloc] init] autorelease];
  return self;
}
- (PBDescriptorProto_ExtensionRange_Builder*) clone {
  return [PBDescriptorProto_ExtensionRange builderWithPrototype:result];
}
- (PBDescriptorProto_ExtensionRange*) defaultInstance {
  return [PBDescriptorProto_ExtensionRange defaultInstance];
}
- (PBDescriptorProto_ExtensionRange*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBDescriptorProto_ExtensionRange*) buildPartial {
  PBDescriptorProto_ExtensionRange* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBDescriptorProto_ExtensionRange_Builder*) mergeFrom:(PBDescriptorProto_ExtensionRange*) other {
  if (other == [PBDescriptorProto_ExtensionRange defaultInstance]) {
    return self;
  }
  if (other.hasStart) {
    [self setStart:other.start];
  }
  if (other.hasEnd) {
    [self setEnd:other.end];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBDescriptorProto_ExtensionRange_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBDescriptorProto_ExtensionRange_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 setStart:[input readInt32]];
        break;
      }
      case 16: {
        [self setEnd:[input readInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasStart {
  return result.hasStart;
}
- (int32_t) start {
  return result.start;
}
- (PBDescriptorProto_ExtensionRange_Builder*) setStart:(int32_t) value {
  result.hasStart = YES;
  result.start = value;
  return self;
}
- (PBDescriptorProto_ExtensionRange_Builder*) clearStart {
  result.hasStart = NO;
  result.start = 0;
  return self;
}
- (BOOL) hasEnd {
  return result.hasEnd;
}
- (int32_t) end {
  return result.end;
}
- (PBDescriptorProto_ExtensionRange_Builder*) setEnd:(int32_t) value {
  result.hasEnd = YES;
  result.end = value;
  return self;
}
- (PBDescriptorProto_ExtensionRange_Builder*) clearEnd {
  result.hasEnd = NO;
  result.end = 0;
  return self;
}
@end

@interface PBDescriptorProto_Builder()
@property (retain) PBDescriptorProto* result;
@end

@implementation PBDescriptorProto_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBDescriptorProto alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBDescriptorProto_Builder*) clear {
  self.result = [[[PBDescriptorProto alloc] init] autorelease];
  return self;
}
- (PBDescriptorProto_Builder*) clone {
  return [PBDescriptorProto builderWithPrototype:result];
}
- (PBDescriptorProto*) defaultInstance {
  return [PBDescriptorProto defaultInstance];
}
- (PBDescriptorProto*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBDescriptorProto*) buildPartial {
  PBDescriptorProto* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBDescriptorProto_Builder*) mergeFrom:(PBDescriptorProto*) other {
  if (other == [PBDescriptorProto defaultInstance]) {
    return self;
  }
  if (other.hasName) {
    [self setName:other.name];
  }
  if (other.mutableFieldList.count > 0) {
    if (result.mutableFieldList == nil) {
      result.mutableFieldList = [NSMutableArray array];
    }
    [result.mutableFieldList addObjectsFromArray:other.mutableFieldList];
  }
  if (other.mutableExtensionList.count > 0) {
    if (result.mutableExtensionList == nil) {
      result.mutableExtensionList = [NSMutableArray array];
    }
    [result.mutableExtensionList addObjectsFromArray:other.mutableExtensionList];
  }
  if (other.mutableNestedTypeList.count > 0) {
    if (result.mutableNestedTypeList == nil) {
      result.mutableNestedTypeList = [NSMutableArray array];
    }
    [result.mutableNestedTypeList addObjectsFromArray:other.mutableNestedTypeList];
  }
  if (other.mutableEnumTypeList.count > 0) {
    if (result.mutableEnumTypeList == nil) {
      result.mutableEnumTypeList = [NSMutableArray array];
    }
    [result.mutableEnumTypeList addObjectsFromArray:other.mutableEnumTypeList];
  }
  if (other.mutableExtensionRangeList.count > 0) {
    if (result.mutableExtensionRangeList == nil) {
      result.mutableExtensionRangeList = [NSMutableArray array];
    }
    [result.mutableExtensionRangeList addObjectsFromArray:other.mutableExtensionRangeList];
  }
  if (other.hasOptions) {
    [self mergeOptions:other.options];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBDescriptorProto_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBDescriptorProto_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 setName:[input readString]];
        break;
      }
      case 18: {
        PBFieldDescriptorProto_Builder* subBuilder = [PBFieldDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addField:[subBuilder buildPartial]];
        break;
      }
      case 26: {
        PBDescriptorProto_Builder* subBuilder = [PBDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addNestedType:[subBuilder buildPartial]];
        break;
      }
      case 34: {
        PBEnumDescriptorProto_Builder* subBuilder = [PBEnumDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addEnumType:[subBuilder buildPartial]];
        break;
      }
      case 42: {
        PBDescriptorProto_ExtensionRange_Builder* subBuilder = [PBDescriptorProto_ExtensionRange builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addExtensionRange:[subBuilder buildPartial]];
        break;
      }
      case 50: {
        PBFieldDescriptorProto_Builder* subBuilder = [PBFieldDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addExtension:[subBuilder buildPartial]];
        break;
      }
      case 58: {
        PBMessageOptions_Builder* subBuilder = [PBMessageOptions builder];
        if (self.hasOptions) {
          [subBuilder mergeFrom:self.options];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptions:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasName {
  return result.hasName;
}
- (NSString*) name {
  return result.name;
}
- (PBDescriptorProto_Builder*) setName:(NSString*) value {
  result.hasName = YES;
  result.name = value;
  return self;
}
- (PBDescriptorProto_Builder*) clearName {
  result.hasName = NO;
  result.name = @"";
  return self;
}
- (NSArray*) fieldList {
  if (result.mutableFieldList == nil) { return [NSArray array]; }
  return result.mutableFieldList;
}
- (PBFieldDescriptorProto*) fieldAtIndex:(int32_t) index {
  return [result fieldAtIndex:index];
}
- (PBDescriptorProto_Builder*) replaceFieldAtIndex:(int32_t) index with:(PBFieldDescriptorProto*) value {
  [result.mutableFieldList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBDescriptorProto_Builder*) addAllField:(NSArray*) values {
  if (result.mutableFieldList == nil) {
    result.mutableFieldList = [NSMutableArray array];
  }
  [result.mutableFieldList addObjectsFromArray:values];
  return self;
}
- (PBDescriptorProto_Builder*) clearFieldList {
  result.mutableFieldList = nil;
  return self;
}
- (PBDescriptorProto_Builder*) addField:(PBFieldDescriptorProto*) value {
  if (result.mutableFieldList == nil) {
    result.mutableFieldList = [NSMutableArray array];
  }
  [result.mutableFieldList addObject:value];
  return self;
}
- (NSArray*) extensionList {
  if (result.mutableExtensionList == nil) { return [NSArray array]; }
  return result.mutableExtensionList;
}
- (PBFieldDescriptorProto*) extensionAtIndex:(int32_t) index {
  return [result extensionAtIndex:index];
}
- (PBDescriptorProto_Builder*) replaceExtensionAtIndex:(int32_t) index with:(PBFieldDescriptorProto*) value {
  [result.mutableExtensionList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBDescriptorProto_Builder*) addAllExtension:(NSArray*) values {
  if (result.mutableExtensionList == nil) {
    result.mutableExtensionList = [NSMutableArray array];
  }
  [result.mutableExtensionList addObjectsFromArray:values];
  return self;
}
- (PBDescriptorProto_Builder*) clearExtensionList {
  result.mutableExtensionList = nil;
  return self;
}
- (PBDescriptorProto_Builder*) addExtension:(PBFieldDescriptorProto*) value {
  if (result.mutableExtensionList == nil) {
    result.mutableExtensionList = [NSMutableArray array];
  }
  [result.mutableExtensionList addObject:value];
  return self;
}
- (NSArray*) nestedTypeList {
  if (result.mutableNestedTypeList == nil) { return [NSArray array]; }
  return result.mutableNestedTypeList;
}
- (PBDescriptorProto*) nestedTypeAtIndex:(int32_t) index {
  return [result nestedTypeAtIndex:index];
}
- (PBDescriptorProto_Builder*) replaceNestedTypeAtIndex:(int32_t) index with:(PBDescriptorProto*) value {
  [result.mutableNestedTypeList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBDescriptorProto_Builder*) addAllNestedType:(NSArray*) values {
  if (result.mutableNestedTypeList == nil) {
    result.mutableNestedTypeList = [NSMutableArray array];
  }
  [result.mutableNestedTypeList addObjectsFromArray:values];
  return self;
}
- (PBDescriptorProto_Builder*) clearNestedTypeList {
  result.mutableNestedTypeList = nil;
  return self;
}
- (PBDescriptorProto_Builder*) addNestedType:(PBDescriptorProto*) value {
  if (result.mutableNestedTypeList == nil) {
    result.mutableNestedTypeList = [NSMutableArray array];
  }
  [result.mutableNestedTypeList addObject:value];
  return self;
}
- (NSArray*) enumTypeList {
  if (result.mutableEnumTypeList == nil) { return [NSArray array]; }
  return result.mutableEnumTypeList;
}
- (PBEnumDescriptorProto*) enumTypeAtIndex:(int32_t) index {
  return [result enumTypeAtIndex:index];
}
- (PBDescriptorProto_Builder*) replaceEnumTypeAtIndex:(int32_t) index with:(PBEnumDescriptorProto*) value {
  [result.mutableEnumTypeList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBDescriptorProto_Builder*) addAllEnumType:(NSArray*) values {
  if (result.mutableEnumTypeList == nil) {
    result.mutableEnumTypeList = [NSMutableArray array];
  }
  [result.mutableEnumTypeList addObjectsFromArray:values];
  return self;
}
- (PBDescriptorProto_Builder*) clearEnumTypeList {
  result.mutableEnumTypeList = nil;
  return self;
}
- (PBDescriptorProto_Builder*) addEnumType:(PBEnumDescriptorProto*) value {
  if (result.mutableEnumTypeList == nil) {
    result.mutableEnumTypeList = [NSMutableArray array];
  }
  [result.mutableEnumTypeList addObject:value];
  return self;
}
- (NSArray*) extensionRangeList {
  if (result.mutableExtensionRangeList == nil) { return [NSArray array]; }
  return result.mutableExtensionRangeList;
}
- (PBDescriptorProto_ExtensionRange*) extensionRangeAtIndex:(int32_t) index {
  return [result extensionRangeAtIndex:index];
}
- (PBDescriptorProto_Builder*) replaceExtensionRangeAtIndex:(int32_t) index with:(PBDescriptorProto_ExtensionRange*) value {
  [result.mutableExtensionRangeList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBDescriptorProto_Builder*) addAllExtensionRange:(NSArray*) values {
  if (result.mutableExtensionRangeList == nil) {
    result.mutableExtensionRangeList = [NSMutableArray array];
  }
  [result.mutableExtensionRangeList addObjectsFromArray:values];
  return self;
}
- (PBDescriptorProto_Builder*) clearExtensionRangeList {
  result.mutableExtensionRangeList = nil;
  return self;
}
- (PBDescriptorProto_Builder*) addExtensionRange:(PBDescriptorProto_ExtensionRange*) value {
  if (result.mutableExtensionRangeList == nil) {
    result.mutableExtensionRangeList = [NSMutableArray array];
  }
  [result.mutableExtensionRangeList addObject:value];
  return self;
}
- (BOOL) hasOptions {
  return result.hasOptions;
}
- (PBMessageOptions*) options {
  return result.options;
}
- (PBDescriptorProto_Builder*) setOptions:(PBMessageOptions*) value {
  result.hasOptions = YES;
  result.options = value;
  return self;
}
- (PBDescriptorProto_Builder*) setOptionsBuilder:(PBMessageOptions_Builder*) builderForValue {
  return [self setOptions:[builderForValue build]];
}
- (PBDescriptorProto_Builder*) mergeOptions:(PBMessageOptions*) value {
  if (result.hasOptions &&
      result.options != [PBMessageOptions defaultInstance]) {
    result.options =
      [[[PBMessageOptions builderWithPrototype:result.options] mergeFrom:value] buildPartial];
  } else {
    result.options = value;
  }
  result.hasOptions = YES;
  return self;
}
- (PBDescriptorProto_Builder*) clearOptions {
  result.hasOptions = NO;
  result.options = [PBMessageOptions defaultInstance];
  return self;
}
@end

@interface PBFieldDescriptorProto ()
@property (retain) NSString* name;
@property int32_t number;
@property PBFieldDescriptorProto_Label label;
@property PBFieldDescriptorProto_Type type;
@property (retain) NSString* typeName;
@property (retain) NSString* extendee;
@property (retain) NSString* defaultValue;
@property (retain) PBFieldOptions* options;
@end

@implementation PBFieldDescriptorProto

- (BOOL) hasName {
  return !!hasName_;
}
- (void) setHasName:(BOOL) value {
  hasName_ = !!value;
}
@synthesize name;
- (BOOL) hasNumber {
  return !!hasNumber_;
}
- (void) setHasNumber:(BOOL) value {
  hasNumber_ = !!value;
}
@synthesize number;
- (BOOL) hasLabel {
  return !!hasLabel_;
}
- (void) setHasLabel:(BOOL) value {
  hasLabel_ = !!value;
}
@synthesize label;
- (BOOL) hasType {
  return !!hasType_;
}
- (void) setHasType:(BOOL) value {
  hasType_ = !!value;
}
@synthesize type;
- (BOOL) hasTypeName {
  return !!hasTypeName_;
}
- (void) setHasTypeName:(BOOL) value {
  hasTypeName_ = !!value;
}
@synthesize typeName;
- (BOOL) hasExtendee {
  return !!hasExtendee_;
}
- (void) setHasExtendee:(BOOL) value {
  hasExtendee_ = !!value;
}
@synthesize extendee;
- (BOOL) hasDefaultValue {
  return !!hasDefaultValue_;
}
- (void) setHasDefaultValue:(BOOL) value {
  hasDefaultValue_ = !!value;
}
@synthesize defaultValue;
- (BOOL) hasOptions {
  return !!hasOptions_;
}
- (void) setHasOptions:(BOOL) value {
  hasOptions_ = !!value;
}
@synthesize options;
- (void) dealloc {
  self.name = nil;
  self.typeName = nil;
  self.extendee = nil;
  self.defaultValue = nil;
  self.options = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.name = @"";
    self.number = 0;
    self.label = PBFieldDescriptorProto_LabelLabelOptional;
    self.type = PBFieldDescriptorProto_TypeTypeDouble;
    self.typeName = @"";
    self.extendee = @"";
    self.defaultValue = @"";
    self.options = [PBFieldOptions defaultInstance];
  }
  return self;
}
static PBFieldDescriptorProto* defaultPBFieldDescriptorProtoInstance = nil;
+ (void) initialize {
  if (self == [PBFieldDescriptorProto class]) {
    defaultPBFieldDescriptorProtoInstance = [[PBFieldDescriptorProto alloc] init];
  }
}
+ (PBFieldDescriptorProto*) defaultInstance {
  return defaultPBFieldDescriptorProtoInstance;
}
- (PBFieldDescriptorProto*) defaultInstance {
  return defaultPBFieldDescriptorProtoInstance;
}
- (BOOL) isInitialized {
  if (self.hasOptions) {
    if (!self.options.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasName) {
    [output writeString:1 value:self.name];
  }
  if (self.hasExtendee) {
    [output writeString:2 value:self.extendee];
  }
  if (self.hasNumber) {
    [output writeInt32:3 value:self.number];
  }
  if (self.hasLabel) {
    [output writeEnum:4 value:self.label];
  }
  if (self.hasType) {
    [output writeEnum:5 value:self.type];
  }
  if (self.hasTypeName) {
    [output writeString:6 value:self.typeName];
  }
  if (self.hasDefaultValue) {
    [output writeString:7 value:self.defaultValue];
  }
  if (self.hasOptions) {
    [output writeMessage:8 value:self.options];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasName) {
    size += computeStringSize(1, self.name);
  }
  if (self.hasExtendee) {
    size += computeStringSize(2, self.extendee);
  }
  if (self.hasNumber) {
    size += computeInt32Size(3, self.number);
  }
  if (self.hasLabel) {
    size += computeEnumSize(4, self.label);
  }
  if (self.hasType) {
    size += computeEnumSize(5, self.type);
  }
  if (self.hasTypeName) {
    size += computeStringSize(6, self.typeName);
  }
  if (self.hasDefaultValue) {
    size += computeStringSize(7, self.defaultValue);
  }
  if (self.hasOptions) {
    size += computeMessageSize(8, self.options);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBFieldDescriptorProto*) parseFromData:(NSData*) data {
  return (PBFieldDescriptorProto*)[[[PBFieldDescriptorProto builder] mergeFromData:data] build];
}
+ (PBFieldDescriptorProto*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFieldDescriptorProto*)[[[PBFieldDescriptorProto builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBFieldDescriptorProto*) parseFromInputStream:(NSInputStream*) input {
  return (PBFieldDescriptorProto*)[[[PBFieldDescriptorProto builder] mergeFromInputStream:input] build];
}
+ (PBFieldDescriptorProto*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFieldDescriptorProto*)[[[PBFieldDescriptorProto builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFieldDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBFieldDescriptorProto*)[[[PBFieldDescriptorProto builder] mergeFromCodedInputStream:input] build];
}
+ (PBFieldDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFieldDescriptorProto*)[[[PBFieldDescriptorProto builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFieldDescriptorProto_Builder*) builder {
  return [[[PBFieldDescriptorProto_Builder alloc] init] autorelease];
}
+ (PBFieldDescriptorProto_Builder*) builderWithPrototype:(PBFieldDescriptorProto*) prototype {
  return [[PBFieldDescriptorProto builder] mergeFrom:prototype];
}
- (PBFieldDescriptorProto_Builder*) builder {
  return [PBFieldDescriptorProto builder];
}
@end

BOOL PBFieldDescriptorProto_TypeIsValidValue(PBFieldDescriptorProto_Type value) {
  switch (value) {
    case PBFieldDescriptorProto_TypeTypeDouble:
    case PBFieldDescriptorProto_TypeTypeFloat:
    case PBFieldDescriptorProto_TypeTypeInt64:
    case PBFieldDescriptorProto_TypeTypeUint64:
    case PBFieldDescriptorProto_TypeTypeInt32:
    case PBFieldDescriptorProto_TypeTypeFixed64:
    case PBFieldDescriptorProto_TypeTypeFixed32:
    case PBFieldDescriptorProto_TypeTypeBool:
    case PBFieldDescriptorProto_TypeTypeString:
    case PBFieldDescriptorProto_TypeTypeGroup:
    case PBFieldDescriptorProto_TypeTypeMessage:
    case PBFieldDescriptorProto_TypeTypeBytes:
    case PBFieldDescriptorProto_TypeTypeUint32:
    case PBFieldDescriptorProto_TypeTypeEnum:
    case PBFieldDescriptorProto_TypeTypeSfixed32:
    case PBFieldDescriptorProto_TypeTypeSfixed64:
    case PBFieldDescriptorProto_TypeTypeSint32:
    case PBFieldDescriptorProto_TypeTypeSint64:
      return YES;
    default:
      return NO;
  }
}
BOOL PBFieldDescriptorProto_LabelIsValidValue(PBFieldDescriptorProto_Label value) {
  switch (value) {
    case PBFieldDescriptorProto_LabelLabelOptional:
    case PBFieldDescriptorProto_LabelLabelRequired:
    case PBFieldDescriptorProto_LabelLabelRepeated:
      return YES;
    default:
      return NO;
  }
}
@interface PBFieldDescriptorProto_Builder()
@property (retain) PBFieldDescriptorProto* result;
@end

@implementation PBFieldDescriptorProto_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBFieldDescriptorProto alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBFieldDescriptorProto_Builder*) clear {
  self.result = [[[PBFieldDescriptorProto alloc] init] autorelease];
  return self;
}
- (PBFieldDescriptorProto_Builder*) clone {
  return [PBFieldDescriptorProto builderWithPrototype:result];
}
- (PBFieldDescriptorProto*) defaultInstance {
  return [PBFieldDescriptorProto defaultInstance];
}
- (PBFieldDescriptorProto*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBFieldDescriptorProto*) buildPartial {
  PBFieldDescriptorProto* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBFieldDescriptorProto_Builder*) mergeFrom:(PBFieldDescriptorProto*) other {
  if (other == [PBFieldDescriptorProto defaultInstance]) {
    return self;
  }
  if (other.hasName) {
    [self setName:other.name];
  }
  if (other.hasNumber) {
    [self setNumber:other.number];
  }
  if (other.hasLabel) {
    [self setLabel:other.label];
  }
  if (other.hasType) {
    [self setType:other.type];
  }
  if (other.hasTypeName) {
    [self setTypeName:other.typeName];
  }
  if (other.hasExtendee) {
    [self setExtendee:other.extendee];
  }
  if (other.hasDefaultValue) {
    [self setDefaultValue:other.defaultValue];
  }
  if (other.hasOptions) {
    [self mergeOptions:other.options];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBFieldDescriptorProto_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBFieldDescriptorProto_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 setName:[input readString]];
        break;
      }
      case 18: {
        [self setExtendee:[input readString]];
        break;
      }
      case 24: {
        [self setNumber:[input readInt32]];
        break;
      }
      case 32: {
        int32_t value = [input readEnum];
        if (PBFieldDescriptorProto_LabelIsValidValue(value)) {
          [self setLabel:value];
        } else {
          [unknownFields mergeVarintField:4 value:value];
        }
        break;
      }
      case 40: {
        int32_t value = [input readEnum];
        if (PBFieldDescriptorProto_TypeIsValidValue(value)) {
          [self setType:value];
        } else {
          [unknownFields mergeVarintField:5 value:value];
        }
        break;
      }
      case 50: {
        [self setTypeName:[input readString]];
        break;
      }
      case 58: {
        [self setDefaultValue:[input readString]];
        break;
      }
      case 66: {
        PBFieldOptions_Builder* subBuilder = [PBFieldOptions builder];
        if (self.hasOptions) {
          [subBuilder mergeFrom:self.options];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptions:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasName {
  return result.hasName;
}
- (NSString*) name {
  return result.name;
}
- (PBFieldDescriptorProto_Builder*) setName:(NSString*) value {
  result.hasName = YES;
  result.name = value;
  return self;
}
- (PBFieldDescriptorProto_Builder*) clearName {
  result.hasName = NO;
  result.name = @"";
  return self;
}
- (BOOL) hasNumber {
  return result.hasNumber;
}
- (int32_t) number {
  return result.number;
}
- (PBFieldDescriptorProto_Builder*) setNumber:(int32_t) value {
  result.hasNumber = YES;
  result.number = value;
  return self;
}
- (PBFieldDescriptorProto_Builder*) clearNumber {
  result.hasNumber = NO;
  result.number = 0;
  return self;
}
- (BOOL) hasLabel {
  return result.hasLabel;
}
- (PBFieldDescriptorProto_Label) label {
  return result.label;
}
- (PBFieldDescriptorProto_Builder*) setLabel:(PBFieldDescriptorProto_Label) value {
  result.hasLabel = YES;
  result.label = value;
  return self;
}
- (PBFieldDescriptorProto_Builder*) clearLabel {
  result.hasLabel = NO;
  result.label = PBFieldDescriptorProto_LabelLabelOptional;
  return self;
}
- (BOOL) hasType {
  return result.hasType;
}
- (PBFieldDescriptorProto_Type) type {
  return result.type;
}
- (PBFieldDescriptorProto_Builder*) setType:(PBFieldDescriptorProto_Type) value {
  result.hasType = YES;
  result.type = value;
  return self;
}
- (PBFieldDescriptorProto_Builder*) clearType {
  result.hasType = NO;
  result.type = PBFieldDescriptorProto_TypeTypeDouble;
  return self;
}
- (BOOL) hasTypeName {
  return result.hasTypeName;
}
- (NSString*) typeName {
  return result.typeName;
}
- (PBFieldDescriptorProto_Builder*) setTypeName:(NSString*) value {
  result.hasTypeName = YES;
  result.typeName = value;
  return self;
}
- (PBFieldDescriptorProto_Builder*) clearTypeName {
  result.hasTypeName = NO;
  result.typeName = @"";
  return self;
}
- (BOOL) hasExtendee {
  return result.hasExtendee;
}
- (NSString*) extendee {
  return result.extendee;
}
- (PBFieldDescriptorProto_Builder*) setExtendee:(NSString*) value {
  result.hasExtendee = YES;
  result.extendee = value;
  return self;
}
- (PBFieldDescriptorProto_Builder*) clearExtendee {
  result.hasExtendee = NO;
  result.extendee = @"";
  return self;
}
- (BOOL) hasDefaultValue {
  return result.hasDefaultValue;
}
- (NSString*) defaultValue {
  return result.defaultValue;
}
- (PBFieldDescriptorProto_Builder*) setDefaultValue:(NSString*) value {
  result.hasDefaultValue = YES;
  result.defaultValue = value;
  return self;
}
- (PBFieldDescriptorProto_Builder*) clearDefaultValue {
  result.hasDefaultValue = NO;
  result.defaultValue = @"";
  return self;
}
- (BOOL) hasOptions {
  return result.hasOptions;
}
- (PBFieldOptions*) options {
  return result.options;
}
- (PBFieldDescriptorProto_Builder*) setOptions:(PBFieldOptions*) value {
  result.hasOptions = YES;
  result.options = value;
  return self;
}
- (PBFieldDescriptorProto_Builder*) setOptionsBuilder:(PBFieldOptions_Builder*) builderForValue {
  return [self setOptions:[builderForValue build]];
}
- (PBFieldDescriptorProto_Builder*) mergeOptions:(PBFieldOptions*) value {
  if (result.hasOptions &&
      result.options != [PBFieldOptions defaultInstance]) {
    result.options =
      [[[PBFieldOptions builderWithPrototype:result.options] mergeFrom:value] buildPartial];
  } else {
    result.options = value;
  }
  result.hasOptions = YES;
  return self;
}
- (PBFieldDescriptorProto_Builder*) clearOptions {
  result.hasOptions = NO;
  result.options = [PBFieldOptions defaultInstance];
  return self;
}
@end

@interface PBEnumDescriptorProto ()
@property (retain) NSString* name;
@property (retain) NSMutableArray* mutableValueList;
@property (retain) PBEnumOptions* options;
@end

@implementation PBEnumDescriptorProto

- (BOOL) hasName {
  return !!hasName_;
}
- (void) setHasName:(BOOL) value {
  hasName_ = !!value;
}
@synthesize name;
@synthesize mutableValueList;
- (BOOL) hasOptions {
  return !!hasOptions_;
}
- (void) setHasOptions:(BOOL) value {
  hasOptions_ = !!value;
}
@synthesize options;
- (void) dealloc {
  self.name = nil;
  self.mutableValueList = nil;
  self.options = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.name = @"";
    self.options = [PBEnumOptions defaultInstance];
  }
  return self;
}
static PBEnumDescriptorProto* defaultPBEnumDescriptorProtoInstance = nil;
+ (void) initialize {
  if (self == [PBEnumDescriptorProto class]) {
    defaultPBEnumDescriptorProtoInstance = [[PBEnumDescriptorProto alloc] init];
  }
}
+ (PBEnumDescriptorProto*) defaultInstance {
  return defaultPBEnumDescriptorProtoInstance;
}
- (PBEnumDescriptorProto*) defaultInstance {
  return defaultPBEnumDescriptorProtoInstance;
}
- (NSArray*) valueList {
  return mutableValueList;
}
- (PBEnumValueDescriptorProto*) valueAtIndex:(int32_t) index {
  id value = [mutableValueList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBEnumValueDescriptorProto* element in self.valueList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (self.hasOptions) {
    if (!self.options.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasName) {
    [output writeString:1 value:self.name];
  }
  for (PBEnumValueDescriptorProto* element in self.valueList) {
    [output writeMessage:2 value:element];
  }
  if (self.hasOptions) {
    [output writeMessage:3 value:self.options];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasName) {
    size += computeStringSize(1, self.name);
  }
  for (PBEnumValueDescriptorProto* element in self.valueList) {
    size += computeMessageSize(2, element);
  }
  if (self.hasOptions) {
    size += computeMessageSize(3, self.options);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBEnumDescriptorProto*) parseFromData:(NSData*) data {
  return (PBEnumDescriptorProto*)[[[PBEnumDescriptorProto builder] mergeFromData:data] build];
}
+ (PBEnumDescriptorProto*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumDescriptorProto*)[[[PBEnumDescriptorProto builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBEnumDescriptorProto*) parseFromInputStream:(NSInputStream*) input {
  return (PBEnumDescriptorProto*)[[[PBEnumDescriptorProto builder] mergeFromInputStream:input] build];
}
+ (PBEnumDescriptorProto*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumDescriptorProto*)[[[PBEnumDescriptorProto builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBEnumDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBEnumDescriptorProto*)[[[PBEnumDescriptorProto builder] mergeFromCodedInputStream:input] build];
}
+ (PBEnumDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumDescriptorProto*)[[[PBEnumDescriptorProto builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBEnumDescriptorProto_Builder*) builder {
  return [[[PBEnumDescriptorProto_Builder alloc] init] autorelease];
}
+ (PBEnumDescriptorProto_Builder*) builderWithPrototype:(PBEnumDescriptorProto*) prototype {
  return [[PBEnumDescriptorProto builder] mergeFrom:prototype];
}
- (PBEnumDescriptorProto_Builder*) builder {
  return [PBEnumDescriptorProto builder];
}
@end

@interface PBEnumDescriptorProto_Builder()
@property (retain) PBEnumDescriptorProto* result;
@end

@implementation PBEnumDescriptorProto_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBEnumDescriptorProto alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBEnumDescriptorProto_Builder*) clear {
  self.result = [[[PBEnumDescriptorProto alloc] init] autorelease];
  return self;
}
- (PBEnumDescriptorProto_Builder*) clone {
  return [PBEnumDescriptorProto builderWithPrototype:result];
}
- (PBEnumDescriptorProto*) defaultInstance {
  return [PBEnumDescriptorProto defaultInstance];
}
- (PBEnumDescriptorProto*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBEnumDescriptorProto*) buildPartial {
  PBEnumDescriptorProto* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBEnumDescriptorProto_Builder*) mergeFrom:(PBEnumDescriptorProto*) other {
  if (other == [PBEnumDescriptorProto defaultInstance]) {
    return self;
  }
  if (other.hasName) {
    [self setName:other.name];
  }
  if (other.mutableValueList.count > 0) {
    if (result.mutableValueList == nil) {
      result.mutableValueList = [NSMutableArray array];
    }
    [result.mutableValueList addObjectsFromArray:other.mutableValueList];
  }
  if (other.hasOptions) {
    [self mergeOptions:other.options];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBEnumDescriptorProto_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBEnumDescriptorProto_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 setName:[input readString]];
        break;
      }
      case 18: {
        PBEnumValueDescriptorProto_Builder* subBuilder = [PBEnumValueDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addValue:[subBuilder buildPartial]];
        break;
      }
      case 26: {
        PBEnumOptions_Builder* subBuilder = [PBEnumOptions builder];
        if (self.hasOptions) {
          [subBuilder mergeFrom:self.options];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptions:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasName {
  return result.hasName;
}
- (NSString*) name {
  return result.name;
}
- (PBEnumDescriptorProto_Builder*) setName:(NSString*) value {
  result.hasName = YES;
  result.name = value;
  return self;
}
- (PBEnumDescriptorProto_Builder*) clearName {
  result.hasName = NO;
  result.name = @"";
  return self;
}
- (NSArray*) valueList {
  if (result.mutableValueList == nil) { return [NSArray array]; }
  return result.mutableValueList;
}
- (PBEnumValueDescriptorProto*) valueAtIndex:(int32_t) index {
  return [result valueAtIndex:index];
}
- (PBEnumDescriptorProto_Builder*) replaceValueAtIndex:(int32_t) index with:(PBEnumValueDescriptorProto*) value {
  [result.mutableValueList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBEnumDescriptorProto_Builder*) addAllValue:(NSArray*) values {
  if (result.mutableValueList == nil) {
    result.mutableValueList = [NSMutableArray array];
  }
  [result.mutableValueList addObjectsFromArray:values];
  return self;
}
- (PBEnumDescriptorProto_Builder*) clearValueList {
  result.mutableValueList = nil;
  return self;
}
- (PBEnumDescriptorProto_Builder*) addValue:(PBEnumValueDescriptorProto*) value {
  if (result.mutableValueList == nil) {
    result.mutableValueList = [NSMutableArray array];
  }
  [result.mutableValueList addObject:value];
  return self;
}
- (BOOL) hasOptions {
  return result.hasOptions;
}
- (PBEnumOptions*) options {
  return result.options;
}
- (PBEnumDescriptorProto_Builder*) setOptions:(PBEnumOptions*) value {
  result.hasOptions = YES;
  result.options = value;
  return self;
}
- (PBEnumDescriptorProto_Builder*) setOptionsBuilder:(PBEnumOptions_Builder*) builderForValue {
  return [self setOptions:[builderForValue build]];
}
- (PBEnumDescriptorProto_Builder*) mergeOptions:(PBEnumOptions*) value {
  if (result.hasOptions &&
      result.options != [PBEnumOptions defaultInstance]) {
    result.options =
      [[[PBEnumOptions builderWithPrototype:result.options] mergeFrom:value] buildPartial];
  } else {
    result.options = value;
  }
  result.hasOptions = YES;
  return self;
}
- (PBEnumDescriptorProto_Builder*) clearOptions {
  result.hasOptions = NO;
  result.options = [PBEnumOptions defaultInstance];
  return self;
}
@end

@interface PBEnumValueDescriptorProto ()
@property (retain) NSString* name;
@property int32_t number;
@property (retain) PBEnumValueOptions* options;
@end

@implementation PBEnumValueDescriptorProto

- (BOOL) hasName {
  return !!hasName_;
}
- (void) setHasName:(BOOL) value {
  hasName_ = !!value;
}
@synthesize name;
- (BOOL) hasNumber {
  return !!hasNumber_;
}
- (void) setHasNumber:(BOOL) value {
  hasNumber_ = !!value;
}
@synthesize number;
- (BOOL) hasOptions {
  return !!hasOptions_;
}
- (void) setHasOptions:(BOOL) value {
  hasOptions_ = !!value;
}
@synthesize options;
- (void) dealloc {
  self.name = nil;
  self.options = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.name = @"";
    self.number = 0;
    self.options = [PBEnumValueOptions defaultInstance];
  }
  return self;
}
static PBEnumValueDescriptorProto* defaultPBEnumValueDescriptorProtoInstance = nil;
+ (void) initialize {
  if (self == [PBEnumValueDescriptorProto class]) {
    defaultPBEnumValueDescriptorProtoInstance = [[PBEnumValueDescriptorProto alloc] init];
  }
}
+ (PBEnumValueDescriptorProto*) defaultInstance {
  return defaultPBEnumValueDescriptorProtoInstance;
}
- (PBEnumValueDescriptorProto*) defaultInstance {
  return defaultPBEnumValueDescriptorProtoInstance;
}
- (BOOL) isInitialized {
  if (self.hasOptions) {
    if (!self.options.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasName) {
    [output writeString:1 value:self.name];
  }
  if (self.hasNumber) {
    [output writeInt32:2 value:self.number];
  }
  if (self.hasOptions) {
    [output writeMessage:3 value:self.options];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasName) {
    size += computeStringSize(1, self.name);
  }
  if (self.hasNumber) {
    size += computeInt32Size(2, self.number);
  }
  if (self.hasOptions) {
    size += computeMessageSize(3, self.options);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBEnumValueDescriptorProto*) parseFromData:(NSData*) data {
  return (PBEnumValueDescriptorProto*)[[[PBEnumValueDescriptorProto builder] mergeFromData:data] build];
}
+ (PBEnumValueDescriptorProto*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumValueDescriptorProto*)[[[PBEnumValueDescriptorProto builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBEnumValueDescriptorProto*) parseFromInputStream:(NSInputStream*) input {
  return (PBEnumValueDescriptorProto*)[[[PBEnumValueDescriptorProto builder] mergeFromInputStream:input] build];
}
+ (PBEnumValueDescriptorProto*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumValueDescriptorProto*)[[[PBEnumValueDescriptorProto builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBEnumValueDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBEnumValueDescriptorProto*)[[[PBEnumValueDescriptorProto builder] mergeFromCodedInputStream:input] build];
}
+ (PBEnumValueDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumValueDescriptorProto*)[[[PBEnumValueDescriptorProto builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBEnumValueDescriptorProto_Builder*) builder {
  return [[[PBEnumValueDescriptorProto_Builder alloc] init] autorelease];
}
+ (PBEnumValueDescriptorProto_Builder*) builderWithPrototype:(PBEnumValueDescriptorProto*) prototype {
  return [[PBEnumValueDescriptorProto builder] mergeFrom:prototype];
}
- (PBEnumValueDescriptorProto_Builder*) builder {
  return [PBEnumValueDescriptorProto builder];
}
@end

@interface PBEnumValueDescriptorProto_Builder()
@property (retain) PBEnumValueDescriptorProto* result;
@end

@implementation PBEnumValueDescriptorProto_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBEnumValueDescriptorProto alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBEnumValueDescriptorProto_Builder*) clear {
  self.result = [[[PBEnumValueDescriptorProto alloc] init] autorelease];
  return self;
}
- (PBEnumValueDescriptorProto_Builder*) clone {
  return [PBEnumValueDescriptorProto builderWithPrototype:result];
}
- (PBEnumValueDescriptorProto*) defaultInstance {
  return [PBEnumValueDescriptorProto defaultInstance];
}
- (PBEnumValueDescriptorProto*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBEnumValueDescriptorProto*) buildPartial {
  PBEnumValueDescriptorProto* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBEnumValueDescriptorProto_Builder*) mergeFrom:(PBEnumValueDescriptorProto*) other {
  if (other == [PBEnumValueDescriptorProto defaultInstance]) {
    return self;
  }
  if (other.hasName) {
    [self setName:other.name];
  }
  if (other.hasNumber) {
    [self setNumber:other.number];
  }
  if (other.hasOptions) {
    [self mergeOptions:other.options];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBEnumValueDescriptorProto_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBEnumValueDescriptorProto_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 setName:[input readString]];
        break;
      }
      case 16: {
        [self setNumber:[input readInt32]];
        break;
      }
      case 26: {
        PBEnumValueOptions_Builder* subBuilder = [PBEnumValueOptions builder];
        if (self.hasOptions) {
          [subBuilder mergeFrom:self.options];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptions:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasName {
  return result.hasName;
}
- (NSString*) name {
  return result.name;
}
- (PBEnumValueDescriptorProto_Builder*) setName:(NSString*) value {
  result.hasName = YES;
  result.name = value;
  return self;
}
- (PBEnumValueDescriptorProto_Builder*) clearName {
  result.hasName = NO;
  result.name = @"";
  return self;
}
- (BOOL) hasNumber {
  return result.hasNumber;
}
- (int32_t) number {
  return result.number;
}
- (PBEnumValueDescriptorProto_Builder*) setNumber:(int32_t) value {
  result.hasNumber = YES;
  result.number = value;
  return self;
}
- (PBEnumValueDescriptorProto_Builder*) clearNumber {
  result.hasNumber = NO;
  result.number = 0;
  return self;
}
- (BOOL) hasOptions {
  return result.hasOptions;
}
- (PBEnumValueOptions*) options {
  return result.options;
}
- (PBEnumValueDescriptorProto_Builder*) setOptions:(PBEnumValueOptions*) value {
  result.hasOptions = YES;
  result.options = value;
  return self;
}
- (PBEnumValueDescriptorProto_Builder*) setOptionsBuilder:(PBEnumValueOptions_Builder*) builderForValue {
  return [self setOptions:[builderForValue build]];
}
- (PBEnumValueDescriptorProto_Builder*) mergeOptions:(PBEnumValueOptions*) value {
  if (result.hasOptions &&
      result.options != [PBEnumValueOptions defaultInstance]) {
    result.options =
      [[[PBEnumValueOptions builderWithPrototype:result.options] mergeFrom:value] buildPartial];
  } else {
    result.options = value;
  }
  result.hasOptions = YES;
  return self;
}
- (PBEnumValueDescriptorProto_Builder*) clearOptions {
  result.hasOptions = NO;
  result.options = [PBEnumValueOptions defaultInstance];
  return self;
}
@end

@interface PBServiceDescriptorProto ()
@property (retain) NSString* name;
@property (retain) NSMutableArray* mutableMethodList;
@property (retain) PBServiceOptions* options;
@end

@implementation PBServiceDescriptorProto

- (BOOL) hasName {
  return !!hasName_;
}
- (void) setHasName:(BOOL) value {
  hasName_ = !!value;
}
@synthesize name;
@synthesize mutableMethodList;
- (BOOL) hasOptions {
  return !!hasOptions_;
}
- (void) setHasOptions:(BOOL) value {
  hasOptions_ = !!value;
}
@synthesize options;
- (void) dealloc {
  self.name = nil;
  self.mutableMethodList = nil;
  self.options = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.name = @"";
    self.options = [PBServiceOptions defaultInstance];
  }
  return self;
}
static PBServiceDescriptorProto* defaultPBServiceDescriptorProtoInstance = nil;
+ (void) initialize {
  if (self == [PBServiceDescriptorProto class]) {
    defaultPBServiceDescriptorProtoInstance = [[PBServiceDescriptorProto alloc] init];
  }
}
+ (PBServiceDescriptorProto*) defaultInstance {
  return defaultPBServiceDescriptorProtoInstance;
}
- (PBServiceDescriptorProto*) defaultInstance {
  return defaultPBServiceDescriptorProtoInstance;
}
- (NSArray*) methodList {
  return mutableMethodList;
}
- (PBMethodDescriptorProto*) methodAtIndex:(int32_t) index {
  id value = [mutableMethodList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBMethodDescriptorProto* element in self.methodList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (self.hasOptions) {
    if (!self.options.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasName) {
    [output writeString:1 value:self.name];
  }
  for (PBMethodDescriptorProto* element in self.methodList) {
    [output writeMessage:2 value:element];
  }
  if (self.hasOptions) {
    [output writeMessage:3 value:self.options];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasName) {
    size += computeStringSize(1, self.name);
  }
  for (PBMethodDescriptorProto* element in self.methodList) {
    size += computeMessageSize(2, element);
  }
  if (self.hasOptions) {
    size += computeMessageSize(3, self.options);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBServiceDescriptorProto*) parseFromData:(NSData*) data {
  return (PBServiceDescriptorProto*)[[[PBServiceDescriptorProto builder] mergeFromData:data] build];
}
+ (PBServiceDescriptorProto*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBServiceDescriptorProto*)[[[PBServiceDescriptorProto builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBServiceDescriptorProto*) parseFromInputStream:(NSInputStream*) input {
  return (PBServiceDescriptorProto*)[[[PBServiceDescriptorProto builder] mergeFromInputStream:input] build];
}
+ (PBServiceDescriptorProto*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBServiceDescriptorProto*)[[[PBServiceDescriptorProto builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBServiceDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBServiceDescriptorProto*)[[[PBServiceDescriptorProto builder] mergeFromCodedInputStream:input] build];
}
+ (PBServiceDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBServiceDescriptorProto*)[[[PBServiceDescriptorProto builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBServiceDescriptorProto_Builder*) builder {
  return [[[PBServiceDescriptorProto_Builder alloc] init] autorelease];
}
+ (PBServiceDescriptorProto_Builder*) builderWithPrototype:(PBServiceDescriptorProto*) prototype {
  return [[PBServiceDescriptorProto builder] mergeFrom:prototype];
}
- (PBServiceDescriptorProto_Builder*) builder {
  return [PBServiceDescriptorProto builder];
}
@end

@interface PBServiceDescriptorProto_Builder()
@property (retain) PBServiceDescriptorProto* result;
@end

@implementation PBServiceDescriptorProto_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBServiceDescriptorProto alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBServiceDescriptorProto_Builder*) clear {
  self.result = [[[PBServiceDescriptorProto alloc] init] autorelease];
  return self;
}
- (PBServiceDescriptorProto_Builder*) clone {
  return [PBServiceDescriptorProto builderWithPrototype:result];
}
- (PBServiceDescriptorProto*) defaultInstance {
  return [PBServiceDescriptorProto defaultInstance];
}
- (PBServiceDescriptorProto*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBServiceDescriptorProto*) buildPartial {
  PBServiceDescriptorProto* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBServiceDescriptorProto_Builder*) mergeFrom:(PBServiceDescriptorProto*) other {
  if (other == [PBServiceDescriptorProto defaultInstance]) {
    return self;
  }
  if (other.hasName) {
    [self setName:other.name];
  }
  if (other.mutableMethodList.count > 0) {
    if (result.mutableMethodList == nil) {
      result.mutableMethodList = [NSMutableArray array];
    }
    [result.mutableMethodList addObjectsFromArray:other.mutableMethodList];
  }
  if (other.hasOptions) {
    [self mergeOptions:other.options];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBServiceDescriptorProto_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBServiceDescriptorProto_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 setName:[input readString]];
        break;
      }
      case 18: {
        PBMethodDescriptorProto_Builder* subBuilder = [PBMethodDescriptorProto builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addMethod:[subBuilder buildPartial]];
        break;
      }
      case 26: {
        PBServiceOptions_Builder* subBuilder = [PBServiceOptions builder];
        if (self.hasOptions) {
          [subBuilder mergeFrom:self.options];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptions:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasName {
  return result.hasName;
}
- (NSString*) name {
  return result.name;
}
- (PBServiceDescriptorProto_Builder*) setName:(NSString*) value {
  result.hasName = YES;
  result.name = value;
  return self;
}
- (PBServiceDescriptorProto_Builder*) clearName {
  result.hasName = NO;
  result.name = @"";
  return self;
}
- (NSArray*) methodList {
  if (result.mutableMethodList == nil) { return [NSArray array]; }
  return result.mutableMethodList;
}
- (PBMethodDescriptorProto*) methodAtIndex:(int32_t) index {
  return [result methodAtIndex:index];
}
- (PBServiceDescriptorProto_Builder*) replaceMethodAtIndex:(int32_t) index with:(PBMethodDescriptorProto*) value {
  [result.mutableMethodList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBServiceDescriptorProto_Builder*) addAllMethod:(NSArray*) values {
  if (result.mutableMethodList == nil) {
    result.mutableMethodList = [NSMutableArray array];
  }
  [result.mutableMethodList addObjectsFromArray:values];
  return self;
}
- (PBServiceDescriptorProto_Builder*) clearMethodList {
  result.mutableMethodList = nil;
  return self;
}
- (PBServiceDescriptorProto_Builder*) addMethod:(PBMethodDescriptorProto*) value {
  if (result.mutableMethodList == nil) {
    result.mutableMethodList = [NSMutableArray array];
  }
  [result.mutableMethodList addObject:value];
  return self;
}
- (BOOL) hasOptions {
  return result.hasOptions;
}
- (PBServiceOptions*) options {
  return result.options;
}
- (PBServiceDescriptorProto_Builder*) setOptions:(PBServiceOptions*) value {
  result.hasOptions = YES;
  result.options = value;
  return self;
}
- (PBServiceDescriptorProto_Builder*) setOptionsBuilder:(PBServiceOptions_Builder*) builderForValue {
  return [self setOptions:[builderForValue build]];
}
- (PBServiceDescriptorProto_Builder*) mergeOptions:(PBServiceOptions*) value {
  if (result.hasOptions &&
      result.options != [PBServiceOptions defaultInstance]) {
    result.options =
      [[[PBServiceOptions builderWithPrototype:result.options] mergeFrom:value] buildPartial];
  } else {
    result.options = value;
  }
  result.hasOptions = YES;
  return self;
}
- (PBServiceDescriptorProto_Builder*) clearOptions {
  result.hasOptions = NO;
  result.options = [PBServiceOptions defaultInstance];
  return self;
}
@end

@interface PBMethodDescriptorProto ()
@property (retain) NSString* name;
@property (retain) NSString* inputType;
@property (retain) NSString* outputType;
@property (retain) PBMethodOptions* options;
@end

@implementation PBMethodDescriptorProto

- (BOOL) hasName {
  return !!hasName_;
}
- (void) setHasName:(BOOL) value {
  hasName_ = !!value;
}
@synthesize name;
- (BOOL) hasInputType {
  return !!hasInputType_;
}
- (void) setHasInputType:(BOOL) value {
  hasInputType_ = !!value;
}
@synthesize inputType;
- (BOOL) hasOutputType {
  return !!hasOutputType_;
}
- (void) setHasOutputType:(BOOL) value {
  hasOutputType_ = !!value;
}
@synthesize outputType;
- (BOOL) hasOptions {
  return !!hasOptions_;
}
- (void) setHasOptions:(BOOL) value {
  hasOptions_ = !!value;
}
@synthesize options;
- (void) dealloc {
  self.name = nil;
  self.inputType = nil;
  self.outputType = nil;
  self.options = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.name = @"";
    self.inputType = @"";
    self.outputType = @"";
    self.options = [PBMethodOptions defaultInstance];
  }
  return self;
}
static PBMethodDescriptorProto* defaultPBMethodDescriptorProtoInstance = nil;
+ (void) initialize {
  if (self == [PBMethodDescriptorProto class]) {
    defaultPBMethodDescriptorProtoInstance = [[PBMethodDescriptorProto alloc] init];
  }
}
+ (PBMethodDescriptorProto*) defaultInstance {
  return defaultPBMethodDescriptorProtoInstance;
}
- (PBMethodDescriptorProto*) defaultInstance {
  return defaultPBMethodDescriptorProtoInstance;
}
- (BOOL) isInitialized {
  if (self.hasOptions) {
    if (!self.options.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasName) {
    [output writeString:1 value:self.name];
  }
  if (self.hasInputType) {
    [output writeString:2 value:self.inputType];
  }
  if (self.hasOutputType) {
    [output writeString:3 value:self.outputType];
  }
  if (self.hasOptions) {
    [output writeMessage:4 value:self.options];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasName) {
    size += computeStringSize(1, self.name);
  }
  if (self.hasInputType) {
    size += computeStringSize(2, self.inputType);
  }
  if (self.hasOutputType) {
    size += computeStringSize(3, self.outputType);
  }
  if (self.hasOptions) {
    size += computeMessageSize(4, self.options);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBMethodDescriptorProto*) parseFromData:(NSData*) data {
  return (PBMethodDescriptorProto*)[[[PBMethodDescriptorProto builder] mergeFromData:data] build];
}
+ (PBMethodDescriptorProto*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBMethodDescriptorProto*)[[[PBMethodDescriptorProto builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBMethodDescriptorProto*) parseFromInputStream:(NSInputStream*) input {
  return (PBMethodDescriptorProto*)[[[PBMethodDescriptorProto builder] mergeFromInputStream:input] build];
}
+ (PBMethodDescriptorProto*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBMethodDescriptorProto*)[[[PBMethodDescriptorProto builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBMethodDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBMethodDescriptorProto*)[[[PBMethodDescriptorProto builder] mergeFromCodedInputStream:input] build];
}
+ (PBMethodDescriptorProto*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBMethodDescriptorProto*)[[[PBMethodDescriptorProto builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBMethodDescriptorProto_Builder*) builder {
  return [[[PBMethodDescriptorProto_Builder alloc] init] autorelease];
}
+ (PBMethodDescriptorProto_Builder*) builderWithPrototype:(PBMethodDescriptorProto*) prototype {
  return [[PBMethodDescriptorProto builder] mergeFrom:prototype];
}
- (PBMethodDescriptorProto_Builder*) builder {
  return [PBMethodDescriptorProto builder];
}
@end

@interface PBMethodDescriptorProto_Builder()
@property (retain) PBMethodDescriptorProto* result;
@end

@implementation PBMethodDescriptorProto_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBMethodDescriptorProto alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBMethodDescriptorProto_Builder*) clear {
  self.result = [[[PBMethodDescriptorProto alloc] init] autorelease];
  return self;
}
- (PBMethodDescriptorProto_Builder*) clone {
  return [PBMethodDescriptorProto builderWithPrototype:result];
}
- (PBMethodDescriptorProto*) defaultInstance {
  return [PBMethodDescriptorProto defaultInstance];
}
- (PBMethodDescriptorProto*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBMethodDescriptorProto*) buildPartial {
  PBMethodDescriptorProto* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBMethodDescriptorProto_Builder*) mergeFrom:(PBMethodDescriptorProto*) other {
  if (other == [PBMethodDescriptorProto defaultInstance]) {
    return self;
  }
  if (other.hasName) {
    [self setName:other.name];
  }
  if (other.hasInputType) {
    [self setInputType:other.inputType];
  }
  if (other.hasOutputType) {
    [self setOutputType:other.outputType];
  }
  if (other.hasOptions) {
    [self mergeOptions:other.options];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBMethodDescriptorProto_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBMethodDescriptorProto_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 setName:[input readString]];
        break;
      }
      case 18: {
        [self setInputType:[input readString]];
        break;
      }
      case 26: {
        [self setOutputType:[input readString]];
        break;
      }
      case 34: {
        PBMethodOptions_Builder* subBuilder = [PBMethodOptions builder];
        if (self.hasOptions) {
          [subBuilder mergeFrom:self.options];
        }
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self setOptions:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasName {
  return result.hasName;
}
- (NSString*) name {
  return result.name;
}
- (PBMethodDescriptorProto_Builder*) setName:(NSString*) value {
  result.hasName = YES;
  result.name = value;
  return self;
}
- (PBMethodDescriptorProto_Builder*) clearName {
  result.hasName = NO;
  result.name = @"";
  return self;
}
- (BOOL) hasInputType {
  return result.hasInputType;
}
- (NSString*) inputType {
  return result.inputType;
}
- (PBMethodDescriptorProto_Builder*) setInputType:(NSString*) value {
  result.hasInputType = YES;
  result.inputType = value;
  return self;
}
- (PBMethodDescriptorProto_Builder*) clearInputType {
  result.hasInputType = NO;
  result.inputType = @"";
  return self;
}
- (BOOL) hasOutputType {
  return result.hasOutputType;
}
- (NSString*) outputType {
  return result.outputType;
}
- (PBMethodDescriptorProto_Builder*) setOutputType:(NSString*) value {
  result.hasOutputType = YES;
  result.outputType = value;
  return self;
}
- (PBMethodDescriptorProto_Builder*) clearOutputType {
  result.hasOutputType = NO;
  result.outputType = @"";
  return self;
}
- (BOOL) hasOptions {
  return result.hasOptions;
}
- (PBMethodOptions*) options {
  return result.options;
}
- (PBMethodDescriptorProto_Builder*) setOptions:(PBMethodOptions*) value {
  result.hasOptions = YES;
  result.options = value;
  return self;
}
- (PBMethodDescriptorProto_Builder*) setOptionsBuilder:(PBMethodOptions_Builder*) builderForValue {
  return [self setOptions:[builderForValue build]];
}
- (PBMethodDescriptorProto_Builder*) mergeOptions:(PBMethodOptions*) value {
  if (result.hasOptions &&
      result.options != [PBMethodOptions defaultInstance]) {
    result.options =
      [[[PBMethodOptions builderWithPrototype:result.options] mergeFrom:value] buildPartial];
  } else {
    result.options = value;
  }
  result.hasOptions = YES;
  return self;
}
- (PBMethodDescriptorProto_Builder*) clearOptions {
  result.hasOptions = NO;
  result.options = [PBMethodOptions defaultInstance];
  return self;
}
@end

@interface PBFileOptions ()
@property (retain) NSString* javaPackage;
@property (retain) NSString* javaOuterClassname;
@property BOOL javaMultipleFiles;
@property PBFileOptions_OptimizeMode optimizeFor;
@property (retain) NSMutableArray* mutableUninterpretedOptionList;
@end

@implementation PBFileOptions

- (BOOL) hasJavaPackage {
  return !!hasJavaPackage_;
}
- (void) setHasJavaPackage:(BOOL) value {
  hasJavaPackage_ = !!value;
}
@synthesize javaPackage;
- (BOOL) hasJavaOuterClassname {
  return !!hasJavaOuterClassname_;
}
- (void) setHasJavaOuterClassname:(BOOL) value {
  hasJavaOuterClassname_ = !!value;
}
@synthesize javaOuterClassname;
- (BOOL) hasJavaMultipleFiles {
  return !!hasJavaMultipleFiles_;
}
- (void) setHasJavaMultipleFiles:(BOOL) value {
  hasJavaMultipleFiles_ = !!value;
}
- (BOOL) javaMultipleFiles {
  return !!javaMultipleFiles_;
}
- (void) setJavaMultipleFiles:(BOOL) value {
  javaMultipleFiles_ = !!value;
}
- (BOOL) hasOptimizeFor {
  return !!hasOptimizeFor_;
}
- (void) setHasOptimizeFor:(BOOL) value {
  hasOptimizeFor_ = !!value;
}
@synthesize optimizeFor;
@synthesize mutableUninterpretedOptionList;
- (void) dealloc {
  self.javaPackage = nil;
  self.javaOuterClassname = nil;
  self.mutableUninterpretedOptionList = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.javaPackage = @"";
    self.javaOuterClassname = @"";
    self.javaMultipleFiles = NO;
    self.optimizeFor = PBFileOptions_OptimizeModeSpeed;
  }
  return self;
}
static PBFileOptions* defaultPBFileOptionsInstance = nil;
+ (void) initialize {
  if (self == [PBFileOptions class]) {
    defaultPBFileOptionsInstance = [[PBFileOptions alloc] init];
  }
}
+ (PBFileOptions*) defaultInstance {
  return defaultPBFileOptionsInstance;
}
- (PBFileOptions*) defaultInstance {
  return defaultPBFileOptionsInstance;
}
- (NSArray*) uninterpretedOptionList {
  return mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  id value = [mutableUninterpretedOptionList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasJavaPackage) {
    [output writeString:1 value:self.javaPackage];
  }
  if (self.hasJavaOuterClassname) {
    [output writeString:8 value:self.javaOuterClassname];
  }
  if (self.hasOptimizeFor) {
    [output writeEnum:9 value:self.optimizeFor];
  }
  if (self.hasJavaMultipleFiles) {
    [output writeBool:10 value:self.javaMultipleFiles];
  }
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    [output writeMessage:999 value:element];
  }
  [self writeExtensionsToCodedOutputStream:output
                                      from:1000
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasJavaPackage) {
    size += computeStringSize(1, self.javaPackage);
  }
  if (self.hasJavaOuterClassname) {
    size += computeStringSize(8, self.javaOuterClassname);
  }
  if (self.hasOptimizeFor) {
    size += computeEnumSize(9, self.optimizeFor);
  }
  if (self.hasJavaMultipleFiles) {
    size += computeBoolSize(10, self.javaMultipleFiles);
  }
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    size += computeMessageSize(999, element);
  }
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBFileOptions*) parseFromData:(NSData*) data {
  return (PBFileOptions*)[[[PBFileOptions builder] mergeFromData:data] build];
}
+ (PBFileOptions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFileOptions*)[[[PBFileOptions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBFileOptions*) parseFromInputStream:(NSInputStream*) input {
  return (PBFileOptions*)[[[PBFileOptions builder] mergeFromInputStream:input] build];
}
+ (PBFileOptions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFileOptions*)[[[PBFileOptions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFileOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBFileOptions*)[[[PBFileOptions builder] mergeFromCodedInputStream:input] build];
}
+ (PBFileOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFileOptions*)[[[PBFileOptions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFileOptions_Builder*) builder {
  return [[[PBFileOptions_Builder alloc] init] autorelease];
}
+ (PBFileOptions_Builder*) builderWithPrototype:(PBFileOptions*) prototype {
  return [[PBFileOptions builder] mergeFrom:prototype];
}
- (PBFileOptions_Builder*) builder {
  return [PBFileOptions builder];
}
@end

BOOL PBFileOptions_OptimizeModeIsValidValue(PBFileOptions_OptimizeMode value) {
  switch (value) {
    case PBFileOptions_OptimizeModeSpeed:
    case PBFileOptions_OptimizeModeCodeSize:
    case PBFileOptions_OptimizeModeLiteRuntime:
      return YES;
    default:
      return NO;
  }
}
@interface PBFileOptions_Builder()
@property (retain) PBFileOptions* result;
@end

@implementation PBFileOptions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBFileOptions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (PBFileOptions_Builder*) clear {
  self.result = [[[PBFileOptions alloc] init] autorelease];
  return self;
}
- (PBFileOptions_Builder*) clone {
  return [PBFileOptions builderWithPrototype:result];
}
- (PBFileOptions*) defaultInstance {
  return [PBFileOptions defaultInstance];
}
- (PBFileOptions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBFileOptions*) buildPartial {
  PBFileOptions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBFileOptions_Builder*) mergeFrom:(PBFileOptions*) other {
  if (other == [PBFileOptions defaultInstance]) {
    return self;
  }
  if (other.hasJavaPackage) {
    [self setJavaPackage:other.javaPackage];
  }
  if (other.hasJavaOuterClassname) {
    [self setJavaOuterClassname:other.javaOuterClassname];
  }
  if (other.hasJavaMultipleFiles) {
    [self setJavaMultipleFiles:other.javaMultipleFiles];
  }
  if (other.hasOptimizeFor) {
    [self setOptimizeFor:other.optimizeFor];
  }
  if (other.mutableUninterpretedOptionList.count > 0) {
    if (result.mutableUninterpretedOptionList == nil) {
      result.mutableUninterpretedOptionList = [NSMutableArray array];
    }
    [result.mutableUninterpretedOptionList addObjectsFromArray:other.mutableUninterpretedOptionList];
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBFileOptions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBFileOptions_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 setJavaPackage:[input readString]];
        break;
      }
      case 66: {
        [self setJavaOuterClassname:[input readString]];
        break;
      }
      case 72: {
        int32_t value = [input readEnum];
        if (PBFileOptions_OptimizeModeIsValidValue(value)) {
          [self setOptimizeFor:value];
        } else {
          [unknownFields mergeVarintField:9 value:value];
        }
        break;
      }
      case 80: {
        [self setJavaMultipleFiles:[input readBool]];
        break;
      }
      case 7994: {
        PBUninterpretedOption_Builder* subBuilder = [PBUninterpretedOption builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addUninterpretedOption:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasJavaPackage {
  return result.hasJavaPackage;
}
- (NSString*) javaPackage {
  return result.javaPackage;
}
- (PBFileOptions_Builder*) setJavaPackage:(NSString*) value {
  result.hasJavaPackage = YES;
  result.javaPackage = value;
  return self;
}
- (PBFileOptions_Builder*) clearJavaPackage {
  result.hasJavaPackage = NO;
  result.javaPackage = @"";
  return self;
}
- (BOOL) hasJavaOuterClassname {
  return result.hasJavaOuterClassname;
}
- (NSString*) javaOuterClassname {
  return result.javaOuterClassname;
}
- (PBFileOptions_Builder*) setJavaOuterClassname:(NSString*) value {
  result.hasJavaOuterClassname = YES;
  result.javaOuterClassname = value;
  return self;
}
- (PBFileOptions_Builder*) clearJavaOuterClassname {
  result.hasJavaOuterClassname = NO;
  result.javaOuterClassname = @"";
  return self;
}
- (BOOL) hasJavaMultipleFiles {
  return result.hasJavaMultipleFiles;
}
- (BOOL) javaMultipleFiles {
  return result.javaMultipleFiles;
}
- (PBFileOptions_Builder*) setJavaMultipleFiles:(BOOL) value {
  result.hasJavaMultipleFiles = YES;
  result.javaMultipleFiles = value;
  return self;
}
- (PBFileOptions_Builder*) clearJavaMultipleFiles {
  result.hasJavaMultipleFiles = NO;
  result.javaMultipleFiles = NO;
  return self;
}
- (BOOL) hasOptimizeFor {
  return result.hasOptimizeFor;
}
- (PBFileOptions_OptimizeMode) optimizeFor {
  return result.optimizeFor;
}
- (PBFileOptions_Builder*) setOptimizeFor:(PBFileOptions_OptimizeMode) value {
  result.hasOptimizeFor = YES;
  result.optimizeFor = value;
  return self;
}
- (PBFileOptions_Builder*) clearOptimizeFor {
  result.hasOptimizeFor = NO;
  result.optimizeFor = PBFileOptions_OptimizeModeSpeed;
  return self;
}
- (NSArray*) uninterpretedOptionList {
  if (result.mutableUninterpretedOptionList == nil) { return [NSArray array]; }
  return result.mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  return [result uninterpretedOptionAtIndex:index];
}
- (PBFileOptions_Builder*) replaceUninterpretedOptionAtIndex:(int32_t) index with:(PBUninterpretedOption*) value {
  [result.mutableUninterpretedOptionList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBFileOptions_Builder*) addAllUninterpretedOption:(NSArray*) values {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObjectsFromArray:values];
  return self;
}
- (PBFileOptions_Builder*) clearUninterpretedOptionList {
  result.mutableUninterpretedOptionList = nil;
  return self;
}
- (PBFileOptions_Builder*) addUninterpretedOption:(PBUninterpretedOption*) value {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObject:value];
  return self;
}
@end

@interface PBMessageOptions ()
@property BOOL messageSetWireFormat;
@property BOOL noStandardDescriptorAccessor;
@property (retain) NSMutableArray* mutableUninterpretedOptionList;
@end

@implementation PBMessageOptions

- (BOOL) hasMessageSetWireFormat {
  return !!hasMessageSetWireFormat_;
}
- (void) setHasMessageSetWireFormat:(BOOL) value {
  hasMessageSetWireFormat_ = !!value;
}
- (BOOL) messageSetWireFormat {
  return !!messageSetWireFormat_;
}
- (void) setMessageSetWireFormat:(BOOL) value {
  messageSetWireFormat_ = !!value;
}
- (BOOL) hasNoStandardDescriptorAccessor {
  return !!hasNoStandardDescriptorAccessor_;
}
- (void) setHasNoStandardDescriptorAccessor:(BOOL) value {
  hasNoStandardDescriptorAccessor_ = !!value;
}
- (BOOL) noStandardDescriptorAccessor {
  return !!noStandardDescriptorAccessor_;
}
- (void) setNoStandardDescriptorAccessor:(BOOL) value {
  noStandardDescriptorAccessor_ = !!value;
}
@synthesize mutableUninterpretedOptionList;
- (void) dealloc {
  self.mutableUninterpretedOptionList = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.messageSetWireFormat = NO;
    self.noStandardDescriptorAccessor = NO;
  }
  return self;
}
static PBMessageOptions* defaultPBMessageOptionsInstance = nil;
+ (void) initialize {
  if (self == [PBMessageOptions class]) {
    defaultPBMessageOptionsInstance = [[PBMessageOptions alloc] init];
  }
}
+ (PBMessageOptions*) defaultInstance {
  return defaultPBMessageOptionsInstance;
}
- (PBMessageOptions*) defaultInstance {
  return defaultPBMessageOptionsInstance;
}
- (NSArray*) uninterpretedOptionList {
  return mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  id value = [mutableUninterpretedOptionList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasMessageSetWireFormat) {
    [output writeBool:1 value:self.messageSetWireFormat];
  }
  if (self.hasNoStandardDescriptorAccessor) {
    [output writeBool:2 value:self.noStandardDescriptorAccessor];
  }
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    [output writeMessage:999 value:element];
  }
  [self writeExtensionsToCodedOutputStream:output
                                      from:1000
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasMessageSetWireFormat) {
    size += computeBoolSize(1, self.messageSetWireFormat);
  }
  if (self.hasNoStandardDescriptorAccessor) {
    size += computeBoolSize(2, self.noStandardDescriptorAccessor);
  }
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    size += computeMessageSize(999, element);
  }
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBMessageOptions*) parseFromData:(NSData*) data {
  return (PBMessageOptions*)[[[PBMessageOptions builder] mergeFromData:data] build];
}
+ (PBMessageOptions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBMessageOptions*)[[[PBMessageOptions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBMessageOptions*) parseFromInputStream:(NSInputStream*) input {
  return (PBMessageOptions*)[[[PBMessageOptions builder] mergeFromInputStream:input] build];
}
+ (PBMessageOptions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBMessageOptions*)[[[PBMessageOptions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBMessageOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBMessageOptions*)[[[PBMessageOptions builder] mergeFromCodedInputStream:input] build];
}
+ (PBMessageOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBMessageOptions*)[[[PBMessageOptions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBMessageOptions_Builder*) builder {
  return [[[PBMessageOptions_Builder alloc] init] autorelease];
}
+ (PBMessageOptions_Builder*) builderWithPrototype:(PBMessageOptions*) prototype {
  return [[PBMessageOptions builder] mergeFrom:prototype];
}
- (PBMessageOptions_Builder*) builder {
  return [PBMessageOptions builder];
}
@end

@interface PBMessageOptions_Builder()
@property (retain) PBMessageOptions* result;
@end

@implementation PBMessageOptions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBMessageOptions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (PBMessageOptions_Builder*) clear {
  self.result = [[[PBMessageOptions alloc] init] autorelease];
  return self;
}
- (PBMessageOptions_Builder*) clone {
  return [PBMessageOptions builderWithPrototype:result];
}
- (PBMessageOptions*) defaultInstance {
  return [PBMessageOptions defaultInstance];
}
- (PBMessageOptions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBMessageOptions*) buildPartial {
  PBMessageOptions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBMessageOptions_Builder*) mergeFrom:(PBMessageOptions*) other {
  if (other == [PBMessageOptions defaultInstance]) {
    return self;
  }
  if (other.hasMessageSetWireFormat) {
    [self setMessageSetWireFormat:other.messageSetWireFormat];
  }
  if (other.hasNoStandardDescriptorAccessor) {
    [self setNoStandardDescriptorAccessor:other.noStandardDescriptorAccessor];
  }
  if (other.mutableUninterpretedOptionList.count > 0) {
    if (result.mutableUninterpretedOptionList == nil) {
      result.mutableUninterpretedOptionList = [NSMutableArray array];
    }
    [result.mutableUninterpretedOptionList addObjectsFromArray:other.mutableUninterpretedOptionList];
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBMessageOptions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBMessageOptions_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 setMessageSetWireFormat:[input readBool]];
        break;
      }
      case 16: {
        [self setNoStandardDescriptorAccessor:[input readBool]];
        break;
      }
      case 7994: {
        PBUninterpretedOption_Builder* subBuilder = [PBUninterpretedOption builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addUninterpretedOption:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasMessageSetWireFormat {
  return result.hasMessageSetWireFormat;
}
- (BOOL) messageSetWireFormat {
  return result.messageSetWireFormat;
}
- (PBMessageOptions_Builder*) setMessageSetWireFormat:(BOOL) value {
  result.hasMessageSetWireFormat = YES;
  result.messageSetWireFormat = value;
  return self;
}
- (PBMessageOptions_Builder*) clearMessageSetWireFormat {
  result.hasMessageSetWireFormat = NO;
  result.messageSetWireFormat = NO;
  return self;
}
- (BOOL) hasNoStandardDescriptorAccessor {
  return result.hasNoStandardDescriptorAccessor;
}
- (BOOL) noStandardDescriptorAccessor {
  return result.noStandardDescriptorAccessor;
}
- (PBMessageOptions_Builder*) setNoStandardDescriptorAccessor:(BOOL) value {
  result.hasNoStandardDescriptorAccessor = YES;
  result.noStandardDescriptorAccessor = value;
  return self;
}
- (PBMessageOptions_Builder*) clearNoStandardDescriptorAccessor {
  result.hasNoStandardDescriptorAccessor = NO;
  result.noStandardDescriptorAccessor = NO;
  return self;
}
- (NSArray*) uninterpretedOptionList {
  if (result.mutableUninterpretedOptionList == nil) { return [NSArray array]; }
  return result.mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  return [result uninterpretedOptionAtIndex:index];
}
- (PBMessageOptions_Builder*) replaceUninterpretedOptionAtIndex:(int32_t) index with:(PBUninterpretedOption*) value {
  [result.mutableUninterpretedOptionList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBMessageOptions_Builder*) addAllUninterpretedOption:(NSArray*) values {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObjectsFromArray:values];
  return self;
}
- (PBMessageOptions_Builder*) clearUninterpretedOptionList {
  result.mutableUninterpretedOptionList = nil;
  return self;
}
- (PBMessageOptions_Builder*) addUninterpretedOption:(PBUninterpretedOption*) value {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObject:value];
  return self;
}
@end

@interface PBFieldOptions ()
@property PBFieldOptions_CType ctype;
@property BOOL packed;
@property BOOL deprecated;
@property (retain) NSString* experimentalMapKey;
@property (retain) NSMutableArray* mutableUninterpretedOptionList;
@end

@implementation PBFieldOptions

- (BOOL) hasCtype {
  return !!hasCtype_;
}
- (void) setHasCtype:(BOOL) value {
  hasCtype_ = !!value;
}
@synthesize ctype;
- (BOOL) hasPacked {
  return !!hasPacked_;
}
- (void) setHasPacked:(BOOL) value {
  hasPacked_ = !!value;
}
- (BOOL) packed {
  return !!packed_;
}
- (void) setPacked:(BOOL) value {
  packed_ = !!value;
}
- (BOOL) hasDeprecated {
  return !!hasDeprecated_;
}
- (void) setHasDeprecated:(BOOL) value {
  hasDeprecated_ = !!value;
}
- (BOOL) deprecated {
  return !!deprecated_;
}
- (void) setDeprecated:(BOOL) value {
  deprecated_ = !!value;
}
- (BOOL) hasExperimentalMapKey {
  return !!hasExperimentalMapKey_;
}
- (void) setHasExperimentalMapKey:(BOOL) value {
  hasExperimentalMapKey_ = !!value;
}
@synthesize experimentalMapKey;
@synthesize mutableUninterpretedOptionList;
- (void) dealloc {
  self.experimentalMapKey = nil;
  self.mutableUninterpretedOptionList = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.ctype = PBFieldOptions_CTypeCord;
    self.packed = NO;
    self.deprecated = NO;
    self.experimentalMapKey = @"";
  }
  return self;
}
static PBFieldOptions* defaultPBFieldOptionsInstance = nil;
+ (void) initialize {
  if (self == [PBFieldOptions class]) {
    defaultPBFieldOptionsInstance = [[PBFieldOptions alloc] init];
  }
}
+ (PBFieldOptions*) defaultInstance {
  return defaultPBFieldOptionsInstance;
}
- (PBFieldOptions*) defaultInstance {
  return defaultPBFieldOptionsInstance;
}
- (NSArray*) uninterpretedOptionList {
  return mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  id value = [mutableUninterpretedOptionList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasCtype) {
    [output writeEnum:1 value:self.ctype];
  }
  if (self.hasPacked) {
    [output writeBool:2 value:self.packed];
  }
  if (self.hasDeprecated) {
    [output writeBool:3 value:self.deprecated];
  }
  if (self.hasExperimentalMapKey) {
    [output writeString:9 value:self.experimentalMapKey];
  }
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    [output writeMessage:999 value:element];
  }
  [self writeExtensionsToCodedOutputStream:output
                                      from:1000
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasCtype) {
    size += computeEnumSize(1, self.ctype);
  }
  if (self.hasPacked) {
    size += computeBoolSize(2, self.packed);
  }
  if (self.hasDeprecated) {
    size += computeBoolSize(3, self.deprecated);
  }
  if (self.hasExperimentalMapKey) {
    size += computeStringSize(9, self.experimentalMapKey);
  }
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    size += computeMessageSize(999, element);
  }
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBFieldOptions*) parseFromData:(NSData*) data {
  return (PBFieldOptions*)[[[PBFieldOptions builder] mergeFromData:data] build];
}
+ (PBFieldOptions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFieldOptions*)[[[PBFieldOptions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBFieldOptions*) parseFromInputStream:(NSInputStream*) input {
  return (PBFieldOptions*)[[[PBFieldOptions builder] mergeFromInputStream:input] build];
}
+ (PBFieldOptions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFieldOptions*)[[[PBFieldOptions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFieldOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBFieldOptions*)[[[PBFieldOptions builder] mergeFromCodedInputStream:input] build];
}
+ (PBFieldOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBFieldOptions*)[[[PBFieldOptions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBFieldOptions_Builder*) builder {
  return [[[PBFieldOptions_Builder alloc] init] autorelease];
}
+ (PBFieldOptions_Builder*) builderWithPrototype:(PBFieldOptions*) prototype {
  return [[PBFieldOptions builder] mergeFrom:prototype];
}
- (PBFieldOptions_Builder*) builder {
  return [PBFieldOptions builder];
}
@end

BOOL PBFieldOptions_CTypeIsValidValue(PBFieldOptions_CType value) {
  switch (value) {
    case PBFieldOptions_CTypeCord:
    case PBFieldOptions_CTypeStringPiece:
      return YES;
    default:
      return NO;
  }
}
@interface PBFieldOptions_Builder()
@property (retain) PBFieldOptions* result;
@end

@implementation PBFieldOptions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBFieldOptions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (PBFieldOptions_Builder*) clear {
  self.result = [[[PBFieldOptions alloc] init] autorelease];
  return self;
}
- (PBFieldOptions_Builder*) clone {
  return [PBFieldOptions builderWithPrototype:result];
}
- (PBFieldOptions*) defaultInstance {
  return [PBFieldOptions defaultInstance];
}
- (PBFieldOptions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBFieldOptions*) buildPartial {
  PBFieldOptions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBFieldOptions_Builder*) mergeFrom:(PBFieldOptions*) other {
  if (other == [PBFieldOptions defaultInstance]) {
    return self;
  }
  if (other.hasCtype) {
    [self setCtype:other.ctype];
  }
  if (other.hasPacked) {
    [self setPacked:other.packed];
  }
  if (other.hasDeprecated) {
    [self setDeprecated:other.deprecated];
  }
  if (other.hasExperimentalMapKey) {
    [self setExperimentalMapKey:other.experimentalMapKey];
  }
  if (other.mutableUninterpretedOptionList.count > 0) {
    if (result.mutableUninterpretedOptionList == nil) {
      result.mutableUninterpretedOptionList = [NSMutableArray array];
    }
    [result.mutableUninterpretedOptionList addObjectsFromArray:other.mutableUninterpretedOptionList];
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBFieldOptions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBFieldOptions_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 (PBFieldOptions_CTypeIsValidValue(value)) {
          [self setCtype:value];
        } else {
          [unknownFields mergeVarintField:1 value:value];
        }
        break;
      }
      case 16: {
        [self setPacked:[input readBool]];
        break;
      }
      case 24: {
        [self setDeprecated:[input readBool]];
        break;
      }
      case 74: {
        [self setExperimentalMapKey:[input readString]];
        break;
      }
      case 7994: {
        PBUninterpretedOption_Builder* subBuilder = [PBUninterpretedOption builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addUninterpretedOption:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (BOOL) hasCtype {
  return result.hasCtype;
}
- (PBFieldOptions_CType) ctype {
  return result.ctype;
}
- (PBFieldOptions_Builder*) setCtype:(PBFieldOptions_CType) value {
  result.hasCtype = YES;
  result.ctype = value;
  return self;
}
- (PBFieldOptions_Builder*) clearCtype {
  result.hasCtype = NO;
  result.ctype = PBFieldOptions_CTypeCord;
  return self;
}
- (BOOL) hasPacked {
  return result.hasPacked;
}
- (BOOL) packed {
  return result.packed;
}
- (PBFieldOptions_Builder*) setPacked:(BOOL) value {
  result.hasPacked = YES;
  result.packed = value;
  return self;
}
- (PBFieldOptions_Builder*) clearPacked {
  result.hasPacked = NO;
  result.packed = NO;
  return self;
}
- (BOOL) hasDeprecated {
  return result.hasDeprecated;
}
- (BOOL) deprecated {
  return result.deprecated;
}
- (PBFieldOptions_Builder*) setDeprecated:(BOOL) value {
  result.hasDeprecated = YES;
  result.deprecated = value;
  return self;
}
- (PBFieldOptions_Builder*) clearDeprecated {
  result.hasDeprecated = NO;
  result.deprecated = NO;
  return self;
}
- (BOOL) hasExperimentalMapKey {
  return result.hasExperimentalMapKey;
}
- (NSString*) experimentalMapKey {
  return result.experimentalMapKey;
}
- (PBFieldOptions_Builder*) setExperimentalMapKey:(NSString*) value {
  result.hasExperimentalMapKey = YES;
  result.experimentalMapKey = value;
  return self;
}
- (PBFieldOptions_Builder*) clearExperimentalMapKey {
  result.hasExperimentalMapKey = NO;
  result.experimentalMapKey = @"";
  return self;
}
- (NSArray*) uninterpretedOptionList {
  if (result.mutableUninterpretedOptionList == nil) { return [NSArray array]; }
  return result.mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  return [result uninterpretedOptionAtIndex:index];
}
- (PBFieldOptions_Builder*) replaceUninterpretedOptionAtIndex:(int32_t) index with:(PBUninterpretedOption*) value {
  [result.mutableUninterpretedOptionList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBFieldOptions_Builder*) addAllUninterpretedOption:(NSArray*) values {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObjectsFromArray:values];
  return self;
}
- (PBFieldOptions_Builder*) clearUninterpretedOptionList {
  result.mutableUninterpretedOptionList = nil;
  return self;
}
- (PBFieldOptions_Builder*) addUninterpretedOption:(PBUninterpretedOption*) value {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObject:value];
  return self;
}
@end

@interface PBEnumOptions ()
@property (retain) NSMutableArray* mutableUninterpretedOptionList;
@end

@implementation PBEnumOptions

@synthesize mutableUninterpretedOptionList;
- (void) dealloc {
  self.mutableUninterpretedOptionList = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static PBEnumOptions* defaultPBEnumOptionsInstance = nil;
+ (void) initialize {
  if (self == [PBEnumOptions class]) {
    defaultPBEnumOptionsInstance = [[PBEnumOptions alloc] init];
  }
}
+ (PBEnumOptions*) defaultInstance {
  return defaultPBEnumOptionsInstance;
}
- (PBEnumOptions*) defaultInstance {
  return defaultPBEnumOptionsInstance;
}
- (NSArray*) uninterpretedOptionList {
  return mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  id value = [mutableUninterpretedOptionList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    [output writeMessage:999 value:element];
  }
  [self writeExtensionsToCodedOutputStream:output
                                      from:1000
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    size += computeMessageSize(999, element);
  }
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBEnumOptions*) parseFromData:(NSData*) data {
  return (PBEnumOptions*)[[[PBEnumOptions builder] mergeFromData:data] build];
}
+ (PBEnumOptions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumOptions*)[[[PBEnumOptions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBEnumOptions*) parseFromInputStream:(NSInputStream*) input {
  return (PBEnumOptions*)[[[PBEnumOptions builder] mergeFromInputStream:input] build];
}
+ (PBEnumOptions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumOptions*)[[[PBEnumOptions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBEnumOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBEnumOptions*)[[[PBEnumOptions builder] mergeFromCodedInputStream:input] build];
}
+ (PBEnumOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumOptions*)[[[PBEnumOptions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBEnumOptions_Builder*) builder {
  return [[[PBEnumOptions_Builder alloc] init] autorelease];
}
+ (PBEnumOptions_Builder*) builderWithPrototype:(PBEnumOptions*) prototype {
  return [[PBEnumOptions builder] mergeFrom:prototype];
}
- (PBEnumOptions_Builder*) builder {
  return [PBEnumOptions builder];
}
@end

@interface PBEnumOptions_Builder()
@property (retain) PBEnumOptions* result;
@end

@implementation PBEnumOptions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBEnumOptions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (PBEnumOptions_Builder*) clear {
  self.result = [[[PBEnumOptions alloc] init] autorelease];
  return self;
}
- (PBEnumOptions_Builder*) clone {
  return [PBEnumOptions builderWithPrototype:result];
}
- (PBEnumOptions*) defaultInstance {
  return [PBEnumOptions defaultInstance];
}
- (PBEnumOptions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBEnumOptions*) buildPartial {
  PBEnumOptions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBEnumOptions_Builder*) mergeFrom:(PBEnumOptions*) other {
  if (other == [PBEnumOptions defaultInstance]) {
    return self;
  }
  if (other.mutableUninterpretedOptionList.count > 0) {
    if (result.mutableUninterpretedOptionList == nil) {
      result.mutableUninterpretedOptionList = [NSMutableArray array];
    }
    [result.mutableUninterpretedOptionList addObjectsFromArray:other.mutableUninterpretedOptionList];
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBEnumOptions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBEnumOptions_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 7994: {
        PBUninterpretedOption_Builder* subBuilder = [PBUninterpretedOption builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addUninterpretedOption:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (NSArray*) uninterpretedOptionList {
  if (result.mutableUninterpretedOptionList == nil) { return [NSArray array]; }
  return result.mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  return [result uninterpretedOptionAtIndex:index];
}
- (PBEnumOptions_Builder*) replaceUninterpretedOptionAtIndex:(int32_t) index with:(PBUninterpretedOption*) value {
  [result.mutableUninterpretedOptionList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBEnumOptions_Builder*) addAllUninterpretedOption:(NSArray*) values {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObjectsFromArray:values];
  return self;
}
- (PBEnumOptions_Builder*) clearUninterpretedOptionList {
  result.mutableUninterpretedOptionList = nil;
  return self;
}
- (PBEnumOptions_Builder*) addUninterpretedOption:(PBUninterpretedOption*) value {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObject:value];
  return self;
}
@end

@interface PBEnumValueOptions ()
@property (retain) NSMutableArray* mutableUninterpretedOptionList;
@end

@implementation PBEnumValueOptions

@synthesize mutableUninterpretedOptionList;
- (void) dealloc {
  self.mutableUninterpretedOptionList = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static PBEnumValueOptions* defaultPBEnumValueOptionsInstance = nil;
+ (void) initialize {
  if (self == [PBEnumValueOptions class]) {
    defaultPBEnumValueOptionsInstance = [[PBEnumValueOptions alloc] init];
  }
}
+ (PBEnumValueOptions*) defaultInstance {
  return defaultPBEnumValueOptionsInstance;
}
- (PBEnumValueOptions*) defaultInstance {
  return defaultPBEnumValueOptionsInstance;
}
- (NSArray*) uninterpretedOptionList {
  return mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  id value = [mutableUninterpretedOptionList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    [output writeMessage:999 value:element];
  }
  [self writeExtensionsToCodedOutputStream:output
                                      from:1000
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    size += computeMessageSize(999, element);
  }
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBEnumValueOptions*) parseFromData:(NSData*) data {
  return (PBEnumValueOptions*)[[[PBEnumValueOptions builder] mergeFromData:data] build];
}
+ (PBEnumValueOptions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumValueOptions*)[[[PBEnumValueOptions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBEnumValueOptions*) parseFromInputStream:(NSInputStream*) input {
  return (PBEnumValueOptions*)[[[PBEnumValueOptions builder] mergeFromInputStream:input] build];
}
+ (PBEnumValueOptions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumValueOptions*)[[[PBEnumValueOptions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBEnumValueOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBEnumValueOptions*)[[[PBEnumValueOptions builder] mergeFromCodedInputStream:input] build];
}
+ (PBEnumValueOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBEnumValueOptions*)[[[PBEnumValueOptions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBEnumValueOptions_Builder*) builder {
  return [[[PBEnumValueOptions_Builder alloc] init] autorelease];
}
+ (PBEnumValueOptions_Builder*) builderWithPrototype:(PBEnumValueOptions*) prototype {
  return [[PBEnumValueOptions builder] mergeFrom:prototype];
}
- (PBEnumValueOptions_Builder*) builder {
  return [PBEnumValueOptions builder];
}
@end

@interface PBEnumValueOptions_Builder()
@property (retain) PBEnumValueOptions* result;
@end

@implementation PBEnumValueOptions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBEnumValueOptions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (PBEnumValueOptions_Builder*) clear {
  self.result = [[[PBEnumValueOptions alloc] init] autorelease];
  return self;
}
- (PBEnumValueOptions_Builder*) clone {
  return [PBEnumValueOptions builderWithPrototype:result];
}
- (PBEnumValueOptions*) defaultInstance {
  return [PBEnumValueOptions defaultInstance];
}
- (PBEnumValueOptions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBEnumValueOptions*) buildPartial {
  PBEnumValueOptions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBEnumValueOptions_Builder*) mergeFrom:(PBEnumValueOptions*) other {
  if (other == [PBEnumValueOptions defaultInstance]) {
    return self;
  }
  if (other.mutableUninterpretedOptionList.count > 0) {
    if (result.mutableUninterpretedOptionList == nil) {
      result.mutableUninterpretedOptionList = [NSMutableArray array];
    }
    [result.mutableUninterpretedOptionList addObjectsFromArray:other.mutableUninterpretedOptionList];
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBEnumValueOptions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBEnumValueOptions_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 7994: {
        PBUninterpretedOption_Builder* subBuilder = [PBUninterpretedOption builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addUninterpretedOption:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (NSArray*) uninterpretedOptionList {
  if (result.mutableUninterpretedOptionList == nil) { return [NSArray array]; }
  return result.mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  return [result uninterpretedOptionAtIndex:index];
}
- (PBEnumValueOptions_Builder*) replaceUninterpretedOptionAtIndex:(int32_t) index with:(PBUninterpretedOption*) value {
  [result.mutableUninterpretedOptionList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBEnumValueOptions_Builder*) addAllUninterpretedOption:(NSArray*) values {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObjectsFromArray:values];
  return self;
}
- (PBEnumValueOptions_Builder*) clearUninterpretedOptionList {
  result.mutableUninterpretedOptionList = nil;
  return self;
}
- (PBEnumValueOptions_Builder*) addUninterpretedOption:(PBUninterpretedOption*) value {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObject:value];
  return self;
}
@end

@interface PBServiceOptions ()
@property (retain) NSMutableArray* mutableUninterpretedOptionList;
@end

@implementation PBServiceOptions

@synthesize mutableUninterpretedOptionList;
- (void) dealloc {
  self.mutableUninterpretedOptionList = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static PBServiceOptions* defaultPBServiceOptionsInstance = nil;
+ (void) initialize {
  if (self == [PBServiceOptions class]) {
    defaultPBServiceOptionsInstance = [[PBServiceOptions alloc] init];
  }
}
+ (PBServiceOptions*) defaultInstance {
  return defaultPBServiceOptionsInstance;
}
- (PBServiceOptions*) defaultInstance {
  return defaultPBServiceOptionsInstance;
}
- (NSArray*) uninterpretedOptionList {
  return mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  id value = [mutableUninterpretedOptionList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    [output writeMessage:999 value:element];
  }
  [self writeExtensionsToCodedOutputStream:output
                                      from:1000
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    size += computeMessageSize(999, element);
  }
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBServiceOptions*) parseFromData:(NSData*) data {
  return (PBServiceOptions*)[[[PBServiceOptions builder] mergeFromData:data] build];
}
+ (PBServiceOptions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBServiceOptions*)[[[PBServiceOptions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBServiceOptions*) parseFromInputStream:(NSInputStream*) input {
  return (PBServiceOptions*)[[[PBServiceOptions builder] mergeFromInputStream:input] build];
}
+ (PBServiceOptions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBServiceOptions*)[[[PBServiceOptions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBServiceOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBServiceOptions*)[[[PBServiceOptions builder] mergeFromCodedInputStream:input] build];
}
+ (PBServiceOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBServiceOptions*)[[[PBServiceOptions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBServiceOptions_Builder*) builder {
  return [[[PBServiceOptions_Builder alloc] init] autorelease];
}
+ (PBServiceOptions_Builder*) builderWithPrototype:(PBServiceOptions*) prototype {
  return [[PBServiceOptions builder] mergeFrom:prototype];
}
- (PBServiceOptions_Builder*) builder {
  return [PBServiceOptions builder];
}
@end

@interface PBServiceOptions_Builder()
@property (retain) PBServiceOptions* result;
@end

@implementation PBServiceOptions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBServiceOptions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (PBServiceOptions_Builder*) clear {
  self.result = [[[PBServiceOptions alloc] init] autorelease];
  return self;
}
- (PBServiceOptions_Builder*) clone {
  return [PBServiceOptions builderWithPrototype:result];
}
- (PBServiceOptions*) defaultInstance {
  return [PBServiceOptions defaultInstance];
}
- (PBServiceOptions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBServiceOptions*) buildPartial {
  PBServiceOptions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBServiceOptions_Builder*) mergeFrom:(PBServiceOptions*) other {
  if (other == [PBServiceOptions defaultInstance]) {
    return self;
  }
  if (other.mutableUninterpretedOptionList.count > 0) {
    if (result.mutableUninterpretedOptionList == nil) {
      result.mutableUninterpretedOptionList = [NSMutableArray array];
    }
    [result.mutableUninterpretedOptionList addObjectsFromArray:other.mutableUninterpretedOptionList];
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBServiceOptions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBServiceOptions_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 7994: {
        PBUninterpretedOption_Builder* subBuilder = [PBUninterpretedOption builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addUninterpretedOption:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (NSArray*) uninterpretedOptionList {
  if (result.mutableUninterpretedOptionList == nil) { return [NSArray array]; }
  return result.mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  return [result uninterpretedOptionAtIndex:index];
}
- (PBServiceOptions_Builder*) replaceUninterpretedOptionAtIndex:(int32_t) index with:(PBUninterpretedOption*) value {
  [result.mutableUninterpretedOptionList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBServiceOptions_Builder*) addAllUninterpretedOption:(NSArray*) values {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObjectsFromArray:values];
  return self;
}
- (PBServiceOptions_Builder*) clearUninterpretedOptionList {
  result.mutableUninterpretedOptionList = nil;
  return self;
}
- (PBServiceOptions_Builder*) addUninterpretedOption:(PBUninterpretedOption*) value {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObject:value];
  return self;
}
@end

@interface PBMethodOptions ()
@property (retain) NSMutableArray* mutableUninterpretedOptionList;
@end

@implementation PBMethodOptions

@synthesize mutableUninterpretedOptionList;
- (void) dealloc {
  self.mutableUninterpretedOptionList = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
  }
  return self;
}
static PBMethodOptions* defaultPBMethodOptionsInstance = nil;
+ (void) initialize {
  if (self == [PBMethodOptions class]) {
    defaultPBMethodOptionsInstance = [[PBMethodOptions alloc] init];
  }
}
+ (PBMethodOptions*) defaultInstance {
  return defaultPBMethodOptionsInstance;
}
- (PBMethodOptions*) defaultInstance {
  return defaultPBMethodOptionsInstance;
}
- (NSArray*) uninterpretedOptionList {
  return mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  id value = [mutableUninterpretedOptionList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  if (!self.extensionsAreInitialized) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    [output writeMessage:999 value:element];
  }
  [self writeExtensionsToCodedOutputStream:output
                                      from:1000
                                        to:536870912];
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  for (PBUninterpretedOption* element in self.uninterpretedOptionList) {
    size += computeMessageSize(999, element);
  }
  size += [self extensionsSerializedSize];
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBMethodOptions*) parseFromData:(NSData*) data {
  return (PBMethodOptions*)[[[PBMethodOptions builder] mergeFromData:data] build];
}
+ (PBMethodOptions*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBMethodOptions*)[[[PBMethodOptions builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBMethodOptions*) parseFromInputStream:(NSInputStream*) input {
  return (PBMethodOptions*)[[[PBMethodOptions builder] mergeFromInputStream:input] build];
}
+ (PBMethodOptions*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBMethodOptions*)[[[PBMethodOptions builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBMethodOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBMethodOptions*)[[[PBMethodOptions builder] mergeFromCodedInputStream:input] build];
}
+ (PBMethodOptions*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBMethodOptions*)[[[PBMethodOptions builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBMethodOptions_Builder*) builder {
  return [[[PBMethodOptions_Builder alloc] init] autorelease];
}
+ (PBMethodOptions_Builder*) builderWithPrototype:(PBMethodOptions*) prototype {
  return [[PBMethodOptions builder] mergeFrom:prototype];
}
- (PBMethodOptions_Builder*) builder {
  return [PBMethodOptions builder];
}
@end

@interface PBMethodOptions_Builder()
@property (retain) PBMethodOptions* result;
@end

@implementation PBMethodOptions_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBMethodOptions alloc] init] autorelease];
  }
  return self;
}
- (PBExtendableMessage*) internalGetResult {
  return result;
}
- (PBMethodOptions_Builder*) clear {
  self.result = [[[PBMethodOptions alloc] init] autorelease];
  return self;
}
- (PBMethodOptions_Builder*) clone {
  return [PBMethodOptions builderWithPrototype:result];
}
- (PBMethodOptions*) defaultInstance {
  return [PBMethodOptions defaultInstance];
}
- (PBMethodOptions*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBMethodOptions*) buildPartial {
  PBMethodOptions* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBMethodOptions_Builder*) mergeFrom:(PBMethodOptions*) other {
  if (other == [PBMethodOptions defaultInstance]) {
    return self;
  }
  if (other.mutableUninterpretedOptionList.count > 0) {
    if (result.mutableUninterpretedOptionList == nil) {
      result.mutableUninterpretedOptionList = [NSMutableArray array];
    }
    [result.mutableUninterpretedOptionList addObjectsFromArray:other.mutableUninterpretedOptionList];
  }
  [self mergeExtensionFields:other];
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBMethodOptions_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBMethodOptions_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 7994: {
        PBUninterpretedOption_Builder* subBuilder = [PBUninterpretedOption builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addUninterpretedOption:[subBuilder buildPartial]];
        break;
      }
    }
  }
}
- (NSArray*) uninterpretedOptionList {
  if (result.mutableUninterpretedOptionList == nil) { return [NSArray array]; }
  return result.mutableUninterpretedOptionList;
}
- (PBUninterpretedOption*) uninterpretedOptionAtIndex:(int32_t) index {
  return [result uninterpretedOptionAtIndex:index];
}
- (PBMethodOptions_Builder*) replaceUninterpretedOptionAtIndex:(int32_t) index with:(PBUninterpretedOption*) value {
  [result.mutableUninterpretedOptionList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBMethodOptions_Builder*) addAllUninterpretedOption:(NSArray*) values {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObjectsFromArray:values];
  return self;
}
- (PBMethodOptions_Builder*) clearUninterpretedOptionList {
  result.mutableUninterpretedOptionList = nil;
  return self;
}
- (PBMethodOptions_Builder*) addUninterpretedOption:(PBUninterpretedOption*) value {
  if (result.mutableUninterpretedOptionList == nil) {
    result.mutableUninterpretedOptionList = [NSMutableArray array];
  }
  [result.mutableUninterpretedOptionList addObject:value];
  return self;
}
@end

@interface PBUninterpretedOption ()
@property (retain) NSMutableArray* mutableNameList;
@property (retain) NSString* identifierValue;
@property int64_t positiveIntValue;
@property int64_t negativeIntValue;
@property Float64 doubleValue;
@property (retain) NSData* stringValue;
@end

@implementation PBUninterpretedOption

@synthesize mutableNameList;
- (BOOL) hasIdentifierValue {
  return !!hasIdentifierValue_;
}
- (void) setHasIdentifierValue:(BOOL) value {
  hasIdentifierValue_ = !!value;
}
@synthesize identifierValue;
- (BOOL) hasPositiveIntValue {
  return !!hasPositiveIntValue_;
}
- (void) setHasPositiveIntValue:(BOOL) value {
  hasPositiveIntValue_ = !!value;
}
@synthesize positiveIntValue;
- (BOOL) hasNegativeIntValue {
  return !!hasNegativeIntValue_;
}
- (void) setHasNegativeIntValue:(BOOL) value {
  hasNegativeIntValue_ = !!value;
}
@synthesize negativeIntValue;
- (BOOL) hasDoubleValue {
  return !!hasDoubleValue_;
}
- (void) setHasDoubleValue:(BOOL) value {
  hasDoubleValue_ = !!value;
}
@synthesize doubleValue;
- (BOOL) hasStringValue {
  return !!hasStringValue_;
}
- (void) setHasStringValue:(BOOL) value {
  hasStringValue_ = !!value;
}
@synthesize stringValue;
- (void) dealloc {
  self.mutableNameList = nil;
  self.identifierValue = nil;
  self.stringValue = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.identifierValue = @"";
    self.positiveIntValue = 0L;
    self.negativeIntValue = 0L;
    self.doubleValue = 0;
    self.stringValue = [NSData data];
  }
  return self;
}
static PBUninterpretedOption* defaultPBUninterpretedOptionInstance = nil;
+ (void) initialize {
  if (self == [PBUninterpretedOption class]) {
    defaultPBUninterpretedOptionInstance = [[PBUninterpretedOption alloc] init];
  }
}
+ (PBUninterpretedOption*) defaultInstance {
  return defaultPBUninterpretedOptionInstance;
}
- (PBUninterpretedOption*) defaultInstance {
  return defaultPBUninterpretedOptionInstance;
}
- (NSArray*) nameList {
  return mutableNameList;
}
- (PBUninterpretedOption_NamePart*) nameAtIndex:(int32_t) index {
  id value = [mutableNameList objectAtIndex:index];
  return value;
}
- (BOOL) isInitialized {
  for (PBUninterpretedOption_NamePart* element in self.nameList) {
    if (!element.isInitialized) {
      return NO;
    }
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  for (PBUninterpretedOption_NamePart* element in self.nameList) {
    [output writeMessage:2 value:element];
  }
  if (self.hasIdentifierValue) {
    [output writeString:3 value:self.identifierValue];
  }
  if (self.hasPositiveIntValue) {
    [output writeUInt64:4 value:self.positiveIntValue];
  }
  if (self.hasNegativeIntValue) {
    [output writeInt64:5 value:self.negativeIntValue];
  }
  if (self.hasDoubleValue) {
    [output writeDouble:6 value:self.doubleValue];
  }
  if (self.hasStringValue) {
    [output writeData:7 value:self.stringValue];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  for (PBUninterpretedOption_NamePart* element in self.nameList) {
    size += computeMessageSize(2, element);
  }
  if (self.hasIdentifierValue) {
    size += computeStringSize(3, self.identifierValue);
  }
  if (self.hasPositiveIntValue) {
    size += computeUInt64Size(4, self.positiveIntValue);
  }
  if (self.hasNegativeIntValue) {
    size += computeInt64Size(5, self.negativeIntValue);
  }
  if (self.hasDoubleValue) {
    size += computeDoubleSize(6, self.doubleValue);
  }
  if (self.hasStringValue) {
    size += computeDataSize(7, self.stringValue);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBUninterpretedOption*) parseFromData:(NSData*) data {
  return (PBUninterpretedOption*)[[[PBUninterpretedOption builder] mergeFromData:data] build];
}
+ (PBUninterpretedOption*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBUninterpretedOption*)[[[PBUninterpretedOption builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBUninterpretedOption*) parseFromInputStream:(NSInputStream*) input {
  return (PBUninterpretedOption*)[[[PBUninterpretedOption builder] mergeFromInputStream:input] build];
}
+ (PBUninterpretedOption*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBUninterpretedOption*)[[[PBUninterpretedOption builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBUninterpretedOption*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBUninterpretedOption*)[[[PBUninterpretedOption builder] mergeFromCodedInputStream:input] build];
}
+ (PBUninterpretedOption*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBUninterpretedOption*)[[[PBUninterpretedOption builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBUninterpretedOption_Builder*) builder {
  return [[[PBUninterpretedOption_Builder alloc] init] autorelease];
}
+ (PBUninterpretedOption_Builder*) builderWithPrototype:(PBUninterpretedOption*) prototype {
  return [[PBUninterpretedOption builder] mergeFrom:prototype];
}
- (PBUninterpretedOption_Builder*) builder {
  return [PBUninterpretedOption builder];
}
@end

@interface PBUninterpretedOption_NamePart ()
@property (retain) NSString* namePart;
@property BOOL isExtension;
@end

@implementation PBUninterpretedOption_NamePart

- (BOOL) hasNamePart {
  return !!hasNamePart_;
}
- (void) setHasNamePart:(BOOL) value {
  hasNamePart_ = !!value;
}
@synthesize namePart;
- (BOOL) hasIsExtension {
  return !!hasIsExtension_;
}
- (void) setHasIsExtension:(BOOL) value {
  hasIsExtension_ = !!value;
}
- (BOOL) isExtension {
  return !!isExtension_;
}
- (void) setIsExtension:(BOOL) value {
  isExtension_ = !!value;
}
- (void) dealloc {
  self.namePart = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.namePart = @"";
    self.isExtension = NO;
  }
  return self;
}
static PBUninterpretedOption_NamePart* defaultPBUninterpretedOption_NamePartInstance = nil;
+ (void) initialize {
  if (self == [PBUninterpretedOption_NamePart class]) {
    defaultPBUninterpretedOption_NamePartInstance = [[PBUninterpretedOption_NamePart alloc] init];
  }
}
+ (PBUninterpretedOption_NamePart*) defaultInstance {
  return defaultPBUninterpretedOption_NamePartInstance;
}
- (PBUninterpretedOption_NamePart*) defaultInstance {
  return defaultPBUninterpretedOption_NamePartInstance;
}
- (BOOL) isInitialized {
  if (!self.hasNamePart) {
    return NO;
  }
  if (!self.hasIsExtension) {
    return NO;
  }
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasNamePart) {
    [output writeString:1 value:self.namePart];
  }
  if (self.hasIsExtension) {
    [output writeBool:2 value:self.isExtension];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasNamePart) {
    size += computeStringSize(1, self.namePart);
  }
  if (self.hasIsExtension) {
    size += computeBoolSize(2, self.isExtension);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (PBUninterpretedOption_NamePart*) parseFromData:(NSData*) data {
  return (PBUninterpretedOption_NamePart*)[[[PBUninterpretedOption_NamePart builder] mergeFromData:data] build];
}
+ (PBUninterpretedOption_NamePart*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBUninterpretedOption_NamePart*)[[[PBUninterpretedOption_NamePart builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (PBUninterpretedOption_NamePart*) parseFromInputStream:(NSInputStream*) input {
  return (PBUninterpretedOption_NamePart*)[[[PBUninterpretedOption_NamePart builder] mergeFromInputStream:input] build];
}
+ (PBUninterpretedOption_NamePart*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBUninterpretedOption_NamePart*)[[[PBUninterpretedOption_NamePart builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBUninterpretedOption_NamePart*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (PBUninterpretedOption_NamePart*)[[[PBUninterpretedOption_NamePart builder] mergeFromCodedInputStream:input] build];
}
+ (PBUninterpretedOption_NamePart*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (PBUninterpretedOption_NamePart*)[[[PBUninterpretedOption_NamePart builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (PBUninterpretedOption_NamePart_Builder*) builder {
  return [[[PBUninterpretedOption_NamePart_Builder alloc] init] autorelease];
}
+ (PBUninterpretedOption_NamePart_Builder*) builderWithPrototype:(PBUninterpretedOption_NamePart*) prototype {
  return [[PBUninterpretedOption_NamePart builder] mergeFrom:prototype];
}
- (PBUninterpretedOption_NamePart_Builder*) builder {
  return [PBUninterpretedOption_NamePart builder];
}
@end

@interface PBUninterpretedOption_NamePart_Builder()
@property (retain) PBUninterpretedOption_NamePart* result;
@end

@implementation PBUninterpretedOption_NamePart_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBUninterpretedOption_NamePart alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBUninterpretedOption_NamePart_Builder*) clear {
  self.result = [[[PBUninterpretedOption_NamePart alloc] init] autorelease];
  return self;
}
- (PBUninterpretedOption_NamePart_Builder*) clone {
  return [PBUninterpretedOption_NamePart builderWithPrototype:result];
}
- (PBUninterpretedOption_NamePart*) defaultInstance {
  return [PBUninterpretedOption_NamePart defaultInstance];
}
- (PBUninterpretedOption_NamePart*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBUninterpretedOption_NamePart*) buildPartial {
  PBUninterpretedOption_NamePart* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBUninterpretedOption_NamePart_Builder*) mergeFrom:(PBUninterpretedOption_NamePart*) other {
  if (other == [PBUninterpretedOption_NamePart defaultInstance]) {
    return self;
  }
  if (other.hasNamePart) {
    [self setNamePart:other.namePart];
  }
  if (other.hasIsExtension) {
    [self setIsExtension:other.isExtension];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBUninterpretedOption_NamePart_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBUninterpretedOption_NamePart_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 setNamePart:[input readString]];
        break;
      }
      case 16: {
        [self setIsExtension:[input readBool]];
        break;
      }
    }
  }
}
- (BOOL) hasNamePart {
  return result.hasNamePart;
}
- (NSString*) namePart {
  return result.namePart;
}
- (PBUninterpretedOption_NamePart_Builder*) setNamePart:(NSString*) value {
  result.hasNamePart = YES;
  result.namePart = value;
  return self;
}
- (PBUninterpretedOption_NamePart_Builder*) clearNamePart {
  result.hasNamePart = NO;
  result.namePart = @"";
  return self;
}
- (BOOL) hasIsExtension {
  return result.hasIsExtension;
}
- (BOOL) isExtension {
  return result.isExtension;
}
- (PBUninterpretedOption_NamePart_Builder*) setIsExtension:(BOOL) value {
  result.hasIsExtension = YES;
  result.isExtension = value;
  return self;
}
- (PBUninterpretedOption_NamePart_Builder*) clearIsExtension {
  result.hasIsExtension = NO;
  result.isExtension = NO;
  return self;
}
@end

@interface PBUninterpretedOption_Builder()
@property (retain) PBUninterpretedOption* result;
@end

@implementation PBUninterpretedOption_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
  [super dealloc];
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[[PBUninterpretedOption alloc] init] autorelease];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (PBUninterpretedOption_Builder*) clear {
  self.result = [[[PBUninterpretedOption alloc] init] autorelease];
  return self;
}
- (PBUninterpretedOption_Builder*) clone {
  return [PBUninterpretedOption builderWithPrototype:result];
}
- (PBUninterpretedOption*) defaultInstance {
  return [PBUninterpretedOption defaultInstance];
}
- (PBUninterpretedOption*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (PBUninterpretedOption*) buildPartial {
  PBUninterpretedOption* returnMe = [[result retain] autorelease];
  self.result = nil;
  return returnMe;
}
- (PBUninterpretedOption_Builder*) mergeFrom:(PBUninterpretedOption*) other {
  if (other == [PBUninterpretedOption defaultInstance]) {
    return self;
  }
  if (other.mutableNameList.count > 0) {
    if (result.mutableNameList == nil) {
      result.mutableNameList = [NSMutableArray array];
    }
    [result.mutableNameList addObjectsFromArray:other.mutableNameList];
  }
  if (other.hasIdentifierValue) {
    [self setIdentifierValue:other.identifierValue];
  }
  if (other.hasPositiveIntValue) {
    [self setPositiveIntValue:other.positiveIntValue];
  }
  if (other.hasNegativeIntValue) {
    [self setNegativeIntValue:other.negativeIntValue];
  }
  if (other.hasDoubleValue) {
    [self setDoubleValue:other.doubleValue];
  }
  if (other.hasStringValue) {
    [self setStringValue:other.stringValue];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (PBUninterpretedOption_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (PBUninterpretedOption_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 18: {
        PBUninterpretedOption_NamePart_Builder* subBuilder = [PBUninterpretedOption_NamePart builder];
        [input readMessage:subBuilder extensionRegistry:extensionRegistry];
        [self addName:[subBuilder buildPartial]];
        break;
      }
      case 26: {
        [self setIdentifierValue:[input readString]];
        break;
      }
      case 32: {
        [self setPositiveIntValue:[input readUInt64]];
        break;
      }
      case 40: {
        [self setNegativeIntValue:[input readInt64]];
        break;
      }
      case 49: {
        [self setDoubleValue:[input readDouble]];
        break;
      }
      case 58: {
        [self setStringValue:[input readData]];
        break;
      }
    }
  }
}
- (NSArray*) nameList {
  if (result.mutableNameList == nil) { return [NSArray array]; }
  return result.mutableNameList;
}
- (PBUninterpretedOption_NamePart*) nameAtIndex:(int32_t) index {
  return [result nameAtIndex:index];
}
- (PBUninterpretedOption_Builder*) replaceNameAtIndex:(int32_t) index with:(PBUninterpretedOption_NamePart*) value {
  [result.mutableNameList replaceObjectAtIndex:index withObject:value];
  return self;
}
- (PBUninterpretedOption_Builder*) addAllName:(NSArray*) values {
  if (result.mutableNameList == nil) {
    result.mutableNameList = [NSMutableArray array];
  }
  [result.mutableNameList addObjectsFromArray:values];
  return self;
}
- (PBUninterpretedOption_Builder*) clearNameList {
  result.mutableNameList = nil;
  return self;
}
- (PBUninterpretedOption_Builder*) addName:(PBUninterpretedOption_NamePart*) value {
  if (result.mutableNameList == nil) {
    result.mutableNameList = [NSMutableArray array];
  }
  [result.mutableNameList addObject:value];
  return self;
}
- (BOOL) hasIdentifierValue {
  return result.hasIdentifierValue;
}
- (NSString*) identifierValue {
  return result.identifierValue;
}
- (PBUninterpretedOption_Builder*) setIdentifierValue:(NSString*) value {
  result.hasIdentifierValue = YES;
  result.identifierValue = value;
  return self;
}
- (PBUninterpretedOption_Builder*) clearIdentifierValue {
  result.hasIdentifierValue = NO;
  result.identifierValue = @"";
  return self;
}
- (BOOL) hasPositiveIntValue {
  return result.hasPositiveIntValue;
}
- (int64_t) positiveIntValue {
  return result.positiveIntValue;
}
- (PBUninterpretedOption_Builder*) setPositiveIntValue:(int64_t) value {
  result.hasPositiveIntValue = YES;
  result.positiveIntValue = value;
  return self;
}
- (PBUninterpretedOption_Builder*) clearPositiveIntValue {
  result.hasPositiveIntValue = NO;
  result.positiveIntValue = 0L;
  return self;
}
- (BOOL) hasNegativeIntValue {
  return result.hasNegativeIntValue;
}
- (int64_t) negativeIntValue {
  return result.negativeIntValue;
}
- (PBUninterpretedOption_Builder*) setNegativeIntValue:(int64_t) value {
  result.hasNegativeIntValue = YES;
  result.negativeIntValue = value;
  return self;
}
- (PBUninterpretedOption_Builder*) clearNegativeIntValue {
  result.hasNegativeIntValue = NO;
  result.negativeIntValue = 0L;
  return self;
}
- (BOOL) hasDoubleValue {
  return result.hasDoubleValue;
}
- (Float64) doubleValue {
  return result.doubleValue;
}
- (PBUninterpretedOption_Builder*) setDoubleValue:(Float64) value {
  result.hasDoubleValue = YES;
  result.doubleValue = value;
  return self;
}
- (PBUninterpretedOption_Builder*) clearDoubleValue {
  result.hasDoubleValue = NO;
  result.doubleValue = 0;
  return self;
}
- (BOOL) hasStringValue {
  return result.hasStringValue;
}
- (NSData*) stringValue {
  return result.stringValue;
}
- (PBUninterpretedOption_Builder*) setStringValue:(NSData*) value {
  result.hasStringValue = YES;
  result.stringValue = value;
  return self;
}
- (PBUninterpretedOption_Builder*) clearStringValue {
  result.hasStringValue = NO;
  result.stringValue = [NSData data];
  return self;
}
@end

