public int getUpgradeLevelsCount() {
        if (upgradeLevelsBuilder_ == null) {
          return upgradeLevels_.size();
        } else {
          return upgradeLevelsBuilder_.getCount();
        }
      }