public com.google.protobuf.DescriptorProtos.FileDescriptorProto buildPartial() {
        com.google.protobuf.DescriptorProtos.FileDescriptorProto result = new com.google.protobuf.DescriptorProtos.FileDescriptorProto(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.name_ = name_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.package_ = package_;
        if (((bitField0_ & 0x00000004) == 0x00000004)) {
          dependency_ = new com.google.protobuf.UnmodifiableLazyStringList(
              dependency_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.dependency_ = dependency_;
        if (((bitField0_ & 0x00000008) == 0x00000008)) {
          publicDependency_ = java.util.Collections.unmodifiableList(publicDependency_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.publicDependency_ = publicDependency_;
        if (((bitField0_ & 0x00000010) == 0x00000010)) {
          weakDependency_ = java.util.Collections.unmodifiableList(weakDependency_);
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.weakDependency_ = weakDependency_;
        if (messageTypeBuilder_ == null) {
          if (((bitField0_ & 0x00000020) == 0x00000020)) {
            messageType_ = java.util.Collections.unmodifiableList(messageType_);
            bitField0_ = (bitField0_ & ~0x00000020);
          }
          result.messageType_ = messageType_;
        } else {
          result.messageType_ = messageTypeBuilder_.build();
        }
        if (enumTypeBuilder_ == null) {
          if (((bitField0_ & 0x00000040) == 0x00000040)) {
            enumType_ = java.util.Collections.unmodifiableList(enumType_);
            bitField0_ = (bitField0_ & ~0x00000040);
          }
          result.enumType_ = enumType_;
        } else {
          result.enumType_ = enumTypeBuilder_.build();
        }
        if (serviceBuilder_ == null) {
          if (((bitField0_ & 0x00000080) == 0x00000080)) {
            service_ = java.util.Collections.unmodifiableList(service_);
            bitField0_ = (bitField0_ & ~0x00000080);
          }
          result.service_ = service_;
        } else {
          result.service_ = serviceBuilder_.build();
        }
        if (extensionBuilder_ == null) {
          if (((bitField0_ & 0x00000100) == 0x00000100)) {
            extension_ = java.util.Collections.unmodifiableList(extension_);
            bitField0_ = (bitField0_ & ~0x00000100);
          }
          result.extension_ = extension_;
        } else {
          result.extension_ = extensionBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
          to_bitField0_ |= 0x00000004;
        }
        if (optionsBuilder_ == null) {
          result.options_ = options_;
        } else {
          result.options_ = optionsBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
          to_bitField0_ |= 0x00000008;
        }
        if (sourceCodeInfoBuilder_ == null) {
          result.sourceCodeInfo_ = sourceCodeInfo_;
        } else {
          result.sourceCodeInfo_ = sourceCodeInfoBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }