// 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 PlayerSyncScNotifyOuterClass {
  /**
   * Protobuf type {@code PlayerSyncScNotify}
   */
  public static final class PlayerSyncScNotify extends ProtoMessage<PlayerSyncScNotify> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional uint32 total_achievement_exp = 1013;</code>
     */
    private int totalAchievementExp;

    /**
     * <code>optional .AvatarSync avatar_sync = 1;</code>
     */
    private final AvatarSyncOuterClass.AvatarSync avatarSync = AvatarSyncOuterClass.AvatarSync.newInstance();

    /**
     * <code>optional .PlayerBasicInfo basic_info = 14;</code>
     */
    private final PlayerBasicInfoOuterClass.PlayerBasicInfo basicInfo = PlayerBasicInfoOuterClass.PlayerBasicInfo.newInstance();

    /**
     * <code>optional .MissionSync mission_sync = 220;</code>
     */
    private final MissionSyncOuterClass.MissionSync missionSync = MissionSyncOuterClass.MissionSync.newInstance();

    /**
     * <code>optional .PlayerOutfitInfo player_outfit_data = 1170;</code>
     */
    private final PlayerOutfitInfoOuterClass.PlayerOutfitInfo playerOutfitData = PlayerOutfitInfoOuterClass.PlayerOutfitInfo.newInstance();

    /**
     * <code>optional .BoardDataSync board_data_sync = 1335;</code>
     */
    private final BoardDataSyncOuterClass.BoardDataSync boardDataSync = BoardDataSyncOuterClass.BoardDataSync.newInstance();

    /**
     * <code>repeated uint32 del_equipment_list = 7;</code>
     */
    private final RepeatedInt delEquipmentList = RepeatedInt.newEmptyInstance();

    /**
     * <code>repeated uint32 del_relic_list = 10;</code>
     */
    private final RepeatedInt delRelicList = RepeatedInt.newEmptyInstance();

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

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

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

    private PlayerSyncScNotify() {
    }

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

    /**
     * <code>optional uint32 total_achievement_exp = 1013;</code>
     * @return whether the totalAchievementExp field is set
     */
    public boolean hasTotalAchievementExp() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional uint32 total_achievement_exp = 1013;</code>
     * @return this
     */
    public PlayerSyncScNotify clearTotalAchievementExp() {
      bitField0_ &= ~0x00000001;
      totalAchievementExp = 0;
      return this;
    }

    /**
     * <code>optional uint32 total_achievement_exp = 1013;</code>
     * @return the totalAchievementExp
     */
    public int getTotalAchievementExp() {
      return totalAchievementExp;
    }

    /**
     * <code>optional uint32 total_achievement_exp = 1013;</code>
     * @param value the totalAchievementExp to set
     * @return this
     */
    public PlayerSyncScNotify setTotalAchievementExp(final int value) {
      bitField0_ |= 0x00000001;
      totalAchievementExp = value;
      return this;
    }

    /**
     * <code>optional .AvatarSync avatar_sync = 1;</code>
     * @return whether the avatarSync field is set
     */
    public boolean hasAvatarSync() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional .AvatarSync avatar_sync = 1;</code>
     * @return this
     */
    public PlayerSyncScNotify clearAvatarSync() {
      bitField0_ &= ~0x00000002;
      avatarSync.clear();
      return this;
    }

    /**
     * <code>optional .AvatarSync avatar_sync = 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 #getMutableAvatarSync()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public AvatarSyncOuterClass.AvatarSync getAvatarSync() {
      return avatarSync;
    }

    /**
     * <code>optional .AvatarSync avatar_sync = 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 AvatarSyncOuterClass.AvatarSync getMutableAvatarSync() {
      bitField0_ |= 0x00000002;
      return avatarSync;
    }

    /**
     * <code>optional .AvatarSync avatar_sync = 1;</code>
     * @param value the avatarSync to set
     * @return this
     */
    public PlayerSyncScNotify setAvatarSync(final AvatarSyncOuterClass.AvatarSync value) {
      bitField0_ |= 0x00000002;
      avatarSync.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .PlayerBasicInfo basic_info = 14;</code>
     * @return whether the basicInfo field is set
     */
    public boolean hasBasicInfo() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional .PlayerBasicInfo basic_info = 14;</code>
     * @return this
     */
    public PlayerSyncScNotify clearBasicInfo() {
      bitField0_ &= ~0x00000004;
      basicInfo.clear();
      return this;
    }

    /**
     * <code>optional .PlayerBasicInfo basic_info = 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 #getMutableBasicInfo()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public PlayerBasicInfoOuterClass.PlayerBasicInfo getBasicInfo() {
      return basicInfo;
    }

    /**
     * <code>optional .PlayerBasicInfo basic_info = 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 PlayerBasicInfoOuterClass.PlayerBasicInfo getMutableBasicInfo() {
      bitField0_ |= 0x00000004;
      return basicInfo;
    }

    /**
     * <code>optional .PlayerBasicInfo basic_info = 14;</code>
     * @param value the basicInfo to set
     * @return this
     */
    public PlayerSyncScNotify setBasicInfo(final PlayerBasicInfoOuterClass.PlayerBasicInfo value) {
      bitField0_ |= 0x00000004;
      basicInfo.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .MissionSync mission_sync = 220;</code>
     * @return whether the missionSync field is set
     */
    public boolean hasMissionSync() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional .MissionSync mission_sync = 220;</code>
     * @return this
     */
    public PlayerSyncScNotify clearMissionSync() {
      bitField0_ &= ~0x00000008;
      missionSync.clear();
      return this;
    }

    /**
     * <code>optional .MissionSync mission_sync = 220;</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 #getMutableMissionSync()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public MissionSyncOuterClass.MissionSync getMissionSync() {
      return missionSync;
    }

    /**
     * <code>optional .MissionSync mission_sync = 220;</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 MissionSyncOuterClass.MissionSync getMutableMissionSync() {
      bitField0_ |= 0x00000008;
      return missionSync;
    }

    /**
     * <code>optional .MissionSync mission_sync = 220;</code>
     * @param value the missionSync to set
     * @return this
     */
    public PlayerSyncScNotify setMissionSync(final MissionSyncOuterClass.MissionSync value) {
      bitField0_ |= 0x00000008;
      missionSync.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .PlayerOutfitInfo player_outfit_data = 1170;</code>
     * @return whether the playerOutfitData field is set
     */
    public boolean hasPlayerOutfitData() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional .PlayerOutfitInfo player_outfit_data = 1170;</code>
     * @return this
     */
    public PlayerSyncScNotify clearPlayerOutfitData() {
      bitField0_ &= ~0x00000010;
      playerOutfitData.clear();
      return this;
    }

    /**
     * <code>optional .PlayerOutfitInfo player_outfit_data = 1170;</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 #getMutablePlayerOutfitData()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public PlayerOutfitInfoOuterClass.PlayerOutfitInfo getPlayerOutfitData() {
      return playerOutfitData;
    }

    /**
     * <code>optional .PlayerOutfitInfo player_outfit_data = 1170;</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 PlayerOutfitInfoOuterClass.PlayerOutfitInfo getMutablePlayerOutfitData() {
      bitField0_ |= 0x00000010;
      return playerOutfitData;
    }

    /**
     * <code>optional .PlayerOutfitInfo player_outfit_data = 1170;</code>
     * @param value the playerOutfitData to set
     * @return this
     */
    public PlayerSyncScNotify setPlayerOutfitData(
        final PlayerOutfitInfoOuterClass.PlayerOutfitInfo value) {
      bitField0_ |= 0x00000010;
      playerOutfitData.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .BoardDataSync board_data_sync = 1335;</code>
     * @return whether the boardDataSync field is set
     */
    public boolean hasBoardDataSync() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional .BoardDataSync board_data_sync = 1335;</code>
     * @return this
     */
    public PlayerSyncScNotify clearBoardDataSync() {
      bitField0_ &= ~0x00000020;
      boardDataSync.clear();
      return this;
    }

    /**
     * <code>optional .BoardDataSync board_data_sync = 1335;</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 #getMutableBoardDataSync()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public BoardDataSyncOuterClass.BoardDataSync getBoardDataSync() {
      return boardDataSync;
    }

    /**
     * <code>optional .BoardDataSync board_data_sync = 1335;</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 BoardDataSyncOuterClass.BoardDataSync getMutableBoardDataSync() {
      bitField0_ |= 0x00000020;
      return boardDataSync;
    }

    /**
     * <code>optional .BoardDataSync board_data_sync = 1335;</code>
     * @param value the boardDataSync to set
     * @return this
     */
    public PlayerSyncScNotify setBoardDataSync(final BoardDataSyncOuterClass.BoardDataSync value) {
      bitField0_ |= 0x00000020;
      boardDataSync.copyFrom(value);
      return this;
    }

    /**
     * <code>repeated uint32 del_equipment_list = 7;</code>
     * @return whether the delEquipmentList field is set
     */
    public boolean hasDelEquipmentList() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>repeated uint32 del_equipment_list = 7;</code>
     * @return this
     */
    public PlayerSyncScNotify clearDelEquipmentList() {
      bitField0_ &= ~0x00000040;
      delEquipmentList.clear();
      return this;
    }

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

    /**
     * <code>repeated uint32 del_equipment_list = 7;</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 getMutableDelEquipmentList() {
      bitField0_ |= 0x00000040;
      return delEquipmentList;
    }

    /**
     * <code>repeated uint32 del_equipment_list = 7;</code>
     * @param value the delEquipmentList to add
     * @return this
     */
    public PlayerSyncScNotify addDelEquipmentList(final int value) {
      bitField0_ |= 0x00000040;
      delEquipmentList.add(value);
      return this;
    }

    /**
     * <code>repeated uint32 del_equipment_list = 7;</code>
     * @param values the delEquipmentList to add
     * @return this
     */
    public PlayerSyncScNotify addAllDelEquipmentList(final int... values) {
      bitField0_ |= 0x00000040;
      delEquipmentList.addAll(values);
      return this;
    }

    /**
     * <code>repeated uint32 del_relic_list = 10;</code>
     * @return whether the delRelicList field is set
     */
    public boolean hasDelRelicList() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>repeated uint32 del_relic_list = 10;</code>
     * @return this
     */
    public PlayerSyncScNotify clearDelRelicList() {
      bitField0_ &= ~0x00000080;
      delRelicList.clear();
      return this;
    }

    /**
     * <code>repeated uint32 del_relic_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 #getMutableDelRelicList()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedInt getDelRelicList() {
      return delRelicList;
    }

    /**
     * <code>repeated uint32 del_relic_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 RepeatedInt getMutableDelRelicList() {
      bitField0_ |= 0x00000080;
      return delRelicList;
    }

    /**
     * <code>repeated uint32 del_relic_list = 10;</code>
     * @param value the delRelicList to add
     * @return this
     */
    public PlayerSyncScNotify addDelRelicList(final int value) {
      bitField0_ |= 0x00000080;
      delRelicList.add(value);
      return this;
    }

    /**
     * <code>repeated uint32 del_relic_list = 10;</code>
     * @param values the delRelicList to add
     * @return this
     */
    public PlayerSyncScNotify addAllDelRelicList(final int... values) {
      bitField0_ |= 0x00000080;
      delRelicList.addAll(values);
      return this;
    }

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

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

    /**
     * <code>repeated .Relic relic_list = 5;</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 = 5;</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_ |= 0x00000100;
      return relicList;
    }

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

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

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

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

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

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

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

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

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

    /**
     * <code>repeated .Material material_list = 12;</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 = 12;</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_ |= 0x00000400;
      return materialList;
    }

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

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

    @Override
    public PlayerSyncScNotify copyFrom(final PlayerSyncScNotify other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        totalAchievementExp = other.totalAchievementExp;
        avatarSync.copyFrom(other.avatarSync);
        basicInfo.copyFrom(other.basicInfo);
        missionSync.copyFrom(other.missionSync);
        playerOutfitData.copyFrom(other.playerOutfitData);
        boardDataSync.copyFrom(other.boardDataSync);
        delEquipmentList.copyFrom(other.delEquipmentList);
        delRelicList.copyFrom(other.delRelicList);
        relicList.copyFrom(other.relicList);
        equipmentList.copyFrom(other.equipmentList);
        materialList.copyFrom(other.materialList);
      }
      return this;
    }

    @Override
    public PlayerSyncScNotify mergeFrom(final PlayerSyncScNotify other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasTotalAchievementExp()) {
        setTotalAchievementExp(other.totalAchievementExp);
      }
      if (other.hasAvatarSync()) {
        getMutableAvatarSync().mergeFrom(other.avatarSync);
      }
      if (other.hasBasicInfo()) {
        getMutableBasicInfo().mergeFrom(other.basicInfo);
      }
      if (other.hasMissionSync()) {
        getMutableMissionSync().mergeFrom(other.missionSync);
      }
      if (other.hasPlayerOutfitData()) {
        getMutablePlayerOutfitData().mergeFrom(other.playerOutfitData);
      }
      if (other.hasBoardDataSync()) {
        getMutableBoardDataSync().mergeFrom(other.boardDataSync);
      }
      if (other.hasDelEquipmentList()) {
        getMutableDelEquipmentList().addAll(other.delEquipmentList);
      }
      if (other.hasDelRelicList()) {
        getMutableDelRelicList().addAll(other.delRelicList);
      }
      if (other.hasRelicList()) {
        getMutableRelicList().addAll(other.relicList);
      }
      if (other.hasEquipmentList()) {
        getMutableEquipmentList().addAll(other.equipmentList);
      }
      if (other.hasMaterialList()) {
        getMutableMaterialList().addAll(other.materialList);
      }
      return this;
    }

    @Override
    public PlayerSyncScNotify clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      totalAchievementExp = 0;
      avatarSync.clear();
      basicInfo.clear();
      missionSync.clear();
      playerOutfitData.clear();
      boardDataSync.clear();
      delEquipmentList.clear();
      delRelicList.clear();
      relicList.clear();
      equipmentList.clear();
      materialList.clear();
      return this;
    }

    @Override
    public PlayerSyncScNotify clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      avatarSync.clearQuick();
      basicInfo.clearQuick();
      missionSync.clearQuick();
      playerOutfitData.clearQuick();
      boardDataSync.clearQuick();
      delEquipmentList.clear();
      delRelicList.clear();
      relicList.clearQuick();
      equipmentList.clearQuick();
      materialList.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof PlayerSyncScNotify)) {
        return false;
      }
      PlayerSyncScNotify other = (PlayerSyncScNotify) o;
      return bitField0_ == other.bitField0_
        && (!hasTotalAchievementExp() || totalAchievementExp == other.totalAchievementExp)
        && (!hasAvatarSync() || avatarSync.equals(other.avatarSync))
        && (!hasBasicInfo() || basicInfo.equals(other.basicInfo))
        && (!hasMissionSync() || missionSync.equals(other.missionSync))
        && (!hasPlayerOutfitData() || playerOutfitData.equals(other.playerOutfitData))
        && (!hasBoardDataSync() || boardDataSync.equals(other.boardDataSync))
        && (!hasDelEquipmentList() || delEquipmentList.equals(other.delEquipmentList))
        && (!hasDelRelicList() || delRelicList.equals(other.delRelicList))
        && (!hasRelicList() || relicList.equals(other.relicList))
        && (!hasEquipmentList() || equipmentList.equals(other.equipmentList))
        && (!hasMaterialList() || materialList.equals(other.materialList));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawLittleEndian16((short) 16296);
        output.writeUInt32NoTag(totalAchievementExp);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 10);
        output.writeMessageNoTag(avatarSync);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 114);
        output.writeMessageNoTag(basicInfo);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawLittleEndian16((short) 3554);
        output.writeMessageNoTag(missionSync);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawLittleEndian16((short) 18834);
        output.writeMessageNoTag(playerOutfitData);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawLittleEndian16((short) 21434);
        output.writeMessageNoTag(boardDataSync);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        for (int i = 0; i < delEquipmentList.length(); i++) {
          output.writeRawByte((byte) 56);
          output.writeUInt32NoTag(delEquipmentList.array()[i]);
        }
      }
      if ((bitField0_ & 0x00000080) != 0) {
        for (int i = 0; i < delRelicList.length(); i++) {
          output.writeRawByte((byte) 80);
          output.writeUInt32NoTag(delRelicList.array()[i]);
        }
      }
      if ((bitField0_ & 0x00000100) != 0) {
        for (int i = 0; i < relicList.length(); i++) {
          output.writeRawByte((byte) 42);
          output.writeMessageNoTag(relicList.get(i));
        }
      }
      if ((bitField0_ & 0x00000200) != 0) {
        for (int i = 0; i < equipmentList.length(); i++) {
          output.writeRawByte((byte) 50);
          output.writeMessageNoTag(equipmentList.get(i));
        }
      }
      if ((bitField0_ & 0x00000400) != 0) {
        for (int i = 0; i < materialList.length(); i++) {
          output.writeRawByte((byte) 98);
          output.writeMessageNoTag(materialList.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 2 + ProtoSink.computeUInt32SizeNoTag(totalAchievementExp);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(avatarSync);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(basicInfo);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 2 + ProtoSink.computeMessageSizeNoTag(missionSync);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 2 + ProtoSink.computeMessageSizeNoTag(playerOutfitData);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 2 + ProtoSink.computeMessageSizeNoTag(boardDataSync);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += (1 * delEquipmentList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(delEquipmentList);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += (1 * delRelicList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(delRelicList);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += (1 * relicList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(relicList);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        size += (1 * equipmentList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(equipmentList);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        size += (1 * materialList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(materialList);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public PlayerSyncScNotify mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8104: {
            // totalAchievementExp
            totalAchievementExp = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 10) {
              break;
            }
          }
          case 10: {
            // avatarSync
            input.readMessage(avatarSync);
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 114) {
              break;
            }
          }
          case 114: {
            // basicInfo
            input.readMessage(basicInfo);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 1762) {
              break;
            }
          }
          case 1762: {
            // missionSync
            input.readMessage(missionSync);
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 9362) {
              break;
            }
          }
          case 9362: {
            // playerOutfitData
            input.readMessage(playerOutfitData);
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 10682) {
              break;
            }
          }
          case 10682: {
            // boardDataSync
            input.readMessage(boardDataSync);
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 58) {
              break;
            }
          }
          case 58: {
            // delEquipmentList [packed=true]
            input.readPackedUInt32(delEquipmentList, tag);
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 82) {
              break;
            }
          }
          case 82: {
            // delRelicList [packed=true]
            input.readPackedUInt32(delRelicList, tag);
            bitField0_ |= 0x00000080;
            tag = input.readTag();
            if (tag != 42) {
              break;
            }
          }
          case 42: {
            // relicList
            tag = input.readRepeatedMessage(relicList, tag);
            bitField0_ |= 0x00000100;
            if (tag != 50) {
              break;
            }
          }
          case 50: {
            // equipmentList
            tag = input.readRepeatedMessage(equipmentList, tag);
            bitField0_ |= 0x00000200;
            if (tag != 98) {
              break;
            }
          }
          case 98: {
            // materialList
            tag = input.readRepeatedMessage(materialList, tag);
            bitField0_ |= 0x00000400;
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
          case 56: {
            // delEquipmentList [packed=false]
            tag = input.readRepeatedUInt32(delEquipmentList, tag);
            bitField0_ |= 0x00000040;
            break;
          }
          case 80: {
            // delRelicList [packed=false]
            tag = input.readRepeatedUInt32(delRelicList, tag);
            bitField0_ |= 0x00000080;
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeUInt32(FieldNames.totalAchievementExp, totalAchievementExp);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeMessage(FieldNames.avatarSync, avatarSync);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeMessage(FieldNames.basicInfo, basicInfo);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeMessage(FieldNames.missionSync, missionSync);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeMessage(FieldNames.playerOutfitData, playerOutfitData);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeMessage(FieldNames.boardDataSync, boardDataSync);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRepeatedUInt32(FieldNames.delEquipmentList, delEquipmentList);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRepeatedUInt32(FieldNames.delRelicList, delRelicList);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRepeatedMessage(FieldNames.relicList, relicList);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeRepeatedMessage(FieldNames.equipmentList, equipmentList);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeRepeatedMessage(FieldNames.materialList, materialList);
      }
      output.endObject();
    }

    @Override
    public PlayerSyncScNotify mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 255336658:
          case -1295039982: {
            if (input.isAtField(FieldNames.totalAchievementExp)) {
              if (!input.trySkipNullValue()) {
                totalAchievementExp = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -403178604:
          case 397279681: {
            if (input.isAtField(FieldNames.avatarSync)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(avatarSync);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1699486212:
          case -1124288993: {
            if (input.isAtField(FieldNames.basicInfo)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(basicInfo);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1383230023:
          case -58627730: {
            if (input.isAtField(FieldNames.missionSync)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(missionSync);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1168879118:
          case 1803235336: {
            if (input.isAtField(FieldNames.playerOutfitData)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(playerOutfitData);
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 818128491:
          case -589815817: {
            if (input.isAtField(FieldNames.boardDataSync)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(boardDataSync);
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2124519167:
          case -1682718877: {
            if (input.isAtField(FieldNames.delEquipmentList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedUInt32(delEquipmentList);
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1380069094:
          case 1336083102: {
            if (input.isAtField(FieldNames.delRelicList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedUInt32(delRelicList);
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 204814001:
          case 2071893482: {
            if (input.isAtField(FieldNames.relicList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(relicList);
                bitField0_ |= 0x00000100;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2007143244:
          case 2109525167: {
            if (input.isAtField(FieldNames.equipmentList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(equipmentList);
                bitField0_ |= 0x00000200;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2115854747:
          case -1149360970: {
            if (input.isAtField(FieldNames.materialList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(materialList);
                bitField0_ |= 0x00000400;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum PlayerSyncScNotifyFactory implements MessageFactory<PlayerSyncScNotify> {
      INSTANCE;

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

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

      static final FieldName avatarSync = FieldName.forField("avatarSync", "avatar_sync");

      static final FieldName basicInfo = FieldName.forField("basicInfo", "basic_info");

      static final FieldName missionSync = FieldName.forField("missionSync", "mission_sync");

      static final FieldName playerOutfitData = FieldName.forField("playerOutfitData", "player_outfit_data");

      static final FieldName boardDataSync = FieldName.forField("boardDataSync", "board_data_sync");

      static final FieldName delEquipmentList = FieldName.forField("delEquipmentList", "del_equipment_list");

      static final FieldName delRelicList = FieldName.forField("delRelicList", "del_relic_list");

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

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

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