public com.google.protobuf.DescriptorProtos.DescriptorProto buildPartial() {
        com.google.protobuf.DescriptorProtos.DescriptorProto result = new com.google.protobuf.DescriptorProtos.DescriptorProto(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.name_ = name_;
        if (fieldBuilder_ == null) {
          if (((bitField0_ & 0x00000002) == 0x00000002)) {
            field_ = java.util.Collections.unmodifiableList(field_);
            bitField0_ = (bitField0_ & ~0x00000002);
          }
          result.field_ = field_;
        } else {
          result.field_ = fieldBuilder_.build();
        }
        if (extensionBuilder_ == null) {
          if (((bitField0_ & 0x00000004) == 0x00000004)) {
            extension_ = java.util.Collections.unmodifiableList(extension_);
            bitField0_ = (bitField0_ & ~0x00000004);
          }
          result.extension_ = extension_;
        } else {
          result.extension_ = extensionBuilder_.build();
        }
        if (nestedTypeBuilder_ == null) {
          if (((bitField0_ & 0x00000008) == 0x00000008)) {
            nestedType_ = java.util.Collections.unmodifiableList(nestedType_);
            bitField0_ = (bitField0_ & ~0x00000008);
          }
          result.nestedType_ = nestedType_;
        } else {
          result.nestedType_ = nestedTypeBuilder_.build();
        }
        if (enumTypeBuilder_ == null) {
          if (((bitField0_ & 0x00000010) == 0x00000010)) {
            enumType_ = java.util.Collections.unmodifiableList(enumType_);
            bitField0_ = (bitField0_ & ~0x00000010);
          }
          result.enumType_ = enumType_;
        } else {
          result.enumType_ = enumTypeBuilder_.build();
        }
        if (extensionRangeBuilder_ == null) {
          if (((bitField0_ & 0x00000020) == 0x00000020)) {
            extensionRange_ = java.util.Collections.unmodifiableList(extensionRange_);
            bitField0_ = (bitField0_ & ~0x00000020);
          }
          result.extensionRange_ = extensionRange_;
        } else {
          result.extensionRange_ = extensionRangeBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
          to_bitField0_ |= 0x00000002;
        }
        if (optionsBuilder_ == null) {
          result.options_ = options_;
        } else {
          result.options_ = optionsBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }