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

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

    /**
     * <code>optional uint64 Checksum = 2;</code>
     */
    private long checksum;

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

    /**
     * <code>repeated .TravelerDuelBattleSample Sample = 1;</code>
     */
    private final RepeatedMessage<TravelerDuelBattleSample> sample = RepeatedMessage.newEmptyInstance(TravelerDuelBattleSample.getFactory());

    private TravelerDuelBattleSamples() {
    }

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

    /**
     * <code>optional uint64 Checksum = 2;</code>
     * @return whether the checksum field is set
     */
    public boolean hasChecksum() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional uint64 Checksum = 2;</code>
     * @return this
     */
    public TravelerDuelBattleSamples clearChecksum() {
      bitField0_ &= ~0x00000001;
      checksum = 0L;
      return this;
    }

    /**
     * <code>optional uint64 Checksum = 2;</code>
     * @return the checksum
     */
    public long getChecksum() {
      return checksum;
    }

    /**
     * <code>optional uint64 Checksum = 2;</code>
     * @param value the checksum to set
     * @return this
     */
    public TravelerDuelBattleSamples setChecksum(final long value) {
      bitField0_ |= 0x00000001;
      checksum = value;
      return this;
    }

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public TravelerDuelBattleSamples clearNextPackage() {
      bitField0_ &= ~0x00000002;
      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_ |= 0x00000002;
      return nextPackage;
    }

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

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

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

    /**
     * <code>repeated .TravelerDuelBattleSample Sample = 1;</code>
     * @return whether the sample field is set
     */
    public boolean hasSample() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>repeated .TravelerDuelBattleSample Sample = 1;</code>
     * @return this
     */
    public TravelerDuelBattleSamples clearSample() {
      bitField0_ &= ~0x00000004;
      sample.clear();
      return this;
    }

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

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

    /**
     * <code>repeated .TravelerDuelBattleSample Sample = 1;</code>
     * @param value the sample to add
     * @return this
     */
    public TravelerDuelBattleSamples addSample(final TravelerDuelBattleSample value) {
      bitField0_ |= 0x00000004;
      sample.add(value);
      return this;
    }

    /**
     * <code>repeated .TravelerDuelBattleSample Sample = 1;</code>
     * @param values the sample to add
     * @return this
     */
    public TravelerDuelBattleSamples addAllSample(final TravelerDuelBattleSample... values) {
      bitField0_ |= 0x00000004;
      sample.addAll(values);
      return this;
    }

    @Override
    public TravelerDuelBattleSamples copyFrom(final TravelerDuelBattleSamples other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        checksum = other.checksum;
        nextPackage.copyFrom(other.nextPackage);
        sample.copyFrom(other.sample);
      }
      return this;
    }

    @Override
    public TravelerDuelBattleSamples mergeFrom(final TravelerDuelBattleSamples other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasChecksum()) {
        setChecksum(other.checksum);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasSample()) {
        getMutableSample().addAll(other.sample);
      }
      return this;
    }

    @Override
    public TravelerDuelBattleSamples clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      checksum = 0L;
      nextPackage.clear();
      sample.clear();
      return this;
    }

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof TravelerDuelBattleSamples)) {
        return false;
      }
      TravelerDuelBattleSamples other = (TravelerDuelBattleSamples) o;
      return bitField0_ == other.bitField0_
        && (!hasChecksum() || checksum == other.checksum)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasSample() || sample.equals(other.sample));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 16);
        output.writeUInt64NoTag(checksum);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        for (int i = 0; i < sample.length(); i++) {
          output.writeRawByte((byte) 10);
          output.writeMessageNoTag(sample.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt64SizeNoTag(checksum);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += (1 * sample.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(sample);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public TravelerDuelBattleSamples mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 16: {
            // checksum
            checksum = input.readUInt64();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 10) {
              break;
            }
          }
          case 10: {
            // sample
            tag = input.readRepeatedMessage(sample, tag);
            bitField0_ |= 0x00000004;
            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.checksum, checksum);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRepeatedMessage(FieldNames.sample, sample);
      }
      output.endObject();
    }

    @Override
    public TravelerDuelBattleSamples mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 1601552483: {
            if (input.isAtField(FieldNames.checksum)) {
              if (!input.trySkipNullValue()) {
                checksum = input.readUInt64();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1825807926: {
            if (input.isAtField(FieldNames.sample)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(sample);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum TravelerDuelBattleSamplesFactory implements MessageFactory<TravelerDuelBattleSamples> {
      INSTANCE;

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

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

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

      static final FieldName sample = FieldName.forField("Sample");
    }
  }

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

    /**
     * <code>optional .TravelerDuelMetaInfo Meta = 1;</code>
     */
    private final TravelerDuelMetaInfo meta = TravelerDuelMetaInfo.newInstance();

    /**
     * <code>optional .TravelerDuelBattleSamples Samples = 2;</code>
     */
    private final TravelerDuelBattleSamples samples = TravelerDuelBattleSamples.newInstance();

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

    private TravelerDuelBattleData() {
    }

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

    /**
     * <code>optional .TravelerDuelMetaInfo Meta = 1;</code>
     * @return whether the meta field is set
     */
    public boolean hasMeta() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional .TravelerDuelMetaInfo Meta = 1;</code>
     * @return this
     */
    public TravelerDuelBattleData clearMeta() {
      bitField0_ &= ~0x00000001;
      meta.clear();
      return this;
    }

    /**
     * <code>optional .TravelerDuelMetaInfo Meta = 1;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableMeta()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public TravelerDuelMetaInfo getMeta() {
      return meta;
    }

    /**
     * <code>optional .TravelerDuelMetaInfo Meta = 1;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public TravelerDuelMetaInfo getMutableMeta() {
      bitField0_ |= 0x00000001;
      return meta;
    }

    /**
     * <code>optional .TravelerDuelMetaInfo Meta = 1;</code>
     * @param value the meta to set
     * @return this
     */
    public TravelerDuelBattleData setMeta(final TravelerDuelMetaInfo value) {
      bitField0_ |= 0x00000001;
      meta.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .TravelerDuelBattleSamples Samples = 2;</code>
     * @return whether the samples field is set
     */
    public boolean hasSamples() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional .TravelerDuelBattleSamples Samples = 2;</code>
     * @return this
     */
    public TravelerDuelBattleData clearSamples() {
      bitField0_ &= ~0x00000002;
      samples.clear();
      return this;
    }

    /**
     * <code>optional .TravelerDuelBattleSamples Samples = 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 #getMutableSamples()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public TravelerDuelBattleSamples getSamples() {
      return samples;
    }

    /**
     * <code>optional .TravelerDuelBattleSamples Samples = 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 TravelerDuelBattleSamples getMutableSamples() {
      bitField0_ |= 0x00000002;
      return samples;
    }

    /**
     * <code>optional .TravelerDuelBattleSamples Samples = 2;</code>
     * @param value the samples to set
     * @return this
     */
    public TravelerDuelBattleData setSamples(final TravelerDuelBattleSamples value) {
      bitField0_ |= 0x00000002;
      samples.copyFrom(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 TravelerDuelBattleData 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 TravelerDuelBattleData 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 TravelerDuelBattleData 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 TravelerDuelBattleData setNextPackage(final byte... values) {
      bitField0_ |= 0x00000004;
      nextPackage.copyFrom(values);
      return this;
    }

    @Override
    public TravelerDuelBattleData copyFrom(final TravelerDuelBattleData other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        meta.copyFrom(other.meta);
        samples.copyFrom(other.samples);
        nextPackage.copyFrom(other.nextPackage);
      }
      return this;
    }

    @Override
    public TravelerDuelBattleData mergeFrom(final TravelerDuelBattleData other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasMeta()) {
        getMutableMeta().mergeFrom(other.meta);
      }
      if (other.hasSamples()) {
        getMutableSamples().mergeFrom(other.samples);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      return this;
    }

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

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof TravelerDuelBattleData)) {
        return false;
      }
      TravelerDuelBattleData other = (TravelerDuelBattleData) o;
      return bitField0_ == other.bitField0_
        && (!hasMeta() || meta.equals(other.meta))
        && (!hasSamples() || samples.equals(other.samples))
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 10);
        output.writeMessageNoTag(meta);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 18);
        output.writeMessageNoTag(samples);
      }
      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.computeMessageSizeNoTag(meta);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(samples);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public TravelerDuelBattleData mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 10: {
            // meta
            input.readMessage(meta);
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // samples
            input.readMessage(samples);
            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.writeMessage(FieldNames.meta, meta);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeMessage(FieldNames.samples, samples);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      output.endObject();
    }

    @Override
    public TravelerDuelBattleData mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 2394661: {
            if (input.isAtField(FieldNames.meta)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(meta);
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -765470743: {
            if (input.isAtField(FieldNames.samples)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(samples);
                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 TravelerDuelBattleData clone() {
      return new TravelerDuelBattleData().copyFrom(this);
    }

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

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

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

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

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

    private enum TravelerDuelBattleDataFactory implements MessageFactory<TravelerDuelBattleData> {
      INSTANCE;

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

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

      static final FieldName samples = FieldName.forField("Samples");

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

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

    /**
     * <code>optional int64 Time = 10;</code>
     */
    private long time;

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

    /**
     * <code>optional uint64 PlayerId = 6;</code>
     */
    private long playerId;

    /**
     * <code>optional uint32 Version = 2;</code>
     */
    private int version;

    /**
     * <code>optional uint32 MissionId = 4;</code>
     */
    private int missionId;

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

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

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

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

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

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

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

    private TravelerDuelMetaInfo() {
    }

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

    /**
     * <code>optional int64 Time = 10;</code>
     * @return whether the time field is set
     */
    public boolean hasTime() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional int64 Time = 10;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearTime() {
      bitField0_ &= ~0x00000001;
      time = 0L;
      return this;
    }

    /**
     * <code>optional int64 Time = 10;</code>
     * @return the time
     */
    public long getTime() {
      return time;
    }

    /**
     * <code>optional int64 Time = 10;</code>
     * @param value the time to set
     * @return this
     */
    public TravelerDuelMetaInfo setTime(final long value) {
      bitField0_ |= 0x00000001;
      time = value;
      return this;
    }

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

    /**
     * <code>optional uint64 Id = 1;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearId() {
      bitField0_ &= ~0x00000002;
      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 TravelerDuelMetaInfo setId(final long value) {
      bitField0_ |= 0x00000002;
      id = value;
      return this;
    }

    /**
     * <code>optional uint64 PlayerId = 6;</code>
     * @return whether the playerId field is set
     */
    public boolean hasPlayerId() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional uint64 PlayerId = 6;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearPlayerId() {
      bitField0_ &= ~0x00000004;
      playerId = 0L;
      return this;
    }

    /**
     * <code>optional uint64 PlayerId = 6;</code>
     * @return the playerId
     */
    public long getPlayerId() {
      return playerId;
    }

    /**
     * <code>optional uint64 PlayerId = 6;</code>
     * @param value the playerId to set
     * @return this
     */
    public TravelerDuelMetaInfo setPlayerId(final long value) {
      bitField0_ |= 0x00000004;
      playerId = value;
      return this;
    }

    /**
     * <code>optional uint32 Version = 2;</code>
     * @return whether the version field is set
     */
    public boolean hasVersion() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional uint32 Version = 2;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearVersion() {
      bitField0_ &= ~0x00000008;
      version = 0;
      return this;
    }

    /**
     * <code>optional uint32 Version = 2;</code>
     * @return the version
     */
    public int getVersion() {
      return version;
    }

    /**
     * <code>optional uint32 Version = 2;</code>
     * @param value the version to set
     * @return this
     */
    public TravelerDuelMetaInfo setVersion(final int value) {
      bitField0_ |= 0x00000008;
      version = value;
      return this;
    }

    /**
     * <code>optional uint32 MissionId = 4;</code>
     * @return whether the missionId field is set
     */
    public boolean hasMissionId() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional uint32 MissionId = 4;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearMissionId() {
      bitField0_ &= ~0x00000010;
      missionId = 0;
      return this;
    }

    /**
     * <code>optional uint32 MissionId = 4;</code>
     * @return the missionId
     */
    public int getMissionId() {
      return missionId;
    }

    /**
     * <code>optional uint32 MissionId = 4;</code>
     * @param value the missionId to set
     * @return this
     */
    public TravelerDuelMetaInfo setMissionId(final int value) {
      bitField0_ |= 0x00000010;
      missionId = value;
      return this;
    }

    /**
     * <code>optional uint32 Season = 5;</code>
     * @return whether the season field is set
     */
    public boolean hasSeason() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional uint32 Season = 5;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearSeason() {
      bitField0_ &= ~0x00000020;
      season = 0;
      return this;
    }

    /**
     * <code>optional uint32 Season = 5;</code>
     * @return the season
     */
    public int getSeason() {
      return season;
    }

    /**
     * <code>optional uint32 Season = 5;</code>
     * @param value the season to set
     * @return this
     */
    public TravelerDuelMetaInfo setSeason(final int value) {
      bitField0_ |= 0x00000020;
      season = value;
      return this;
    }

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

    /**
     * <code>optional uint32 Duration = 8;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearDuration() {
      bitField0_ &= ~0x00000040;
      duration = 0;
      return this;
    }

    /**
     * <code>optional uint32 Duration = 8;</code>
     * @return the duration
     */
    public int getDuration() {
      return duration;
    }

    /**
     * <code>optional uint32 Duration = 8;</code>
     * @param value the duration to set
     * @return this
     */
    public TravelerDuelMetaInfo setDuration(final int value) {
      bitField0_ |= 0x00000040;
      duration = value;
      return this;
    }

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

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

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

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

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

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

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

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

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearNextPackage() {
      bitField0_ &= ~0x00000200;
      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_ |= 0x00000200;
      return nextPackage;
    }

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

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

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

    /**
     * <code>optional string Zone = 3;</code>
     * @return whether the zone field is set
     */
    public boolean hasZone() {
      return (bitField0_ & 0x00000400) != 0;
    }

    /**
     * <code>optional string Zone = 3;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearZone() {
      bitField0_ &= ~0x00000400;
      zone.clear();
      return this;
    }

    /**
     * <code>optional string Zone = 3;</code>
     * @return the zone
     */
    public String getZone() {
      return zone.getString();
    }

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

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

    /**
     * <code>optional string Zone = 3;</code>
     * @param value the zone to set
     * @return this
     */
    public TravelerDuelMetaInfo setZone(final CharSequence value) {
      bitField0_ |= 0x00000400;
      zone.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string Zone = 3;</code>
     * @param value the zone to set
     * @return this
     */
    public TravelerDuelMetaInfo setZone(final Utf8String value) {
      bitField0_ |= 0x00000400;
      zone.copyFrom(value);
      return this;
    }

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

    /**
     * <code>optional string Nickname = 7;</code>
     * @return this
     */
    public TravelerDuelMetaInfo clearNickname() {
      bitField0_ &= ~0x00000800;
      nickname.clear();
      return this;
    }

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

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

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

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

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

    @Override
    public TravelerDuelMetaInfo copyFrom(final TravelerDuelMetaInfo other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        time = other.time;
        id = other.id;
        playerId = other.playerId;
        version = other.version;
        missionId = other.missionId;
        season = other.season;
        duration = other.duration;
        rank = other.rank;
        score = other.score;
        nextPackage.copyFrom(other.nextPackage);
        zone.copyFrom(other.zone);
        nickname.copyFrom(other.nickname);
      }
      return this;
    }

    @Override
    public TravelerDuelMetaInfo mergeFrom(final TravelerDuelMetaInfo other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasTime()) {
        setTime(other.time);
      }
      if (other.hasId()) {
        setId(other.id);
      }
      if (other.hasPlayerId()) {
        setPlayerId(other.playerId);
      }
      if (other.hasVersion()) {
        setVersion(other.version);
      }
      if (other.hasMissionId()) {
        setMissionId(other.missionId);
      }
      if (other.hasSeason()) {
        setSeason(other.season);
      }
      if (other.hasDuration()) {
        setDuration(other.duration);
      }
      if (other.hasRank()) {
        setRank(other.rank);
      }
      if (other.hasScore()) {
        setScore(other.score);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasZone()) {
        getMutableZoneBytes().copyFrom(other.zone);
      }
      if (other.hasNickname()) {
        getMutableNicknameBytes().copyFrom(other.nickname);
      }
      return this;
    }

    @Override
    public TravelerDuelMetaInfo clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      time = 0L;
      id = 0L;
      playerId = 0L;
      version = 0;
      missionId = 0;
      season = 0;
      duration = 0;
      rank = 0;
      score = 0;
      nextPackage.clear();
      zone.clear();
      nickname.clear();
      return this;
    }

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof TravelerDuelMetaInfo)) {
        return false;
      }
      TravelerDuelMetaInfo other = (TravelerDuelMetaInfo) o;
      return bitField0_ == other.bitField0_
        && (!hasTime() || time == other.time)
        && (!hasId() || id == other.id)
        && (!hasPlayerId() || playerId == other.playerId)
        && (!hasVersion() || version == other.version)
        && (!hasMissionId() || missionId == other.missionId)
        && (!hasSeason() || season == other.season)
        && (!hasDuration() || duration == other.duration)
        && (!hasRank() || rank == other.rank)
        && (!hasScore() || score == other.score)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasZone() || zone.equals(other.zone))
        && (!hasNickname() || nickname.equals(other.nickname));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 80);
        output.writeInt64NoTag(time);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt64NoTag(id);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 48);
        output.writeUInt64NoTag(playerId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 16);
        output.writeUInt32NoTag(version);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 32);
        output.writeUInt32NoTag(missionId);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawByte((byte) 40);
        output.writeUInt32NoTag(season);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawByte((byte) 64);
        output.writeUInt32NoTag(duration);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRawByte((byte) 72);
        output.writeUInt32NoTag(rank);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRawByte((byte) 88);
        output.writeUInt32NoTag(score);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeRawByte((byte) 26);
        output.writeStringNoTag(zone);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeRawByte((byte) 58);
        output.writeStringNoTag(nickname);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeInt64SizeNoTag(time);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt64SizeNoTag(id);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeUInt64SizeNoTag(playerId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(version);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(missionId);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(season);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(duration);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(rank);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(score);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(zone);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(nickname);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public TravelerDuelMetaInfo mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 80: {
            // time
            time = input.readInt64();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 8) {
              break;
            }
          }
          case 8: {
            // id
            id = input.readUInt64();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 48) {
              break;
            }
          }
          case 48: {
            // playerId
            playerId = input.readUInt64();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 16) {
              break;
            }
          }
          case 16: {
            // version
            version = input.readUInt32();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 32) {
              break;
            }
          }
          case 32: {
            // missionId
            missionId = input.readUInt32();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 40) {
              break;
            }
          }
          case 40: {
            // season
            season = input.readUInt32();
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 64) {
              break;
            }
          }
          case 64: {
            // duration
            duration = input.readUInt32();
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 72) {
              break;
            }
          }
          case 72: {
            // rank
            rank = input.readUInt32();
            bitField0_ |= 0x00000080;
            tag = input.readTag();
            if (tag != 88) {
              break;
            }
          }
          case 88: {
            // score
            score = input.readUInt32();
            bitField0_ |= 0x00000100;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000200;
            tag = input.readTag();
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // zone
            input.readString(zone);
            bitField0_ |= 0x00000400;
            tag = input.readTag();
            if (tag != 58) {
              break;
            }
          }
          case 58: {
            // nickname
            input.readString(nickname);
            bitField0_ |= 0x00000800;
            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.writeInt64(FieldNames.time, time);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt64(FieldNames.id, id);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeUInt64(FieldNames.playerId, playerId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeUInt32(FieldNames.version, version);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeUInt32(FieldNames.missionId, missionId);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeUInt32(FieldNames.season, season);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeUInt32(FieldNames.duration, duration);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeUInt32(FieldNames.rank, rank);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeUInt32(FieldNames.score, score);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeString(FieldNames.zone, zone);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeString(FieldNames.nickname, nickname);
      }
      output.endObject();
    }

    @Override
    public TravelerDuelMetaInfo mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 2606829: {
            if (input.isAtField(FieldNames.time)) {
              if (!input.trySkipNullValue()) {
                time = input.readInt64();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2363: {
            if (input.isAtField(FieldNames.id)) {
              if (!input.trySkipNullValue()) {
                id = input.readUInt64();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1943917564: {
            if (input.isAtField(FieldNames.playerId)) {
              if (!input.trySkipNullValue()) {
                playerId = input.readUInt64();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2016261304: {
            if (input.isAtField(FieldNames.version)) {
              if (!input.trySkipNullValue()) {
                version = input.readUInt32();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1047103577: {
            if (input.isAtField(FieldNames.missionId)) {
              if (!input.trySkipNullValue()) {
                missionId = input.readUInt32();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1822468349: {
            if (input.isAtField(FieldNames.season)) {
              if (!input.trySkipNullValue()) {
                season = input.readUInt32();
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1927368268: {
            if (input.isAtField(FieldNames.duration)) {
              if (!input.trySkipNullValue()) {
                duration = input.readUInt32();
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2539596: {
            if (input.isAtField(FieldNames.rank)) {
              if (!input.trySkipNullValue()) {
                rank = input.readUInt32();
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 79711858: {
            if (input.isAtField(FieldNames.score)) {
              if (!input.trySkipNullValue()) {
                score = input.readUInt32();
                bitField0_ |= 0x00000100;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00000200;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2791372: {
            if (input.isAtField(FieldNames.zone)) {
              if (!input.trySkipNullValue()) {
                input.readString(zone);
                bitField0_ |= 0x00000400;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 135335054: {
            if (input.isAtField(FieldNames.nickname)) {
              if (!input.trySkipNullValue()) {
                input.readString(nickname);
                bitField0_ |= 0x00000800;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum TravelerDuelMetaInfoFactory implements MessageFactory<TravelerDuelMetaInfo> {
      INSTANCE;

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

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

      static final FieldName id = FieldName.forField("Id");

      static final FieldName playerId = FieldName.forField("PlayerId");

      static final FieldName version = FieldName.forField("Version");

      static final FieldName missionId = FieldName.forField("MissionId");

      static final FieldName season = FieldName.forField("Season");

      static final FieldName duration = FieldName.forField("Duration");

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

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

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

      static final FieldName zone = FieldName.forField("Zone");

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

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

    /**
     * <code>optional float FromPerkIntensityRatio = 2;</code>
     */
    private float fromPerkIntensityRatio;

    /**
     * <code>optional float FromSlotDmgRatio = 3;</code>
     */
    private float fromSlotDmgRatio;

    /**
     * <code>optional float FromEE = 4;</code>
     */
    private float fromEE;

    /**
     * <code>optional float FromGenDmgRatio = 5;</code>
     */
    private float fromGenDmgRatio;

    /**
     * <code>optional float FromCritRatio = 7;</code>
     */
    private float fromCritRatio;

    /**
     * <code>optional float FromFinalDmgRatio = 8;</code>
     */
    private float fromFinalDmgRatio;

    /**
     * <code>optional float ToErAmend = 10;</code>
     */
    private float toErAmend;

    /**
     * <code>optional float ToDefAmend = 11;</code>
     */
    private float toDefAmend;

    /**
     * <code>optional float ToRcdSlotDmgRatio = 12;</code>
     */
    private float toRcdSlotDmgRatio;

    /**
     * <code>optional float ToEERCD = 13;</code>
     */
    private float toEERCD;

    /**
     * <code>optional float ToGenDmgRcdRatio = 14;</code>
     */
    private float toGenDmgRcdRatio;

    /**
     * <code>optional float ToDmgPlusRcd = 15;</code>
     */
    private float toDmgPlusRcd;

    /**
     * <code>optional float CritRate = 17;</code>
     */
    private float critRate;

    /**
     * <code>optional int32 FromSrcAtk = 1;</code>
     */
    private int fromSrcAtk;

    /**
     * <code>optional int32 FromDmgPlus = 6;</code>
     */
    private int fromDmgPlus;

    /**
     * <code>optional int32 FromFinalDmgPlus = 9;</code>
     */
    private int fromFinalDmgPlus;

    /**
     * <code>optional int32 Dmg = 16;</code>
     */
    private int dmg;

    /**
     * <code>optional int32 Hp = 18;</code>
     */
    private int hp;

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

    private TravelerDuelBattleSample() {
    }

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

    /**
     * <code>optional float FromPerkIntensityRatio = 2;</code>
     * @return whether the fromPerkIntensityRatio field is set
     */
    public boolean hasFromPerkIntensityRatio() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional float FromPerkIntensityRatio = 2;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearFromPerkIntensityRatio() {
      bitField0_ &= ~0x00000001;
      fromPerkIntensityRatio = 0F;
      return this;
    }

    /**
     * <code>optional float FromPerkIntensityRatio = 2;</code>
     * @return the fromPerkIntensityRatio
     */
    public float getFromPerkIntensityRatio() {
      return fromPerkIntensityRatio;
    }

    /**
     * <code>optional float FromPerkIntensityRatio = 2;</code>
     * @param value the fromPerkIntensityRatio to set
     * @return this
     */
    public TravelerDuelBattleSample setFromPerkIntensityRatio(final float value) {
      bitField0_ |= 0x00000001;
      fromPerkIntensityRatio = value;
      return this;
    }

    /**
     * <code>optional float FromSlotDmgRatio = 3;</code>
     * @return whether the fromSlotDmgRatio field is set
     */
    public boolean hasFromSlotDmgRatio() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional float FromSlotDmgRatio = 3;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearFromSlotDmgRatio() {
      bitField0_ &= ~0x00000002;
      fromSlotDmgRatio = 0F;
      return this;
    }

    /**
     * <code>optional float FromSlotDmgRatio = 3;</code>
     * @return the fromSlotDmgRatio
     */
    public float getFromSlotDmgRatio() {
      return fromSlotDmgRatio;
    }

    /**
     * <code>optional float FromSlotDmgRatio = 3;</code>
     * @param value the fromSlotDmgRatio to set
     * @return this
     */
    public TravelerDuelBattleSample setFromSlotDmgRatio(final float value) {
      bitField0_ |= 0x00000002;
      fromSlotDmgRatio = value;
      return this;
    }

    /**
     * <code>optional float FromEE = 4;</code>
     * @return whether the fromEE field is set
     */
    public boolean hasFromEE() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional float FromEE = 4;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearFromEE() {
      bitField0_ &= ~0x00000004;
      fromEE = 0F;
      return this;
    }

    /**
     * <code>optional float FromEE = 4;</code>
     * @return the fromEE
     */
    public float getFromEE() {
      return fromEE;
    }

    /**
     * <code>optional float FromEE = 4;</code>
     * @param value the fromEE to set
     * @return this
     */
    public TravelerDuelBattleSample setFromEE(final float value) {
      bitField0_ |= 0x00000004;
      fromEE = value;
      return this;
    }

    /**
     * <code>optional float FromGenDmgRatio = 5;</code>
     * @return whether the fromGenDmgRatio field is set
     */
    public boolean hasFromGenDmgRatio() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional float FromGenDmgRatio = 5;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearFromGenDmgRatio() {
      bitField0_ &= ~0x00000008;
      fromGenDmgRatio = 0F;
      return this;
    }

    /**
     * <code>optional float FromGenDmgRatio = 5;</code>
     * @return the fromGenDmgRatio
     */
    public float getFromGenDmgRatio() {
      return fromGenDmgRatio;
    }

    /**
     * <code>optional float FromGenDmgRatio = 5;</code>
     * @param value the fromGenDmgRatio to set
     * @return this
     */
    public TravelerDuelBattleSample setFromGenDmgRatio(final float value) {
      bitField0_ |= 0x00000008;
      fromGenDmgRatio = value;
      return this;
    }

    /**
     * <code>optional float FromCritRatio = 7;</code>
     * @return whether the fromCritRatio field is set
     */
    public boolean hasFromCritRatio() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional float FromCritRatio = 7;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearFromCritRatio() {
      bitField0_ &= ~0x00000010;
      fromCritRatio = 0F;
      return this;
    }

    /**
     * <code>optional float FromCritRatio = 7;</code>
     * @return the fromCritRatio
     */
    public float getFromCritRatio() {
      return fromCritRatio;
    }

    /**
     * <code>optional float FromCritRatio = 7;</code>
     * @param value the fromCritRatio to set
     * @return this
     */
    public TravelerDuelBattleSample setFromCritRatio(final float value) {
      bitField0_ |= 0x00000010;
      fromCritRatio = value;
      return this;
    }

    /**
     * <code>optional float FromFinalDmgRatio = 8;</code>
     * @return whether the fromFinalDmgRatio field is set
     */
    public boolean hasFromFinalDmgRatio() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional float FromFinalDmgRatio = 8;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearFromFinalDmgRatio() {
      bitField0_ &= ~0x00000020;
      fromFinalDmgRatio = 0F;
      return this;
    }

    /**
     * <code>optional float FromFinalDmgRatio = 8;</code>
     * @return the fromFinalDmgRatio
     */
    public float getFromFinalDmgRatio() {
      return fromFinalDmgRatio;
    }

    /**
     * <code>optional float FromFinalDmgRatio = 8;</code>
     * @param value the fromFinalDmgRatio to set
     * @return this
     */
    public TravelerDuelBattleSample setFromFinalDmgRatio(final float value) {
      bitField0_ |= 0x00000020;
      fromFinalDmgRatio = value;
      return this;
    }

    /**
     * <code>optional float ToErAmend = 10;</code>
     * @return whether the toErAmend field is set
     */
    public boolean hasToErAmend() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>optional float ToErAmend = 10;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearToErAmend() {
      bitField0_ &= ~0x00000040;
      toErAmend = 0F;
      return this;
    }

    /**
     * <code>optional float ToErAmend = 10;</code>
     * @return the toErAmend
     */
    public float getToErAmend() {
      return toErAmend;
    }

    /**
     * <code>optional float ToErAmend = 10;</code>
     * @param value the toErAmend to set
     * @return this
     */
    public TravelerDuelBattleSample setToErAmend(final float value) {
      bitField0_ |= 0x00000040;
      toErAmend = value;
      return this;
    }

    /**
     * <code>optional float ToDefAmend = 11;</code>
     * @return whether the toDefAmend field is set
     */
    public boolean hasToDefAmend() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>optional float ToDefAmend = 11;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearToDefAmend() {
      bitField0_ &= ~0x00000080;
      toDefAmend = 0F;
      return this;
    }

    /**
     * <code>optional float ToDefAmend = 11;</code>
     * @return the toDefAmend
     */
    public float getToDefAmend() {
      return toDefAmend;
    }

    /**
     * <code>optional float ToDefAmend = 11;</code>
     * @param value the toDefAmend to set
     * @return this
     */
    public TravelerDuelBattleSample setToDefAmend(final float value) {
      bitField0_ |= 0x00000080;
      toDefAmend = value;
      return this;
    }

    /**
     * <code>optional float ToRcdSlotDmgRatio = 12;</code>
     * @return whether the toRcdSlotDmgRatio field is set
     */
    public boolean hasToRcdSlotDmgRatio() {
      return (bitField0_ & 0x00000100) != 0;
    }

    /**
     * <code>optional float ToRcdSlotDmgRatio = 12;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearToRcdSlotDmgRatio() {
      bitField0_ &= ~0x00000100;
      toRcdSlotDmgRatio = 0F;
      return this;
    }

    /**
     * <code>optional float ToRcdSlotDmgRatio = 12;</code>
     * @return the toRcdSlotDmgRatio
     */
    public float getToRcdSlotDmgRatio() {
      return toRcdSlotDmgRatio;
    }

    /**
     * <code>optional float ToRcdSlotDmgRatio = 12;</code>
     * @param value the toRcdSlotDmgRatio to set
     * @return this
     */
    public TravelerDuelBattleSample setToRcdSlotDmgRatio(final float value) {
      bitField0_ |= 0x00000100;
      toRcdSlotDmgRatio = value;
      return this;
    }

    /**
     * <code>optional float ToEERCD = 13;</code>
     * @return whether the toEERCD field is set
     */
    public boolean hasToEERCD() {
      return (bitField0_ & 0x00000200) != 0;
    }

    /**
     * <code>optional float ToEERCD = 13;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearToEERCD() {
      bitField0_ &= ~0x00000200;
      toEERCD = 0F;
      return this;
    }

    /**
     * <code>optional float ToEERCD = 13;</code>
     * @return the toEERCD
     */
    public float getToEERCD() {
      return toEERCD;
    }

    /**
     * <code>optional float ToEERCD = 13;</code>
     * @param value the toEERCD to set
     * @return this
     */
    public TravelerDuelBattleSample setToEERCD(final float value) {
      bitField0_ |= 0x00000200;
      toEERCD = value;
      return this;
    }

    /**
     * <code>optional float ToGenDmgRcdRatio = 14;</code>
     * @return whether the toGenDmgRcdRatio field is set
     */
    public boolean hasToGenDmgRcdRatio() {
      return (bitField0_ & 0x00000400) != 0;
    }

    /**
     * <code>optional float ToGenDmgRcdRatio = 14;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearToGenDmgRcdRatio() {
      bitField0_ &= ~0x00000400;
      toGenDmgRcdRatio = 0F;
      return this;
    }

    /**
     * <code>optional float ToGenDmgRcdRatio = 14;</code>
     * @return the toGenDmgRcdRatio
     */
    public float getToGenDmgRcdRatio() {
      return toGenDmgRcdRatio;
    }

    /**
     * <code>optional float ToGenDmgRcdRatio = 14;</code>
     * @param value the toGenDmgRcdRatio to set
     * @return this
     */
    public TravelerDuelBattleSample setToGenDmgRcdRatio(final float value) {
      bitField0_ |= 0x00000400;
      toGenDmgRcdRatio = value;
      return this;
    }

    /**
     * <code>optional float ToDmgPlusRcd = 15;</code>
     * @return whether the toDmgPlusRcd field is set
     */
    public boolean hasToDmgPlusRcd() {
      return (bitField0_ & 0x00000800) != 0;
    }

    /**
     * <code>optional float ToDmgPlusRcd = 15;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearToDmgPlusRcd() {
      bitField0_ &= ~0x00000800;
      toDmgPlusRcd = 0F;
      return this;
    }

    /**
     * <code>optional float ToDmgPlusRcd = 15;</code>
     * @return the toDmgPlusRcd
     */
    public float getToDmgPlusRcd() {
      return toDmgPlusRcd;
    }

    /**
     * <code>optional float ToDmgPlusRcd = 15;</code>
     * @param value the toDmgPlusRcd to set
     * @return this
     */
    public TravelerDuelBattleSample setToDmgPlusRcd(final float value) {
      bitField0_ |= 0x00000800;
      toDmgPlusRcd = value;
      return this;
    }

    /**
     * <code>optional float CritRate = 17;</code>
     * @return whether the critRate field is set
     */
    public boolean hasCritRate() {
      return (bitField0_ & 0x00001000) != 0;
    }

    /**
     * <code>optional float CritRate = 17;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearCritRate() {
      bitField0_ &= ~0x00001000;
      critRate = 0F;
      return this;
    }

    /**
     * <code>optional float CritRate = 17;</code>
     * @return the critRate
     */
    public float getCritRate() {
      return critRate;
    }

    /**
     * <code>optional float CritRate = 17;</code>
     * @param value the critRate to set
     * @return this
     */
    public TravelerDuelBattleSample setCritRate(final float value) {
      bitField0_ |= 0x00001000;
      critRate = value;
      return this;
    }

    /**
     * <code>optional int32 FromSrcAtk = 1;</code>
     * @return whether the fromSrcAtk field is set
     */
    public boolean hasFromSrcAtk() {
      return (bitField0_ & 0x00002000) != 0;
    }

    /**
     * <code>optional int32 FromSrcAtk = 1;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearFromSrcAtk() {
      bitField0_ &= ~0x00002000;
      fromSrcAtk = 0;
      return this;
    }

    /**
     * <code>optional int32 FromSrcAtk = 1;</code>
     * @return the fromSrcAtk
     */
    public int getFromSrcAtk() {
      return fromSrcAtk;
    }

    /**
     * <code>optional int32 FromSrcAtk = 1;</code>
     * @param value the fromSrcAtk to set
     * @return this
     */
    public TravelerDuelBattleSample setFromSrcAtk(final int value) {
      bitField0_ |= 0x00002000;
      fromSrcAtk = value;
      return this;
    }

    /**
     * <code>optional int32 FromDmgPlus = 6;</code>
     * @return whether the fromDmgPlus field is set
     */
    public boolean hasFromDmgPlus() {
      return (bitField0_ & 0x00004000) != 0;
    }

    /**
     * <code>optional int32 FromDmgPlus = 6;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearFromDmgPlus() {
      bitField0_ &= ~0x00004000;
      fromDmgPlus = 0;
      return this;
    }

    /**
     * <code>optional int32 FromDmgPlus = 6;</code>
     * @return the fromDmgPlus
     */
    public int getFromDmgPlus() {
      return fromDmgPlus;
    }

    /**
     * <code>optional int32 FromDmgPlus = 6;</code>
     * @param value the fromDmgPlus to set
     * @return this
     */
    public TravelerDuelBattleSample setFromDmgPlus(final int value) {
      bitField0_ |= 0x00004000;
      fromDmgPlus = value;
      return this;
    }

    /**
     * <code>optional int32 FromFinalDmgPlus = 9;</code>
     * @return whether the fromFinalDmgPlus field is set
     */
    public boolean hasFromFinalDmgPlus() {
      return (bitField0_ & 0x00008000) != 0;
    }

    /**
     * <code>optional int32 FromFinalDmgPlus = 9;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearFromFinalDmgPlus() {
      bitField0_ &= ~0x00008000;
      fromFinalDmgPlus = 0;
      return this;
    }

    /**
     * <code>optional int32 FromFinalDmgPlus = 9;</code>
     * @return the fromFinalDmgPlus
     */
    public int getFromFinalDmgPlus() {
      return fromFinalDmgPlus;
    }

    /**
     * <code>optional int32 FromFinalDmgPlus = 9;</code>
     * @param value the fromFinalDmgPlus to set
     * @return this
     */
    public TravelerDuelBattleSample setFromFinalDmgPlus(final int value) {
      bitField0_ |= 0x00008000;
      fromFinalDmgPlus = value;
      return this;
    }

    /**
     * <code>optional int32 Dmg = 16;</code>
     * @return whether the dmg field is set
     */
    public boolean hasDmg() {
      return (bitField0_ & 0x00010000) != 0;
    }

    /**
     * <code>optional int32 Dmg = 16;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearDmg() {
      bitField0_ &= ~0x00010000;
      dmg = 0;
      return this;
    }

    /**
     * <code>optional int32 Dmg = 16;</code>
     * @return the dmg
     */
    public int getDmg() {
      return dmg;
    }

    /**
     * <code>optional int32 Dmg = 16;</code>
     * @param value the dmg to set
     * @return this
     */
    public TravelerDuelBattleSample setDmg(final int value) {
      bitField0_ |= 0x00010000;
      dmg = value;
      return this;
    }

    /**
     * <code>optional int32 Hp = 18;</code>
     * @return whether the hp field is set
     */
    public boolean hasHp() {
      return (bitField0_ & 0x00020000) != 0;
    }

    /**
     * <code>optional int32 Hp = 18;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearHp() {
      bitField0_ &= ~0x00020000;
      hp = 0;
      return this;
    }

    /**
     * <code>optional int32 Hp = 18;</code>
     * @return the hp
     */
    public int getHp() {
      return hp;
    }

    /**
     * <code>optional int32 Hp = 18;</code>
     * @param value the hp to set
     * @return this
     */
    public TravelerDuelBattleSample setHp(final int value) {
      bitField0_ |= 0x00020000;
      hp = value;
      return this;
    }

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public TravelerDuelBattleSample clearNextPackage() {
      bitField0_ &= ~0x00040000;
      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_ |= 0x00040000;
      return nextPackage;
    }

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

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

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

    @Override
    public TravelerDuelBattleSample copyFrom(final TravelerDuelBattleSample other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        fromPerkIntensityRatio = other.fromPerkIntensityRatio;
        fromSlotDmgRatio = other.fromSlotDmgRatio;
        fromEE = other.fromEE;
        fromGenDmgRatio = other.fromGenDmgRatio;
        fromCritRatio = other.fromCritRatio;
        fromFinalDmgRatio = other.fromFinalDmgRatio;
        toErAmend = other.toErAmend;
        toDefAmend = other.toDefAmend;
        toRcdSlotDmgRatio = other.toRcdSlotDmgRatio;
        toEERCD = other.toEERCD;
        toGenDmgRcdRatio = other.toGenDmgRcdRatio;
        toDmgPlusRcd = other.toDmgPlusRcd;
        critRate = other.critRate;
        fromSrcAtk = other.fromSrcAtk;
        fromDmgPlus = other.fromDmgPlus;
        fromFinalDmgPlus = other.fromFinalDmgPlus;
        dmg = other.dmg;
        hp = other.hp;
        nextPackage.copyFrom(other.nextPackage);
      }
      return this;
    }

    @Override
    public TravelerDuelBattleSample mergeFrom(final TravelerDuelBattleSample other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasFromPerkIntensityRatio()) {
        setFromPerkIntensityRatio(other.fromPerkIntensityRatio);
      }
      if (other.hasFromSlotDmgRatio()) {
        setFromSlotDmgRatio(other.fromSlotDmgRatio);
      }
      if (other.hasFromEE()) {
        setFromEE(other.fromEE);
      }
      if (other.hasFromGenDmgRatio()) {
        setFromGenDmgRatio(other.fromGenDmgRatio);
      }
      if (other.hasFromCritRatio()) {
        setFromCritRatio(other.fromCritRatio);
      }
      if (other.hasFromFinalDmgRatio()) {
        setFromFinalDmgRatio(other.fromFinalDmgRatio);
      }
      if (other.hasToErAmend()) {
        setToErAmend(other.toErAmend);
      }
      if (other.hasToDefAmend()) {
        setToDefAmend(other.toDefAmend);
      }
      if (other.hasToRcdSlotDmgRatio()) {
        setToRcdSlotDmgRatio(other.toRcdSlotDmgRatio);
      }
      if (other.hasToEERCD()) {
        setToEERCD(other.toEERCD);
      }
      if (other.hasToGenDmgRcdRatio()) {
        setToGenDmgRcdRatio(other.toGenDmgRcdRatio);
      }
      if (other.hasToDmgPlusRcd()) {
        setToDmgPlusRcd(other.toDmgPlusRcd);
      }
      if (other.hasCritRate()) {
        setCritRate(other.critRate);
      }
      if (other.hasFromSrcAtk()) {
        setFromSrcAtk(other.fromSrcAtk);
      }
      if (other.hasFromDmgPlus()) {
        setFromDmgPlus(other.fromDmgPlus);
      }
      if (other.hasFromFinalDmgPlus()) {
        setFromFinalDmgPlus(other.fromFinalDmgPlus);
      }
      if (other.hasDmg()) {
        setDmg(other.dmg);
      }
      if (other.hasHp()) {
        setHp(other.hp);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      return this;
    }

    @Override
    public TravelerDuelBattleSample clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      fromPerkIntensityRatio = 0F;
      fromSlotDmgRatio = 0F;
      fromEE = 0F;
      fromGenDmgRatio = 0F;
      fromCritRatio = 0F;
      fromFinalDmgRatio = 0F;
      toErAmend = 0F;
      toDefAmend = 0F;
      toRcdSlotDmgRatio = 0F;
      toEERCD = 0F;
      toGenDmgRcdRatio = 0F;
      toDmgPlusRcd = 0F;
      critRate = 0F;
      fromSrcAtk = 0;
      fromDmgPlus = 0;
      fromFinalDmgPlus = 0;
      dmg = 0;
      hp = 0;
      nextPackage.clear();
      return this;
    }

    @Override
    public TravelerDuelBattleSample 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 TravelerDuelBattleSample)) {
        return false;
      }
      TravelerDuelBattleSample other = (TravelerDuelBattleSample) o;
      return bitField0_ == other.bitField0_
        && (!hasFromPerkIntensityRatio() || ProtoUtil.isEqual(fromPerkIntensityRatio, other.fromPerkIntensityRatio))
        && (!hasFromSlotDmgRatio() || ProtoUtil.isEqual(fromSlotDmgRatio, other.fromSlotDmgRatio))
        && (!hasFromEE() || ProtoUtil.isEqual(fromEE, other.fromEE))
        && (!hasFromGenDmgRatio() || ProtoUtil.isEqual(fromGenDmgRatio, other.fromGenDmgRatio))
        && (!hasFromCritRatio() || ProtoUtil.isEqual(fromCritRatio, other.fromCritRatio))
        && (!hasFromFinalDmgRatio() || ProtoUtil.isEqual(fromFinalDmgRatio, other.fromFinalDmgRatio))
        && (!hasToErAmend() || ProtoUtil.isEqual(toErAmend, other.toErAmend))
        && (!hasToDefAmend() || ProtoUtil.isEqual(toDefAmend, other.toDefAmend))
        && (!hasToRcdSlotDmgRatio() || ProtoUtil.isEqual(toRcdSlotDmgRatio, other.toRcdSlotDmgRatio))
        && (!hasToEERCD() || ProtoUtil.isEqual(toEERCD, other.toEERCD))
        && (!hasToGenDmgRcdRatio() || ProtoUtil.isEqual(toGenDmgRcdRatio, other.toGenDmgRcdRatio))
        && (!hasToDmgPlusRcd() || ProtoUtil.isEqual(toDmgPlusRcd, other.toDmgPlusRcd))
        && (!hasCritRate() || ProtoUtil.isEqual(critRate, other.critRate))
        && (!hasFromSrcAtk() || fromSrcAtk == other.fromSrcAtk)
        && (!hasFromDmgPlus() || fromDmgPlus == other.fromDmgPlus)
        && (!hasFromFinalDmgPlus() || fromFinalDmgPlus == other.fromFinalDmgPlus)
        && (!hasDmg() || dmg == other.dmg)
        && (!hasHp() || hp == other.hp)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 21);
        output.writeFloatNoTag(fromPerkIntensityRatio);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 29);
        output.writeFloatNoTag(fromSlotDmgRatio);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 37);
        output.writeFloatNoTag(fromEE);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 45);
        output.writeFloatNoTag(fromGenDmgRatio);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 61);
        output.writeFloatNoTag(fromCritRatio);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawByte((byte) 69);
        output.writeFloatNoTag(fromFinalDmgRatio);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawByte((byte) 85);
        output.writeFloatNoTag(toErAmend);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRawByte((byte) 93);
        output.writeFloatNoTag(toDefAmend);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRawByte((byte) 101);
        output.writeFloatNoTag(toRcdSlotDmgRatio);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeRawByte((byte) 109);
        output.writeFloatNoTag(toEERCD);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeRawByte((byte) 117);
        output.writeFloatNoTag(toGenDmgRcdRatio);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeRawByte((byte) 125);
        output.writeFloatNoTag(toDmgPlusRcd);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeRawLittleEndian16((short) 397);
        output.writeFloatNoTag(critRate);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        output.writeRawByte((byte) 8);
        output.writeInt32NoTag(fromSrcAtk);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        output.writeRawByte((byte) 48);
        output.writeInt32NoTag(fromDmgPlus);
      }
      if ((bitField0_ & 0x00008000) != 0) {
        output.writeRawByte((byte) 72);
        output.writeInt32NoTag(fromFinalDmgPlus);
      }
      if ((bitField0_ & 0x00010000) != 0) {
        output.writeRawLittleEndian16((short) 384);
        output.writeInt32NoTag(dmg);
      }
      if ((bitField0_ & 0x00020000) != 0) {
        output.writeRawLittleEndian16((short) 400);
        output.writeInt32NoTag(hp);
      }
      if ((bitField0_ & 0x00040000) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000200) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000400) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00000800) != 0) {
        size += 5;
      }
      if ((bitField0_ & 0x00001000) != 0) {
        size += 6;
      }
      if ((bitField0_ & 0x00002000) != 0) {
        size += 1 + ProtoSink.computeInt32SizeNoTag(fromSrcAtk);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        size += 1 + ProtoSink.computeInt32SizeNoTag(fromDmgPlus);
      }
      if ((bitField0_ & 0x00008000) != 0) {
        size += 1 + ProtoSink.computeInt32SizeNoTag(fromFinalDmgPlus);
      }
      if ((bitField0_ & 0x00010000) != 0) {
        size += 2 + ProtoSink.computeInt32SizeNoTag(dmg);
      }
      if ((bitField0_ & 0x00020000) != 0) {
        size += 2 + ProtoSink.computeInt32SizeNoTag(hp);
      }
      if ((bitField0_ & 0x00040000) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public TravelerDuelBattleSample mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 21: {
            // fromPerkIntensityRatio
            fromPerkIntensityRatio = input.readFloat();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 29) {
              break;
            }
          }
          case 29: {
            // fromSlotDmgRatio
            fromSlotDmgRatio = input.readFloat();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 37) {
              break;
            }
          }
          case 37: {
            // fromEE
            fromEE = input.readFloat();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 45) {
              break;
            }
          }
          case 45: {
            // fromGenDmgRatio
            fromGenDmgRatio = input.readFloat();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 61) {
              break;
            }
          }
          case 61: {
            // fromCritRatio
            fromCritRatio = input.readFloat();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 69) {
              break;
            }
          }
          case 69: {
            // fromFinalDmgRatio
            fromFinalDmgRatio = input.readFloat();
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 85) {
              break;
            }
          }
          case 85: {
            // toErAmend
            toErAmend = input.readFloat();
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 93) {
              break;
            }
          }
          case 93: {
            // toDefAmend
            toDefAmend = input.readFloat();
            bitField0_ |= 0x00000080;
            tag = input.readTag();
            if (tag != 101) {
              break;
            }
          }
          case 101: {
            // toRcdSlotDmgRatio
            toRcdSlotDmgRatio = input.readFloat();
            bitField0_ |= 0x00000100;
            tag = input.readTag();
            if (tag != 109) {
              break;
            }
          }
          case 109: {
            // toEERCD
            toEERCD = input.readFloat();
            bitField0_ |= 0x00000200;
            tag = input.readTag();
            if (tag != 117) {
              break;
            }
          }
          case 117: {
            // toGenDmgRcdRatio
            toGenDmgRcdRatio = input.readFloat();
            bitField0_ |= 0x00000400;
            tag = input.readTag();
            if (tag != 125) {
              break;
            }
          }
          case 125: {
            // toDmgPlusRcd
            toDmgPlusRcd = input.readFloat();
            bitField0_ |= 0x00000800;
            tag = input.readTag();
            if (tag != 141) {
              break;
            }
          }
          case 141: {
            // critRate
            critRate = input.readFloat();
            bitField0_ |= 0x00001000;
            tag = input.readTag();
            if (tag != 8) {
              break;
            }
          }
          case 8: {
            // fromSrcAtk
            fromSrcAtk = input.readInt32();
            bitField0_ |= 0x00002000;
            tag = input.readTag();
            if (tag != 48) {
              break;
            }
          }
          case 48: {
            // fromDmgPlus
            fromDmgPlus = input.readInt32();
            bitField0_ |= 0x00004000;
            tag = input.readTag();
            if (tag != 72) {
              break;
            }
          }
          case 72: {
            // fromFinalDmgPlus
            fromFinalDmgPlus = input.readInt32();
            bitField0_ |= 0x00008000;
            tag = input.readTag();
            if (tag != 128) {
              break;
            }
          }
          case 128: {
            // dmg
            dmg = input.readInt32();
            bitField0_ |= 0x00010000;
            tag = input.readTag();
            if (tag != 144) {
              break;
            }
          }
          case 144: {
            // hp
            hp = input.readInt32();
            bitField0_ |= 0x00020000;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00040000;
            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.writeFloat(FieldNames.fromPerkIntensityRatio, fromPerkIntensityRatio);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeFloat(FieldNames.fromSlotDmgRatio, fromSlotDmgRatio);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeFloat(FieldNames.fromEE, fromEE);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeFloat(FieldNames.fromGenDmgRatio, fromGenDmgRatio);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeFloat(FieldNames.fromCritRatio, fromCritRatio);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeFloat(FieldNames.fromFinalDmgRatio, fromFinalDmgRatio);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeFloat(FieldNames.toErAmend, toErAmend);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeFloat(FieldNames.toDefAmend, toDefAmend);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeFloat(FieldNames.toRcdSlotDmgRatio, toRcdSlotDmgRatio);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeFloat(FieldNames.toEERCD, toEERCD);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeFloat(FieldNames.toGenDmgRcdRatio, toGenDmgRcdRatio);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeFloat(FieldNames.toDmgPlusRcd, toDmgPlusRcd);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeFloat(FieldNames.critRate, critRate);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        output.writeInt32(FieldNames.fromSrcAtk, fromSrcAtk);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        output.writeInt32(FieldNames.fromDmgPlus, fromDmgPlus);
      }
      if ((bitField0_ & 0x00008000) != 0) {
        output.writeInt32(FieldNames.fromFinalDmgPlus, fromFinalDmgPlus);
      }
      if ((bitField0_ & 0x00010000) != 0) {
        output.writeInt32(FieldNames.dmg, dmg);
      }
      if ((bitField0_ & 0x00020000) != 0) {
        output.writeInt32(FieldNames.hp, hp);
      }
      if ((bitField0_ & 0x00040000) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      output.endObject();
    }

    @Override
    public TravelerDuelBattleSample mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -1072259184: {
            if (input.isAtField(FieldNames.fromPerkIntensityRatio)) {
              if (!input.trySkipNullValue()) {
                fromPerkIntensityRatio = input.readFloat();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1791376053: {
            if (input.isAtField(FieldNames.fromSlotDmgRatio)) {
              if (!input.trySkipNullValue()) {
                fromSlotDmgRatio = input.readFloat();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2112735722: {
            if (input.isAtField(FieldNames.fromEE)) {
              if (!input.trySkipNullValue()) {
                fromEE = input.readFloat();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 206612211: {
            if (input.isAtField(FieldNames.fromGenDmgRatio)) {
              if (!input.trySkipNullValue()) {
                fromGenDmgRatio = input.readFloat();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -996215385: {
            if (input.isAtField(FieldNames.fromCritRatio)) {
              if (!input.trySkipNullValue()) {
                fromCritRatio = input.readFloat();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -336775783: {
            if (input.isAtField(FieldNames.fromFinalDmgRatio)) {
              if (!input.trySkipNullValue()) {
                fromFinalDmgRatio = input.readFloat();
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1183556249: {
            if (input.isAtField(FieldNames.toErAmend)) {
              if (!input.trySkipNullValue()) {
                toErAmend = input.readFloat();
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1707087899: {
            if (input.isAtField(FieldNames.toDefAmend)) {
              if (!input.trySkipNullValue()) {
                toDefAmend = input.readFloat();
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -831412829: {
            if (input.isAtField(FieldNames.toRcdSlotDmgRatio)) {
              if (!input.trySkipNullValue()) {
                toRcdSlotDmgRatio = input.readFloat();
                bitField0_ |= 0x00000100;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 484593112: {
            if (input.isAtField(FieldNames.toEERCD)) {
              if (!input.trySkipNullValue()) {
                toEERCD = input.readFloat();
                bitField0_ |= 0x00000200;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1466564447: {
            if (input.isAtField(FieldNames.toGenDmgRcdRatio)) {
              if (!input.trySkipNullValue()) {
                toGenDmgRcdRatio = input.readFloat();
                bitField0_ |= 0x00000400;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 748047990: {
            if (input.isAtField(FieldNames.toDmgPlusRcd)) {
              if (!input.trySkipNullValue()) {
                toDmgPlusRcd = input.readFloat();
                bitField0_ |= 0x00000800;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2016109050: {
            if (input.isAtField(FieldNames.critRate)) {
              if (!input.trySkipNullValue()) {
                critRate = input.readFloat();
                bitField0_ |= 0x00001000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -145833346: {
            if (input.isAtField(FieldNames.fromSrcAtk)) {
              if (!input.trySkipNullValue()) {
                fromSrcAtk = input.readInt32();
                bitField0_ |= 0x00002000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -792531826: {
            if (input.isAtField(FieldNames.fromDmgPlus)) {
              if (!input.trySkipNullValue()) {
                fromDmgPlus = input.readInt32();
                bitField0_ |= 0x00004000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 543276620: {
            if (input.isAtField(FieldNames.fromFinalDmgPlus)) {
              if (!input.trySkipNullValue()) {
                fromFinalDmgPlus = input.readInt32();
                bitField0_ |= 0x00008000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 68830: {
            if (input.isAtField(FieldNames.dmg)) {
              if (!input.trySkipNullValue()) {
                dmg = input.readInt32();
                bitField0_ |= 0x00010000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2344: {
            if (input.isAtField(FieldNames.hp)) {
              if (!input.trySkipNullValue()) {
                hp = input.readInt32();
                bitField0_ |= 0x00020000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00040000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum TravelerDuelBattleSampleFactory implements MessageFactory<TravelerDuelBattleSample> {
      INSTANCE;

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

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

      static final FieldName fromSlotDmgRatio = FieldName.forField("FromSlotDmgRatio");

      static final FieldName fromEE = FieldName.forField("FromEE");

      static final FieldName fromGenDmgRatio = FieldName.forField("FromGenDmgRatio");

      static final FieldName fromCritRatio = FieldName.forField("FromCritRatio");

      static final FieldName fromFinalDmgRatio = FieldName.forField("FromFinalDmgRatio");

      static final FieldName toErAmend = FieldName.forField("ToErAmend");

      static final FieldName toDefAmend = FieldName.forField("ToDefAmend");

      static final FieldName toRcdSlotDmgRatio = FieldName.forField("ToRcdSlotDmgRatio");

      static final FieldName toEERCD = FieldName.forField("ToEERCD");

      static final FieldName toGenDmgRcdRatio = FieldName.forField("ToGenDmgRcdRatio");

      static final FieldName toDmgPlusRcd = FieldName.forField("ToDmgPlusRcd");

      static final FieldName critRate = FieldName.forField("CritRate");

      static final FieldName fromSrcAtk = FieldName.forField("FromSrcAtk");

      static final FieldName fromDmgPlus = FieldName.forField("FromDmgPlus");

      static final FieldName fromFinalDmgPlus = FieldName.forField("FromFinalDmgPlus");

      static final FieldName dmg = FieldName.forField("Dmg");

      static final FieldName hp = FieldName.forField("Hp");

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

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

    /**
     * <code>optional uint32 Old = 1;</code>
     */
    private int old;

    /**
     * <code>optional uint32 New = 2;</code>
     */
    private int new_;

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

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

    private RankChange() {
    }

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

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

    /**
     * <code>optional uint32 Old = 1;</code>
     * @return this
     */
    public RankChange clearOld() {
      bitField0_ &= ~0x00000001;
      old = 0;
      return this;
    }

    /**
     * <code>optional uint32 Old = 1;</code>
     * @return the old
     */
    public int getOld() {
      return old;
    }

    /**
     * <code>optional uint32 Old = 1;</code>
     * @param value the old to set
     * @return this
     */
    public RankChange setOld(final int value) {
      bitField0_ |= 0x00000001;
      old = value;
      return this;
    }

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

    /**
     * <code>optional uint32 New = 2;</code>
     * @return this
     */
    public RankChange clearNew() {
      bitField0_ &= ~0x00000002;
      new_ = 0;
      return this;
    }

    /**
     * <code>optional uint32 New = 2;</code>
     * @return the new_
     */
    public int getNew() {
      return new_;
    }

    /**
     * <code>optional uint32 New = 2;</code>
     * @param value the new_ to set
     * @return this
     */
    public RankChange setNew(final int value) {
      bitField0_ |= 0x00000002;
      new_ = 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 RankChange 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 RankChange 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 RankChange 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 RankChange setNextPackage(final byte... values) {
      bitField0_ |= 0x00000004;
      nextPackage.copyFrom(values);
      return this;
    }

    /**
     * <code>optional string Token = 3;</code>
     * @return whether the token field is set
     */
    public boolean hasToken() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional string Token = 3;</code>
     * @return this
     */
    public RankChange clearToken() {
      bitField0_ &= ~0x00000008;
      token.clear();
      return this;
    }

    /**
     * <code>optional string Token = 3;</code>
     * @return the token
     */
    public String getToken() {
      return token.getString();
    }

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

    /**
     * <code>optional string Token = 3;</code>
     * @return internal {@code Utf8String} representation of token for modifications
     */
    public Utf8String getMutableTokenBytes() {
      bitField0_ |= 0x00000008;
      return this.token;
    }

    /**
     * <code>optional string Token = 3;</code>
     * @param value the token to set
     * @return this
     */
    public RankChange setToken(final CharSequence value) {
      bitField0_ |= 0x00000008;
      token.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string Token = 3;</code>
     * @param value the token to set
     * @return this
     */
    public RankChange setToken(final Utf8String value) {
      bitField0_ |= 0x00000008;
      token.copyFrom(value);
      return this;
    }

    @Override
    public RankChange copyFrom(final RankChange other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        old = other.old;
        new_ = other.new_;
        nextPackage.copyFrom(other.nextPackage);
        token.copyFrom(other.token);
      }
      return this;
    }

    @Override
    public RankChange mergeFrom(final RankChange other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasOld()) {
        setOld(other.old);
      }
      if (other.hasNew()) {
        setNew(other.new_);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasToken()) {
        getMutableTokenBytes().copyFrom(other.token);
      }
      return this;
    }

    @Override
    public RankChange clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      old = 0;
      new_ = 0;
      nextPackage.clear();
      token.clear();
      return this;
    }

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof RankChange)) {
        return false;
      }
      RankChange other = (RankChange) o;
      return bitField0_ == other.bitField0_
        && (!hasOld() || old == other.old)
        && (!hasNew() || new_ == other.new_)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasToken() || token.equals(other.token));
    }

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

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

    @Override
    @SuppressWarnings("fallthrough")
    public RankChange mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8: {
            // old
            old = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 16) {
              break;
            }
          }
          case 16: {
            // new_
            new_ = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // token
            input.readString(token);
            bitField0_ |= 0x00000008;
            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.old, old);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.new_, new_);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeString(FieldNames.token, token);
      }
      output.endObject();
    }

    @Override
    public RankChange mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 79367: {
            if (input.isAtField(FieldNames.old)) {
              if (!input.trySkipNullValue()) {
                old = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 78208: {
            if (input.isAtField(FieldNames.new_)) {
              if (!input.trySkipNullValue()) {
                new_ = 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 80988633: {
            if (input.isAtField(FieldNames.token)) {
              if (!input.trySkipNullValue()) {
                input.readString(token);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum RankChangeFactory implements MessageFactory<RankChange> {
      INSTANCE;

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

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

      static final FieldName new_ = FieldName.forField("New");

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

      static final FieldName token = FieldName.forField("Token");
    }
  }
}
