// Code generated by protocol buffer compiler. Do not edit!
package emu.nebula.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.RepeatedByte;
import us.hebi.quickbuf.RepeatedLong;
import us.hebi.quickbuf.RepeatedMessage;
import us.hebi.quickbuf.Utf8String;

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

    /**
     * <code>optional int64 LastRefreshTime = 1;</code>
     */
    private long lastRefreshTime;

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

    /**
     * <code>optional .ScoreBossRankData Self = 2;</code>
     */
    private final ScoreBossRankData self = ScoreBossRankData.newInstance();

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     */
    private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance();

    /**
     * <code>repeated uint64 Border = 4;</code>
     */
    private final RepeatedLong border = RepeatedLong.newEmptyInstance();

    /**
     * <code>repeated .ScoreBossRankData Rank = 3;</code>
     */
    private final RepeatedMessage<ScoreBossRankData> rank = RepeatedMessage.newEmptyInstance(ScoreBossRankData.getFactory());

    private ScoreBossRankInfo() {
    }

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

    /**
     * <code>optional int64 LastRefreshTime = 1;</code>
     * @return whether the lastRefreshTime field is set
     */
    public boolean hasLastRefreshTime() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional int64 LastRefreshTime = 1;</code>
     * @return this
     */
    public ScoreBossRankInfo clearLastRefreshTime() {
      bitField0_ &= ~0x00000001;
      lastRefreshTime = 0L;
      return this;
    }

    /**
     * <code>optional int64 LastRefreshTime = 1;</code>
     * @return the lastRefreshTime
     */
    public long getLastRefreshTime() {
      return lastRefreshTime;
    }

    /**
     * <code>optional int64 LastRefreshTime = 1;</code>
     * @param value the lastRefreshTime to set
     * @return this
     */
    public ScoreBossRankInfo setLastRefreshTime(final long value) {
      bitField0_ |= 0x00000001;
      lastRefreshTime = value;
      return this;
    }

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

    /**
     * <code>optional uint32 Total = 5;</code>
     * @return this
     */
    public ScoreBossRankInfo clearTotal() {
      bitField0_ &= ~0x00000002;
      total = 0;
      return this;
    }

    /**
     * <code>optional uint32 Total = 5;</code>
     * @return the total
     */
    public int getTotal() {
      return total;
    }

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

    /**
     * <code>optional .ScoreBossRankData Self = 2;</code>
     * @return whether the self field is set
     */
    public boolean hasSelf() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional .ScoreBossRankData Self = 2;</code>
     * @return this
     */
    public ScoreBossRankInfo clearSelf() {
      bitField0_ &= ~0x00000004;
      self.clear();
      return this;
    }

    /**
     * <code>optional .ScoreBossRankData Self = 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 #getMutableSelf()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public ScoreBossRankData getSelf() {
      return self;
    }

    /**
     * <code>optional .ScoreBossRankData Self = 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 ScoreBossRankData getMutableSelf() {
      bitField0_ |= 0x00000004;
      return self;
    }

    /**
     * <code>optional .ScoreBossRankData Self = 2;</code>
     * @param value the self to set
     * @return this
     */
    public ScoreBossRankInfo setSelf(final ScoreBossRankData value) {
      bitField0_ |= 0x00000004;
      self.copyFrom(value);
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return whether the nextPackage field is set
     */
    public boolean hasNextPackage() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public ScoreBossRankInfo clearNextPackage() {
      bitField0_ &= ~0x00000008;
      nextPackage.clear();
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</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 #getMutableNextPackage()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedByte getNextPackage() {
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</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 RepeatedByte getMutableNextPackage() {
      bitField0_ |= 0x00000008;
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param value the nextPackage to add
     * @return this
     */
    public ScoreBossRankInfo addNextPackage(final byte value) {
      bitField0_ |= 0x00000008;
      nextPackage.add(value);
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param values the nextPackage to add
     * @return this
     */
    public ScoreBossRankInfo addAllNextPackage(final byte... values) {
      bitField0_ |= 0x00000008;
      nextPackage.addAll(values);
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param values the nextPackage to set
     * @return this
     */
    public ScoreBossRankInfo setNextPackage(final byte... values) {
      bitField0_ |= 0x00000008;
      nextPackage.copyFrom(values);
      return this;
    }

    /**
     * <code>repeated uint64 Border = 4;</code>
     * @return whether the border field is set
     */
    public boolean hasBorder() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>repeated uint64 Border = 4;</code>
     * @return this
     */
    public ScoreBossRankInfo clearBorder() {
      bitField0_ &= ~0x00000010;
      border.clear();
      return this;
    }

    /**
     * <code>repeated uint64 Border = 4;</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 #getMutableBorder()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedLong getBorder() {
      return border;
    }

    /**
     * <code>repeated uint64 Border = 4;</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 RepeatedLong getMutableBorder() {
      bitField0_ |= 0x00000010;
      return border;
    }

    /**
     * <code>repeated uint64 Border = 4;</code>
     * @param value the border to add
     * @return this
     */
    public ScoreBossRankInfo addBorder(final long value) {
      bitField0_ |= 0x00000010;
      border.add(value);
      return this;
    }

    /**
     * <code>repeated uint64 Border = 4;</code>
     * @param values the border to add
     * @return this
     */
    public ScoreBossRankInfo addAllBorder(final long... values) {
      bitField0_ |= 0x00000010;
      border.addAll(values);
      return this;
    }

    /**
     * <code>repeated .ScoreBossRankData Rank = 3;</code>
     * @return whether the rank field is set
     */
    public boolean hasRank() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>repeated .ScoreBossRankData Rank = 3;</code>
     * @return this
     */
    public ScoreBossRankInfo clearRank() {
      bitField0_ &= ~0x00000020;
      rank.clear();
      return this;
    }

    /**
     * <code>repeated .ScoreBossRankData Rank = 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 #getMutableRank()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<ScoreBossRankData> getRank() {
      return rank;
    }

    /**
     * <code>repeated .ScoreBossRankData Rank = 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<ScoreBossRankData> getMutableRank() {
      bitField0_ |= 0x00000020;
      return rank;
    }

    /**
     * <code>repeated .ScoreBossRankData Rank = 3;</code>
     * @param value the rank to add
     * @return this
     */
    public ScoreBossRankInfo addRank(final ScoreBossRankData value) {
      bitField0_ |= 0x00000020;
      rank.add(value);
      return this;
    }

    /**
     * <code>repeated .ScoreBossRankData Rank = 3;</code>
     * @param values the rank to add
     * @return this
     */
    public ScoreBossRankInfo addAllRank(final ScoreBossRankData... values) {
      bitField0_ |= 0x00000020;
      rank.addAll(values);
      return this;
    }

    @Override
    public ScoreBossRankInfo copyFrom(final ScoreBossRankInfo other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        lastRefreshTime = other.lastRefreshTime;
        total = other.total;
        self.copyFrom(other.self);
        nextPackage.copyFrom(other.nextPackage);
        border.copyFrom(other.border);
        rank.copyFrom(other.rank);
      }
      return this;
    }

    @Override
    public ScoreBossRankInfo mergeFrom(final ScoreBossRankInfo other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasLastRefreshTime()) {
        setLastRefreshTime(other.lastRefreshTime);
      }
      if (other.hasTotal()) {
        setTotal(other.total);
      }
      if (other.hasSelf()) {
        getMutableSelf().mergeFrom(other.self);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasBorder()) {
        getMutableBorder().addAll(other.border);
      }
      if (other.hasRank()) {
        getMutableRank().addAll(other.rank);
      }
      return this;
    }

    @Override
    public ScoreBossRankInfo clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      lastRefreshTime = 0L;
      total = 0;
      self.clear();
      nextPackage.clear();
      border.clear();
      rank.clear();
      return this;
    }

    @Override
    public ScoreBossRankInfo clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      self.clearQuick();
      nextPackage.clear();
      border.clear();
      rank.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ScoreBossRankInfo)) {
        return false;
      }
      ScoreBossRankInfo other = (ScoreBossRankInfo) o;
      return bitField0_ == other.bitField0_
        && (!hasLastRefreshTime() || lastRefreshTime == other.lastRefreshTime)
        && (!hasTotal() || total == other.total)
        && (!hasSelf() || self.equals(other.self))
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasBorder() || border.equals(other.border))
        && (!hasRank() || rank.equals(other.rank));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeInt64NoTag(lastRefreshTime);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 40);
        output.writeUInt32NoTag(total);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 18);
        output.writeMessageNoTag(self);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        for (int i = 0; i < border.length(); i++) {
          output.writeRawByte((byte) 32);
          output.writeUInt64NoTag(border.array()[i]);
        }
      }
      if ((bitField0_ & 0x00000020) != 0) {
        for (int i = 0; i < rank.length(); i++) {
          output.writeRawByte((byte) 26);
          output.writeMessageNoTag(rank.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeInt64SizeNoTag(lastRefreshTime);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(total);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(self);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += (1 * border.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(border);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += (1 * rank.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rank);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ScoreBossRankInfo mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8: {
            // lastRefreshTime
            lastRefreshTime = input.readInt64();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 40) {
              break;
            }
          }
          case 40: {
            // total
            total = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // self
            input.readMessage(self);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 34) {
              break;
            }
          }
          case 34: {
            // border [packed=true]
            input.readPackedUInt64(border, tag);
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // rank
            tag = input.readRepeatedMessage(rank, tag);
            bitField0_ |= 0x00000020;
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
          case 32: {
            // border [packed=false]
            tag = input.readRepeatedUInt64(border, tag);
            bitField0_ |= 0x00000010;
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeInt64(FieldNames.lastRefreshTime, lastRefreshTime);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.total, total);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeMessage(FieldNames.self, self);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRepeatedUInt64(FieldNames.border, border);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRepeatedMessage(FieldNames.rank, rank);
      }
      output.endObject();
    }

    @Override
    public ScoreBossRankInfo mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -197072974: {
            if (input.isAtField(FieldNames.lastRefreshTime)) {
              if (!input.trySkipNullValue()) {
                lastRefreshTime = input.readInt64();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 80997156: {
            if (input.isAtField(FieldNames.total)) {
              if (!input.trySkipNullValue()) {
                total = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2573164: {
            if (input.isAtField(FieldNames.self)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(self);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1995530316: {
            if (input.isAtField(FieldNames.border)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedUInt64(border);
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2539596: {
            if (input.isAtField(FieldNames.rank)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(rank);
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum ScoreBossRankInfoFactory implements MessageFactory<ScoreBossRankInfo> {
      INSTANCE;

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

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

      static final FieldName total = FieldName.forField("Total");

      static final FieldName self = FieldName.forField("Self");

      static final FieldName nextPackage = FieldName.forField("NextPackage");

      static final FieldName border = FieldName.forField("Border");

      static final FieldName rank = FieldName.forField("Rank");
    }
  }

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

    /**
     * <code>optional uint32 Id = 1;</code>
     */
    private int id;

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     */
    private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance();

    private ScoreBossRankChar() {
    }

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

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

    /**
     * <code>optional uint32 Id = 1;</code>
     * @return this
     */
    public ScoreBossRankChar clearId() {
      bitField0_ &= ~0x00000001;
      id = 0;
      return this;
    }

    /**
     * <code>optional uint32 Id = 1;</code>
     * @return the id
     */
    public int getId() {
      return id;
    }

    /**
     * <code>optional uint32 Id = 1;</code>
     * @param value the id to set
     * @return this
     */
    public ScoreBossRankChar setId(final int value) {
      bitField0_ |= 0x00000001;
      id = value;
      return this;
    }

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

    /**
     * <code>optional uint32 Level = 2;</code>
     * @return this
     */
    public ScoreBossRankChar clearLevel() {
      bitField0_ &= ~0x00000002;
      level = 0;
      return this;
    }

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

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return whether the nextPackage field is set
     */
    public boolean hasNextPackage() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public ScoreBossRankChar clearNextPackage() {
      bitField0_ &= ~0x00000004;
      nextPackage.clear();
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</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 #getMutableNextPackage()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedByte getNextPackage() {
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</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 RepeatedByte getMutableNextPackage() {
      bitField0_ |= 0x00000004;
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param value the nextPackage to add
     * @return this
     */
    public ScoreBossRankChar addNextPackage(final byte value) {
      bitField0_ |= 0x00000004;
      nextPackage.add(value);
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param values the nextPackage to add
     * @return this
     */
    public ScoreBossRankChar addAllNextPackage(final byte... values) {
      bitField0_ |= 0x00000004;
      nextPackage.addAll(values);
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param values the nextPackage to set
     * @return this
     */
    public ScoreBossRankChar setNextPackage(final byte... values) {
      bitField0_ |= 0x00000004;
      nextPackage.copyFrom(values);
      return this;
    }

    @Override
    public ScoreBossRankChar copyFrom(final ScoreBossRankChar other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        id = other.id;
        level = other.level;
        nextPackage.copyFrom(other.nextPackage);
      }
      return this;
    }

    @Override
    public ScoreBossRankChar mergeFrom(final ScoreBossRankChar other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasId()) {
        setId(other.id);
      }
      if (other.hasLevel()) {
        setLevel(other.level);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      return this;
    }

    @Override
    public ScoreBossRankChar clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      id = 0;
      level = 0;
      nextPackage.clear();
      return this;
    }

    @Override
    public ScoreBossRankChar clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      nextPackage.clear();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ScoreBossRankChar)) {
        return false;
      }
      ScoreBossRankChar other = (ScoreBossRankChar) o;
      return bitField0_ == other.bitField0_
        && (!hasId() || id == other.id)
        && (!hasLevel() || level == other.level)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt32NoTag(id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 16);
        output.writeUInt32NoTag(level);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(level);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ScoreBossRankChar mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8: {
            // id
            id = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 16) {
              break;
            }
          }
          case 16: {
            // level
            level = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeUInt32(FieldNames.id, id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.level, level);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      output.endObject();
    }

    @Override
    public ScoreBossRankChar mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 2363: {
            if (input.isAtField(FieldNames.id)) {
              if (!input.trySkipNullValue()) {
                id = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 73313124: {
            if (input.isAtField(FieldNames.level)) {
              if (!input.trySkipNullValue()) {
                level = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum ScoreBossRankCharFactory implements MessageFactory<ScoreBossRankChar> {
      INSTANCE;

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

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

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

      static final FieldName nextPackage = FieldName.forField("NextPackage");
    }
  }

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

    /**
     * <code>optional uint32 BuildScore = 1;</code>
     */
    private int buildScore;

    /**
     * <code>optional uint32 LevelScore = 3;</code>
     */
    private int levelScore;

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     */
    private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance();

    /**
     * <code>repeated .ScoreBossRankChar Chars = 2;</code>
     */
    private final RepeatedMessage<ScoreBossRankChar> chars = RepeatedMessage.newEmptyInstance(ScoreBossRankChar.getFactory());

    private ScoreBossRankTeam() {
    }

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

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

    /**
     * <code>optional uint32 BuildScore = 1;</code>
     * @return this
     */
    public ScoreBossRankTeam clearBuildScore() {
      bitField0_ &= ~0x00000001;
      buildScore = 0;
      return this;
    }

    /**
     * <code>optional uint32 BuildScore = 1;</code>
     * @return the buildScore
     */
    public int getBuildScore() {
      return buildScore;
    }

    /**
     * <code>optional uint32 BuildScore = 1;</code>
     * @param value the buildScore to set
     * @return this
     */
    public ScoreBossRankTeam setBuildScore(final int value) {
      bitField0_ |= 0x00000001;
      buildScore = value;
      return this;
    }

    /**
     * <code>optional uint32 LevelScore = 3;</code>
     * @return whether the levelScore field is set
     */
    public boolean hasLevelScore() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional uint32 LevelScore = 3;</code>
     * @return this
     */
    public ScoreBossRankTeam clearLevelScore() {
      bitField0_ &= ~0x00000002;
      levelScore = 0;
      return this;
    }

    /**
     * <code>optional uint32 LevelScore = 3;</code>
     * @return the levelScore
     */
    public int getLevelScore() {
      return levelScore;
    }

    /**
     * <code>optional uint32 LevelScore = 3;</code>
     * @param value the levelScore to set
     * @return this
     */
    public ScoreBossRankTeam setLevelScore(final int value) {
      bitField0_ |= 0x00000002;
      levelScore = value;
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return whether the nextPackage field is set
     */
    public boolean hasNextPackage() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public ScoreBossRankTeam clearNextPackage() {
      bitField0_ &= ~0x00000004;
      nextPackage.clear();
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</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 #getMutableNextPackage()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedByte getNextPackage() {
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</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 RepeatedByte getMutableNextPackage() {
      bitField0_ |= 0x00000004;
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param value the nextPackage to add
     * @return this
     */
    public ScoreBossRankTeam addNextPackage(final byte value) {
      bitField0_ |= 0x00000004;
      nextPackage.add(value);
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param values the nextPackage to add
     * @return this
     */
    public ScoreBossRankTeam addAllNextPackage(final byte... values) {
      bitField0_ |= 0x00000004;
      nextPackage.addAll(values);
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param values the nextPackage to set
     * @return this
     */
    public ScoreBossRankTeam setNextPackage(final byte... values) {
      bitField0_ |= 0x00000004;
      nextPackage.copyFrom(values);
      return this;
    }

    /**
     * <code>repeated .ScoreBossRankChar Chars = 2;</code>
     * @return whether the chars field is set
     */
    public boolean hasChars() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>repeated .ScoreBossRankChar Chars = 2;</code>
     * @return this
     */
    public ScoreBossRankTeam clearChars() {
      bitField0_ &= ~0x00000008;
      chars.clear();
      return this;
    }

    /**
     * <code>repeated .ScoreBossRankChar Chars = 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 #getMutableChars()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<ScoreBossRankChar> getChars() {
      return chars;
    }

    /**
     * <code>repeated .ScoreBossRankChar Chars = 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<ScoreBossRankChar> getMutableChars() {
      bitField0_ |= 0x00000008;
      return chars;
    }

    /**
     * <code>repeated .ScoreBossRankChar Chars = 2;</code>
     * @param value the chars to add
     * @return this
     */
    public ScoreBossRankTeam addChars(final ScoreBossRankChar value) {
      bitField0_ |= 0x00000008;
      chars.add(value);
      return this;
    }

    /**
     * <code>repeated .ScoreBossRankChar Chars = 2;</code>
     * @param values the chars to add
     * @return this
     */
    public ScoreBossRankTeam addAllChars(final ScoreBossRankChar... values) {
      bitField0_ |= 0x00000008;
      chars.addAll(values);
      return this;
    }

    @Override
    public ScoreBossRankTeam copyFrom(final ScoreBossRankTeam other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        buildScore = other.buildScore;
        levelScore = other.levelScore;
        nextPackage.copyFrom(other.nextPackage);
        chars.copyFrom(other.chars);
      }
      return this;
    }

    @Override
    public ScoreBossRankTeam mergeFrom(final ScoreBossRankTeam other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasBuildScore()) {
        setBuildScore(other.buildScore);
      }
      if (other.hasLevelScore()) {
        setLevelScore(other.levelScore);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasChars()) {
        getMutableChars().addAll(other.chars);
      }
      return this;
    }

    @Override
    public ScoreBossRankTeam clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      buildScore = 0;
      levelScore = 0;
      nextPackage.clear();
      chars.clear();
      return this;
    }

    @Override
    public ScoreBossRankTeam clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      nextPackage.clear();
      chars.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ScoreBossRankTeam)) {
        return false;
      }
      ScoreBossRankTeam other = (ScoreBossRankTeam) o;
      return bitField0_ == other.bitField0_
        && (!hasBuildScore() || buildScore == other.buildScore)
        && (!hasLevelScore() || levelScore == other.levelScore)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasChars() || chars.equals(other.chars));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt32NoTag(buildScore);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 24);
        output.writeUInt32NoTag(levelScore);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        for (int i = 0; i < chars.length(); i++) {
          output.writeRawByte((byte) 18);
          output.writeMessageNoTag(chars.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(buildScore);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(levelScore);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ScoreBossRankTeam mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8: {
            // buildScore
            buildScore = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 24) {
              break;
            }
          }
          case 24: {
            // levelScore
            levelScore = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // chars
            tag = input.readRepeatedMessage(chars, tag);
            bitField0_ |= 0x00000008;
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeUInt32(FieldNames.buildScore, buildScore);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.levelScore, levelScore);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRepeatedMessage(FieldNames.chars, chars);
      }
      output.endObject();
    }

    @Override
    public ScoreBossRankTeam mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 1511471332: {
            if (input.isAtField(FieldNames.buildScore)) {
              if (!input.trySkipNullValue()) {
                buildScore = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2105990770: {
            if (input.isAtField(FieldNames.levelScore)) {
              if (!input.trySkipNullValue()) {
                levelScore = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 65071037: {
            if (input.isAtField(FieldNames.chars)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(chars);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum ScoreBossRankTeamFactory implements MessageFactory<ScoreBossRankTeam> {
      INSTANCE;

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

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

      static final FieldName levelScore = FieldName.forField("LevelScore");

      static final FieldName nextPackage = FieldName.forField("NextPackage");

      static final FieldName chars = FieldName.forField("Chars");
    }
  }

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

    /**
     * <code>optional uint64 Id = 1;</code>
     */
    private long id;

    /**
     * <code>optional uint32 WorldClass = 3;</code>
     */
    private int worldClass;

    /**
     * <code>optional uint32 HeadIcon = 4;</code>
     */
    private int headIcon;

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

    /**
     * <code>optional uint32 Rank = 6;</code>
     */
    private int rank;

    /**
     * <code>optional uint32 TitlePrefix = 7;</code>
     */
    private int titlePrefix;

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     */
    private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance();

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

    /**
     * <code>repeated .ScoreBossRankTeam Teams = 9;</code>
     */
    private final RepeatedMessage<ScoreBossRankTeam> teams = RepeatedMessage.newEmptyInstance(ScoreBossRankTeam.getFactory());

    /**
     * <code>repeated .HonorInfo Honors = 15;</code>
     */
    private final RepeatedMessage<Public.HonorInfo> honors = RepeatedMessage.newEmptyInstance(Public.HonorInfo.getFactory());

    private ScoreBossRankData() {
    }

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

    /**
     * <code>optional uint64 Id = 1;</code>
     * @return whether the id field is set
     */
    public boolean hasId() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional uint64 Id = 1;</code>
     * @return this
     */
    public ScoreBossRankData clearId() {
      bitField0_ &= ~0x00000001;
      id = 0L;
      return this;
    }

    /**
     * <code>optional uint64 Id = 1;</code>
     * @return the id
     */
    public long getId() {
      return id;
    }

    /**
     * <code>optional uint64 Id = 1;</code>
     * @param value the id to set
     * @return this
     */
    public ScoreBossRankData setId(final long value) {
      bitField0_ |= 0x00000001;
      id = value;
      return this;
    }

    /**
     * <code>optional uint32 WorldClass = 3;</code>
     * @return whether the worldClass field is set
     */
    public boolean hasWorldClass() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional uint32 WorldClass = 3;</code>
     * @return this
     */
    public ScoreBossRankData clearWorldClass() {
      bitField0_ &= ~0x00000002;
      worldClass = 0;
      return this;
    }

    /**
     * <code>optional uint32 WorldClass = 3;</code>
     * @return the worldClass
     */
    public int getWorldClass() {
      return worldClass;
    }

    /**
     * <code>optional uint32 WorldClass = 3;</code>
     * @param value the worldClass to set
     * @return this
     */
    public ScoreBossRankData setWorldClass(final int value) {
      bitField0_ |= 0x00000002;
      worldClass = value;
      return this;
    }

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

    /**
     * <code>optional uint32 HeadIcon = 4;</code>
     * @return this
     */
    public ScoreBossRankData clearHeadIcon() {
      bitField0_ &= ~0x00000004;
      headIcon = 0;
      return this;
    }

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

    /**
     * <code>optional uint32 HeadIcon = 4;</code>
     * @param value the headIcon to set
     * @return this
     */
    public ScoreBossRankData setHeadIcon(final int value) {
      bitField0_ |= 0x00000004;
      headIcon = value;
      return this;
    }

    /**
     * <code>optional uint32 Score = 5;</code>
     * @return whether the score field is set
     */
    public boolean hasScore() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional uint32 Score = 5;</code>
     * @return this
     */
    public ScoreBossRankData clearScore() {
      bitField0_ &= ~0x00000008;
      score = 0;
      return this;
    }

    /**
     * <code>optional uint32 Score = 5;</code>
     * @return the score
     */
    public int getScore() {
      return score;
    }

    /**
     * <code>optional uint32 Score = 5;</code>
     * @param value the score to set
     * @return this
     */
    public ScoreBossRankData setScore(final int value) {
      bitField0_ |= 0x00000008;
      score = value;
      return this;
    }

    /**
     * <code>optional uint32 Rank = 6;</code>
     * @return whether the rank field is set
     */
    public boolean hasRank() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional uint32 Rank = 6;</code>
     * @return this
     */
    public ScoreBossRankData clearRank() {
      bitField0_ &= ~0x00000010;
      rank = 0;
      return this;
    }

    /**
     * <code>optional uint32 Rank = 6;</code>
     * @return the rank
     */
    public int getRank() {
      return rank;
    }

    /**
     * <code>optional uint32 Rank = 6;</code>
     * @param value the rank to set
     * @return this
     */
    public ScoreBossRankData setRank(final int value) {
      bitField0_ |= 0x00000010;
      rank = value;
      return this;
    }

    /**
     * <code>optional uint32 TitlePrefix = 7;</code>
     * @return whether the titlePrefix field is set
     */
    public boolean hasTitlePrefix() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional uint32 TitlePrefix = 7;</code>
     * @return this
     */
    public ScoreBossRankData clearTitlePrefix() {
      bitField0_ &= ~0x00000020;
      titlePrefix = 0;
      return this;
    }

    /**
     * <code>optional uint32 TitlePrefix = 7;</code>
     * @return the titlePrefix
     */
    public int getTitlePrefix() {
      return titlePrefix;
    }

    /**
     * <code>optional uint32 TitlePrefix = 7;</code>
     * @param value the titlePrefix to set
     * @return this
     */
    public ScoreBossRankData setTitlePrefix(final int value) {
      bitField0_ |= 0x00000020;
      titlePrefix = value;
      return this;
    }

    /**
     * <code>optional uint32 TitleSuffix = 8;</code>
     * @return whether the titleSuffix field is set
     */
    public boolean hasTitleSuffix() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>optional uint32 TitleSuffix = 8;</code>
     * @return this
     */
    public ScoreBossRankData clearTitleSuffix() {
      bitField0_ &= ~0x00000040;
      titleSuffix = 0;
      return this;
    }

    /**
     * <code>optional uint32 TitleSuffix = 8;</code>
     * @return the titleSuffix
     */
    public int getTitleSuffix() {
      return titleSuffix;
    }

    /**
     * <code>optional uint32 TitleSuffix = 8;</code>
     * @param value the titleSuffix to set
     * @return this
     */
    public ScoreBossRankData setTitleSuffix(final int value) {
      bitField0_ |= 0x00000040;
      titleSuffix = value;
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return whether the nextPackage field is set
     */
    public boolean hasNextPackage() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public ScoreBossRankData clearNextPackage() {
      bitField0_ &= ~0x00000080;
      nextPackage.clear();
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</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 #getMutableNextPackage()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedByte getNextPackage() {
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</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 RepeatedByte getMutableNextPackage() {
      bitField0_ |= 0x00000080;
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param value the nextPackage to add
     * @return this
     */
    public ScoreBossRankData addNextPackage(final byte value) {
      bitField0_ |= 0x00000080;
      nextPackage.add(value);
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param values the nextPackage to add
     * @return this
     */
    public ScoreBossRankData addAllNextPackage(final byte... values) {
      bitField0_ |= 0x00000080;
      nextPackage.addAll(values);
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @param values the nextPackage to set
     * @return this
     */
    public ScoreBossRankData setNextPackage(final byte... values) {
      bitField0_ |= 0x00000080;
      nextPackage.copyFrom(values);
      return this;
    }

    /**
     * <code>optional string NickName = 2;</code>
     * @return whether the nickName field is set
     */
    public boolean hasNickName() {
      return (bitField0_ & 0x00000100) != 0;
    }

    /**
     * <code>optional string NickName = 2;</code>
     * @return this
     */
    public ScoreBossRankData clearNickName() {
      bitField0_ &= ~0x00000100;
      nickName.clear();
      return this;
    }

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

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

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

    /**
     * <code>optional string NickName = 2;</code>
     * @param value the nickName to set
     * @return this
     */
    public ScoreBossRankData setNickName(final CharSequence value) {
      bitField0_ |= 0x00000100;
      nickName.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string NickName = 2;</code>
     * @param value the nickName to set
     * @return this
     */
    public ScoreBossRankData setNickName(final Utf8String value) {
      bitField0_ |= 0x00000100;
      nickName.copyFrom(value);
      return this;
    }

    /**
     * <code>repeated .ScoreBossRankTeam Teams = 9;</code>
     * @return whether the teams field is set
     */
    public boolean hasTeams() {
      return (bitField0_ & 0x00000200) != 0;
    }

    /**
     * <code>repeated .ScoreBossRankTeam Teams = 9;</code>
     * @return this
     */
    public ScoreBossRankData clearTeams() {
      bitField0_ &= ~0x00000200;
      teams.clear();
      return this;
    }

    /**
     * <code>repeated .ScoreBossRankTeam Teams = 9;</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 #getMutableTeams()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<ScoreBossRankTeam> getTeams() {
      return teams;
    }

    /**
     * <code>repeated .ScoreBossRankTeam Teams = 9;</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<ScoreBossRankTeam> getMutableTeams() {
      bitField0_ |= 0x00000200;
      return teams;
    }

    /**
     * <code>repeated .ScoreBossRankTeam Teams = 9;</code>
     * @param value the teams to add
     * @return this
     */
    public ScoreBossRankData addTeams(final ScoreBossRankTeam value) {
      bitField0_ |= 0x00000200;
      teams.add(value);
      return this;
    }

    /**
     * <code>repeated .ScoreBossRankTeam Teams = 9;</code>
     * @param values the teams to add
     * @return this
     */
    public ScoreBossRankData addAllTeams(final ScoreBossRankTeam... values) {
      bitField0_ |= 0x00000200;
      teams.addAll(values);
      return this;
    }

    /**
     * <code>repeated .HonorInfo Honors = 15;</code>
     * @return whether the honors field is set
     */
    public boolean hasHonors() {
      return (bitField0_ & 0x00000400) != 0;
    }

    /**
     * <code>repeated .HonorInfo Honors = 15;</code>
     * @return this
     */
    public ScoreBossRankData clearHonors() {
      bitField0_ &= ~0x00000400;
      honors.clear();
      return this;
    }

    /**
     * <code>repeated .HonorInfo Honors = 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 #getMutableHonors()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<Public.HonorInfo> getHonors() {
      return honors;
    }

    /**
     * <code>repeated .HonorInfo Honors = 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<Public.HonorInfo> getMutableHonors() {
      bitField0_ |= 0x00000400;
      return honors;
    }

    /**
     * <code>repeated .HonorInfo Honors = 15;</code>
     * @param value the honors to add
     * @return this
     */
    public ScoreBossRankData addHonors(final Public.HonorInfo value) {
      bitField0_ |= 0x00000400;
      honors.add(value);
      return this;
    }

    /**
     * <code>repeated .HonorInfo Honors = 15;</code>
     * @param values the honors to add
     * @return this
     */
    public ScoreBossRankData addAllHonors(final Public.HonorInfo... values) {
      bitField0_ |= 0x00000400;
      honors.addAll(values);
      return this;
    }

    @Override
    public ScoreBossRankData copyFrom(final ScoreBossRankData other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        id = other.id;
        worldClass = other.worldClass;
        headIcon = other.headIcon;
        score = other.score;
        rank = other.rank;
        titlePrefix = other.titlePrefix;
        titleSuffix = other.titleSuffix;
        nextPackage.copyFrom(other.nextPackage);
        nickName.copyFrom(other.nickName);
        teams.copyFrom(other.teams);
        honors.copyFrom(other.honors);
      }
      return this;
    }

    @Override
    public ScoreBossRankData mergeFrom(final ScoreBossRankData other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasId()) {
        setId(other.id);
      }
      if (other.hasWorldClass()) {
        setWorldClass(other.worldClass);
      }
      if (other.hasHeadIcon()) {
        setHeadIcon(other.headIcon);
      }
      if (other.hasScore()) {
        setScore(other.score);
      }
      if (other.hasRank()) {
        setRank(other.rank);
      }
      if (other.hasTitlePrefix()) {
        setTitlePrefix(other.titlePrefix);
      }
      if (other.hasTitleSuffix()) {
        setTitleSuffix(other.titleSuffix);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasNickName()) {
        getMutableNickNameBytes().copyFrom(other.nickName);
      }
      if (other.hasTeams()) {
        getMutableTeams().addAll(other.teams);
      }
      if (other.hasHonors()) {
        getMutableHonors().addAll(other.honors);
      }
      return this;
    }

    @Override
    public ScoreBossRankData clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      id = 0L;
      worldClass = 0;
      headIcon = 0;
      score = 0;
      rank = 0;
      titlePrefix = 0;
      titleSuffix = 0;
      nextPackage.clear();
      nickName.clear();
      teams.clear();
      honors.clear();
      return this;
    }

    @Override
    public ScoreBossRankData clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      nextPackage.clear();
      nickName.clear();
      teams.clearQuick();
      honors.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ScoreBossRankData)) {
        return false;
      }
      ScoreBossRankData other = (ScoreBossRankData) o;
      return bitField0_ == other.bitField0_
        && (!hasId() || id == other.id)
        && (!hasWorldClass() || worldClass == other.worldClass)
        && (!hasHeadIcon() || headIcon == other.headIcon)
        && (!hasScore() || score == other.score)
        && (!hasRank() || rank == other.rank)
        && (!hasTitlePrefix() || titlePrefix == other.titlePrefix)
        && (!hasTitleSuffix() || titleSuffix == other.titleSuffix)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasNickName() || nickName.equals(other.nickName))
        && (!hasTeams() || teams.equals(other.teams))
        && (!hasHonors() || honors.equals(other.honors));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt64NoTag(id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 24);
        output.writeUInt32NoTag(worldClass);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 32);
        output.writeUInt32NoTag(headIcon);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 40);
        output.writeUInt32NoTag(score);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 48);
        output.writeUInt32NoTag(rank);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawByte((byte) 56);
        output.writeUInt32NoTag(titlePrefix);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawByte((byte) 64);
        output.writeUInt32NoTag(titleSuffix);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRawByte((byte) 18);
        output.writeStringNoTag(nickName);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        for (int i = 0; i < teams.length(); i++) {
          output.writeRawByte((byte) 74);
          output.writeMessageNoTag(teams.get(i));
        }
      }
      if ((bitField0_ & 0x00000400) != 0) {
        for (int i = 0; i < honors.length(); i++) {
          output.writeRawByte((byte) 122);
          output.writeMessageNoTag(honors.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt64SizeNoTag(id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(worldClass);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(headIcon);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(score);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(rank);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(titlePrefix);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(titleSuffix);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(nickName);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        size += (1 * teams.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(teams);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        size += (1 * honors.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(honors);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ScoreBossRankData mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8: {
            // id
            id = input.readUInt64();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 24) {
              break;
            }
          }
          case 24: {
            // worldClass
            worldClass = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 32) {
              break;
            }
          }
          case 32: {
            // headIcon
            headIcon = input.readUInt32();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 40) {
              break;
            }
          }
          case 40: {
            // score
            score = input.readUInt32();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 48) {
              break;
            }
          }
          case 48: {
            // rank
            rank = input.readUInt32();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 56) {
              break;
            }
          }
          case 56: {
            // titlePrefix
            titlePrefix = input.readUInt32();
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 64) {
              break;
            }
          }
          case 64: {
            // titleSuffix
            titleSuffix = input.readUInt32();
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000080;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // nickName
            input.readString(nickName);
            bitField0_ |= 0x00000100;
            tag = input.readTag();
            if (tag != 74) {
              break;
            }
          }
          case 74: {
            // teams
            tag = input.readRepeatedMessage(teams, tag);
            bitField0_ |= 0x00000200;
            if (tag != 122) {
              break;
            }
          }
          case 122: {
            // honors
            tag = input.readRepeatedMessage(honors, tag);
            bitField0_ |= 0x00000400;
            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.writeUInt64(FieldNames.id, id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.worldClass, worldClass);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeUInt32(FieldNames.headIcon, headIcon);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeUInt32(FieldNames.score, score);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeUInt32(FieldNames.rank, rank);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeUInt32(FieldNames.titlePrefix, titlePrefix);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeUInt32(FieldNames.titleSuffix, titleSuffix);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeString(FieldNames.nickName, nickName);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeRepeatedMessage(FieldNames.teams, teams);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeRepeatedMessage(FieldNames.honors, honors);
      }
      output.endObject();
    }

    @Override
    public ScoreBossRankData mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 2363: {
            if (input.isAtField(FieldNames.id)) {
              if (!input.trySkipNullValue()) {
                id = input.readUInt64();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1869617882: {
            if (input.isAtField(FieldNames.worldClass)) {
              if (!input.trySkipNullValue()) {
                worldClass = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1051463015: {
            if (input.isAtField(FieldNames.headIcon)) {
              if (!input.trySkipNullValue()) {
                headIcon = input.readUInt32();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 79711858: {
            if (input.isAtField(FieldNames.score)) {
              if (!input.trySkipNullValue()) {
                score = input.readUInt32();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2539596: {
            if (input.isAtField(FieldNames.rank)) {
              if (!input.trySkipNullValue()) {
                rank = input.readUInt32();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2096776938: {
            if (input.isAtField(FieldNames.titlePrefix)) {
              if (!input.trySkipNullValue()) {
                titlePrefix = input.readUInt32();
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2109502551: {
            if (input.isAtField(FieldNames.titleSuffix)) {
              if (!input.trySkipNullValue()) {
                titleSuffix = input.readUInt32();
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 134381742: {
            if (input.isAtField(FieldNames.nickName)) {
              if (!input.trySkipNullValue()) {
                input.readString(nickName);
                bitField0_ |= 0x00000100;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 80681366: {
            if (input.isAtField(FieldNames.teams)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(teams);
                bitField0_ |= 0x00000200;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2127770263: {
            if (input.isAtField(FieldNames.honors)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(honors);
                bitField0_ |= 0x00000400;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum ScoreBossRankDataFactory implements MessageFactory<ScoreBossRankData> {
      INSTANCE;

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

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

      static final FieldName worldClass = FieldName.forField("WorldClass");

      static final FieldName headIcon = FieldName.forField("HeadIcon");

      static final FieldName score = FieldName.forField("Score");

      static final FieldName rank = FieldName.forField("Rank");

      static final FieldName titlePrefix = FieldName.forField("TitlePrefix");

      static final FieldName titleSuffix = FieldName.forField("TitleSuffix");

      static final FieldName nextPackage = FieldName.forField("NextPackage");

      static final FieldName nickName = FieldName.forField("NickName");

      static final FieldName teams = FieldName.forField("Teams");

      static final FieldName honors = FieldName.forField("Honors");
    }
  }
}
