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

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

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

    /**
     * <code>optional uint32 ActivityId = 1;</code>
     */
    private int activityId;

    /**
     * <code>optional uint32 LevelId = 2;</code>
     */
    private int levelId;

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

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

    /**
     * <code>optional uint32 PackageNum = 5;</code>
     */
    private int packageNum;

    /**
     * <code>optional uint32 PerfectNum = 6;</code>
     */
    private int perfectNum;

    /**
     * <code>optional uint32 ExcellentNum = 7;</code>
     */
    private int excellentNum;

    /**
     * <code>optional uint32 MissNum = 8;</code>
     */
    private int missNum;

    /**
     * <code>optional uint32 Good = 9;</code>
     */
    private int good;

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

    private ActivityCookieSettleReq() {
    }

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

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

    /**
     * <code>optional uint32 ActivityId = 1;</code>
     * @return this
     */
    public ActivityCookieSettleReq clearActivityId() {
      bitField0_ &= ~0x00000001;
      activityId = 0;
      return this;
    }

    /**
     * <code>optional uint32 ActivityId = 1;</code>
     * @return the activityId
     */
    public int getActivityId() {
      return activityId;
    }

    /**
     * <code>optional uint32 ActivityId = 1;</code>
     * @param value the activityId to set
     * @return this
     */
    public ActivityCookieSettleReq setActivityId(final int value) {
      bitField0_ |= 0x00000001;
      activityId = value;
      return this;
    }

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

    /**
     * <code>optional uint32 LevelId = 2;</code>
     * @return this
     */
    public ActivityCookieSettleReq clearLevelId() {
      bitField0_ &= ~0x00000002;
      levelId = 0;
      return this;
    }

    /**
     * <code>optional uint32 LevelId = 2;</code>
     * @return the levelId
     */
    public int getLevelId() {
      return levelId;
    }

    /**
     * <code>optional uint32 LevelId = 2;</code>
     * @param value the levelId to set
     * @return this
     */
    public ActivityCookieSettleReq setLevelId(final int value) {
      bitField0_ |= 0x00000002;
      levelId = value;
      return this;
    }

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

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

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

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

    /**
     * <code>optional uint32 CookieNum = 4;</code>
     * @return whether the cookieNum field is set
     */
    public boolean hasCookieNum() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional uint32 CookieNum = 4;</code>
     * @return this
     */
    public ActivityCookieSettleReq clearCookieNum() {
      bitField0_ &= ~0x00000008;
      cookieNum = 0;
      return this;
    }

    /**
     * <code>optional uint32 CookieNum = 4;</code>
     * @return the cookieNum
     */
    public int getCookieNum() {
      return cookieNum;
    }

    /**
     * <code>optional uint32 CookieNum = 4;</code>
     * @param value the cookieNum to set
     * @return this
     */
    public ActivityCookieSettleReq setCookieNum(final int value) {
      bitField0_ |= 0x00000008;
      cookieNum = value;
      return this;
    }

    /**
     * <code>optional uint32 PackageNum = 5;</code>
     * @return whether the packageNum field is set
     */
    public boolean hasPackageNum() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional uint32 PackageNum = 5;</code>
     * @return this
     */
    public ActivityCookieSettleReq clearPackageNum() {
      bitField0_ &= ~0x00000010;
      packageNum = 0;
      return this;
    }

    /**
     * <code>optional uint32 PackageNum = 5;</code>
     * @return the packageNum
     */
    public int getPackageNum() {
      return packageNum;
    }

    /**
     * <code>optional uint32 PackageNum = 5;</code>
     * @param value the packageNum to set
     * @return this
     */
    public ActivityCookieSettleReq setPackageNum(final int value) {
      bitField0_ |= 0x00000010;
      packageNum = value;
      return this;
    }

    /**
     * <code>optional uint32 PerfectNum = 6;</code>
     * @return whether the perfectNum field is set
     */
    public boolean hasPerfectNum() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional uint32 PerfectNum = 6;</code>
     * @return this
     */
    public ActivityCookieSettleReq clearPerfectNum() {
      bitField0_ &= ~0x00000020;
      perfectNum = 0;
      return this;
    }

    /**
     * <code>optional uint32 PerfectNum = 6;</code>
     * @return the perfectNum
     */
    public int getPerfectNum() {
      return perfectNum;
    }

    /**
     * <code>optional uint32 PerfectNum = 6;</code>
     * @param value the perfectNum to set
     * @return this
     */
    public ActivityCookieSettleReq setPerfectNum(final int value) {
      bitField0_ |= 0x00000020;
      perfectNum = value;
      return this;
    }

    /**
     * <code>optional uint32 ExcellentNum = 7;</code>
     * @return whether the excellentNum field is set
     */
    public boolean hasExcellentNum() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>optional uint32 ExcellentNum = 7;</code>
     * @return this
     */
    public ActivityCookieSettleReq clearExcellentNum() {
      bitField0_ &= ~0x00000040;
      excellentNum = 0;
      return this;
    }

    /**
     * <code>optional uint32 ExcellentNum = 7;</code>
     * @return the excellentNum
     */
    public int getExcellentNum() {
      return excellentNum;
    }

    /**
     * <code>optional uint32 ExcellentNum = 7;</code>
     * @param value the excellentNum to set
     * @return this
     */
    public ActivityCookieSettleReq setExcellentNum(final int value) {
      bitField0_ |= 0x00000040;
      excellentNum = value;
      return this;
    }

    /**
     * <code>optional uint32 MissNum = 8;</code>
     * @return whether the missNum field is set
     */
    public boolean hasMissNum() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>optional uint32 MissNum = 8;</code>
     * @return this
     */
    public ActivityCookieSettleReq clearMissNum() {
      bitField0_ &= ~0x00000080;
      missNum = 0;
      return this;
    }

    /**
     * <code>optional uint32 MissNum = 8;</code>
     * @return the missNum
     */
    public int getMissNum() {
      return missNum;
    }

    /**
     * <code>optional uint32 MissNum = 8;</code>
     * @param value the missNum to set
     * @return this
     */
    public ActivityCookieSettleReq setMissNum(final int value) {
      bitField0_ |= 0x00000080;
      missNum = value;
      return this;
    }

    /**
     * <code>optional uint32 Good = 9;</code>
     * @return whether the good field is set
     */
    public boolean hasGood() {
      return (bitField0_ & 0x00000100) != 0;
    }

    /**
     * <code>optional uint32 Good = 9;</code>
     * @return this
     */
    public ActivityCookieSettleReq clearGood() {
      bitField0_ &= ~0x00000100;
      good = 0;
      return this;
    }

    /**
     * <code>optional uint32 Good = 9;</code>
     * @return the good
     */
    public int getGood() {
      return good;
    }

    /**
     * <code>optional uint32 Good = 9;</code>
     * @param value the good to set
     * @return this
     */
    public ActivityCookieSettleReq setGood(final int value) {
      bitField0_ |= 0x00000100;
      good = 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 ActivityCookieSettleReq 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 ActivityCookieSettleReq 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 ActivityCookieSettleReq 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 ActivityCookieSettleReq setNextPackage(final byte... values) {
      bitField0_ |= 0x00000200;
      nextPackage.copyFrom(values);
      return this;
    }

    @Override
    public ActivityCookieSettleReq copyFrom(final ActivityCookieSettleReq other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        activityId = other.activityId;
        levelId = other.levelId;
        score = other.score;
        cookieNum = other.cookieNum;
        packageNum = other.packageNum;
        perfectNum = other.perfectNum;
        excellentNum = other.excellentNum;
        missNum = other.missNum;
        good = other.good;
        nextPackage.copyFrom(other.nextPackage);
      }
      return this;
    }

    @Override
    public ActivityCookieSettleReq mergeFrom(final ActivityCookieSettleReq other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasActivityId()) {
        setActivityId(other.activityId);
      }
      if (other.hasLevelId()) {
        setLevelId(other.levelId);
      }
      if (other.hasScore()) {
        setScore(other.score);
      }
      if (other.hasCookieNum()) {
        setCookieNum(other.cookieNum);
      }
      if (other.hasPackageNum()) {
        setPackageNum(other.packageNum);
      }
      if (other.hasPerfectNum()) {
        setPerfectNum(other.perfectNum);
      }
      if (other.hasExcellentNum()) {
        setExcellentNum(other.excellentNum);
      }
      if (other.hasMissNum()) {
        setMissNum(other.missNum);
      }
      if (other.hasGood()) {
        setGood(other.good);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      return this;
    }

    @Override
    public ActivityCookieSettleReq clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      activityId = 0;
      levelId = 0;
      score = 0;
      cookieNum = 0;
      packageNum = 0;
      perfectNum = 0;
      excellentNum = 0;
      missNum = 0;
      good = 0;
      nextPackage.clear();
      return this;
    }

    @Override
    public ActivityCookieSettleReq 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 ActivityCookieSettleReq)) {
        return false;
      }
      ActivityCookieSettleReq other = (ActivityCookieSettleReq) o;
      return bitField0_ == other.bitField0_
        && (!hasActivityId() || activityId == other.activityId)
        && (!hasLevelId() || levelId == other.levelId)
        && (!hasScore() || score == other.score)
        && (!hasCookieNum() || cookieNum == other.cookieNum)
        && (!hasPackageNum() || packageNum == other.packageNum)
        && (!hasPerfectNum() || perfectNum == other.perfectNum)
        && (!hasExcellentNum() || excellentNum == other.excellentNum)
        && (!hasMissNum() || missNum == other.missNum)
        && (!hasGood() || good == other.good)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt32NoTag(activityId);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 16);
        output.writeUInt32NoTag(levelId);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 24);
        output.writeUInt32NoTag(score);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 32);
        output.writeUInt32NoTag(cookieNum);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 40);
        output.writeUInt32NoTag(packageNum);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawByte((byte) 48);
        output.writeUInt32NoTag(perfectNum);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawByte((byte) 56);
        output.writeUInt32NoTag(excellentNum);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRawByte((byte) 64);
        output.writeUInt32NoTag(missNum);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRawByte((byte) 72);
        output.writeUInt32NoTag(good);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(score);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(cookieNum);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(packageNum);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(perfectNum);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(excellentNum);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(missNum);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(good);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ActivityCookieSettleReq mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8: {
            // activityId
            activityId = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 16) {
              break;
            }
          }
          case 16: {
            // levelId
            levelId = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 24) {
              break;
            }
          }
          case 24: {
            // score
            score = input.readUInt32();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 32) {
              break;
            }
          }
          case 32: {
            // cookieNum
            cookieNum = input.readUInt32();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 40) {
              break;
            }
          }
          case 40: {
            // packageNum
            packageNum = input.readUInt32();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 48) {
              break;
            }
          }
          case 48: {
            // perfectNum
            perfectNum = input.readUInt32();
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 56) {
              break;
            }
          }
          case 56: {
            // excellentNum
            excellentNum = input.readUInt32();
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 64) {
              break;
            }
          }
          case 64: {
            // missNum
            missNum = input.readUInt32();
            bitField0_ |= 0x00000080;
            tag = input.readTag();
            if (tag != 72) {
              break;
            }
          }
          case 72: {
            // good
            good = input.readUInt32();
            bitField0_ |= 0x00000100;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000200;
            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.activityId, activityId);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.levelId, levelId);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeUInt32(FieldNames.score, score);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeUInt32(FieldNames.cookieNum, cookieNum);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeUInt32(FieldNames.packageNum, packageNum);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeUInt32(FieldNames.perfectNum, perfectNum);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeUInt32(FieldNames.excellentNum, excellentNum);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeUInt32(FieldNames.missNum, missNum);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeUInt32(FieldNames.good, good);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      output.endObject();
    }

    @Override
    public ActivityCookieSettleReq mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -252882774: {
            if (input.isAtField(FieldNames.activityId)) {
              if (!input.trySkipNullValue()) {
                activityId = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1734437791: {
            if (input.isAtField(FieldNames.levelId)) {
              if (!input.trySkipNullValue()) {
                levelId = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 79711858: {
            if (input.isAtField(FieldNames.score)) {
              if (!input.trySkipNullValue()) {
                score = input.readUInt32();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2064875934: {
            if (input.isAtField(FieldNames.cookieNum)) {
              if (!input.trySkipNullValue()) {
                cookieNum = input.readUInt32();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2022780288: {
            if (input.isAtField(FieldNames.packageNum)) {
              if (!input.trySkipNullValue()) {
                packageNum = input.readUInt32();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -571000743: {
            if (input.isAtField(FieldNames.perfectNum)) {
              if (!input.trySkipNullValue()) {
                perfectNum = input.readUInt32();
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1405529200: {
            if (input.isAtField(FieldNames.excellentNum)) {
              if (!input.trySkipNullValue()) {
                excellentNum = input.readUInt32();
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1560890166: {
            if (input.isAtField(FieldNames.missNum)) {
              if (!input.trySkipNullValue()) {
                missNum = input.readUInt32();
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2225373: {
            if (input.isAtField(FieldNames.good)) {
              if (!input.trySkipNullValue()) {
                good = 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;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum ActivityCookieSettleReqFactory implements MessageFactory<ActivityCookieSettleReq> {
      INSTANCE;

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

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

      static final FieldName levelId = FieldName.forField("LevelId");

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

      static final FieldName cookieNum = FieldName.forField("CookieNum");

      static final FieldName packageNum = FieldName.forField("PackageNum");

      static final FieldName perfectNum = FieldName.forField("PerfectNum");

      static final FieldName excellentNum = FieldName.forField("ExcellentNum");

      static final FieldName missNum = FieldName.forField("MissNum");

      static final FieldName good = FieldName.forField("Good");

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