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

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

    /**
     * <code>optional int64 logout_time = 9;</code>
     */
    private long logoutTime;

    /**
     * <code>optional uint32 uid = 5;</code>
     */
    private int uid;

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

    /**
     * <code>optional uint32 chat_bubble = 11;</code>
     */
    private int chatBubble;

    /**
     * <code>optional uint32 head_icon = 12;</code>
     */
    private int headIcon;

    /**
     * <code>optional uint32 level = 14;</code>
     */
    private int level;

    /**
     * <code>optional .PlatformType platform = 7;</code>
     */
    private int platform;

    /**
     * <code>optional .FriendOnlineStatus online_status = 10;</code>
     */
    private int onlineStatus;

    /**
     * <code>optional bool is_banned = 13;</code>
     */
    private boolean isBanned;

    /**
     * <code>optional string nickname = 1;</code>
     */
    private final Utf8String nickname = Utf8String.newEmptyInstance();

    /**
     * <code>optional string signature = 2;</code>
     */
    private final Utf8String signature = Utf8String.newEmptyInstance();

    /**
     * <code>optional string platform_uuid = 3;</code>
     */
    private final Utf8String platformUuid = Utf8String.newEmptyInstance();

    /**
     * <code>optional string platform_nick = 6;</code>
     */
    private final Utf8String platformNick = Utf8String.newEmptyInstance();

    /**
     * <code>repeated .AssistSimpleInfo assist_info_list = 15;</code>
     */
    private final RepeatedMessage<AssistSimpleInfoOuterClass.AssistSimpleInfo> assistInfoList = RepeatedMessage.newEmptyInstance(AssistSimpleInfoOuterClass.AssistSimpleInfo.getFactory());

    private PlayerSimpleInfo() {
    }

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

    /**
     * <code>optional int64 logout_time = 9;</code>
     * @return whether the logoutTime field is set
     */
    public boolean hasLogoutTime() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional int64 logout_time = 9;</code>
     * @return this
     */
    public PlayerSimpleInfo clearLogoutTime() {
      bitField0_ &= ~0x00000001;
      logoutTime = 0L;
      return this;
    }

    /**
     * <code>optional int64 logout_time = 9;</code>
     * @return the logoutTime
     */
    public long getLogoutTime() {
      return logoutTime;
    }

    /**
     * <code>optional int64 logout_time = 9;</code>
     * @param value the logoutTime to set
     * @return this
     */
    public PlayerSimpleInfo setLogoutTime(final long value) {
      bitField0_ |= 0x00000001;
      logoutTime = value;
      return this;
    }

    /**
     * <code>optional uint32 uid = 5;</code>
     * @return whether the uid field is set
     */
    public boolean hasUid() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional uint32 uid = 5;</code>
     * @return this
     */
    public PlayerSimpleInfo clearUid() {
      bitField0_ &= ~0x00000002;
      uid = 0;
      return this;
    }

    /**
     * <code>optional uint32 uid = 5;</code>
     * @return the uid
     */
    public int getUid() {
      return uid;
    }

    /**
     * <code>optional uint32 uid = 5;</code>
     * @param value the uid to set
     * @return this
     */
    public PlayerSimpleInfo setUid(final int value) {
      bitField0_ |= 0x00000002;
      uid = value;
      return this;
    }

    /**
     * <code>optional uint32 personal_card = 8;</code>
     * @return whether the personalCard field is set
     */
    public boolean hasPersonalCard() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional uint32 personal_card = 8;</code>
     * @return this
     */
    public PlayerSimpleInfo clearPersonalCard() {
      bitField0_ &= ~0x00000004;
      personalCard = 0;
      return this;
    }

    /**
     * <code>optional uint32 personal_card = 8;</code>
     * @return the personalCard
     */
    public int getPersonalCard() {
      return personalCard;
    }

    /**
     * <code>optional uint32 personal_card = 8;</code>
     * @param value the personalCard to set
     * @return this
     */
    public PlayerSimpleInfo setPersonalCard(final int value) {
      bitField0_ |= 0x00000004;
      personalCard = value;
      return this;
    }

    /**
     * <code>optional uint32 chat_bubble = 11;</code>
     * @return whether the chatBubble field is set
     */
    public boolean hasChatBubble() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional uint32 chat_bubble = 11;</code>
     * @return this
     */
    public PlayerSimpleInfo clearChatBubble() {
      bitField0_ &= ~0x00000008;
      chatBubble = 0;
      return this;
    }

    /**
     * <code>optional uint32 chat_bubble = 11;</code>
     * @return the chatBubble
     */
    public int getChatBubble() {
      return chatBubble;
    }

    /**
     * <code>optional uint32 chat_bubble = 11;</code>
     * @param value the chatBubble to set
     * @return this
     */
    public PlayerSimpleInfo setChatBubble(final int value) {
      bitField0_ |= 0x00000008;
      chatBubble = value;
      return this;
    }

    /**
     * <code>optional uint32 head_icon = 12;</code>
     * @return whether the headIcon field is set
     */
    public boolean hasHeadIcon() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional uint32 head_icon = 12;</code>
     * @return this
     */
    public PlayerSimpleInfo clearHeadIcon() {
      bitField0_ &= ~0x00000010;
      headIcon = 0;
      return this;
    }

    /**
     * <code>optional uint32 head_icon = 12;</code>
     * @return the headIcon
     */
    public int getHeadIcon() {
      return headIcon;
    }

    /**
     * <code>optional uint32 head_icon = 12;</code>
     * @param value the headIcon to set
     * @return this
     */
    public PlayerSimpleInfo setHeadIcon(final int value) {
      bitField0_ |= 0x00000010;
      headIcon = value;
      return this;
    }

    /**
     * <code>optional uint32 level = 14;</code>
     * @return whether the level field is set
     */
    public boolean hasLevel() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional uint32 level = 14;</code>
     * @return this
     */
    public PlayerSimpleInfo clearLevel() {
      bitField0_ &= ~0x00000020;
      level = 0;
      return this;
    }

    /**
     * <code>optional uint32 level = 14;</code>
     * @return the level
     */
    public int getLevel() {
      return level;
    }

    /**
     * <code>optional uint32 level = 14;</code>
     * @param value the level to set
     * @return this
     */
    public PlayerSimpleInfo setLevel(final int value) {
      bitField0_ |= 0x00000020;
      level = value;
      return this;
    }

    /**
     * <code>optional .PlatformType platform = 7;</code>
     * @return whether the platform field is set
     */
    public boolean hasPlatform() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>optional .PlatformType platform = 7;</code>
     * @return this
     */
    public PlayerSimpleInfo clearPlatform() {
      bitField0_ &= ~0x00000040;
      platform = 0;
      return this;
    }

    /**
     * <code>optional .PlatformType platform = 7;</code>
     * @return the platform
     */
    public PlatformTypeOuterClass.PlatformType getPlatform() {
      return PlatformTypeOuterClass.PlatformType.forNumber(platform);
    }

    /**
     * Gets the value of the internal enum store. The result is
     * equivalent to {@link PlayerSimpleInfo#getPlatform()}.getNumber().
     *
     * @return numeric wire representation
     */
    public int getPlatformValue() {
      return platform;
    }

    /**
     * Sets the value of the internal enum store. This does not
     * do any validity checks, so be sure to use appropriate value
     * constants from {@link PlatformTypeOuterClass.PlatformType}. Setting an invalid value
     * can cause {@link PlayerSimpleInfo#getPlatform()} to return null
     *
     * @param value the numeric wire value to set
     * @return this
     */
    public PlayerSimpleInfo setPlatformValue(final int value) {
      bitField0_ |= 0x00000040;
      platform = value;
      return this;
    }

    /**
     * <code>optional .PlatformType platform = 7;</code>
     * @param value the platform to set
     * @return this
     */
    public PlayerSimpleInfo setPlatform(final PlatformTypeOuterClass.PlatformType value) {
      bitField0_ |= 0x00000040;
      platform = value.getNumber();
      return this;
    }

    /**
     * <code>optional .FriendOnlineStatus online_status = 10;</code>
     * @return whether the onlineStatus field is set
     */
    public boolean hasOnlineStatus() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>optional .FriendOnlineStatus online_status = 10;</code>
     * @return this
     */
    public PlayerSimpleInfo clearOnlineStatus() {
      bitField0_ &= ~0x00000080;
      onlineStatus = 0;
      return this;
    }

    /**
     * <code>optional .FriendOnlineStatus online_status = 10;</code>
     * @return the onlineStatus
     */
    public FriendOnlineStatusOuterClass.FriendOnlineStatus getOnlineStatus() {
      return FriendOnlineStatusOuterClass.FriendOnlineStatus.forNumber(onlineStatus);
    }

    /**
     * Gets the value of the internal enum store. The result is
     * equivalent to {@link PlayerSimpleInfo#getOnlineStatus()}.getNumber().
     *
     * @return numeric wire representation
     */
    public int getOnlineStatusValue() {
      return onlineStatus;
    }

    /**
     * Sets the value of the internal enum store. This does not
     * do any validity checks, so be sure to use appropriate value
     * constants from {@link FriendOnlineStatusOuterClass.FriendOnlineStatus}. Setting an invalid value
     * can cause {@link PlayerSimpleInfo#getOnlineStatus()} to return null
     *
     * @param value the numeric wire value to set
     * @return this
     */
    public PlayerSimpleInfo setOnlineStatusValue(final int value) {
      bitField0_ |= 0x00000080;
      onlineStatus = value;
      return this;
    }

    /**
     * <code>optional .FriendOnlineStatus online_status = 10;</code>
     * @param value the onlineStatus to set
     * @return this
     */
    public PlayerSimpleInfo setOnlineStatus(
        final FriendOnlineStatusOuterClass.FriendOnlineStatus value) {
      bitField0_ |= 0x00000080;
      onlineStatus = value.getNumber();
      return this;
    }

    /**
     * <code>optional bool is_banned = 13;</code>
     * @return whether the isBanned field is set
     */
    public boolean hasIsBanned() {
      return (bitField0_ & 0x00000100) != 0;
    }

    /**
     * <code>optional bool is_banned = 13;</code>
     * @return this
     */
    public PlayerSimpleInfo clearIsBanned() {
      bitField0_ &= ~0x00000100;
      isBanned = false;
      return this;
    }

    /**
     * <code>optional bool is_banned = 13;</code>
     * @return the isBanned
     */
    public boolean getIsBanned() {
      return isBanned;
    }

    /**
     * <code>optional bool is_banned = 13;</code>
     * @param value the isBanned to set
     * @return this
     */
    public PlayerSimpleInfo setIsBanned(final boolean value) {
      bitField0_ |= 0x00000100;
      isBanned = value;
      return this;
    }

    /**
     * <code>optional string nickname = 1;</code>
     * @return whether the nickname field is set
     */
    public boolean hasNickname() {
      return (bitField0_ & 0x00000200) != 0;
    }

    /**
     * <code>optional string nickname = 1;</code>
     * @return this
     */
    public PlayerSimpleInfo clearNickname() {
      bitField0_ &= ~0x00000200;
      nickname.clear();
      return this;
    }

    /**
     * <code>optional string nickname = 1;</code>
     * @return the nickname
     */
    public String getNickname() {
      return nickname.getString();
    }

    /**
     * <code>optional string nickname = 1;</code>
     * @return internal {@code Utf8String} representation of nickname for reading
     */
    public Utf8String getNicknameBytes() {
      return this.nickname;
    }

    /**
     * <code>optional string nickname = 1;</code>
     * @return internal {@code Utf8String} representation of nickname for modifications
     */
    public Utf8String getMutableNicknameBytes() {
      bitField0_ |= 0x00000200;
      return this.nickname;
    }

    /**
     * <code>optional string nickname = 1;</code>
     * @param value the nickname to set
     * @return this
     */
    public PlayerSimpleInfo setNickname(final CharSequence value) {
      bitField0_ |= 0x00000200;
      nickname.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string nickname = 1;</code>
     * @param value the nickname to set
     * @return this
     */
    public PlayerSimpleInfo setNickname(final Utf8String value) {
      bitField0_ |= 0x00000200;
      nickname.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string signature = 2;</code>
     * @return whether the signature field is set
     */
    public boolean hasSignature() {
      return (bitField0_ & 0x00000400) != 0;
    }

    /**
     * <code>optional string signature = 2;</code>
     * @return this
     */
    public PlayerSimpleInfo clearSignature() {
      bitField0_ &= ~0x00000400;
      signature.clear();
      return this;
    }

    /**
     * <code>optional string signature = 2;</code>
     * @return the signature
     */
    public String getSignature() {
      return signature.getString();
    }

    /**
     * <code>optional string signature = 2;</code>
     * @return internal {@code Utf8String} representation of signature for reading
     */
    public Utf8String getSignatureBytes() {
      return this.signature;
    }

    /**
     * <code>optional string signature = 2;</code>
     * @return internal {@code Utf8String} representation of signature for modifications
     */
    public Utf8String getMutableSignatureBytes() {
      bitField0_ |= 0x00000400;
      return this.signature;
    }

    /**
     * <code>optional string signature = 2;</code>
     * @param value the signature to set
     * @return this
     */
    public PlayerSimpleInfo setSignature(final CharSequence value) {
      bitField0_ |= 0x00000400;
      signature.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string signature = 2;</code>
     * @param value the signature to set
     * @return this
     */
    public PlayerSimpleInfo setSignature(final Utf8String value) {
      bitField0_ |= 0x00000400;
      signature.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string platform_uuid = 3;</code>
     * @return whether the platformUuid field is set
     */
    public boolean hasPlatformUuid() {
      return (bitField0_ & 0x00000800) != 0;
    }

    /**
     * <code>optional string platform_uuid = 3;</code>
     * @return this
     */
    public PlayerSimpleInfo clearPlatformUuid() {
      bitField0_ &= ~0x00000800;
      platformUuid.clear();
      return this;
    }

    /**
     * <code>optional string platform_uuid = 3;</code>
     * @return the platformUuid
     */
    public String getPlatformUuid() {
      return platformUuid.getString();
    }

    /**
     * <code>optional string platform_uuid = 3;</code>
     * @return internal {@code Utf8String} representation of platformUuid for reading
     */
    public Utf8String getPlatformUuidBytes() {
      return this.platformUuid;
    }

    /**
     * <code>optional string platform_uuid = 3;</code>
     * @return internal {@code Utf8String} representation of platformUuid for modifications
     */
    public Utf8String getMutablePlatformUuidBytes() {
      bitField0_ |= 0x00000800;
      return this.platformUuid;
    }

    /**
     * <code>optional string platform_uuid = 3;</code>
     * @param value the platformUuid to set
     * @return this
     */
    public PlayerSimpleInfo setPlatformUuid(final CharSequence value) {
      bitField0_ |= 0x00000800;
      platformUuid.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string platform_uuid = 3;</code>
     * @param value the platformUuid to set
     * @return this
     */
    public PlayerSimpleInfo setPlatformUuid(final Utf8String value) {
      bitField0_ |= 0x00000800;
      platformUuid.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string platform_nick = 6;</code>
     * @return whether the platformNick field is set
     */
    public boolean hasPlatformNick() {
      return (bitField0_ & 0x00001000) != 0;
    }

    /**
     * <code>optional string platform_nick = 6;</code>
     * @return this
     */
    public PlayerSimpleInfo clearPlatformNick() {
      bitField0_ &= ~0x00001000;
      platformNick.clear();
      return this;
    }

    /**
     * <code>optional string platform_nick = 6;</code>
     * @return the platformNick
     */
    public String getPlatformNick() {
      return platformNick.getString();
    }

    /**
     * <code>optional string platform_nick = 6;</code>
     * @return internal {@code Utf8String} representation of platformNick for reading
     */
    public Utf8String getPlatformNickBytes() {
      return this.platformNick;
    }

    /**
     * <code>optional string platform_nick = 6;</code>
     * @return internal {@code Utf8String} representation of platformNick for modifications
     */
    public Utf8String getMutablePlatformNickBytes() {
      bitField0_ |= 0x00001000;
      return this.platformNick;
    }

    /**
     * <code>optional string platform_nick = 6;</code>
     * @param value the platformNick to set
     * @return this
     */
    public PlayerSimpleInfo setPlatformNick(final CharSequence value) {
      bitField0_ |= 0x00001000;
      platformNick.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string platform_nick = 6;</code>
     * @param value the platformNick to set
     * @return this
     */
    public PlayerSimpleInfo setPlatformNick(final Utf8String value) {
      bitField0_ |= 0x00001000;
      platformNick.copyFrom(value);
      return this;
    }

    /**
     * <code>repeated .AssistSimpleInfo assist_info_list = 15;</code>
     * @return whether the assistInfoList field is set
     */
    public boolean hasAssistInfoList() {
      return (bitField0_ & 0x00002000) != 0;
    }

    /**
     * <code>repeated .AssistSimpleInfo assist_info_list = 15;</code>
     * @return this
     */
    public PlayerSimpleInfo clearAssistInfoList() {
      bitField0_ &= ~0x00002000;
      assistInfoList.clear();
      return this;
    }

    /**
     * <code>repeated .AssistSimpleInfo assist_info_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 #getMutableAssistInfoList()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<AssistSimpleInfoOuterClass.AssistSimpleInfo> getAssistInfoList() {
      return assistInfoList;
    }

    /**
     * <code>repeated .AssistSimpleInfo assist_info_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<AssistSimpleInfoOuterClass.AssistSimpleInfo> getMutableAssistInfoList() {
      bitField0_ |= 0x00002000;
      return assistInfoList;
    }

    /**
     * <code>repeated .AssistSimpleInfo assist_info_list = 15;</code>
     * @param value the assistInfoList to add
     * @return this
     */
    public PlayerSimpleInfo addAssistInfoList(
        final AssistSimpleInfoOuterClass.AssistSimpleInfo value) {
      bitField0_ |= 0x00002000;
      assistInfoList.add(value);
      return this;
    }

    /**
     * <code>repeated .AssistSimpleInfo assist_info_list = 15;</code>
     * @param values the assistInfoList to add
     * @return this
     */
    public PlayerSimpleInfo addAllAssistInfoList(
        final AssistSimpleInfoOuterClass.AssistSimpleInfo... values) {
      bitField0_ |= 0x00002000;
      assistInfoList.addAll(values);
      return this;
    }

    @Override
    public PlayerSimpleInfo copyFrom(final PlayerSimpleInfo other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        logoutTime = other.logoutTime;
        uid = other.uid;
        personalCard = other.personalCard;
        chatBubble = other.chatBubble;
        headIcon = other.headIcon;
        level = other.level;
        platform = other.platform;
        onlineStatus = other.onlineStatus;
        isBanned = other.isBanned;
        nickname.copyFrom(other.nickname);
        signature.copyFrom(other.signature);
        platformUuid.copyFrom(other.platformUuid);
        platformNick.copyFrom(other.platformNick);
        assistInfoList.copyFrom(other.assistInfoList);
      }
      return this;
    }

    @Override
    public PlayerSimpleInfo mergeFrom(final PlayerSimpleInfo other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasLogoutTime()) {
        setLogoutTime(other.logoutTime);
      }
      if (other.hasUid()) {
        setUid(other.uid);
      }
      if (other.hasPersonalCard()) {
        setPersonalCard(other.personalCard);
      }
      if (other.hasChatBubble()) {
        setChatBubble(other.chatBubble);
      }
      if (other.hasHeadIcon()) {
        setHeadIcon(other.headIcon);
      }
      if (other.hasLevel()) {
        setLevel(other.level);
      }
      if (other.hasPlatform()) {
        setPlatformValue(other.platform);
      }
      if (other.hasOnlineStatus()) {
        setOnlineStatusValue(other.onlineStatus);
      }
      if (other.hasIsBanned()) {
        setIsBanned(other.isBanned);
      }
      if (other.hasNickname()) {
        getMutableNicknameBytes().copyFrom(other.nickname);
      }
      if (other.hasSignature()) {
        getMutableSignatureBytes().copyFrom(other.signature);
      }
      if (other.hasPlatformUuid()) {
        getMutablePlatformUuidBytes().copyFrom(other.platformUuid);
      }
      if (other.hasPlatformNick()) {
        getMutablePlatformNickBytes().copyFrom(other.platformNick);
      }
      if (other.hasAssistInfoList()) {
        getMutableAssistInfoList().addAll(other.assistInfoList);
      }
      return this;
    }

    @Override
    public PlayerSimpleInfo clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      logoutTime = 0L;
      uid = 0;
      personalCard = 0;
      chatBubble = 0;
      headIcon = 0;
      level = 0;
      platform = 0;
      onlineStatus = 0;
      isBanned = false;
      nickname.clear();
      signature.clear();
      platformUuid.clear();
      platformNick.clear();
      assistInfoList.clear();
      return this;
    }

    @Override
    public PlayerSimpleInfo clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      nickname.clear();
      signature.clear();
      platformUuid.clear();
      platformNick.clear();
      assistInfoList.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof PlayerSimpleInfo)) {
        return false;
      }
      PlayerSimpleInfo other = (PlayerSimpleInfo) o;
      return bitField0_ == other.bitField0_
        && (!hasLogoutTime() || logoutTime == other.logoutTime)
        && (!hasUid() || uid == other.uid)
        && (!hasPersonalCard() || personalCard == other.personalCard)
        && (!hasChatBubble() || chatBubble == other.chatBubble)
        && (!hasHeadIcon() || headIcon == other.headIcon)
        && (!hasLevel() || level == other.level)
        && (!hasPlatform() || platform == other.platform)
        && (!hasOnlineStatus() || onlineStatus == other.onlineStatus)
        && (!hasIsBanned() || isBanned == other.isBanned)
        && (!hasNickname() || nickname.equals(other.nickname))
        && (!hasSignature() || signature.equals(other.signature))
        && (!hasPlatformUuid() || platformUuid.equals(other.platformUuid))
        && (!hasPlatformNick() || platformNick.equals(other.platformNick))
        && (!hasAssistInfoList() || assistInfoList.equals(other.assistInfoList));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 72);
        output.writeInt64NoTag(logoutTime);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 40);
        output.writeUInt32NoTag(uid);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 64);
        output.writeUInt32NoTag(personalCard);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 88);
        output.writeUInt32NoTag(chatBubble);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 96);
        output.writeUInt32NoTag(headIcon);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawByte((byte) 112);
        output.writeUInt32NoTag(level);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawByte((byte) 56);
        output.writeEnumNoTag(platform);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRawByte((byte) 80);
        output.writeEnumNoTag(onlineStatus);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRawByte((byte) 104);
        output.writeBoolNoTag(isBanned);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeRawByte((byte) 10);
        output.writeStringNoTag(nickname);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeRawByte((byte) 18);
        output.writeStringNoTag(signature);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeRawByte((byte) 26);
        output.writeStringNoTag(platformUuid);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeRawByte((byte) 50);
        output.writeStringNoTag(platformNick);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        for (int i = 0; i < assistInfoList.length(); i++) {
          output.writeRawByte((byte) 122);
          output.writeMessageNoTag(assistInfoList.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeInt64SizeNoTag(logoutTime);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(uid);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(personalCard);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(chatBubble);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(headIcon);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(level);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += 1 + ProtoSink.computeEnumSizeNoTag(platform);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += 1 + ProtoSink.computeEnumSizeNoTag(onlineStatus);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += 2;
      }
      if ((bitField0_ & 0x00000200) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(nickname);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(signature);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(platformUuid);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(platformNick);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        size += (1 * assistInfoList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(assistInfoList);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public PlayerSimpleInfo mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 72: {
            // logoutTime
            logoutTime = input.readInt64();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 40) {
              break;
            }
          }
          case 40: {
            // uid
            uid = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 64) {
              break;
            }
          }
          case 64: {
            // personalCard
            personalCard = input.readUInt32();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 88) {
              break;
            }
          }
          case 88: {
            // chatBubble
            chatBubble = input.readUInt32();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 96) {
              break;
            }
          }
          case 96: {
            // headIcon
            headIcon = input.readUInt32();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 112) {
              break;
            }
          }
          case 112: {
            // level
            level = input.readUInt32();
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 56) {
              break;
            }
          }
          case 56: {
            // platform
            final int value = input.readInt32();
            if (PlatformTypeOuterClass.PlatformType.forNumber(value) != null) {
              platform = value;
              bitField0_ |= 0x00000040;
            }
            tag = input.readTag();
            if (tag != 80) {
              break;
            }
          }
          case 80: {
            // onlineStatus
            final int value = input.readInt32();
            if (FriendOnlineStatusOuterClass.FriendOnlineStatus.forNumber(value) != null) {
              onlineStatus = value;
              bitField0_ |= 0x00000080;
            }
            tag = input.readTag();
            if (tag != 104) {
              break;
            }
          }
          case 104: {
            // isBanned
            isBanned = input.readBool();
            bitField0_ |= 0x00000100;
            tag = input.readTag();
            if (tag != 10) {
              break;
            }
          }
          case 10: {
            // nickname
            input.readString(nickname);
            bitField0_ |= 0x00000200;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // signature
            input.readString(signature);
            bitField0_ |= 0x00000400;
            tag = input.readTag();
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // platformUuid
            input.readString(platformUuid);
            bitField0_ |= 0x00000800;
            tag = input.readTag();
            if (tag != 50) {
              break;
            }
          }
          case 50: {
            // platformNick
            input.readString(platformNick);
            bitField0_ |= 0x00001000;
            tag = input.readTag();
            if (tag != 122) {
              break;
            }
          }
          case 122: {
            // assistInfoList
            tag = input.readRepeatedMessage(assistInfoList, tag);
            bitField0_ |= 0x00002000;
            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.writeInt64(FieldNames.logoutTime, logoutTime);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.uid, uid);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeUInt32(FieldNames.personalCard, personalCard);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeUInt32(FieldNames.chatBubble, chatBubble);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeUInt32(FieldNames.headIcon, headIcon);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeUInt32(FieldNames.level, level);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeEnum(FieldNames.platform, platform, PlatformTypeOuterClass.PlatformType.converter());
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeEnum(FieldNames.onlineStatus, onlineStatus, FriendOnlineStatusOuterClass.FriendOnlineStatus.converter());
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeBool(FieldNames.isBanned, isBanned);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeString(FieldNames.nickname, nickname);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeString(FieldNames.signature, signature);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeString(FieldNames.platformUuid, platformUuid);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeString(FieldNames.platformNick, platformNick);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        output.writeRepeatedMessage(FieldNames.assistInfoList, assistInfoList);
      }
      output.endObject();
    }

    @Override
    public PlayerSimpleInfo mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -498727049:
          case 1729813602: {
            if (input.isAtField(FieldNames.logoutTime)) {
              if (!input.trySkipNullValue()) {
                logoutTime = input.readInt64();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 115792: {
            if (input.isAtField(FieldNames.uid)) {
              if (!input.trySkipNullValue()) {
                uid = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -259197584:
          case 580711855: {
            if (input.isAtField(FieldNames.personalCard)) {
              if (!input.trySkipNullValue()) {
                personalCard = input.readUInt32();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2145955324:
          case 1636248403: {
            if (input.isAtField(FieldNames.chatBubble)) {
              if (!input.trySkipNullValue()) {
                chatBubble = input.readUInt32();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1116107143:
          case -219098248: {
            if (input.isAtField(FieldNames.headIcon)) {
              if (!input.trySkipNullValue()) {
                headIcon = input.readUInt32();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 102865796: {
            if (input.isAtField(FieldNames.level)) {
              if (!input.trySkipNullValue()) {
                level = input.readUInt32();
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1874684019: {
            if (input.isAtField(FieldNames.platform)) {
              if (!input.trySkipNullValue()) {
                final PlatformTypeOuterClass.PlatformType value = input.readEnum(PlatformTypeOuterClass.PlatformType.converter());
                if (value != null) {
                  platform = value.getNumber();
                  bitField0_ |= 0x00000040;
                } else {
                  input.skipUnknownEnumValue();
                }
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1159866405:
          case -650386594: {
            if (input.isAtField(FieldNames.onlineStatus)) {
              if (!input.trySkipNullValue()) {
                final FriendOnlineStatusOuterClass.FriendOnlineStatus value = input.readEnum(FriendOnlineStatusOuterClass.FriendOnlineStatus.converter());
                if (value != null) {
                  onlineStatus = value.getNumber();
                  bitField0_ |= 0x00000080;
                } else {
                  input.skipUnknownEnumValue();
                }
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -722308888:
          case -932303917: {
            if (input.isAtField(FieldNames.isBanned)) {
              if (!input.trySkipNullValue()) {
                isBanned = input.readBool();
                bitField0_ |= 0x00000100;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 70690926: {
            if (input.isAtField(FieldNames.nickname)) {
              if (!input.trySkipNullValue()) {
                input.readString(nickname);
                bitField0_ |= 0x00000200;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1073584312: {
            if (input.isAtField(FieldNames.signature)) {
              if (!input.trySkipNullValue()) {
                input.readString(signature);
                bitField0_ |= 0x00000400;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 155606734:
          case 538088455: {
            if (input.isAtField(FieldNames.platformUuid)) {
              if (!input.trySkipNullValue()) {
                input.readString(platformUuid);
                bitField0_ |= 0x00000800;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 155386486:
          case 537868207: {
            if (input.isAtField(FieldNames.platformNick)) {
              if (!input.trySkipNullValue()) {
                input.readString(platformNick);
                bitField0_ |= 0x00001000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 988934133:
          case -45478087: {
            if (input.isAtField(FieldNames.assistInfoList)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(assistInfoList);
                bitField0_ |= 0x00002000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum PlayerSimpleInfoFactory implements MessageFactory<PlayerSimpleInfo> {
      INSTANCE;

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

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

      static final FieldName uid = FieldName.forField("uid");

      static final FieldName personalCard = FieldName.forField("personalCard", "personal_card");

      static final FieldName chatBubble = FieldName.forField("chatBubble", "chat_bubble");

      static final FieldName headIcon = FieldName.forField("headIcon", "head_icon");

      static final FieldName level = FieldName.forField("level");

      static final FieldName platform = FieldName.forField("platform");

      static final FieldName onlineStatus = FieldName.forField("onlineStatus", "online_status");

      static final FieldName isBanned = FieldName.forField("isBanned", "is_banned");

      static final FieldName nickname = FieldName.forField("nickname");

      static final FieldName signature = FieldName.forField("signature");

      static final FieldName platformUuid = FieldName.forField("platformUuid", "platform_uuid");

      static final FieldName platformNick = FieldName.forField("platformNick", "platform_nick");

      static final FieldName assistInfoList = FieldName.forField("assistInfoList", "assist_info_list");
    }
  }
}
