public org.bwapi.proxy.messages.TerrainMessages.Region buildPartial() {
        org.bwapi.proxy.messages.TerrainMessages.Region result = new org.bwapi.proxy.messages.TerrainMessages.Region(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.id_ = id_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        if (polygonBuilder_ == null) {
          result.polygon_ = polygon_;
        } else {
          result.polygon_ = polygonBuilder_.build();
        }
        if (((bitField0_ & 0x00000004) == 0x00000004)) {
          chokepoints_ = java.util.Collections.unmodifiableList(chokepoints_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.chokepoints_ = chokepoints_;
        if (((bitField0_ & 0x00000008) == 0x00000008)) {
          baseLocations_ = java.util.Collections.unmodifiableList(baseLocations_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.baseLocations_ = baseLocations_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }