// 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 FriendDevelopmentInfoOuterClass {
  /**
   * Protobuf type {@code FriendDevelopmentInfo}
   */
  public static final class FriendDevelopmentInfo extends ProtoMessage<FriendDevelopmentInfo> implements Cloneable {
    private static final long serialVersionUID = 0L;

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

    /**
     * <code>optional uint32 MEOJDPFCEOI = 149;</code>
     */
    private int mEOJDPFCEOI;

    /**
     * <code>optional uint32 avatar_id = 710;</code>
     */
    private int avatarId;

    /**
     * <code>optional uint32 EMIDNFOLJDJ = 1496;</code>
     */
    private int eMIDNFOLJDJ;

    /**
     * <code>optional .DevelopmentType development_type = 12;</code>
     */
    private int developmentType;

    /**
     * <pre>
     *  MLLFMKOKJFK CEOFECGIHPD = 1319;
     *  NIOIGPPBPEH LFHOJLFBGDI = 1267; // NEW WTF?
     * </pre>
     *
     * <code>optional .ChallengeDevelopmentInfo challenge_development_info = 120;</code>
     */
    private final ChallengeDevelopmentInfoOuterClass.ChallengeDevelopmentInfo challengeDevelopmentInfo = ChallengeDevelopmentInfoOuterClass.ChallengeDevelopmentInfo.newInstance();

    private FriendDevelopmentInfo() {
    }

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

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

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

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

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

    /**
     * <code>optional uint32 MEOJDPFCEOI = 149;</code>
     * @return whether the mEOJDPFCEOI field is set
     */
    public boolean hasMEOJDPFCEOI() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional uint32 MEOJDPFCEOI = 149;</code>
     * @return this
     */
    public FriendDevelopmentInfo clearMEOJDPFCEOI() {
      bitField0_ &= ~0x00000002;
      mEOJDPFCEOI = 0;
      return this;
    }

    /**
     * <code>optional uint32 MEOJDPFCEOI = 149;</code>
     * @return the mEOJDPFCEOI
     */
    public int getMEOJDPFCEOI() {
      return mEOJDPFCEOI;
    }

    /**
     * <code>optional uint32 MEOJDPFCEOI = 149;</code>
     * @param value the mEOJDPFCEOI to set
     * @return this
     */
    public FriendDevelopmentInfo setMEOJDPFCEOI(final int value) {
      bitField0_ |= 0x00000002;
      mEOJDPFCEOI = value;
      return this;
    }

    /**
     * <code>optional uint32 avatar_id = 710;</code>
     * @return whether the avatarId field is set
     */
    public boolean hasAvatarId() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional uint32 avatar_id = 710;</code>
     * @return this
     */
    public FriendDevelopmentInfo clearAvatarId() {
      bitField0_ &= ~0x00000004;
      avatarId = 0;
      return this;
    }

    /**
     * <code>optional uint32 avatar_id = 710;</code>
     * @return the avatarId
     */
    public int getAvatarId() {
      return avatarId;
    }

    /**
     * <code>optional uint32 avatar_id = 710;</code>
     * @param value the avatarId to set
     * @return this
     */
    public FriendDevelopmentInfo setAvatarId(final int value) {
      bitField0_ |= 0x00000004;
      avatarId = value;
      return this;
    }

    /**
     * <code>optional uint32 EMIDNFOLJDJ = 1496;</code>
     * @return whether the eMIDNFOLJDJ field is set
     */
    public boolean hasEMIDNFOLJDJ() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional uint32 EMIDNFOLJDJ = 1496;</code>
     * @return this
     */
    public FriendDevelopmentInfo clearEMIDNFOLJDJ() {
      bitField0_ &= ~0x00000008;
      eMIDNFOLJDJ = 0;
      return this;
    }

    /**
     * <code>optional uint32 EMIDNFOLJDJ = 1496;</code>
     * @return the eMIDNFOLJDJ
     */
    public int getEMIDNFOLJDJ() {
      return eMIDNFOLJDJ;
    }

    /**
     * <code>optional uint32 EMIDNFOLJDJ = 1496;</code>
     * @param value the eMIDNFOLJDJ to set
     * @return this
     */
    public FriendDevelopmentInfo setEMIDNFOLJDJ(final int value) {
      bitField0_ |= 0x00000008;
      eMIDNFOLJDJ = value;
      return this;
    }

    /**
     * <code>optional .DevelopmentType development_type = 12;</code>
     * @return whether the developmentType field is set
     */
    public boolean hasDevelopmentType() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional .DevelopmentType development_type = 12;</code>
     * @return this
     */
    public FriendDevelopmentInfo clearDevelopmentType() {
      bitField0_ &= ~0x00000010;
      developmentType = 0;
      return this;
    }

    /**
     * <code>optional .DevelopmentType development_type = 12;</code>
     * @return the developmentType
     */
    public DevelopmentTypeOuterClass.DevelopmentType getDevelopmentType() {
      return DevelopmentTypeOuterClass.DevelopmentType.forNumber(developmentType);
    }

    /**
     * Gets the value of the internal enum store. The result is
     * equivalent to {@link FriendDevelopmentInfo#getDevelopmentType()}.getNumber().
     *
     * @return numeric wire representation
     */
    public int getDevelopmentTypeValue() {
      return developmentType;
    }

    /**
     * Sets the value of the internal enum store. This does not
     * do any validity checks, so be sure to use appropriate value
     * constants from {@link DevelopmentTypeOuterClass.DevelopmentType}. Setting an invalid value
     * can cause {@link FriendDevelopmentInfo#getDevelopmentType()} to return null
     *
     * @param value the numeric wire value to set
     * @return this
     */
    public FriendDevelopmentInfo setDevelopmentTypeValue(final int value) {
      bitField0_ |= 0x00000010;
      developmentType = value;
      return this;
    }

    /**
     * <code>optional .DevelopmentType development_type = 12;</code>
     * @param value the developmentType to set
     * @return this
     */
    public FriendDevelopmentInfo setDevelopmentType(
        final DevelopmentTypeOuterClass.DevelopmentType value) {
      bitField0_ |= 0x00000010;
      developmentType = value.getNumber();
      return this;
    }

    /**
     * <pre>
     *  MLLFMKOKJFK CEOFECGIHPD = 1319;
     *  NIOIGPPBPEH LFHOJLFBGDI = 1267; // NEW WTF?
     * </pre>
     *
     * <code>optional .ChallengeDevelopmentInfo challenge_development_info = 120;</code>
     * @return whether the challengeDevelopmentInfo field is set
     */
    public boolean hasChallengeDevelopmentInfo() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <pre>
     *  MLLFMKOKJFK CEOFECGIHPD = 1319;
     *  NIOIGPPBPEH LFHOJLFBGDI = 1267; // NEW WTF?
     * </pre>
     *
     * <code>optional .ChallengeDevelopmentInfo challenge_development_info = 120;</code>
     * @return this
     */
    public FriendDevelopmentInfo clearChallengeDevelopmentInfo() {
      bitField0_ &= ~0x00000020;
      challengeDevelopmentInfo.clear();
      return this;
    }

    /**
     * <pre>
     *  MLLFMKOKJFK CEOFECGIHPD = 1319;
     *  NIOIGPPBPEH LFHOJLFBGDI = 1267; // NEW WTF?
     * </pre>
     *
     * <code>optional .ChallengeDevelopmentInfo challenge_development_info = 120;</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 #getMutableChallengeDevelopmentInfo()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public ChallengeDevelopmentInfoOuterClass.ChallengeDevelopmentInfo getChallengeDevelopmentInfo(
        ) {
      return challengeDevelopmentInfo;
    }

    /**
     * <pre>
     *  MLLFMKOKJFK CEOFECGIHPD = 1319;
     *  NIOIGPPBPEH LFHOJLFBGDI = 1267; // NEW WTF?
     * </pre>
     *
     * <code>optional .ChallengeDevelopmentInfo challenge_development_info = 120;</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 ChallengeDevelopmentInfoOuterClass.ChallengeDevelopmentInfo getMutableChallengeDevelopmentInfo(
        ) {
      bitField0_ |= 0x00000020;
      return challengeDevelopmentInfo;
    }

    /**
     * <pre>
     *  MLLFMKOKJFK CEOFECGIHPD = 1319;
     *  NIOIGPPBPEH LFHOJLFBGDI = 1267; // NEW WTF?
     * </pre>
     *
     * <code>optional .ChallengeDevelopmentInfo challenge_development_info = 120;</code>
     * @param value the challengeDevelopmentInfo to set
     * @return this
     */
    public FriendDevelopmentInfo setChallengeDevelopmentInfo(
        final ChallengeDevelopmentInfoOuterClass.ChallengeDevelopmentInfo value) {
      bitField0_ |= 0x00000020;
      challengeDevelopmentInfo.copyFrom(value);
      return this;
    }

    @Override
    public FriendDevelopmentInfo copyFrom(final FriendDevelopmentInfo other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        time = other.time;
        mEOJDPFCEOI = other.mEOJDPFCEOI;
        avatarId = other.avatarId;
        eMIDNFOLJDJ = other.eMIDNFOLJDJ;
        developmentType = other.developmentType;
        challengeDevelopmentInfo.copyFrom(other.challengeDevelopmentInfo);
      }
      return this;
    }

    @Override
    public FriendDevelopmentInfo mergeFrom(final FriendDevelopmentInfo other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasTime()) {
        setTime(other.time);
      }
      if (other.hasMEOJDPFCEOI()) {
        setMEOJDPFCEOI(other.mEOJDPFCEOI);
      }
      if (other.hasAvatarId()) {
        setAvatarId(other.avatarId);
      }
      if (other.hasEMIDNFOLJDJ()) {
        setEMIDNFOLJDJ(other.eMIDNFOLJDJ);
      }
      if (other.hasDevelopmentType()) {
        setDevelopmentTypeValue(other.developmentType);
      }
      if (other.hasChallengeDevelopmentInfo()) {
        getMutableChallengeDevelopmentInfo().mergeFrom(other.challengeDevelopmentInfo);
      }
      return this;
    }

    @Override
    public FriendDevelopmentInfo clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      time = 0L;
      mEOJDPFCEOI = 0;
      avatarId = 0;
      eMIDNFOLJDJ = 0;
      developmentType = 0;
      challengeDevelopmentInfo.clear();
      return this;
    }

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof FriendDevelopmentInfo)) {
        return false;
      }
      FriendDevelopmentInfo other = (FriendDevelopmentInfo) o;
      return bitField0_ == other.bitField0_
        && (!hasTime() || time == other.time)
        && (!hasMEOJDPFCEOI() || mEOJDPFCEOI == other.mEOJDPFCEOI)
        && (!hasAvatarId() || avatarId == other.avatarId)
        && (!hasEMIDNFOLJDJ() || eMIDNFOLJDJ == other.eMIDNFOLJDJ)
        && (!hasDevelopmentType() || developmentType == other.developmentType)
        && (!hasChallengeDevelopmentInfo() || challengeDevelopmentInfo.equals(other.challengeDevelopmentInfo));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 32);
        output.writeInt64NoTag(time);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawLittleEndian16((short) 2472);
        output.writeUInt32NoTag(mEOJDPFCEOI);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawLittleEndian16((short) 11440);
        output.writeUInt32NoTag(avatarId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawLittleEndian16((short) 24000);
        output.writeUInt32NoTag(eMIDNFOLJDJ);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 96);
        output.writeEnumNoTag(developmentType);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawLittleEndian16((short) 1986);
        output.writeMessageNoTag(challengeDevelopmentInfo);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeInt64SizeNoTag(time);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 2 + ProtoSink.computeUInt32SizeNoTag(mEOJDPFCEOI);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 2 + ProtoSink.computeUInt32SizeNoTag(avatarId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 2 + ProtoSink.computeUInt32SizeNoTag(eMIDNFOLJDJ);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 1 + ProtoSink.computeEnumSizeNoTag(developmentType);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 2 + ProtoSink.computeMessageSizeNoTag(challengeDevelopmentInfo);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public FriendDevelopmentInfo mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 32: {
            // time
            time = input.readInt64();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 1192) {
              break;
            }
          }
          case 1192: {
            // mEOJDPFCEOI
            mEOJDPFCEOI = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 5680) {
              break;
            }
          }
          case 5680: {
            // avatarId
            avatarId = input.readUInt32();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 11968) {
              break;
            }
          }
          case 11968: {
            // eMIDNFOLJDJ
            eMIDNFOLJDJ = input.readUInt32();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 96) {
              break;
            }
          }
          case 96: {
            // developmentType
            final int value = input.readInt32();
            if (DevelopmentTypeOuterClass.DevelopmentType.forNumber(value) != null) {
              developmentType = value;
              bitField0_ |= 0x00000010;
            }
            tag = input.readTag();
            if (tag != 962) {
              break;
            }
          }
          case 962: {
            // challengeDevelopmentInfo
            input.readMessage(challengeDevelopmentInfo);
            bitField0_ |= 0x00000020;
            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.writeUInt32(FieldNames.mEOJDPFCEOI, mEOJDPFCEOI);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeUInt32(FieldNames.avatarId, avatarId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeUInt32(FieldNames.eMIDNFOLJDJ, eMIDNFOLJDJ);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeEnum(FieldNames.developmentType, developmentType, DevelopmentTypeOuterClass.DevelopmentType.converter());
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeMessage(FieldNames.challengeDevelopmentInfo, challengeDevelopmentInfo);
      }
      output.endObject();
    }

    @Override
    public FriendDevelopmentInfo 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.readInt64();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 40884515: {
            if (input.isAtField(FieldNames.mEOJDPFCEOI)) {
              if (!input.trySkipNullValue()) {
                mEOJDPFCEOI = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1787287636:
          case -428636735: {
            if (input.isAtField(FieldNames.avatarId)) {
              if (!input.trySkipNullValue()) {
                avatarId = input.readUInt32();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 354745208: {
            if (input.isAtField(FieldNames.eMIDNFOLJDJ)) {
              if (!input.trySkipNullValue()) {
                eMIDNFOLJDJ = input.readUInt32();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1511355627:
          case 402634686: {
            if (input.isAtField(FieldNames.developmentType)) {
              if (!input.trySkipNullValue()) {
                final DevelopmentTypeOuterClass.DevelopmentType value = input.readEnum(DevelopmentTypeOuterClass.DevelopmentType.converter());
                if (value != null) {
                  developmentType = value.getNumber();
                  bitField0_ |= 0x00000010;
                } else {
                  input.skipUnknownEnumValue();
                }
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 310307238:
          case -929340018: {
            if (input.isAtField(FieldNames.challengeDevelopmentInfo)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(challengeDevelopmentInfo);
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum FriendDevelopmentInfoFactory implements MessageFactory<FriendDevelopmentInfo> {
      INSTANCE;

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

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

      static final FieldName mEOJDPFCEOI = FieldName.forField("MEOJDPFCEOI");

      static final FieldName avatarId = FieldName.forField("avatarId", "avatar_id");

      static final FieldName eMIDNFOLJDJ = FieldName.forField("EMIDNFOLJDJ");

      static final FieldName developmentType = FieldName.forField("developmentType", "development_type");

      static final FieldName challengeDevelopmentInfo = FieldName.forField("challengeDevelopmentInfo", "challenge_development_info");
    }
  }
}
