// 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;

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

    /**
     * <code>optional uint32 NCCNLKFCAKM = 1;</code>
     */
    private int nCCNLKFCAKM;

    /**
     * <code>optional uint32 KJNOOOJDGDN = 3;</code>
     */
    private int kJNOOOJDGDN;

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

    /**
     * <code>optional uint32 DGJKPAAINFI = 7;</code>
     */
    private int dGJKPAAINFI;

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

    private PlayerCollectionInfo() {
    }

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

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

    /**
     * <code>optional uint32 NCCNLKFCAKM = 1;</code>
     * @return this
     */
    public PlayerCollectionInfo clearNCCNLKFCAKM() {
      bitField0_ &= ~0x00000001;
      nCCNLKFCAKM = 0;
      return this;
    }

    /**
     * <code>optional uint32 NCCNLKFCAKM = 1;</code>
     * @return the nCCNLKFCAKM
     */
    public int getNCCNLKFCAKM() {
      return nCCNLKFCAKM;
    }

    /**
     * <code>optional uint32 NCCNLKFCAKM = 1;</code>
     * @param value the nCCNLKFCAKM to set
     * @return this
     */
    public PlayerCollectionInfo setNCCNLKFCAKM(final int value) {
      bitField0_ |= 0x00000001;
      nCCNLKFCAKM = value;
      return this;
    }

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

    /**
     * <code>optional uint32 KJNOOOJDGDN = 3;</code>
     * @return this
     */
    public PlayerCollectionInfo clearKJNOOOJDGDN() {
      bitField0_ &= ~0x00000002;
      kJNOOOJDGDN = 0;
      return this;
    }

    /**
     * <code>optional uint32 KJNOOOJDGDN = 3;</code>
     * @return the kJNOOOJDGDN
     */
    public int getKJNOOOJDGDN() {
      return kJNOOOJDGDN;
    }

    /**
     * <code>optional uint32 KJNOOOJDGDN = 3;</code>
     * @param value the kJNOOOJDGDN to set
     * @return this
     */
    public PlayerCollectionInfo setKJNOOOJDGDN(final int value) {
      bitField0_ |= 0x00000002;
      kJNOOOJDGDN = value;
      return this;
    }

    /**
     * <code>optional uint32 ONEEHDCGMOH = 5;</code>
     * @return whether the oNEEHDCGMOH field is set
     */
    public boolean hasONEEHDCGMOH() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional uint32 ONEEHDCGMOH = 5;</code>
     * @return this
     */
    public PlayerCollectionInfo clearONEEHDCGMOH() {
      bitField0_ &= ~0x00000004;
      oNEEHDCGMOH = 0;
      return this;
    }

    /**
     * <code>optional uint32 ONEEHDCGMOH = 5;</code>
     * @return the oNEEHDCGMOH
     */
    public int getONEEHDCGMOH() {
      return oNEEHDCGMOH;
    }

    /**
     * <code>optional uint32 ONEEHDCGMOH = 5;</code>
     * @param value the oNEEHDCGMOH to set
     * @return this
     */
    public PlayerCollectionInfo setONEEHDCGMOH(final int value) {
      bitField0_ |= 0x00000004;
      oNEEHDCGMOH = value;
      return this;
    }

    /**
     * <code>optional uint32 DGJKPAAINFI = 7;</code>
     * @return whether the dGJKPAAINFI field is set
     */
    public boolean hasDGJKPAAINFI() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional uint32 DGJKPAAINFI = 7;</code>
     * @return this
     */
    public PlayerCollectionInfo clearDGJKPAAINFI() {
      bitField0_ &= ~0x00000008;
      dGJKPAAINFI = 0;
      return this;
    }

    /**
     * <code>optional uint32 DGJKPAAINFI = 7;</code>
     * @return the dGJKPAAINFI
     */
    public int getDGJKPAAINFI() {
      return dGJKPAAINFI;
    }

    /**
     * <code>optional uint32 DGJKPAAINFI = 7;</code>
     * @param value the dGJKPAAINFI to set
     * @return this
     */
    public PlayerCollectionInfo setDGJKPAAINFI(final int value) {
      bitField0_ |= 0x00000008;
      dGJKPAAINFI = value;
      return this;
    }

    /**
     * <code>optional uint32 JMGKJKDLIFI = 14;</code>
     * @return whether the jMGKJKDLIFI field is set
     */
    public boolean hasJMGKJKDLIFI() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional uint32 JMGKJKDLIFI = 14;</code>
     * @return this
     */
    public PlayerCollectionInfo clearJMGKJKDLIFI() {
      bitField0_ &= ~0x00000010;
      jMGKJKDLIFI = 0;
      return this;
    }

    /**
     * <code>optional uint32 JMGKJKDLIFI = 14;</code>
     * @return the jMGKJKDLIFI
     */
    public int getJMGKJKDLIFI() {
      return jMGKJKDLIFI;
    }

    /**
     * <code>optional uint32 JMGKJKDLIFI = 14;</code>
     * @param value the jMGKJKDLIFI to set
     * @return this
     */
    public PlayerCollectionInfo setJMGKJKDLIFI(final int value) {
      bitField0_ |= 0x00000010;
      jMGKJKDLIFI = value;
      return this;
    }

    @Override
    public PlayerCollectionInfo copyFrom(final PlayerCollectionInfo other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        nCCNLKFCAKM = other.nCCNLKFCAKM;
        kJNOOOJDGDN = other.kJNOOOJDGDN;
        oNEEHDCGMOH = other.oNEEHDCGMOH;
        dGJKPAAINFI = other.dGJKPAAINFI;
        jMGKJKDLIFI = other.jMGKJKDLIFI;
      }
      return this;
    }

    @Override
    public PlayerCollectionInfo mergeFrom(final PlayerCollectionInfo other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasNCCNLKFCAKM()) {
        setNCCNLKFCAKM(other.nCCNLKFCAKM);
      }
      if (other.hasKJNOOOJDGDN()) {
        setKJNOOOJDGDN(other.kJNOOOJDGDN);
      }
      if (other.hasONEEHDCGMOH()) {
        setONEEHDCGMOH(other.oNEEHDCGMOH);
      }
      if (other.hasDGJKPAAINFI()) {
        setDGJKPAAINFI(other.dGJKPAAINFI);
      }
      if (other.hasJMGKJKDLIFI()) {
        setJMGKJKDLIFI(other.jMGKJKDLIFI);
      }
      return this;
    }

    @Override
    public PlayerCollectionInfo clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      nCCNLKFCAKM = 0;
      kJNOOOJDGDN = 0;
      oNEEHDCGMOH = 0;
      dGJKPAAINFI = 0;
      jMGKJKDLIFI = 0;
      return this;
    }

    @Override
    public PlayerCollectionInfo clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof PlayerCollectionInfo)) {
        return false;
      }
      PlayerCollectionInfo other = (PlayerCollectionInfo) o;
      return bitField0_ == other.bitField0_
        && (!hasNCCNLKFCAKM() || nCCNLKFCAKM == other.nCCNLKFCAKM)
        && (!hasKJNOOOJDGDN() || kJNOOOJDGDN == other.kJNOOOJDGDN)
        && (!hasONEEHDCGMOH() || oNEEHDCGMOH == other.oNEEHDCGMOH)
        && (!hasDGJKPAAINFI() || dGJKPAAINFI == other.dGJKPAAINFI)
        && (!hasJMGKJKDLIFI() || jMGKJKDLIFI == other.jMGKJKDLIFI);
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt32NoTag(nCCNLKFCAKM);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 24);
        output.writeUInt32NoTag(kJNOOOJDGDN);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 40);
        output.writeUInt32NoTag(oNEEHDCGMOH);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 56);
        output.writeUInt32NoTag(dGJKPAAINFI);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 112);
        output.writeUInt32NoTag(jMGKJKDLIFI);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(nCCNLKFCAKM);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(kJNOOOJDGDN);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(oNEEHDCGMOH);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(dGJKPAAINFI);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(jMGKJKDLIFI);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public PlayerCollectionInfo mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8: {
            // nCCNLKFCAKM
            nCCNLKFCAKM = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 24) {
              break;
            }
          }
          case 24: {
            // kJNOOOJDGDN
            kJNOOOJDGDN = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 40) {
              break;
            }
          }
          case 40: {
            // oNEEHDCGMOH
            oNEEHDCGMOH = input.readUInt32();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 56) {
              break;
            }
          }
          case 56: {
            // dGJKPAAINFI
            dGJKPAAINFI = input.readUInt32();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 112) {
              break;
            }
          }
          case 112: {
            // jMGKJKDLIFI
            jMGKJKDLIFI = input.readUInt32();
            bitField0_ |= 0x00000010;
            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.nCCNLKFCAKM, nCCNLKFCAKM);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.kJNOOOJDGDN, kJNOOOJDGDN);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeUInt32(FieldNames.oNEEHDCGMOH, oNEEHDCGMOH);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeUInt32(FieldNames.dGJKPAAINFI, dGJKPAAINFI);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeUInt32(FieldNames.jMGKJKDLIFI, jMGKJKDLIFI);
      }
      output.endObject();
    }

    @Override
    public PlayerCollectionInfo mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -105203577: {
            if (input.isAtField(FieldNames.nCCNLKFCAKM)) {
              if (!input.trySkipNullValue()) {
                nCCNLKFCAKM = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1436526167: {
            if (input.isAtField(FieldNames.kJNOOOJDGDN)) {
              if (!input.trySkipNullValue()) {
                kJNOOOJDGDN = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1347260185: {
            if (input.isAtField(FieldNames.oNEEHDCGMOH)) {
              if (!input.trySkipNullValue()) {
                oNEEHDCGMOH = input.readUInt32();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1838026860: {
            if (input.isAtField(FieldNames.dGJKPAAINFI)) {
              if (!input.trySkipNullValue()) {
                dGJKPAAINFI = input.readUInt32();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -527426212: {
            if (input.isAtField(FieldNames.jMGKJKDLIFI)) {
              if (!input.trySkipNullValue()) {
                jMGKJKDLIFI = input.readUInt32();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum PlayerCollectionInfoFactory implements MessageFactory<PlayerCollectionInfo> {
      INSTANCE;

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

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

      static final FieldName kJNOOOJDGDN = FieldName.forField("KJNOOOJDGDN");

      static final FieldName oNEEHDCGMOH = FieldName.forField("ONEEHDCGMOH");

      static final FieldName dGJKPAAINFI = FieldName.forField("DGJKPAAINFI");

      static final FieldName jMGKJKDLIFI = FieldName.forField("JMGKJKDLIFI");
    }
  }
}
