public org.bwapi.proxy.messages.TerrainMessages.Polygon buildPartial() {
        org.bwapi.proxy.messages.TerrainMessages.Polygon result = new org.bwapi.proxy.messages.TerrainMessages.Polygon(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (verticesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001)) {
            vertices_ = java.util.Collections.unmodifiableList(vertices_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.vertices_ = vertices_;
        } else {
          result.vertices_ = verticesBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000001;
        }
        result.area_ = area_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000002;
        }
        result.perimeter_ = perimeter_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000004;
        }
        if (centerBuilder_ == null) {
          result.center_ = center_;
        } else {
          result.center_ = centerBuilder_.build();
        }
        if (holesBuilder_ == null) {
          if (((bitField0_ & 0x00000010) == 0x00000010)) {
            holes_ = java.util.Collections.unmodifiableList(holes_);
            bitField0_ = (bitField0_ & ~0x00000010);
          }
          result.holes_ = holes_;
        } else {
          result.holes_ = holesBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }