// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;

import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.Utf8String;

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

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

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

    /**
     * <code>optional uint32 account_id = 6;</code>
     */
    private int accountId;

    /**
     * <code>optional bool unk_bool_1 = 1;</code>
     */
    private boolean unkBool1;

    /**
     * <code>optional bool unk_bool_2 = 7;</code>
     */
    private boolean unkBool2;

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

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

    /**
     * <pre>
     *  ?
     * </pre>
     *
     * <code>optional string region = 8;</code>
     */
    private final Utf8String region = Utf8String.newEmptyInstance();

    /**
     * <code>optional string country_code = 13;</code>
     */
    private final Utf8String countryCode = Utf8String.newEmptyInstance();

    private DispatchToken() {
    }

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

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

    /**
     * <code>optional uint32 time = 4;</code>
     * @return this
     */
    public DispatchToken clearTime() {
      bitField0_ &= ~0x00000001;
      time = 0;
      return this;
    }

    /**
     * <code>optional uint32 time = 4;</code>
     * @return the time
     */
    public int getTime() {
      return time;
    }

    /**
     * <code>optional uint32 time = 4;</code>
     * @param value the time to set
     * @return this
     */
    public DispatchToken setTime(final int value) {
      bitField0_ |= 0x00000001;
      time = value;
      return this;
    }

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

    /**
     * <code>optional uint32 unk_uint_1 = 5;</code>
     * @return this
     */
    public DispatchToken clearUnkUint1() {
      bitField0_ &= ~0x00000002;
      unkUint1 = 0;
      return this;
    }

    /**
     * <code>optional uint32 unk_uint_1 = 5;</code>
     * @return the unkUint1
     */
    public int getUnkUint1() {
      return unkUint1;
    }

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

    /**
     * <code>optional uint32 account_id = 6;</code>
     * @return whether the accountId field is set
     */
    public boolean hasAccountId() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional uint32 account_id = 6;</code>
     * @return this
     */
    public DispatchToken clearAccountId() {
      bitField0_ &= ~0x00000004;
      accountId = 0;
      return this;
    }

    /**
     * <code>optional uint32 account_id = 6;</code>
     * @return the accountId
     */
    public int getAccountId() {
      return accountId;
    }

    /**
     * <code>optional uint32 account_id = 6;</code>
     * @param value the accountId to set
     * @return this
     */
    public DispatchToken setAccountId(final int value) {
      bitField0_ |= 0x00000004;
      accountId = value;
      return this;
    }

    /**
     * <code>optional bool unk_bool_1 = 1;</code>
     * @return whether the unkBool1 field is set
     */
    public boolean hasUnkBool1() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional bool unk_bool_1 = 1;</code>
     * @return this
     */
    public DispatchToken clearUnkBool1() {
      bitField0_ &= ~0x00000008;
      unkBool1 = false;
      return this;
    }

    /**
     * <code>optional bool unk_bool_1 = 1;</code>
     * @return the unkBool1
     */
    public boolean getUnkBool1() {
      return unkBool1;
    }

    /**
     * <code>optional bool unk_bool_1 = 1;</code>
     * @param value the unkBool1 to set
     * @return this
     */
    public DispatchToken setUnkBool1(final boolean value) {
      bitField0_ |= 0x00000008;
      unkBool1 = value;
      return this;
    }

    /**
     * <code>optional bool unk_bool_2 = 7;</code>
     * @return whether the unkBool2 field is set
     */
    public boolean hasUnkBool2() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional bool unk_bool_2 = 7;</code>
     * @return this
     */
    public DispatchToken clearUnkBool2() {
      bitField0_ &= ~0x00000010;
      unkBool2 = false;
      return this;
    }

    /**
     * <code>optional bool unk_bool_2 = 7;</code>
     * @return the unkBool2
     */
    public boolean getUnkBool2() {
      return unkBool2;
    }

    /**
     * <code>optional bool unk_bool_2 = 7;</code>
     * @param value the unkBool2 to set
     * @return this
     */
    public DispatchToken setUnkBool2(final boolean value) {
      bitField0_ |= 0x00000010;
      unkBool2 = value;
      return this;
    }

    /**
     * <code>optional string unk_string_1 = 2;</code>
     * @return whether the unkString1 field is set
     */
    public boolean hasUnkString1() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional string unk_string_1 = 2;</code>
     * @return this
     */
    public DispatchToken clearUnkString1() {
      bitField0_ &= ~0x00000020;
      unkString1.clear();
      return this;
    }

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

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

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

    /**
     * <code>optional string unk_string_1 = 2;</code>
     * @param value the unkString1 to set
     * @return this
     */
    public DispatchToken setUnkString1(final CharSequence value) {
      bitField0_ |= 0x00000020;
      unkString1.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string unk_string_1 = 2;</code>
     * @param value the unkString1 to set
     * @return this
     */
    public DispatchToken setUnkString1(final Utf8String value) {
      bitField0_ |= 0x00000020;
      unkString1.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string unk_string_2 = 3;</code>
     * @return whether the unkString2 field is set
     */
    public boolean hasUnkString2() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>optional string unk_string_2 = 3;</code>
     * @return this
     */
    public DispatchToken clearUnkString2() {
      bitField0_ &= ~0x00000040;
      unkString2.clear();
      return this;
    }

    /**
     * <code>optional string unk_string_2 = 3;</code>
     * @return the unkString2
     */
    public String getUnkString2() {
      return unkString2.getString();
    }

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

    /**
     * <code>optional string unk_string_2 = 3;</code>
     * @return internal {@code Utf8String} representation of unkString2 for modifications
     */
    public Utf8String getMutableUnkString2Bytes() {
      bitField0_ |= 0x00000040;
      return this.unkString2;
    }

    /**
     * <code>optional string unk_string_2 = 3;</code>
     * @param value the unkString2 to set
     * @return this
     */
    public DispatchToken setUnkString2(final CharSequence value) {
      bitField0_ |= 0x00000040;
      unkString2.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string unk_string_2 = 3;</code>
     * @param value the unkString2 to set
     * @return this
     */
    public DispatchToken setUnkString2(final Utf8String value) {
      bitField0_ |= 0x00000040;
      unkString2.copyFrom(value);
      return this;
    }

    /**
     * <pre>
     *  ?
     * </pre>
     *
     * <code>optional string region = 8;</code>
     * @return whether the region field is set
     */
    public boolean hasRegion() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <pre>
     *  ?
     * </pre>
     *
     * <code>optional string region = 8;</code>
     * @return this
     */
    public DispatchToken clearRegion() {
      bitField0_ &= ~0x00000080;
      region.clear();
      return this;
    }

    /**
     * <pre>
     *  ?
     * </pre>
     *
     * <code>optional string region = 8;</code>
     * @return the region
     */
    public String getRegion() {
      return region.getString();
    }

    /**
     * <pre>
     *  ?
     * </pre>
     *
     * <code>optional string region = 8;</code>
     * @return internal {@code Utf8String} representation of region for reading
     */
    public Utf8String getRegionBytes() {
      return this.region;
    }

    /**
     * <pre>
     *  ?
     * </pre>
     *
     * <code>optional string region = 8;</code>
     * @return internal {@code Utf8String} representation of region for modifications
     */
    public Utf8String getMutableRegionBytes() {
      bitField0_ |= 0x00000080;
      return this.region;
    }

    /**
     * <pre>
     *  ?
     * </pre>
     *
     * <code>optional string region = 8;</code>
     * @param value the region to set
     * @return this
     */
    public DispatchToken setRegion(final CharSequence value) {
      bitField0_ |= 0x00000080;
      region.copyFrom(value);
      return this;
    }

    /**
     * <pre>
     *  ?
     * </pre>
     *
     * <code>optional string region = 8;</code>
     * @param value the region to set
     * @return this
     */
    public DispatchToken setRegion(final Utf8String value) {
      bitField0_ |= 0x00000080;
      region.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string country_code = 13;</code>
     * @return whether the countryCode field is set
     */
    public boolean hasCountryCode() {
      return (bitField0_ & 0x00000100) != 0;
    }

    /**
     * <code>optional string country_code = 13;</code>
     * @return this
     */
    public DispatchToken clearCountryCode() {
      bitField0_ &= ~0x00000100;
      countryCode.clear();
      return this;
    }

    /**
     * <code>optional string country_code = 13;</code>
     * @return the countryCode
     */
    public String getCountryCode() {
      return countryCode.getString();
    }

    /**
     * <code>optional string country_code = 13;</code>
     * @return internal {@code Utf8String} representation of countryCode for reading
     */
    public Utf8String getCountryCodeBytes() {
      return this.countryCode;
    }

    /**
     * <code>optional string country_code = 13;</code>
     * @return internal {@code Utf8String} representation of countryCode for modifications
     */
    public Utf8String getMutableCountryCodeBytes() {
      bitField0_ |= 0x00000100;
      return this.countryCode;
    }

    /**
     * <code>optional string country_code = 13;</code>
     * @param value the countryCode to set
     * @return this
     */
    public DispatchToken setCountryCode(final CharSequence value) {
      bitField0_ |= 0x00000100;
      countryCode.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string country_code = 13;</code>
     * @param value the countryCode to set
     * @return this
     */
    public DispatchToken setCountryCode(final Utf8String value) {
      bitField0_ |= 0x00000100;
      countryCode.copyFrom(value);
      return this;
    }

    @Override
    public DispatchToken copyFrom(final DispatchToken other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        time = other.time;
        unkUint1 = other.unkUint1;
        accountId = other.accountId;
        unkBool1 = other.unkBool1;
        unkBool2 = other.unkBool2;
        unkString1.copyFrom(other.unkString1);
        unkString2.copyFrom(other.unkString2);
        region.copyFrom(other.region);
        countryCode.copyFrom(other.countryCode);
      }
      return this;
    }

    @Override
    public DispatchToken mergeFrom(final DispatchToken other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasTime()) {
        setTime(other.time);
      }
      if (other.hasUnkUint1()) {
        setUnkUint1(other.unkUint1);
      }
      if (other.hasAccountId()) {
        setAccountId(other.accountId);
      }
      if (other.hasUnkBool1()) {
        setUnkBool1(other.unkBool1);
      }
      if (other.hasUnkBool2()) {
        setUnkBool2(other.unkBool2);
      }
      if (other.hasUnkString1()) {
        getMutableUnkString1Bytes().copyFrom(other.unkString1);
      }
      if (other.hasUnkString2()) {
        getMutableUnkString2Bytes().copyFrom(other.unkString2);
      }
      if (other.hasRegion()) {
        getMutableRegionBytes().copyFrom(other.region);
      }
      if (other.hasCountryCode()) {
        getMutableCountryCodeBytes().copyFrom(other.countryCode);
      }
      return this;
    }

    @Override
    public DispatchToken clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      time = 0;
      unkUint1 = 0;
      accountId = 0;
      unkBool1 = false;
      unkBool2 = false;
      unkString1.clear();
      unkString2.clear();
      region.clear();
      countryCode.clear();
      return this;
    }

    @Override
    public DispatchToken clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      unkString1.clear();
      unkString2.clear();
      region.clear();
      countryCode.clear();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof DispatchToken)) {
        return false;
      }
      DispatchToken other = (DispatchToken) o;
      return bitField0_ == other.bitField0_
        && (!hasTime() || time == other.time)
        && (!hasUnkUint1() || unkUint1 == other.unkUint1)
        && (!hasAccountId() || accountId == other.accountId)
        && (!hasUnkBool1() || unkBool1 == other.unkBool1)
        && (!hasUnkBool2() || unkBool2 == other.unkBool2)
        && (!hasUnkString1() || unkString1.equals(other.unkString1))
        && (!hasUnkString2() || unkString2.equals(other.unkString2))
        && (!hasRegion() || region.equals(other.region))
        && (!hasCountryCode() || countryCode.equals(other.countryCode));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 32);
        output.writeUInt32NoTag(time);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 40);
        output.writeUInt32NoTag(unkUint1);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 48);
        output.writeUInt32NoTag(accountId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 8);
        output.writeBoolNoTag(unkBool1);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 56);
        output.writeBoolNoTag(unkBool2);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawByte((byte) 18);
        output.writeStringNoTag(unkString1);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawByte((byte) 26);
        output.writeStringNoTag(unkString2);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRawByte((byte) 66);
        output.writeStringNoTag(region);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRawByte((byte) 106);
        output.writeStringNoTag(countryCode);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(time);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(unkUint1);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(accountId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 2;
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 2;
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(unkString1);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(unkString2);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(region);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(countryCode);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public DispatchToken mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 32: {
            // time
            time = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 40) {
              break;
            }
          }
          case 40: {
            // unkUint1
            unkUint1 = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 48) {
              break;
            }
          }
          case 48: {
            // accountId
            accountId = input.readUInt32();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 8) {
              break;
            }
          }
          case 8: {
            // unkBool1
            unkBool1 = input.readBool();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 56) {
              break;
            }
          }
          case 56: {
            // unkBool2
            unkBool2 = input.readBool();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // unkString1
            input.readString(unkString1);
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // unkString2
            input.readString(unkString2);
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 66) {
              break;
            }
          }
          case 66: {
            // region
            input.readString(region);
            bitField0_ |= 0x00000080;
            tag = input.readTag();
            if (tag != 106) {
              break;
            }
          }
          case 106: {
            // countryCode
            input.readString(countryCode);
            bitField0_ |= 0x00000100;
            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.time, time);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.unkUint1, unkUint1);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeUInt32(FieldNames.accountId, accountId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeBool(FieldNames.unkBool1, unkBool1);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeBool(FieldNames.unkBool2, unkBool2);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeString(FieldNames.unkString1, unkString1);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeString(FieldNames.unkString2, unkString2);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeString(FieldNames.region, region);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeString(FieldNames.countryCode, countryCode);
      }
      output.endObject();
    }

    @Override
    public DispatchToken mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 3560141: {
            if (input.isAtField(FieldNames.time)) {
              if (!input.trySkipNullValue()) {
                time = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -263408059:
          case 891848825: {
            if (input.isAtField(FieldNames.unkUint1)) {
              if (!input.trySkipNullValue()) {
                unkUint1 = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1827029976:
          case -803333011: {
            if (input.isAtField(FieldNames.accountId)) {
              if (!input.trySkipNullValue()) {
                accountId = input.readUInt32();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -280775499:
          case 353458185: {
            if (input.isAtField(FieldNames.unkBool1)) {
              if (!input.trySkipNullValue()) {
                unkBool1 = input.readBool();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -280775498:
          case 353458186: {
            if (input.isAtField(FieldNames.unkBool2)) {
              if (!input.trySkipNullValue()) {
                unkBool2 = input.readBool();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1188732690:
          case 160073776: {
            if (input.isAtField(FieldNames.unkString1)) {
              if (!input.trySkipNullValue()) {
                input.readString(unkString1);
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1188732689:
          case 160073777: {
            if (input.isAtField(FieldNames.unkString2)) {
              if (!input.trySkipNullValue()) {
                input.readString(unkString2);
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -934795532: {
            if (input.isAtField(FieldNames.region)) {
              if (!input.trySkipNullValue()) {
                input.readString(region);
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1477067101:
          case 1481071862: {
            if (input.isAtField(FieldNames.countryCode)) {
              if (!input.trySkipNullValue()) {
                input.readString(countryCode);
                bitField0_ |= 0x00000100;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum DispatchTokenFactory implements MessageFactory<DispatchToken> {
      INSTANCE;

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

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

      static final FieldName unkUint1 = FieldName.forField("unkUint1", "unk_uint_1");

      static final FieldName accountId = FieldName.forField("accountId", "account_id");

      static final FieldName unkBool1 = FieldName.forField("unkBool1", "unk_bool_1");

      static final FieldName unkBool2 = FieldName.forField("unkBool2", "unk_bool_2");

      static final FieldName unkString1 = FieldName.forField("unkString1", "unk_string_1");

      static final FieldName unkString2 = FieldName.forField("unkString2", "unk_string_2");

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

      static final FieldName countryCode = FieldName.forField("countryCode", "country_code");
    }
  }
}
