// 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;
import us.hebi.quickbuf.RepeatedInt;
import us.hebi.quickbuf.RepeatedLong;
import us.hebi.quickbuf.RepeatedMessage;

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

    /**
     * <code>optional uint32 Id = 1;</code>
     */
    private int id;

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

    private AgentRewardReceiveReq() {
    }

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

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

    /**
     * <code>optional uint32 Id = 1;</code>
     * @return this
     */
    public AgentRewardReceiveReq clearId() {
      bitField0_ &= ~0x00000001;
      id = 0;
      return this;
    }

    /**
     * <code>optional uint32 Id = 1;</code>
     * @return the id
     */
    public int getId() {
      return id;
    }

    /**
     * <code>optional uint32 Id = 1;</code>
     * @param value the id to set
     * @return this
     */
    public AgentRewardReceiveReq setId(final int value) {
      bitField0_ |= 0x00000001;
      id = value;
      return this;
    }

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public AgentRewardReceiveReq clearNextPackage() {
      bitField0_ &= ~0x00000002;
      nextPackage.clear();
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableNextPackage()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedByte getNextPackage() {
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public RepeatedByte getMutableNextPackage() {
      bitField0_ |= 0x00000002;
      return nextPackage;
    }

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

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

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

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

    @Override
    public AgentRewardReceiveReq mergeFrom(final AgentRewardReceiveReq other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasId()) {
        setId(other.id);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      return this;
    }

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

    @Override
    public AgentRewardReceiveReq 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 AgentRewardReceiveReq)) {
        return false;
      }
      AgentRewardReceiveReq other = (AgentRewardReceiveReq) o;
      return bitField0_ == other.bitField0_
        && (!hasId() || id == other.id)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt32NoTag(id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
    }

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

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

    @Override
    public AgentRewardReceiveReq mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 2363: {
            if (input.isAtField(FieldNames.id)) {
              if (!input.trySkipNullValue()) {
                id = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum AgentRewardReceiveReqFactory implements MessageFactory<AgentRewardReceiveReq> {
      INSTANCE;

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

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

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

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

    /**
     * <code>optional .ChangeInfo Change = 4;</code>
     */
    private final Public.ChangeInfo change = Public.ChangeInfo.newInstance();

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

    /**
     * <code>repeated uint64 BuildIds = 2;</code>
     */
    private final RepeatedLong buildIds = RepeatedLong.newEmptyInstance();

    /**
     * <code>repeated uint32 CharIds = 1;</code>
     */
    private final RepeatedInt charIds = RepeatedInt.newEmptyInstance();

    /**
     * <code>repeated .AgentRewardShow RewardShows = 3;</code>
     */
    private final RepeatedMessage<AgentRewardShow> rewardShows = RepeatedMessage.newEmptyInstance(AgentRewardShow.getFactory());

    private AgentRewardReceiveResp() {
    }

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

    /**
     * <code>optional .ChangeInfo Change = 4;</code>
     * @return whether the change field is set
     */
    public boolean hasChange() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional .ChangeInfo Change = 4;</code>
     * @return this
     */
    public AgentRewardReceiveResp clearChange() {
      bitField0_ &= ~0x00000001;
      change.clear();
      return this;
    }

    /**
     * <code>optional .ChangeInfo Change = 4;</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 #getMutableChange()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ChangeInfo getChange() {
      return change;
    }

    /**
     * <code>optional .ChangeInfo Change = 4;</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 Public.ChangeInfo getMutableChange() {
      bitField0_ |= 0x00000001;
      return change;
    }

    /**
     * <code>optional .ChangeInfo Change = 4;</code>
     * @param value the change to set
     * @return this
     */
    public AgentRewardReceiveResp setChange(final Public.ChangeInfo value) {
      bitField0_ |= 0x00000001;
      change.copyFrom(value);
      return this;
    }

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public AgentRewardReceiveResp clearNextPackage() {
      bitField0_ &= ~0x00000002;
      nextPackage.clear();
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableNextPackage()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedByte getNextPackage() {
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public RepeatedByte getMutableNextPackage() {
      bitField0_ |= 0x00000002;
      return nextPackage;
    }

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

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

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

    /**
     * <code>repeated uint64 BuildIds = 2;</code>
     * @return whether the buildIds field is set
     */
    public boolean hasBuildIds() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>repeated uint64 BuildIds = 2;</code>
     * @return this
     */
    public AgentRewardReceiveResp clearBuildIds() {
      bitField0_ &= ~0x00000004;
      buildIds.clear();
      return this;
    }

    /**
     * <code>repeated uint64 BuildIds = 2;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableBuildIds()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedLong getBuildIds() {
      return buildIds;
    }

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

    /**
     * <code>repeated uint64 BuildIds = 2;</code>
     * @param value the buildIds to add
     * @return this
     */
    public AgentRewardReceiveResp addBuildIds(final long value) {
      bitField0_ |= 0x00000004;
      buildIds.add(value);
      return this;
    }

    /**
     * <code>repeated uint64 BuildIds = 2;</code>
     * @param values the buildIds to add
     * @return this
     */
    public AgentRewardReceiveResp addAllBuildIds(final long... values) {
      bitField0_ |= 0x00000004;
      buildIds.addAll(values);
      return this;
    }

    /**
     * <code>repeated uint32 CharIds = 1;</code>
     * @return whether the charIds field is set
     */
    public boolean hasCharIds() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>repeated uint32 CharIds = 1;</code>
     * @return this
     */
    public AgentRewardReceiveResp clearCharIds() {
      bitField0_ &= ~0x00000008;
      charIds.clear();
      return this;
    }

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

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

    /**
     * <code>repeated uint32 CharIds = 1;</code>
     * @param value the charIds to add
     * @return this
     */
    public AgentRewardReceiveResp addCharIds(final int value) {
      bitField0_ |= 0x00000008;
      charIds.add(value);
      return this;
    }

    /**
     * <code>repeated uint32 CharIds = 1;</code>
     * @param values the charIds to add
     * @return this
     */
    public AgentRewardReceiveResp addAllCharIds(final int... values) {
      bitField0_ |= 0x00000008;
      charIds.addAll(values);
      return this;
    }

    /**
     * <code>repeated .AgentRewardShow RewardShows = 3;</code>
     * @return whether the rewardShows field is set
     */
    public boolean hasRewardShows() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>repeated .AgentRewardShow RewardShows = 3;</code>
     * @return this
     */
    public AgentRewardReceiveResp clearRewardShows() {
      bitField0_ &= ~0x00000010;
      rewardShows.clear();
      return this;
    }

    /**
     * <code>repeated .AgentRewardShow RewardShows = 3;</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 #getMutableRewardShows()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<AgentRewardShow> getRewardShows() {
      return rewardShows;
    }

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

    /**
     * <code>repeated .AgentRewardShow RewardShows = 3;</code>
     * @param value the rewardShows to add
     * @return this
     */
    public AgentRewardReceiveResp addRewardShows(final AgentRewardShow value) {
      bitField0_ |= 0x00000010;
      rewardShows.add(value);
      return this;
    }

    /**
     * <code>repeated .AgentRewardShow RewardShows = 3;</code>
     * @param values the rewardShows to add
     * @return this
     */
    public AgentRewardReceiveResp addAllRewardShows(final AgentRewardShow... values) {
      bitField0_ |= 0x00000010;
      rewardShows.addAll(values);
      return this;
    }

    @Override
    public AgentRewardReceiveResp copyFrom(final AgentRewardReceiveResp other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        change.copyFrom(other.change);
        nextPackage.copyFrom(other.nextPackage);
        buildIds.copyFrom(other.buildIds);
        charIds.copyFrom(other.charIds);
        rewardShows.copyFrom(other.rewardShows);
      }
      return this;
    }

    @Override
    public AgentRewardReceiveResp mergeFrom(final AgentRewardReceiveResp other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasChange()) {
        getMutableChange().mergeFrom(other.change);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasBuildIds()) {
        getMutableBuildIds().addAll(other.buildIds);
      }
      if (other.hasCharIds()) {
        getMutableCharIds().addAll(other.charIds);
      }
      if (other.hasRewardShows()) {
        getMutableRewardShows().addAll(other.rewardShows);
      }
      return this;
    }

    @Override
    public AgentRewardReceiveResp clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      change.clear();
      nextPackage.clear();
      buildIds.clear();
      charIds.clear();
      rewardShows.clear();
      return this;
    }

    @Override
    public AgentRewardReceiveResp clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      change.clearQuick();
      nextPackage.clear();
      buildIds.clear();
      charIds.clear();
      rewardShows.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof AgentRewardReceiveResp)) {
        return false;
      }
      AgentRewardReceiveResp other = (AgentRewardReceiveResp) o;
      return bitField0_ == other.bitField0_
        && (!hasChange() || change.equals(other.change))
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasBuildIds() || buildIds.equals(other.buildIds))
        && (!hasCharIds() || charIds.equals(other.charIds))
        && (!hasRewardShows() || rewardShows.equals(other.rewardShows));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 34);
        output.writeMessageNoTag(change);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        for (int i = 0; i < buildIds.length(); i++) {
          output.writeRawByte((byte) 16);
          output.writeUInt64NoTag(buildIds.array()[i]);
        }
      }
      if ((bitField0_ & 0x00000008) != 0) {
        for (int i = 0; i < charIds.length(); i++) {
          output.writeRawByte((byte) 8);
          output.writeUInt32NoTag(charIds.array()[i]);
        }
      }
      if ((bitField0_ & 0x00000010) != 0) {
        for (int i = 0; i < rewardShows.length(); i++) {
          output.writeRawByte((byte) 26);
          output.writeMessageNoTag(rewardShows.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(change);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += (1 * buildIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(buildIds);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += (1 * rewardShows.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewardShows);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public AgentRewardReceiveResp mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 34: {
            // change
            input.readMessage(change);
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // buildIds [packed=true]
            input.readPackedUInt64(buildIds, tag);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 10) {
              break;
            }
          }
          case 10: {
            // charIds [packed=true]
            input.readPackedUInt32(charIds, tag);
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // rewardShows
            tag = input.readRepeatedMessage(rewardShows, tag);
            bitField0_ |= 0x00000010;
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
          case 16: {
            // buildIds [packed=false]
            tag = input.readRepeatedUInt64(buildIds, tag);
            bitField0_ |= 0x00000004;
            break;
          }
          case 8: {
            // charIds [packed=false]
            tag = input.readRepeatedUInt32(charIds, tag);
            bitField0_ |= 0x00000008;
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeMessage(FieldNames.change, change);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRepeatedUInt64(FieldNames.buildIds, buildIds);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRepeatedUInt32(FieldNames.charIds, charIds);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRepeatedMessage(FieldNames.rewardShows, rewardShows);
      }
      output.endObject();
    }

    @Override
    public AgentRewardReceiveResp mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 2017198032: {
            if (input.isAtField(FieldNames.change)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(change);
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1366033014: {
            if (input.isAtField(FieldNames.buildIds)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedUInt64(buildIds);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1891280030: {
            if (input.isAtField(FieldNames.charIds)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedUInt32(charIds);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1739975929: {
            if (input.isAtField(FieldNames.rewardShows)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(rewardShows);
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum AgentRewardReceiveRespFactory implements MessageFactory<AgentRewardReceiveResp> {
      INSTANCE;

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

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

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

      static final FieldName buildIds = FieldName.forField("BuildIds");

      static final FieldName charIds = FieldName.forField("CharIds");

      static final FieldName rewardShows = FieldName.forField("RewardShows");
    }
  }

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

    /**
     * <code>optional uint32 Id = 1;</code>
     */
    private int id;

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

    /**
     * <code>repeated .ItemTpl Rewards = 2;</code>
     */
    private final RepeatedMessage<Public.ItemTpl> rewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory());

    /**
     * <code>repeated .ItemTpl Bonus = 3;</code>
     */
    private final RepeatedMessage<Public.ItemTpl> bonus = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory());

    /**
     * <code>repeated .ItemTpl SpecialRewards = 4;</code>
     */
    private final RepeatedMessage<Public.ItemTpl> specialRewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory());

    private AgentRewardShow() {
    }

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

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

    /**
     * <code>optional uint32 Id = 1;</code>
     * @return this
     */
    public AgentRewardShow clearId() {
      bitField0_ &= ~0x00000001;
      id = 0;
      return this;
    }

    /**
     * <code>optional uint32 Id = 1;</code>
     * @return the id
     */
    public int getId() {
      return id;
    }

    /**
     * <code>optional uint32 Id = 1;</code>
     * @param value the id to set
     * @return this
     */
    public AgentRewardShow setId(final int value) {
      bitField0_ |= 0x00000001;
      id = value;
      return this;
    }

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public AgentRewardShow clearNextPackage() {
      bitField0_ &= ~0x00000002;
      nextPackage.clear();
      return this;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableNextPackage()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedByte getNextPackage() {
      return nextPackage;
    }

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public RepeatedByte getMutableNextPackage() {
      bitField0_ |= 0x00000002;
      return nextPackage;
    }

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

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

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

    /**
     * <code>repeated .ItemTpl Rewards = 2;</code>
     * @return whether the rewards field is set
     */
    public boolean hasRewards() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>repeated .ItemTpl Rewards = 2;</code>
     * @return this
     */
    public AgentRewardShow clearRewards() {
      bitField0_ &= ~0x00000004;
      rewards.clear();
      return this;
    }

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

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

    /**
     * <code>repeated .ItemTpl Rewards = 2;</code>
     * @param value the rewards to add
     * @return this
     */
    public AgentRewardShow addRewards(final Public.ItemTpl value) {
      bitField0_ |= 0x00000004;
      rewards.add(value);
      return this;
    }

    /**
     * <code>repeated .ItemTpl Rewards = 2;</code>
     * @param values the rewards to add
     * @return this
     */
    public AgentRewardShow addAllRewards(final Public.ItemTpl... values) {
      bitField0_ |= 0x00000004;
      rewards.addAll(values);
      return this;
    }

    /**
     * <code>repeated .ItemTpl Bonus = 3;</code>
     * @return whether the bonus field is set
     */
    public boolean hasBonus() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>repeated .ItemTpl Bonus = 3;</code>
     * @return this
     */
    public AgentRewardShow clearBonus() {
      bitField0_ &= ~0x00000008;
      bonus.clear();
      return this;
    }

    /**
     * <code>repeated .ItemTpl Bonus = 3;</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 #getMutableBonus()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<Public.ItemTpl> getBonus() {
      return bonus;
    }

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

    /**
     * <code>repeated .ItemTpl Bonus = 3;</code>
     * @param value the bonus to add
     * @return this
     */
    public AgentRewardShow addBonus(final Public.ItemTpl value) {
      bitField0_ |= 0x00000008;
      bonus.add(value);
      return this;
    }

    /**
     * <code>repeated .ItemTpl Bonus = 3;</code>
     * @param values the bonus to add
     * @return this
     */
    public AgentRewardShow addAllBonus(final Public.ItemTpl... values) {
      bitField0_ |= 0x00000008;
      bonus.addAll(values);
      return this;
    }

    /**
     * <code>repeated .ItemTpl SpecialRewards = 4;</code>
     * @return whether the specialRewards field is set
     */
    public boolean hasSpecialRewards() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>repeated .ItemTpl SpecialRewards = 4;</code>
     * @return this
     */
    public AgentRewardShow clearSpecialRewards() {
      bitField0_ &= ~0x00000010;
      specialRewards.clear();
      return this;
    }

    /**
     * <code>repeated .ItemTpl SpecialRewards = 4;</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 #getMutableSpecialRewards()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<Public.ItemTpl> getSpecialRewards() {
      return specialRewards;
    }

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

    /**
     * <code>repeated .ItemTpl SpecialRewards = 4;</code>
     * @param value the specialRewards to add
     * @return this
     */
    public AgentRewardShow addSpecialRewards(final Public.ItemTpl value) {
      bitField0_ |= 0x00000010;
      specialRewards.add(value);
      return this;
    }

    /**
     * <code>repeated .ItemTpl SpecialRewards = 4;</code>
     * @param values the specialRewards to add
     * @return this
     */
    public AgentRewardShow addAllSpecialRewards(final Public.ItemTpl... values) {
      bitField0_ |= 0x00000010;
      specialRewards.addAll(values);
      return this;
    }

    @Override
    public AgentRewardShow copyFrom(final AgentRewardShow other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        id = other.id;
        nextPackage.copyFrom(other.nextPackage);
        rewards.copyFrom(other.rewards);
        bonus.copyFrom(other.bonus);
        specialRewards.copyFrom(other.specialRewards);
      }
      return this;
    }

    @Override
    public AgentRewardShow mergeFrom(final AgentRewardShow other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasId()) {
        setId(other.id);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasRewards()) {
        getMutableRewards().addAll(other.rewards);
      }
      if (other.hasBonus()) {
        getMutableBonus().addAll(other.bonus);
      }
      if (other.hasSpecialRewards()) {
        getMutableSpecialRewards().addAll(other.specialRewards);
      }
      return this;
    }

    @Override
    public AgentRewardShow clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      id = 0;
      nextPackage.clear();
      rewards.clear();
      bonus.clear();
      specialRewards.clear();
      return this;
    }

    @Override
    public AgentRewardShow clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      nextPackage.clear();
      rewards.clearQuick();
      bonus.clearQuick();
      specialRewards.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof AgentRewardShow)) {
        return false;
      }
      AgentRewardShow other = (AgentRewardShow) o;
      return bitField0_ == other.bitField0_
        && (!hasId() || id == other.id)
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasRewards() || rewards.equals(other.rewards))
        && (!hasBonus() || bonus.equals(other.bonus))
        && (!hasSpecialRewards() || specialRewards.equals(other.specialRewards));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt32NoTag(id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        for (int i = 0; i < rewards.length(); i++) {
          output.writeRawByte((byte) 18);
          output.writeMessageNoTag(rewards.get(i));
        }
      }
      if ((bitField0_ & 0x00000008) != 0) {
        for (int i = 0; i < bonus.length(); i++) {
          output.writeRawByte((byte) 26);
          output.writeMessageNoTag(bonus.get(i));
        }
      }
      if ((bitField0_ & 0x00000010) != 0) {
        for (int i = 0; i < specialRewards.length(); i++) {
          output.writeRawByte((byte) 34);
          output.writeMessageNoTag(specialRewards.get(i));
        }
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += (1 * bonus.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(bonus);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += (1 * specialRewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(specialRewards);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public AgentRewardShow mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 8: {
            // id
            id = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // rewards
            tag = input.readRepeatedMessage(rewards, tag);
            bitField0_ |= 0x00000004;
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // bonus
            tag = input.readRepeatedMessage(bonus, tag);
            bitField0_ |= 0x00000008;
            if (tag != 34) {
              break;
            }
          }
          case 34: {
            // specialRewards
            tag = input.readRepeatedMessage(specialRewards, tag);
            bitField0_ |= 0x00000010;
            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.id, id);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRepeatedMessage(FieldNames.rewards, rewards);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRepeatedMessage(FieldNames.bonus, bonus);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRepeatedMessage(FieldNames.specialRewards, specialRewards);
      }
      output.endObject();
    }

    @Override
    public AgentRewardShow mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 2363: {
            if (input.isAtField(FieldNames.id)) {
              if (!input.trySkipNullValue()) {
                id = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1529663740: {
            if (input.isAtField(FieldNames.rewards)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(rewards);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 64368639: {
            if (input.isAtField(FieldNames.bonus)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(bonus);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 161622091: {
            if (input.isAtField(FieldNames.specialRewards)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(specialRewards);
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum AgentRewardShowFactory implements MessageFactory<AgentRewardShow> {
      INSTANCE;

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

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

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

      static final FieldName rewards = FieldName.forField("Rewards");

      static final FieldName bonus = FieldName.forField("Bonus");

      static final FieldName specialRewards = FieldName.forField("SpecialRewards");
    }
  }
}
