// 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.RepeatedInt;
import us.hebi.quickbuf.RepeatedMessage;

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

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

    /**
     * <code>optional uint32 BLDMDEFNEPK = 13;</code>
     */
    private int bLDMDEFNEPK;

    /**
     * <code>repeated uint32 MIOOCCLLFAA = 1;</code>
     */
    private final RepeatedInt mIOOCCLLFAA = RepeatedInt.newEmptyInstance();

    /**
     * <code>repeated .Relic relic_list = 2;</code>
     */
    private final RepeatedMessage<RelicOuterClass.Relic> relicList = RepeatedMessage.newEmptyInstance(RelicOuterClass.Relic.getFactory());

    /**
     * <pre>
     * repeated IIEKAFLADPC GEHHOPNKDFE = 5;
     * repeated IIEKAFLADPC LOOLEGLHFIP = 10;
     * </pre>
     *
     * <code>repeated .WaitDelResource DNOIJIGOANN = 3;</code>
     */
    private final RepeatedMessage<WaitDelResourceOuterClass.WaitDelResource> dNOIJIGOANN = RepeatedMessage.newEmptyInstance(WaitDelResourceOuterClass.WaitDelResource.getFactory());

    /**
     * <code>repeated .Material material_list = 6;</code>
     */
    private final RepeatedMessage<MaterialOuterClass.Material> materialList = RepeatedMessage.newEmptyInstance(MaterialOuterClass.Material.getFactory());

    /**
     * <code>repeated .Equipment equipment_list = 14;</code>
     */
    private final RepeatedMessage<EquipmentOuterClass.Equipment> equipmentList = RepeatedMessage.newEmptyInstance(EquipmentOuterClass.Equipment.getFactory());

    /**
     * <code>repeated .Material BBKKDJEGAPF = 15;</code>
     */
    private final RepeatedMessage<MaterialOuterClass.Material> bBKKDJEGAPF = RepeatedMessage.newEmptyInstance(MaterialOuterClass.Material.getFactory());

    private GetBagScRsp() {
    }

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

    /**
     * <code>optional uint32 retcode = 8;</code>
     * @return whether the retcode field is set
     */
    public boolean hasRetcode() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional uint32 retcode = 8;</code>
     * @return this
     */
    public GetBagScRsp clearRetcode() {
      bitField0_ &= ~0x00000001;
      retcode = 0;
      return this;
    }

    /**
     * <code>optional uint32 retcode = 8;</code>
     * @return the retcode
     */
    public int getRetcode() {
      return retcode;
    }

    /**
     * <code>optional uint32 retcode = 8;</code>
     * @param value the retcode to set
     * @return this
     */
    public GetBagScRsp setRetcode(final int value) {
      bitField0_ |= 0x00000001;
      retcode = value;
      return this;
    }

    /**
     * <code>optional uint32 BLDMDEFNEPK = 13;</code>
     * @return whether the bLDMDEFNEPK field is set
     */
    public boolean hasBLDMDEFNEPK() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional uint32 BLDMDEFNEPK = 13;</code>
     * @return this
     */
    public GetBagScRsp clearBLDMDEFNEPK() {
      bitField0_ &= ~0x00000002;
      bLDMDEFNEPK = 0;
      return this;
    }

    /**
     * <code>optional uint32 BLDMDEFNEPK = 13;</code>
     * @return the bLDMDEFNEPK
     */
    public int getBLDMDEFNEPK() {
      return bLDMDEFNEPK;
    }

    /**
     * <code>optional uint32 BLDMDEFNEPK = 13;</code>
     * @param value the bLDMDEFNEPK to set
     * @return this
     */
    public GetBagScRsp setBLDMDEFNEPK(final int value) {
      bitField0_ |= 0x00000002;
      bLDMDEFNEPK = value;
      return this;
    }

    /**
     * <code>repeated uint32 MIOOCCLLFAA = 1;</code>
     * @return whether the mIOOCCLLFAA field is set
     */
    public boolean hasMIOOCCLLFAA() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>repeated uint32 MIOOCCLLFAA = 1;</code>
     * @return this
     */
    public GetBagScRsp clearMIOOCCLLFAA() {
      bitField0_ &= ~0x00000004;
      mIOOCCLLFAA.clear();
      return this;
    }

    /**
     * <code>repeated uint32 MIOOCCLLFAA = 1;</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 #getMutableMIOOCCLLFAA()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedInt getMIOOCCLLFAA() {
      return mIOOCCLLFAA;
    }

    /**
     * <code>repeated uint32 MIOOCCLLFAA = 1;</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 RepeatedInt getMutableMIOOCCLLFAA() {
      bitField0_ |= 0x00000004;
      return mIOOCCLLFAA;
    }

    /**
     * <code>repeated uint32 MIOOCCLLFAA = 1;</code>
     * @param value the mIOOCCLLFAA to add
     * @return this
     */
    public GetBagScRsp addMIOOCCLLFAA(final int value) {
      bitField0_ |= 0x00000004;
      mIOOCCLLFAA.add(value);
      return this;
    }

    /**
     * <code>repeated uint32 MIOOCCLLFAA = 1;</code>
     * @param values the mIOOCCLLFAA to add
     * @return this
     */
    public GetBagScRsp addAllMIOOCCLLFAA(final int... values) {
      bitField0_ |= 0x00000004;
      mIOOCCLLFAA.addAll(values);
      return this;
    }

    /**
     * <code>repeated .Relic relic_list = 2;</code>
     * @return whether the relicList field is set
     */
    public boolean hasRelicList() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>repeated .Relic relic_list = 2;</code>
     * @return this
     */
    public GetBagScRsp clearRelicList() {
      bitField0_ &= ~0x00000008;
      relicList.clear();
      return this;
    }

    /**
     * <code>repeated .Relic relic_list = 2;</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 #getMutableRelicList()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<RelicOuterClass.Relic> getRelicList() {
      return relicList;
    }

    /**
     * <code>repeated .Relic relic_list = 2;</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<RelicOuterClass.Relic> getMutableRelicList() {
      bitField0_ |= 0x00000008;
      return relicList;
    }

    /**
     * <code>repeated .Relic relic_list = 2;</code>
     * @param value the relicList to add
     * @return this
     */
    public GetBagScRsp addRelicList(final RelicOuterClass.Relic value) {
      bitField0_ |= 0x00000008;
      relicList.add(value);
      return this;
    }

    /**
     * <code>repeated .Relic relic_list = 2;</code>
     * @param values the relicList to add
     * @return this
     */
    public GetBagScRsp addAllRelicList(final RelicOuterClass.Relic... values) {
      bitField0_ |= 0x00000008;
      relicList.addAll(values);
      return this;
    }

    /**
     * <pre>
     * repeated IIEKAFLADPC GEHHOPNKDFE = 5;
     * repeated IIEKAFLADPC LOOLEGLHFIP = 10;
     * </pre>
     *
     * <code>repeated .WaitDelResource DNOIJIGOANN = 3;</code>
     * @return whether the dNOIJIGOANN field is set
     */
    public boolean hasDNOIJIGOANN() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <pre>
     * repeated IIEKAFLADPC GEHHOPNKDFE = 5;
     * repeated IIEKAFLADPC LOOLEGLHFIP = 10;
     * </pre>
     *
     * <code>repeated .WaitDelResource DNOIJIGOANN = 3;</code>
     * @return this
     */
    public GetBagScRsp clearDNOIJIGOANN() {
      bitField0_ &= ~0x00000010;
      dNOIJIGOANN.clear();
      return this;
    }

    /**
     * <pre>
     * repeated IIEKAFLADPC GEHHOPNKDFE = 5;
     * repeated IIEKAFLADPC LOOLEGLHFIP = 10;
     * </pre>
     *
     * <code>repeated .WaitDelResource DNOIJIGOANN = 3;</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 #getMutableDNOIJIGOANN()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<WaitDelResourceOuterClass.WaitDelResource> getDNOIJIGOANN() {
      return dNOIJIGOANN;
    }

    /**
     * <pre>
     * repeated IIEKAFLADPC GEHHOPNKDFE = 5;
     * repeated IIEKAFLADPC LOOLEGLHFIP = 10;
     * </pre>
     *
     * <code>repeated .WaitDelResource DNOIJIGOANN = 3;</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<WaitDelResourceOuterClass.WaitDelResource> getMutableDNOIJIGOANN() {
      bitField0_ |= 0x00000010;
      return dNOIJIGOANN;
    }

    /**
     * <pre>
     * repeated IIEKAFLADPC GEHHOPNKDFE = 5;
     * repeated IIEKAFLADPC LOOLEGLHFIP = 10;
     * </pre>
     *
     * <code>repeated .WaitDelResource DNOIJIGOANN = 3;</code>
     * @param value the dNOIJIGOANN to add
     * @return this
     */
    public GetBagScRsp addDNOIJIGOANN(final WaitDelResourceOuterClass.WaitDelResource value) {
      bitField0_ |= 0x00000010;
      dNOIJIGOANN.add(value);
      return this;
    }

    /**
     * <pre>
     * repeated IIEKAFLADPC GEHHOPNKDFE = 5;
     * repeated IIEKAFLADPC LOOLEGLHFIP = 10;
     * </pre>
     *
     * <code>repeated .WaitDelResource DNOIJIGOANN = 3;</code>
     * @param values the dNOIJIGOANN to add
     * @return this
     */
    public GetBagScRsp addAllDNOIJIGOANN(
        final WaitDelResourceOuterClass.WaitDelResource... values) {
      bitField0_ |= 0x00000010;
      dNOIJIGOANN.addAll(values);
      return this;
    }

    /**
     * <code>repeated .Material material_list = 6;</code>
     * @return whether the materialList field is set
     */
    public boolean hasMaterialList() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>repeated .Material material_list = 6;</code>
     * @return this
     */
    public GetBagScRsp clearMaterialList() {
      bitField0_ &= ~0x00000020;
      materialList.clear();
      return this;
    }

    /**
     * <code>repeated .Material material_list = 6;</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 #getMutableMaterialList()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<MaterialOuterClass.Material> getMaterialList() {
      return materialList;
    }

    /**
     * <code>repeated .Material material_list = 6;</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<MaterialOuterClass.Material> getMutableMaterialList() {
      bitField0_ |= 0x00000020;
      return materialList;
    }

    /**
     * <code>repeated .Material material_list = 6;</code>
     * @param value the materialList to add
     * @return this
     */
    public GetBagScRsp addMaterialList(final MaterialOuterClass.Material value) {
      bitField0_ |= 0x00000020;
      materialList.add(value);
      return this;
    }

    /**
     * <code>repeated .Material material_list = 6;</code>
     * @param values the materialList to add
     * @return this
     */
    public GetBagScRsp addAllMaterialList(final MaterialOuterClass.Material... values) {
      bitField0_ |= 0x00000020;
      materialList.addAll(values);
      return this;
    }

    /**
     * <code>repeated .Equipment equipment_list = 14;</code>
     * @return whether the equipmentList field is set
     */
    public boolean hasEquipmentList() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>repeated .Equipment equipment_list = 14;</code>
     * @return this
     */
    public GetBagScRsp clearEquipmentList() {
      bitField0_ &= ~0x00000040;
      equipmentList.clear();
      return this;
    }

    /**
     * <code>repeated .Equipment equipment_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 #getMutableEquipmentList()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<EquipmentOuterClass.Equipment> getEquipmentList() {
      return equipmentList;
    }

    /**
     * <code>repeated .Equipment equipment_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<EquipmentOuterClass.Equipment> getMutableEquipmentList() {
      bitField0_ |= 0x00000040;
      return equipmentList;
    }

    /**
     * <code>repeated .Equipment equipment_list = 14;</code>
     * @param value the equipmentList to add
     * @return this
     */
    public GetBagScRsp addEquipmentList(final EquipmentOuterClass.Equipment value) {
      bitField0_ |= 0x00000040;
      equipmentList.add(value);
      return this;
    }

    /**
     * <code>repeated .Equipment equipment_list = 14;</code>
     * @param values the equipmentList to add
     * @return this
     */
    public GetBagScRsp addAllEquipmentList(final EquipmentOuterClass.Equipment... values) {
      bitField0_ |= 0x00000040;
      equipmentList.addAll(values);
      return this;
    }

    /**
     * <code>repeated .Material BBKKDJEGAPF = 15;</code>
     * @return whether the bBKKDJEGAPF field is set
     */
    public boolean hasBBKKDJEGAPF() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>repeated .Material BBKKDJEGAPF = 15;</code>
     * @return this
     */
    public GetBagScRsp clearBBKKDJEGAPF() {
      bitField0_ &= ~0x00000080;
      bBKKDJEGAPF.clear();
      return this;
    }

    /**
     * <code>repeated .Material BBKKDJEGAPF = 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 #getMutableBBKKDJEGAPF()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<MaterialOuterClass.Material> getBBKKDJEGAPF() {
      return bBKKDJEGAPF;
    }

    /**
     * <code>repeated .Material BBKKDJEGAPF = 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<MaterialOuterClass.Material> getMutableBBKKDJEGAPF() {
      bitField0_ |= 0x00000080;
      return bBKKDJEGAPF;
    }

    /**
     * <code>repeated .Material BBKKDJEGAPF = 15;</code>
     * @param value the bBKKDJEGAPF to add
     * @return this
     */
    public GetBagScRsp addBBKKDJEGAPF(final MaterialOuterClass.Material value) {
      bitField0_ |= 0x00000080;
      bBKKDJEGAPF.add(value);
      return this;
    }

    /**
     * <code>repeated .Material BBKKDJEGAPF = 15;</code>
     * @param values the bBKKDJEGAPF to add
     * @return this
     */
    public GetBagScRsp addAllBBKKDJEGAPF(final MaterialOuterClass.Material... values) {
      bitField0_ |= 0x00000080;
      bBKKDJEGAPF.addAll(values);
      return this;
    }

    @Override
    public GetBagScRsp copyFrom(final GetBagScRsp other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        retcode = other.retcode;
        bLDMDEFNEPK = other.bLDMDEFNEPK;
        mIOOCCLLFAA.copyFrom(other.mIOOCCLLFAA);
        relicList.copyFrom(other.relicList);
        dNOIJIGOANN.copyFrom(other.dNOIJIGOANN);
        materialList.copyFrom(other.materialList);
        equipmentList.copyFrom(other.equipmentList);
        bBKKDJEGAPF.copyFrom(other.bBKKDJEGAPF);
      }
      return this;
    }

    @Override
    public GetBagScRsp mergeFrom(final GetBagScRsp other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasRetcode()) {
        setRetcode(other.retcode);
      }
      if (other.hasBLDMDEFNEPK()) {
        setBLDMDEFNEPK(other.bLDMDEFNEPK);
      }
      if (other.hasMIOOCCLLFAA()) {
        getMutableMIOOCCLLFAA().addAll(other.mIOOCCLLFAA);
      }
      if (other.hasRelicList()) {
        getMutableRelicList().addAll(other.relicList);
      }
      if (other.hasDNOIJIGOANN()) {
        getMutableDNOIJIGOANN().addAll(other.dNOIJIGOANN);
      }
      if (other.hasMaterialList()) {
        getMutableMaterialList().addAll(other.materialList);
      }
      if (other.hasEquipmentList()) {
        getMutableEquipmentList().addAll(other.equipmentList);
      }
      if (other.hasBBKKDJEGAPF()) {
        getMutableBBKKDJEGAPF().addAll(other.bBKKDJEGAPF);
      }
      return this;
    }

    @Override
    public GetBagScRsp clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      retcode = 0;
      bLDMDEFNEPK = 0;
      mIOOCCLLFAA.clear();
      relicList.clear();
      dNOIJIGOANN.clear();
      materialList.clear();
      equipmentList.clear();
      bBKKDJEGAPF.clear();
      return this;
    }

    @Override
    public GetBagScRsp clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      mIOOCCLLFAA.clear();
      relicList.clearQuick();
      dNOIJIGOANN.clearQuick();
      materialList.clearQuick();
      equipmentList.clearQuick();
      bBKKDJEGAPF.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof GetBagScRsp)) {
        return false;
      }
      GetBagScRsp other = (GetBagScRsp) o;
      return bitField0_ == other.bitField0_
        && (!hasRetcode() || retcode == other.retcode)
        && (!hasBLDMDEFNEPK() || bLDMDEFNEPK == other.bLDMDEFNEPK)
        && (!hasMIOOCCLLFAA() || mIOOCCLLFAA.equals(other.mIOOCCLLFAA))
        && (!hasRelicList() || relicList.equals(other.relicList))
        && (!hasDNOIJIGOANN() || dNOIJIGOANN.equals(other.dNOIJIGOANN))
        && (!hasMaterialList() || materialList.equals(other.materialList))
        && (!hasEquipmentList() || equipmentList.equals(other.equipmentList))
        && (!hasBBKKDJEGAPF() || bBKKDJEGAPF.equals(other.bBKKDJEGAPF));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 64);
        output.writeUInt32NoTag(retcode);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 104);
        output.writeUInt32NoTag(bLDMDEFNEPK);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        for (int i = 0; i < mIOOCCLLFAA.length(); i++) {
          output.writeRawByte((byte) 8);
          output.writeUInt32NoTag(mIOOCCLLFAA.array()[i]);
        }
      }
      if ((bitField0_ & 0x00000008) != 0) {
        for (int i = 0; i < relicList.length(); i++) {
          output.writeRawByte((byte) 18);
          output.writeMessageNoTag(relicList.get(i));
        }
      }
      if ((bitField0_ & 0x00000010) != 0) {
        for (int i = 0; i < dNOIJIGOANN.length(); i++) {
          output.writeRawByte((byte) 26);
          output.writeMessageNoTag(dNOIJIGOANN.get(i));
        }
      }
      if ((bitField0_ & 0x00000020) != 0) {
        for (int i = 0; i < materialList.length(); i++) {
          output.writeRawByte((byte) 50);
          output.writeMessageNoTag(materialList.get(i));
        }
      }
      if ((bitField0_ & 0x00000040) != 0) {
        for (int i = 0; i < equipmentList.length(); i++) {
          output.writeRawByte((byte) 114);
          output.writeMessageNoTag(equipmentList.get(i));
        }
      }
      if ((bitField0_ & 0x00000080) != 0) {
        for (int i = 0; i < bBKKDJEGAPF.length(); i++) {
          output.writeRawByte((byte) 122);
          output.writeMessageNoTag(bBKKDJEGAPF.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(bLDMDEFNEPK);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += (1 * mIOOCCLLFAA.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(mIOOCCLLFAA);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += (1 * relicList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(relicList);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += (1 * dNOIJIGOANN.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dNOIJIGOANN);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += (1 * materialList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(materialList);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += (1 * equipmentList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(equipmentList);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += (1 * bBKKDJEGAPF.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(bBKKDJEGAPF);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public GetBagScRsp mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 64: {
            // retcode
            retcode = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 104) {
              break;
            }
          }
          case 104: {
            // bLDMDEFNEPK
            bLDMDEFNEPK = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 10) {
              break;
            }
          }
          case 10: {
            // mIOOCCLLFAA [packed=true]
            input.readPackedUInt32(mIOOCCLLFAA, tag);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // relicList
            tag = input.readRepeatedMessage(relicList, tag);
            bitField0_ |= 0x00000008;
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // dNOIJIGOANN
            tag = input.readRepeatedMessage(dNOIJIGOANN, tag);
            bitField0_ |= 0x00000010;
            if (tag != 50) {
              break;
            }
          }
          case 50: {
            // materialList
            tag = input.readRepeatedMessage(materialList, tag);
            bitField0_ |= 0x00000020;
            if (tag != 114) {
              break;
            }
          }
          case 114: {
            // equipmentList
            tag = input.readRepeatedMessage(equipmentList, tag);
            bitField0_ |= 0x00000040;
            if (tag != 122) {
              break;
            }
          }
          case 122: {
            // bBKKDJEGAPF
            tag = input.readRepeatedMessage(bBKKDJEGAPF, tag);
            bitField0_ |= 0x00000080;
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
          case 8: {
            // mIOOCCLLFAA [packed=false]
            tag = input.readRepeatedUInt32(mIOOCCLLFAA, tag);
            bitField0_ |= 0x00000004;
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeUInt32(FieldNames.retcode, retcode);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.bLDMDEFNEPK, bLDMDEFNEPK);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRepeatedUInt32(FieldNames.mIOOCCLLFAA, mIOOCCLLFAA);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRepeatedMessage(FieldNames.relicList, relicList);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRepeatedMessage(FieldNames.dNOIJIGOANN, dNOIJIGOANN);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRepeatedMessage(FieldNames.materialList, materialList);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRepeatedMessage(FieldNames.equipmentList, equipmentList);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRepeatedMessage(FieldNames.bBKKDJEGAPF, bBKKDJEGAPF);
      }
      output.endObject();
    }

    @Override
    public GetBagScRsp mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 1097936398: {
            if (input.isAtField(FieldNames.retcode)) {
              if (!input.trySkipNullValue()) {
                retcode = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 277919140: {
            if (input.isAtField(FieldNames.bLDMDEFNEPK)) {
              if (!input.trySkipNullValue()) {
                bLDMDEFNEPK = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1874925302: {
            if (input.isAtField(FieldNames.mIOOCCLLFAA)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedUInt32(mIOOCCLLFAA);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 204814001:
          case 2071893482: {
            if (input.isAtField(FieldNames.relicList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(relicList);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 648040854: {
            if (input.isAtField(FieldNames.dNOIJIGOANN)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(dNOIJIGOANN);
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2115854747:
          case -1149360970: {
            if (input.isAtField(FieldNames.materialList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(materialList);
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2007143244:
          case 2109525167: {
            if (input.isAtField(FieldNames.equipmentList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(equipmentList);
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -867835985: {
            if (input.isAtField(FieldNames.bBKKDJEGAPF)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(bBKKDJEGAPF);
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum GetBagScRspFactory implements MessageFactory<GetBagScRsp> {
      INSTANCE;

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

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

      static final FieldName bLDMDEFNEPK = FieldName.forField("BLDMDEFNEPK");

      static final FieldName mIOOCCLLFAA = FieldName.forField("MIOOCCLLFAA");

      static final FieldName relicList = FieldName.forField("relicList", "relic_list");

      static final FieldName dNOIJIGOANN = FieldName.forField("DNOIJIGOANN");

      static final FieldName materialList = FieldName.forField("materialList", "material_list");

      static final FieldName equipmentList = FieldName.forField("equipmentList", "equipment_list");

      static final FieldName bBKKDJEGAPF = FieldName.forField("BBKKDJEGAPF");
    }
  }
}
