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

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

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

    /**
     * <code>optional .ActivityPeriodic Periodic = 2;</code>
     */
    private final Public.ActivityPeriodic periodic = Public.ActivityPeriodic.newInstance();

    /**
     * <code>optional .ActivityLogin Login = 3;</code>
     */
    private final Public.ActivityLogin login = Public.ActivityLogin.newInstance();

    /**
     * <code>optional .ActivityMining Mining = 4;</code>
     */
    private final Public.ActivityMining mining = Public.ActivityMining.newInstance();

    /**
     * <code>optional .ActivityJointDrill JointDrill = 5;</code>
     */
    private final PublicJointDrill.ActivityJointDrill jointDrill = PublicJointDrill.ActivityJointDrill.newInstance();

    /**
     * <code>optional .ActivityCookie Cookie = 6;</code>
     */
    private final Public.ActivityCookie cookie = Public.ActivityCookie.newInstance();

    /**
     * <code>optional .ActivityTowerDefense TowerDefense = 7;</code>
     */
    private final Public.ActivityTowerDefense towerDefense = Public.ActivityTowerDefense.newInstance();

    /**
     * <code>optional .ActivityTrial Trial = 8;</code>
     */
    private final Public.ActivityTrial trial = Public.ActivityTrial.newInstance();

    /**
     * <code>optional .ActivityCG CG = 9;</code>
     */
    private final Public.ActivityCG cG = Public.ActivityCG.newInstance();

    /**
     * <code>optional .ActivityLevels Levels = 10;</code>
     */
    private final Public.ActivityLevels levels = Public.ActivityLevels.newInstance();

    /**
     * <code>optional .ActivityAvg Avg = 11;</code>
     */
    private final Public.ActivityAvg avg = Public.ActivityAvg.newInstance();

    /**
     * <code>optional .ActivityTask Task = 12;</code>
     */
    private final Public.ActivityTask task = Public.ActivityTask.newInstance();

    /**
     * <code>optional .ActivityShop Shop = 13;</code>
     */
    private final Public.ActivityShop shop = Public.ActivityShop.newInstance();

    /**
     * <code>optional .ActivityBuildConvert BdConvert = 14;</code>
     */
    private final Public.ActivityBuildConvert bdConvert = Public.ActivityBuildConvert.newInstance();

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

    private ActivityMsg() {
    }

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

    /**
     * <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 ActivityMsg 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 ActivityMsg setId(final int value) {
      bitField0_ |= 0x00000001;
      id = value;
      return this;
    }

    /**
     * <code>optional .ActivityPeriodic Periodic = 2;</code>
     * @return whether the periodic field is set
     */
    public boolean hasPeriodic() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional .ActivityPeriodic Periodic = 2;</code>
     * @return this
     */
    public ActivityMsg clearPeriodic() {
      bitField0_ &= ~0x00000002;
      periodic.clear();
      return this;
    }

    /**
     * <code>optional .ActivityPeriodic Periodic = 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 #getMutablePeriodic()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityPeriodic getPeriodic() {
      return periodic;
    }

    /**
     * <code>optional .ActivityPeriodic Periodic = 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 Public.ActivityPeriodic getMutablePeriodic() {
      bitField0_ |= 0x00000002;
      return periodic;
    }

    /**
     * <code>optional .ActivityPeriodic Periodic = 2;</code>
     * @param value the periodic to set
     * @return this
     */
    public ActivityMsg setPeriodic(final Public.ActivityPeriodic value) {
      bitField0_ |= 0x00000002;
      periodic.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityLogin Login = 3;</code>
     * @return whether the login field is set
     */
    public boolean hasLogin() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional .ActivityLogin Login = 3;</code>
     * @return this
     */
    public ActivityMsg clearLogin() {
      bitField0_ &= ~0x00000004;
      login.clear();
      return this;
    }

    /**
     * <code>optional .ActivityLogin Login = 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 #getMutableLogin()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityLogin getLogin() {
      return login;
    }

    /**
     * <code>optional .ActivityLogin Login = 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 Public.ActivityLogin getMutableLogin() {
      bitField0_ |= 0x00000004;
      return login;
    }

    /**
     * <code>optional .ActivityLogin Login = 3;</code>
     * @param value the login to set
     * @return this
     */
    public ActivityMsg setLogin(final Public.ActivityLogin value) {
      bitField0_ |= 0x00000004;
      login.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityMining Mining = 4;</code>
     * @return whether the mining field is set
     */
    public boolean hasMining() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional .ActivityMining Mining = 4;</code>
     * @return this
     */
    public ActivityMsg clearMining() {
      bitField0_ &= ~0x00000008;
      mining.clear();
      return this;
    }

    /**
     * <code>optional .ActivityMining Mining = 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 #getMutableMining()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityMining getMining() {
      return mining;
    }

    /**
     * <code>optional .ActivityMining Mining = 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.ActivityMining getMutableMining() {
      bitField0_ |= 0x00000008;
      return mining;
    }

    /**
     * <code>optional .ActivityMining Mining = 4;</code>
     * @param value the mining to set
     * @return this
     */
    public ActivityMsg setMining(final Public.ActivityMining value) {
      bitField0_ |= 0x00000008;
      mining.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityJointDrill JointDrill = 5;</code>
     * @return whether the jointDrill field is set
     */
    public boolean hasJointDrill() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional .ActivityJointDrill JointDrill = 5;</code>
     * @return this
     */
    public ActivityMsg clearJointDrill() {
      bitField0_ &= ~0x00000010;
      jointDrill.clear();
      return this;
    }

    /**
     * <code>optional .ActivityJointDrill JointDrill = 5;</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 #getMutableJointDrill()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public PublicJointDrill.ActivityJointDrill getJointDrill() {
      return jointDrill;
    }

    /**
     * <code>optional .ActivityJointDrill JointDrill = 5;</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 PublicJointDrill.ActivityJointDrill getMutableJointDrill() {
      bitField0_ |= 0x00000010;
      return jointDrill;
    }

    /**
     * <code>optional .ActivityJointDrill JointDrill = 5;</code>
     * @param value the jointDrill to set
     * @return this
     */
    public ActivityMsg setJointDrill(final PublicJointDrill.ActivityJointDrill value) {
      bitField0_ |= 0x00000010;
      jointDrill.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityCookie Cookie = 6;</code>
     * @return whether the cookie field is set
     */
    public boolean hasCookie() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional .ActivityCookie Cookie = 6;</code>
     * @return this
     */
    public ActivityMsg clearCookie() {
      bitField0_ &= ~0x00000020;
      cookie.clear();
      return this;
    }

    /**
     * <code>optional .ActivityCookie Cookie = 6;</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 #getMutableCookie()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityCookie getCookie() {
      return cookie;
    }

    /**
     * <code>optional .ActivityCookie Cookie = 6;</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.ActivityCookie getMutableCookie() {
      bitField0_ |= 0x00000020;
      return cookie;
    }

    /**
     * <code>optional .ActivityCookie Cookie = 6;</code>
     * @param value the cookie to set
     * @return this
     */
    public ActivityMsg setCookie(final Public.ActivityCookie value) {
      bitField0_ |= 0x00000020;
      cookie.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityTowerDefense TowerDefense = 7;</code>
     * @return whether the towerDefense field is set
     */
    public boolean hasTowerDefense() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>optional .ActivityTowerDefense TowerDefense = 7;</code>
     * @return this
     */
    public ActivityMsg clearTowerDefense() {
      bitField0_ &= ~0x00000040;
      towerDefense.clear();
      return this;
    }

    /**
     * <code>optional .ActivityTowerDefense TowerDefense = 7;</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 #getMutableTowerDefense()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityTowerDefense getTowerDefense() {
      return towerDefense;
    }

    /**
     * <code>optional .ActivityTowerDefense TowerDefense = 7;</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.ActivityTowerDefense getMutableTowerDefense() {
      bitField0_ |= 0x00000040;
      return towerDefense;
    }

    /**
     * <code>optional .ActivityTowerDefense TowerDefense = 7;</code>
     * @param value the towerDefense to set
     * @return this
     */
    public ActivityMsg setTowerDefense(final Public.ActivityTowerDefense value) {
      bitField0_ |= 0x00000040;
      towerDefense.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityTrial Trial = 8;</code>
     * @return whether the trial field is set
     */
    public boolean hasTrial() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>optional .ActivityTrial Trial = 8;</code>
     * @return this
     */
    public ActivityMsg clearTrial() {
      bitField0_ &= ~0x00000080;
      trial.clear();
      return this;
    }

    /**
     * <code>optional .ActivityTrial Trial = 8;</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 #getMutableTrial()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityTrial getTrial() {
      return trial;
    }

    /**
     * <code>optional .ActivityTrial Trial = 8;</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.ActivityTrial getMutableTrial() {
      bitField0_ |= 0x00000080;
      return trial;
    }

    /**
     * <code>optional .ActivityTrial Trial = 8;</code>
     * @param value the trial to set
     * @return this
     */
    public ActivityMsg setTrial(final Public.ActivityTrial value) {
      bitField0_ |= 0x00000080;
      trial.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityCG CG = 9;</code>
     * @return whether the cG field is set
     */
    public boolean hasCG() {
      return (bitField0_ & 0x00000100) != 0;
    }

    /**
     * <code>optional .ActivityCG CG = 9;</code>
     * @return this
     */
    public ActivityMsg clearCG() {
      bitField0_ &= ~0x00000100;
      cG.clear();
      return this;
    }

    /**
     * <code>optional .ActivityCG CG = 9;</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 #getMutableCG()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityCG getCG() {
      return cG;
    }

    /**
     * <code>optional .ActivityCG CG = 9;</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.ActivityCG getMutableCG() {
      bitField0_ |= 0x00000100;
      return cG;
    }

    /**
     * <code>optional .ActivityCG CG = 9;</code>
     * @param value the cG to set
     * @return this
     */
    public ActivityMsg setCG(final Public.ActivityCG value) {
      bitField0_ |= 0x00000100;
      cG.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityLevels Levels = 10;</code>
     * @return whether the levels field is set
     */
    public boolean hasLevels() {
      return (bitField0_ & 0x00000200) != 0;
    }

    /**
     * <code>optional .ActivityLevels Levels = 10;</code>
     * @return this
     */
    public ActivityMsg clearLevels() {
      bitField0_ &= ~0x00000200;
      levels.clear();
      return this;
    }

    /**
     * <code>optional .ActivityLevels Levels = 10;</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 #getMutableLevels()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityLevels getLevels() {
      return levels;
    }

    /**
     * <code>optional .ActivityLevels Levels = 10;</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.ActivityLevels getMutableLevels() {
      bitField0_ |= 0x00000200;
      return levels;
    }

    /**
     * <code>optional .ActivityLevels Levels = 10;</code>
     * @param value the levels to set
     * @return this
     */
    public ActivityMsg setLevels(final Public.ActivityLevels value) {
      bitField0_ |= 0x00000200;
      levels.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityAvg Avg = 11;</code>
     * @return whether the avg field is set
     */
    public boolean hasAvg() {
      return (bitField0_ & 0x00000400) != 0;
    }

    /**
     * <code>optional .ActivityAvg Avg = 11;</code>
     * @return this
     */
    public ActivityMsg clearAvg() {
      bitField0_ &= ~0x00000400;
      avg.clear();
      return this;
    }

    /**
     * <code>optional .ActivityAvg Avg = 11;</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 #getMutableAvg()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityAvg getAvg() {
      return avg;
    }

    /**
     * <code>optional .ActivityAvg Avg = 11;</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.ActivityAvg getMutableAvg() {
      bitField0_ |= 0x00000400;
      return avg;
    }

    /**
     * <code>optional .ActivityAvg Avg = 11;</code>
     * @param value the avg to set
     * @return this
     */
    public ActivityMsg setAvg(final Public.ActivityAvg value) {
      bitField0_ |= 0x00000400;
      avg.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityTask Task = 12;</code>
     * @return whether the task field is set
     */
    public boolean hasTask() {
      return (bitField0_ & 0x00000800) != 0;
    }

    /**
     * <code>optional .ActivityTask Task = 12;</code>
     * @return this
     */
    public ActivityMsg clearTask() {
      bitField0_ &= ~0x00000800;
      task.clear();
      return this;
    }

    /**
     * <code>optional .ActivityTask Task = 12;</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 #getMutableTask()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityTask getTask() {
      return task;
    }

    /**
     * <code>optional .ActivityTask Task = 12;</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.ActivityTask getMutableTask() {
      bitField0_ |= 0x00000800;
      return task;
    }

    /**
     * <code>optional .ActivityTask Task = 12;</code>
     * @param value the task to set
     * @return this
     */
    public ActivityMsg setTask(final Public.ActivityTask value) {
      bitField0_ |= 0x00000800;
      task.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityShop Shop = 13;</code>
     * @return whether the shop field is set
     */
    public boolean hasShop() {
      return (bitField0_ & 0x00001000) != 0;
    }

    /**
     * <code>optional .ActivityShop Shop = 13;</code>
     * @return this
     */
    public ActivityMsg clearShop() {
      bitField0_ &= ~0x00001000;
      shop.clear();
      return this;
    }

    /**
     * <code>optional .ActivityShop Shop = 13;</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 #getMutableShop()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityShop getShop() {
      return shop;
    }

    /**
     * <code>optional .ActivityShop Shop = 13;</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.ActivityShop getMutableShop() {
      bitField0_ |= 0x00001000;
      return shop;
    }

    /**
     * <code>optional .ActivityShop Shop = 13;</code>
     * @param value the shop to set
     * @return this
     */
    public ActivityMsg setShop(final Public.ActivityShop value) {
      bitField0_ |= 0x00001000;
      shop.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .ActivityBuildConvert BdConvert = 14;</code>
     * @return whether the bdConvert field is set
     */
    public boolean hasBdConvert() {
      return (bitField0_ & 0x00002000) != 0;
    }

    /**
     * <code>optional .ActivityBuildConvert BdConvert = 14;</code>
     * @return this
     */
    public ActivityMsg clearBdConvert() {
      bitField0_ &= ~0x00002000;
      bdConvert.clear();
      return this;
    }

    /**
     * <code>optional .ActivityBuildConvert BdConvert = 14;</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 #getMutableBdConvert()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Public.ActivityBuildConvert getBdConvert() {
      return bdConvert;
    }

    /**
     * <code>optional .ActivityBuildConvert BdConvert = 14;</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.ActivityBuildConvert getMutableBdConvert() {
      bitField0_ |= 0x00002000;
      return bdConvert;
    }

    /**
     * <code>optional .ActivityBuildConvert BdConvert = 14;</code>
     * @param value the bdConvert to set
     * @return this
     */
    public ActivityMsg setBdConvert(final Public.ActivityBuildConvert value) {
      bitField0_ |= 0x00002000;
      bdConvert.copyFrom(value);
      return this;
    }

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public ActivityMsg clearNextPackage() {
      bitField0_ &= ~0x00004000;
      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_ |= 0x00004000;
      return nextPackage;
    }

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

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

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

    @Override
    public ActivityMsg copyFrom(final ActivityMsg other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        id = other.id;
        periodic.copyFrom(other.periodic);
        login.copyFrom(other.login);
        mining.copyFrom(other.mining);
        jointDrill.copyFrom(other.jointDrill);
        cookie.copyFrom(other.cookie);
        towerDefense.copyFrom(other.towerDefense);
        trial.copyFrom(other.trial);
        cG.copyFrom(other.cG);
        levels.copyFrom(other.levels);
        avg.copyFrom(other.avg);
        task.copyFrom(other.task);
        shop.copyFrom(other.shop);
        bdConvert.copyFrom(other.bdConvert);
        nextPackage.copyFrom(other.nextPackage);
      }
      return this;
    }

    @Override
    public ActivityMsg mergeFrom(final ActivityMsg other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasId()) {
        setId(other.id);
      }
      if (other.hasPeriodic()) {
        getMutablePeriodic().mergeFrom(other.periodic);
      }
      if (other.hasLogin()) {
        getMutableLogin().mergeFrom(other.login);
      }
      if (other.hasMining()) {
        getMutableMining().mergeFrom(other.mining);
      }
      if (other.hasJointDrill()) {
        getMutableJointDrill().mergeFrom(other.jointDrill);
      }
      if (other.hasCookie()) {
        getMutableCookie().mergeFrom(other.cookie);
      }
      if (other.hasTowerDefense()) {
        getMutableTowerDefense().mergeFrom(other.towerDefense);
      }
      if (other.hasTrial()) {
        getMutableTrial().mergeFrom(other.trial);
      }
      if (other.hasCG()) {
        getMutableCG().mergeFrom(other.cG);
      }
      if (other.hasLevels()) {
        getMutableLevels().mergeFrom(other.levels);
      }
      if (other.hasAvg()) {
        getMutableAvg().mergeFrom(other.avg);
      }
      if (other.hasTask()) {
        getMutableTask().mergeFrom(other.task);
      }
      if (other.hasShop()) {
        getMutableShop().mergeFrom(other.shop);
      }
      if (other.hasBdConvert()) {
        getMutableBdConvert().mergeFrom(other.bdConvert);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      return this;
    }

    @Override
    public ActivityMsg clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      id = 0;
      periodic.clear();
      login.clear();
      mining.clear();
      jointDrill.clear();
      cookie.clear();
      towerDefense.clear();
      trial.clear();
      cG.clear();
      levels.clear();
      avg.clear();
      task.clear();
      shop.clear();
      bdConvert.clear();
      nextPackage.clear();
      return this;
    }

    @Override
    public ActivityMsg clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      periodic.clearQuick();
      login.clearQuick();
      mining.clearQuick();
      jointDrill.clearQuick();
      cookie.clearQuick();
      towerDefense.clearQuick();
      trial.clearQuick();
      cG.clearQuick();
      levels.clearQuick();
      avg.clearQuick();
      task.clearQuick();
      shop.clearQuick();
      bdConvert.clearQuick();
      nextPackage.clear();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ActivityMsg)) {
        return false;
      }
      ActivityMsg other = (ActivityMsg) o;
      return bitField0_ == other.bitField0_
        && (!hasId() || id == other.id)
        && (!hasPeriodic() || periodic.equals(other.periodic))
        && (!hasLogin() || login.equals(other.login))
        && (!hasMining() || mining.equals(other.mining))
        && (!hasJointDrill() || jointDrill.equals(other.jointDrill))
        && (!hasCookie() || cookie.equals(other.cookie))
        && (!hasTowerDefense() || towerDefense.equals(other.towerDefense))
        && (!hasTrial() || trial.equals(other.trial))
        && (!hasCG() || cG.equals(other.cG))
        && (!hasLevels() || levels.equals(other.levels))
        && (!hasAvg() || avg.equals(other.avg))
        && (!hasTask() || task.equals(other.task))
        && (!hasShop() || shop.equals(other.shop))
        && (!hasBdConvert() || bdConvert.equals(other.bdConvert))
        && (!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.writeRawByte((byte) 18);
        output.writeMessageNoTag(periodic);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 26);
        output.writeMessageNoTag(login);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 34);
        output.writeMessageNoTag(mining);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 42);
        output.writeMessageNoTag(jointDrill);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawByte((byte) 50);
        output.writeMessageNoTag(cookie);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawByte((byte) 58);
        output.writeMessageNoTag(towerDefense);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRawByte((byte) 66);
        output.writeMessageNoTag(trial);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRawByte((byte) 74);
        output.writeMessageNoTag(cG);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeRawByte((byte) 82);
        output.writeMessageNoTag(levels);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeRawByte((byte) 90);
        output.writeMessageNoTag(avg);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeRawByte((byte) 98);
        output.writeMessageNoTag(task);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeRawByte((byte) 106);
        output.writeMessageNoTag(shop);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        output.writeRawByte((byte) 114);
        output.writeMessageNoTag(bdConvert);
      }
      if ((bitField0_ & 0x00004000) != 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 += 1 + ProtoSink.computeMessageSizeNoTag(periodic);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(login);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(mining);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(jointDrill);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(cookie);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(towerDefense);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(trial);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(cG);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(levels);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(avg);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(task);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(shop);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(bdConvert);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ActivityMsg 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 != 18) {
              break;
            }
          }
          case 18: {
            // periodic
            input.readMessage(periodic);
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // login
            input.readMessage(login);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 34) {
              break;
            }
          }
          case 34: {
            // mining
            input.readMessage(mining);
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 42) {
              break;
            }
          }
          case 42: {
            // jointDrill
            input.readMessage(jointDrill);
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 50) {
              break;
            }
          }
          case 50: {
            // cookie
            input.readMessage(cookie);
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 58) {
              break;
            }
          }
          case 58: {
            // towerDefense
            input.readMessage(towerDefense);
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 66) {
              break;
            }
          }
          case 66: {
            // trial
            input.readMessage(trial);
            bitField0_ |= 0x00000080;
            tag = input.readTag();
            if (tag != 74) {
              break;
            }
          }
          case 74: {
            // cG
            input.readMessage(cG);
            bitField0_ |= 0x00000100;
            tag = input.readTag();
            if (tag != 82) {
              break;
            }
          }
          case 82: {
            // levels
            input.readMessage(levels);
            bitField0_ |= 0x00000200;
            tag = input.readTag();
            if (tag != 90) {
              break;
            }
          }
          case 90: {
            // avg
            input.readMessage(avg);
            bitField0_ |= 0x00000400;
            tag = input.readTag();
            if (tag != 98) {
              break;
            }
          }
          case 98: {
            // task
            input.readMessage(task);
            bitField0_ |= 0x00000800;
            tag = input.readTag();
            if (tag != 106) {
              break;
            }
          }
          case 106: {
            // shop
            input.readMessage(shop);
            bitField0_ |= 0x00001000;
            tag = input.readTag();
            if (tag != 114) {
              break;
            }
          }
          case 114: {
            // bdConvert
            input.readMessage(bdConvert);
            bitField0_ |= 0x00002000;
            tag = input.readTag();
            if (tag != 16378) {
              break;
            }
          }
          case 16378: {
            // nextPackage
            input.readBytes(nextPackage);
            bitField0_ |= 0x00004000;
            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.writeMessage(FieldNames.periodic, periodic);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeMessage(FieldNames.login, login);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeMessage(FieldNames.mining, mining);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeMessage(FieldNames.jointDrill, jointDrill);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeMessage(FieldNames.cookie, cookie);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeMessage(FieldNames.towerDefense, towerDefense);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeMessage(FieldNames.trial, trial);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeMessage(FieldNames.cG, cG);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeMessage(FieldNames.levels, levels);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeMessage(FieldNames.avg, avg);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeMessage(FieldNames.task, task);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeMessage(FieldNames.shop, shop);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        output.writeMessage(FieldNames.bdConvert, bdConvert);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        output.writeBytes(FieldNames.nextPackage, nextPackage);
      }
      output.endObject();
    }

    @Override
    public ActivityMsg 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 498563771: {
            if (input.isAtField(FieldNames.periodic)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(periodic);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 73596745: {
            if (input.isAtField(FieldNames.login)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(login);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1990171536: {
            if (input.isAtField(FieldNames.mining)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(mining);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 118850065: {
            if (input.isAtField(FieldNames.jointDrill)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(jointDrill);
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2024076932: {
            if (input.isAtField(FieldNames.cookie)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(cookie);
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 606816023: {
            if (input.isAtField(FieldNames.towerDefense)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(towerDefense);
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 81075958: {
            if (input.isAtField(FieldNames.trial)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(trial);
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2148: {
            if (input.isAtField(FieldNames.cG)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(cG);
                bitField0_ |= 0x00000100;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2022260337: {
            if (input.isAtField(FieldNames.levels)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(levels);
                bitField0_ |= 0x00000200;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 66226: {
            if (input.isAtField(FieldNames.avg)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(avg);
                bitField0_ |= 0x00000400;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2599333: {
            if (input.isAtField(FieldNames.task)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(task);
                bitField0_ |= 0x00000800;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 2576150: {
            if (input.isAtField(FieldNames.shop)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(shop);
                bitField0_ |= 0x00001000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1770707697: {
            if (input.isAtField(FieldNames.bdConvert)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(bdConvert);
                bitField0_ |= 0x00002000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -2082324045: {
            if (input.isAtField(FieldNames.nextPackage)) {
              if (!input.trySkipNullValue()) {
                input.readBytes(nextPackage);
                bitField0_ |= 0x00004000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum ActivityMsgFactory implements MessageFactory<ActivityMsg> {
      INSTANCE;

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

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

      static final FieldName periodic = FieldName.forField("Periodic");

      static final FieldName login = FieldName.forField("Login");

      static final FieldName mining = FieldName.forField("Mining");

      static final FieldName jointDrill = FieldName.forField("JointDrill");

      static final FieldName cookie = FieldName.forField("Cookie");

      static final FieldName towerDefense = FieldName.forField("TowerDefense");

      static final FieldName trial = FieldName.forField("Trial");

      static final FieldName cG = FieldName.forField("CG");

      static final FieldName levels = FieldName.forField("Levels");

      static final FieldName avg = FieldName.forField("Avg");

      static final FieldName task = FieldName.forField("Task");

      static final FieldName shop = FieldName.forField("Shop");

      static final FieldName bdConvert = FieldName.forField("BdConvert");

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

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

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

    /**
     * <code>repeated .ActivityMsg List = 1;</code>
     */
    private final RepeatedMessage<ActivityMsg> list = RepeatedMessage.newEmptyInstance(ActivityMsg.getFactory());

    private ActivityResp() {
    }

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

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

    /**
     * <code>optional bytes NextPackage = 2047;</code>
     * @return this
     */
    public ActivityResp clearNextPackage() {
      bitField0_ &= ~0x00000001;
      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_ |= 0x00000001;
      return nextPackage;
    }

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

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

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

    /**
     * <code>repeated .ActivityMsg List = 1;</code>
     * @return whether the list field is set
     */
    public boolean hasList() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>repeated .ActivityMsg List = 1;</code>
     * @return this
     */
    public ActivityResp clearList() {
      bitField0_ &= ~0x00000002;
      list.clear();
      return this;
    }

    /**
     * <code>repeated .ActivityMsg List = 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 #getMutableList()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<ActivityMsg> getList() {
      return list;
    }

    /**
     * <code>repeated .ActivityMsg List = 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 RepeatedMessage<ActivityMsg> getMutableList() {
      bitField0_ |= 0x00000002;
      return list;
    }

    /**
     * <code>repeated .ActivityMsg List = 1;</code>
     * @param value the list to add
     * @return this
     */
    public ActivityResp addList(final ActivityMsg value) {
      bitField0_ |= 0x00000002;
      list.add(value);
      return this;
    }

    /**
     * <code>repeated .ActivityMsg List = 1;</code>
     * @param values the list to add
     * @return this
     */
    public ActivityResp addAllList(final ActivityMsg... values) {
      bitField0_ |= 0x00000002;
      list.addAll(values);
      return this;
    }

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

    @Override
    public ActivityResp mergeFrom(final ActivityResp other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasList()) {
        getMutableList().addAll(other.list);
      }
      return this;
    }

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

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ActivityResp)) {
        return false;
      }
      ActivityResp other = (ActivityResp) o;
      return bitField0_ == other.bitField0_
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasList() || list.equals(other.list));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawLittleEndian16((short) 32762);
        output.writeBytesNoTag(nextPackage);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        for (int i = 0; i < list.length(); i++) {
          output.writeRawByte((byte) 10);
          output.writeMessageNoTag(list.get(i));
        }
      }
    }

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

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

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

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

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

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

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

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

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

    private enum ActivityRespFactory implements MessageFactory<ActivityResp> {
      INSTANCE;

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

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

      static final FieldName list = FieldName.forField("List");
    }
  }
}
