// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;

import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedMessage;

public final class SceneBattleInfoOuterClass {
  /**
   * Protobuf type {@code SceneBattleInfo}
   */
  public static final class SceneBattleInfo extends ProtoMessage<SceneBattleInfo> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional uint32 battle_id = 1;</code>
     */
    private int battleId;

    /**
     * <code>optional uint32 rounds_limit = 2;</code>
     */
    private int roundsLimit;

    /**
     * <code>optional uint32 stage_id = 6;</code>
     */
    private int stageId;

    /**
     * <code>optional uint32 world_level = 7;</code>
     */
    private int worldLevel;

    /**
     * <code>optional uint32 logic_random_seed = 8;</code>
     */
    private int logicRandomSeed;

    /**
     * <code>repeated .BattleAvatar battle_avatar_list = 10;</code>
     */
    private final RepeatedMessage<BattleAvatarOuterClass.BattleAvatar> battleAvatarList = RepeatedMessage.newEmptyInstance(BattleAvatarOuterClass.BattleAvatar.getFactory());

    /**
     * <code>repeated .BattleBuff buff_list = 14;</code>
     */
    private final RepeatedMessage<BattleBuffOuterClass.BattleBuff> buffList = RepeatedMessage.newEmptyInstance(BattleBuffOuterClass.BattleBuff.getFactory());

    /**
     * <code>repeated .SceneMonsterWave monster_wave_list = 15;</code>
     */
    private final RepeatedMessage<SceneMonsterWaveOuterClass.SceneMonsterWave> monsterWaveList = RepeatedMessage.newEmptyInstance(SceneMonsterWaveOuterClass.SceneMonsterWave.getFactory());

    private SceneBattleInfo() {
    }

    /**
     * @return a new empty instance of {@code SceneBattleInfo}
     */
    public static SceneBattleInfo newInstance() {
      return new SceneBattleInfo();
    }

    /**
     * <code>optional uint32 battle_id = 1;</code>
     * @return whether the battleId field is set
     */
    public boolean hasBattleId() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional uint32 battle_id = 1;</code>
     * @return this
     */
    public SceneBattleInfo clearBattleId() {
      bitField0_ &= ~0x00000001;
      battleId = 0;
      return this;
    }

    /**
     * <code>optional uint32 battle_id = 1;</code>
     * @return the battleId
     */
    public int getBattleId() {
      return battleId;
    }

    /**
     * <code>optional uint32 battle_id = 1;</code>
     * @param value the battleId to set
     * @return this
     */
    public SceneBattleInfo setBattleId(final int value) {
      bitField0_ |= 0x00000001;
      battleId = value;
      return this;
    }

    /**
     * <code>optional uint32 rounds_limit = 2;</code>
     * @return whether the roundsLimit field is set
     */
    public boolean hasRoundsLimit() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional uint32 rounds_limit = 2;</code>
     * @return this
     */
    public SceneBattleInfo clearRoundsLimit() {
      bitField0_ &= ~0x00000002;
      roundsLimit = 0;
      return this;
    }

    /**
     * <code>optional uint32 rounds_limit = 2;</code>
     * @return the roundsLimit
     */
    public int getRoundsLimit() {
      return roundsLimit;
    }

    /**
     * <code>optional uint32 rounds_limit = 2;</code>
     * @param value the roundsLimit to set
     * @return this
     */
    public SceneBattleInfo setRoundsLimit(final int value) {
      bitField0_ |= 0x00000002;
      roundsLimit = value;
      return this;
    }

    /**
     * <code>optional uint32 stage_id = 6;</code>
     * @return whether the stageId field is set
     */
    public boolean hasStageId() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional uint32 stage_id = 6;</code>
     * @return this
     */
    public SceneBattleInfo clearStageId() {
      bitField0_ &= ~0x00000004;
      stageId = 0;
      return this;
    }

    /**
     * <code>optional uint32 stage_id = 6;</code>
     * @return the stageId
     */
    public int getStageId() {
      return stageId;
    }

    /**
     * <code>optional uint32 stage_id = 6;</code>
     * @param value the stageId to set
     * @return this
     */
    public SceneBattleInfo setStageId(final int value) {
      bitField0_ |= 0x00000004;
      stageId = value;
      return this;
    }

    /**
     * <code>optional uint32 world_level = 7;</code>
     * @return whether the worldLevel field is set
     */
    public boolean hasWorldLevel() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional uint32 world_level = 7;</code>
     * @return this
     */
    public SceneBattleInfo clearWorldLevel() {
      bitField0_ &= ~0x00000008;
      worldLevel = 0;
      return this;
    }

    /**
     * <code>optional uint32 world_level = 7;</code>
     * @return the worldLevel
     */
    public int getWorldLevel() {
      return worldLevel;
    }

    /**
     * <code>optional uint32 world_level = 7;</code>
     * @param value the worldLevel to set
     * @return this
     */
    public SceneBattleInfo setWorldLevel(final int value) {
      bitField0_ |= 0x00000008;
      worldLevel = value;
      return this;
    }

    /**
     * <code>optional uint32 logic_random_seed = 8;</code>
     * @return whether the logicRandomSeed field is set
     */
    public boolean hasLogicRandomSeed() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional uint32 logic_random_seed = 8;</code>
     * @return this
     */
    public SceneBattleInfo clearLogicRandomSeed() {
      bitField0_ &= ~0x00000010;
      logicRandomSeed = 0;
      return this;
    }

    /**
     * <code>optional uint32 logic_random_seed = 8;</code>
     * @return the logicRandomSeed
     */
    public int getLogicRandomSeed() {
      return logicRandomSeed;
    }

    /**
     * <code>optional uint32 logic_random_seed = 8;</code>
     * @param value the logicRandomSeed to set
     * @return this
     */
    public SceneBattleInfo setLogicRandomSeed(final int value) {
      bitField0_ |= 0x00000010;
      logicRandomSeed = value;
      return this;
    }

    /**
     * <code>repeated .BattleAvatar battle_avatar_list = 10;</code>
     * @return whether the battleAvatarList field is set
     */
    public boolean hasBattleAvatarList() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>repeated .BattleAvatar battle_avatar_list = 10;</code>
     * @return this
     */
    public SceneBattleInfo clearBattleAvatarList() {
      bitField0_ &= ~0x00000020;
      battleAvatarList.clear();
      return this;
    }

    /**
     * <code>repeated .BattleAvatar battle_avatar_list = 10;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableBattleAvatarList()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<BattleAvatarOuterClass.BattleAvatar> getBattleAvatarList() {
      return battleAvatarList;
    }

    /**
     * <code>repeated .BattleAvatar battle_avatar_list = 10;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public RepeatedMessage<BattleAvatarOuterClass.BattleAvatar> getMutableBattleAvatarList() {
      bitField0_ |= 0x00000020;
      return battleAvatarList;
    }

    /**
     * <code>repeated .BattleAvatar battle_avatar_list = 10;</code>
     * @param value the battleAvatarList to add
     * @return this
     */
    public SceneBattleInfo addBattleAvatarList(final BattleAvatarOuterClass.BattleAvatar value) {
      bitField0_ |= 0x00000020;
      battleAvatarList.add(value);
      return this;
    }

    /**
     * <code>repeated .BattleAvatar battle_avatar_list = 10;</code>
     * @param values the battleAvatarList to add
     * @return this
     */
    public SceneBattleInfo addAllBattleAvatarList(
        final BattleAvatarOuterClass.BattleAvatar... values) {
      bitField0_ |= 0x00000020;
      battleAvatarList.addAll(values);
      return this;
    }

    /**
     * <code>repeated .BattleBuff buff_list = 14;</code>
     * @return whether the buffList field is set
     */
    public boolean hasBuffList() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>repeated .BattleBuff buff_list = 14;</code>
     * @return this
     */
    public SceneBattleInfo clearBuffList() {
      bitField0_ &= ~0x00000040;
      buffList.clear();
      return this;
    }

    /**
     * <code>repeated .BattleBuff buff_list = 14;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableBuffList()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<BattleBuffOuterClass.BattleBuff> getBuffList() {
      return buffList;
    }

    /**
     * <code>repeated .BattleBuff buff_list = 14;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public RepeatedMessage<BattleBuffOuterClass.BattleBuff> getMutableBuffList() {
      bitField0_ |= 0x00000040;
      return buffList;
    }

    /**
     * <code>repeated .BattleBuff buff_list = 14;</code>
     * @param value the buffList to add
     * @return this
     */
    public SceneBattleInfo addBuffList(final BattleBuffOuterClass.BattleBuff value) {
      bitField0_ |= 0x00000040;
      buffList.add(value);
      return this;
    }

    /**
     * <code>repeated .BattleBuff buff_list = 14;</code>
     * @param values the buffList to add
     * @return this
     */
    public SceneBattleInfo addAllBuffList(final BattleBuffOuterClass.BattleBuff... values) {
      bitField0_ |= 0x00000040;
      buffList.addAll(values);
      return this;
    }

    /**
     * <code>repeated .SceneMonsterWave monster_wave_list = 15;</code>
     * @return whether the monsterWaveList field is set
     */
    public boolean hasMonsterWaveList() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>repeated .SceneMonsterWave monster_wave_list = 15;</code>
     * @return this
     */
    public SceneBattleInfo clearMonsterWaveList() {
      bitField0_ &= ~0x00000080;
      monsterWaveList.clear();
      return this;
    }

    /**
     * <code>repeated .SceneMonsterWave monster_wave_list = 15;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableMonsterWaveList()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<SceneMonsterWaveOuterClass.SceneMonsterWave> getMonsterWaveList() {
      return monsterWaveList;
    }

    /**
     * <code>repeated .SceneMonsterWave monster_wave_list = 15;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public RepeatedMessage<SceneMonsterWaveOuterClass.SceneMonsterWave> getMutableMonsterWaveList(
        ) {
      bitField0_ |= 0x00000080;
      return monsterWaveList;
    }

    /**
     * <code>repeated .SceneMonsterWave monster_wave_list = 15;</code>
     * @param value the monsterWaveList to add
     * @return this
     */
    public SceneBattleInfo addMonsterWaveList(
        final SceneMonsterWaveOuterClass.SceneMonsterWave value) {
      bitField0_ |= 0x00000080;
      monsterWaveList.add(value);
      return this;
    }

    /**
     * <code>repeated .SceneMonsterWave monster_wave_list = 15;</code>
     * @param values the monsterWaveList to add
     * @return this
     */
    public SceneBattleInfo addAllMonsterWaveList(
        final SceneMonsterWaveOuterClass.SceneMonsterWave... values) {
      bitField0_ |= 0x00000080;
      monsterWaveList.addAll(values);
      return this;
    }

    @Override
    public SceneBattleInfo copyFrom(final SceneBattleInfo other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        battleId = other.battleId;
        roundsLimit = other.roundsLimit;
        stageId = other.stageId;
        worldLevel = other.worldLevel;
        logicRandomSeed = other.logicRandomSeed;
        battleAvatarList.copyFrom(other.battleAvatarList);
        buffList.copyFrom(other.buffList);
        monsterWaveList.copyFrom(other.monsterWaveList);
      }
      return this;
    }

    @Override
    public SceneBattleInfo mergeFrom(final SceneBattleInfo other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasBattleId()) {
        setBattleId(other.battleId);
      }
      if (other.hasRoundsLimit()) {
        setRoundsLimit(other.roundsLimit);
      }
      if (other.hasStageId()) {
        setStageId(other.stageId);
      }
      if (other.hasWorldLevel()) {
        setWorldLevel(other.worldLevel);
      }
      if (other.hasLogicRandomSeed()) {
        setLogicRandomSeed(other.logicRandomSeed);
      }
      if (other.hasBattleAvatarList()) {
        getMutableBattleAvatarList().addAll(other.battleAvatarList);
      }
      if (other.hasBuffList()) {
        getMutableBuffList().addAll(other.buffList);
      }
      if (other.hasMonsterWaveList()) {
        getMutableMonsterWaveList().addAll(other.monsterWaveList);
      }
      return this;
    }

    @Override
    public SceneBattleInfo clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      battleId = 0;
      roundsLimit = 0;
      stageId = 0;
      worldLevel = 0;
      logicRandomSeed = 0;
      battleAvatarList.clear();
      buffList.clear();
      monsterWaveList.clear();
      return this;
    }

    @Override
    public SceneBattleInfo clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      battleAvatarList.clearQuick();
      buffList.clearQuick();
      monsterWaveList.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof SceneBattleInfo)) {
        return false;
      }
      SceneBattleInfo other = (SceneBattleInfo) o;
      return bitField0_ == other.bitField0_
        && (!hasBattleId() || battleId == other.battleId)
        && (!hasRoundsLimit() || roundsLimit == other.roundsLimit)
        && (!hasStageId() || stageId == other.stageId)
        && (!hasWorldLevel() || worldLevel == other.worldLevel)
        && (!hasLogicRandomSeed() || logicRandomSeed == other.logicRandomSeed)
        && (!hasBattleAvatarList() || battleAvatarList.equals(other.battleAvatarList))
        && (!hasBuffList() || buffList.equals(other.buffList))
        && (!hasMonsterWaveList() || monsterWaveList.equals(other.monsterWaveList));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt32NoTag(battleId);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 16);
        output.writeUInt32NoTag(roundsLimit);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 48);
        output.writeUInt32NoTag(stageId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 56);
        output.writeUInt32NoTag(worldLevel);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 64);
        output.writeUInt32NoTag(logicRandomSeed);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        for (int i = 0; i < battleAvatarList.length(); i++) {
          output.writeRawByte((byte) 82);
          output.writeMessageNoTag(battleAvatarList.get(i));
        }
      }
      if ((bitField0_ & 0x00000040) != 0) {
        for (int i = 0; i < buffList.length(); i++) {
          output.writeRawByte((byte) 114);
          output.writeMessageNoTag(buffList.get(i));
        }
      }
      if ((bitField0_ & 0x00000080) != 0) {
        for (int i = 0; i < monsterWaveList.length(); i++) {
          output.writeRawByte((byte) 122);
          output.writeMessageNoTag(monsterWaveList.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(battleId);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(roundsLimit);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(stageId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(worldLevel);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(logicRandomSeed);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += (1 * battleAvatarList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(battleAvatarList);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += (1 * buffList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(buffList);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += (1 * monsterWaveList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(monsterWaveList);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public SceneBattleInfo mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8: {
            // battleId
            battleId = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 16) {
              break;
            }
          }
          case 16: {
            // roundsLimit
            roundsLimit = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 48) {
              break;
            }
          }
          case 48: {
            // stageId
            stageId = input.readUInt32();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 56) {
              break;
            }
          }
          case 56: {
            // worldLevel
            worldLevel = input.readUInt32();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 64) {
              break;
            }
          }
          case 64: {
            // logicRandomSeed
            logicRandomSeed = input.readUInt32();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 82) {
              break;
            }
          }
          case 82: {
            // battleAvatarList
            tag = input.readRepeatedMessage(battleAvatarList, tag);
            bitField0_ |= 0x00000020;
            if (tag != 114) {
              break;
            }
          }
          case 114: {
            // buffList
            tag = input.readRepeatedMessage(buffList, tag);
            bitField0_ |= 0x00000040;
            if (tag != 122) {
              break;
            }
          }
          case 122: {
            // monsterWaveList
            tag = input.readRepeatedMessage(monsterWaveList, tag);
            bitField0_ |= 0x00000080;
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeUInt32(FieldNames.battleId, battleId);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.roundsLimit, roundsLimit);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeUInt32(FieldNames.stageId, stageId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeUInt32(FieldNames.worldLevel, worldLevel);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeUInt32(FieldNames.logicRandomSeed, logicRandomSeed);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRepeatedMessage(FieldNames.battleAvatarList, battleAvatarList);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRepeatedMessage(FieldNames.buffList, buffList);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRepeatedMessage(FieldNames.monsterWaveList, monsterWaveList);
      }
      output.endObject();
    }

    @Override
    public SceneBattleInfo mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -1678308365:
          case -487930366: {
            if (input.isAtField(FieldNames.battleId)) {
              if (!input.trySkipNullValue()) {
                battleId = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 306477590:
          case 1457479585: {
            if (input.isAtField(FieldNames.roundsLimit)) {
              if (!input.trySkipNullValue()) {
                roundsLimit = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1897528135:
          case 1306191356: {
            if (input.isAtField(FieldNames.stageId)) {
              if (!input.trySkipNullValue()) {
                stageId = input.readUInt32();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 440007442:
          case 1305257111: {
            if (input.isAtField(FieldNames.worldLevel)) {
              if (!input.trySkipNullValue()) {
                worldLevel = input.readUInt32();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 141999058:
          case -1894951668: {
            if (input.isAtField(FieldNames.logicRandomSeed)) {
              if (!input.trySkipNullValue()) {
                logicRandomSeed = input.readUInt32();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 768292975:
          case 328463037: {
            if (input.isAtField(FieldNames.battleAvatarList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(battleAvatarList);
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1522789487:
          case 55792906: {
            if (input.isAtField(FieldNames.buffList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(buffList);
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 697746737:
          case -1492024321: {
            if (input.isAtField(FieldNames.monsterWaveList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(monsterWaveList);
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

    @Override
    public SceneBattleInfo clone() {
      return new SceneBattleInfo().copyFrom(this);
    }

    @Override
    public boolean isEmpty() {
      return ((bitField0_) == 0);
    }

    public static SceneBattleInfo parseFrom(final byte[] data) throws
        InvalidProtocolBufferException {
      return ProtoMessage.mergeFrom(new SceneBattleInfo(), data).checkInitialized();
    }

    public static SceneBattleInfo parseFrom(final ProtoSource input) throws IOException {
      return ProtoMessage.mergeFrom(new SceneBattleInfo(), input).checkInitialized();
    }

    public static SceneBattleInfo parseFrom(final JsonSource input) throws IOException {
      return ProtoMessage.mergeFrom(new SceneBattleInfo(), input).checkInitialized();
    }

    /**
     * @return factory for creating SceneBattleInfo messages
     */
    public static MessageFactory<SceneBattleInfo> getFactory() {
      return SceneBattleInfoFactory.INSTANCE;
    }

    private enum SceneBattleInfoFactory implements MessageFactory<SceneBattleInfo> {
      INSTANCE;

      @Override
      public SceneBattleInfo create() {
        return SceneBattleInfo.newInstance();
      }
    }

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
      static final FieldName battleId = FieldName.forField("battleId", "battle_id");

      static final FieldName roundsLimit = FieldName.forField("roundsLimit", "rounds_limit");

      static final FieldName stageId = FieldName.forField("stageId", "stage_id");

      static final FieldName worldLevel = FieldName.forField("worldLevel", "world_level");

      static final FieldName logicRandomSeed = FieldName.forField("logicRandomSeed", "logic_random_seed");

      static final FieldName battleAvatarList = FieldName.forField("battleAvatarList", "battle_avatar_list");

      static final FieldName buffList = FieldName.forField("buffList", "buff_list");

      static final FieldName monsterWaveList = FieldName.forField("monsterWaveList", "monster_wave_list");
    }
  }
}
