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

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

    /**
     * <code>optional uint32 OptionId = 1;</code>
     */
    private int optionId;

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

    private CharDatingBranchASelectReq() {
    }

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

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

    /**
     * <code>optional uint32 OptionId = 1;</code>
     * @return this
     */
    public CharDatingBranchASelectReq clearOptionId() {
      bitField0_ &= ~0x00000001;
      optionId = 0;
      return this;
    }

    /**
     * <code>optional uint32 OptionId = 1;</code>
     * @return the optionId
     */
    public int getOptionId() {
      return optionId;
    }

    /**
     * <code>optional uint32 OptionId = 1;</code>
     * @param value the optionId to set
     * @return this
     */
    public CharDatingBranchASelectReq setOptionId(final int value) {
      bitField0_ |= 0x00000001;
      optionId = 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 CharDatingBranchASelectReq 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 CharDatingBranchASelectReq 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 CharDatingBranchASelectReq 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 CharDatingBranchASelectReq setNextPackage(final byte... values) {
      bitField0_ |= 0x00000002;
      nextPackage.copyFrom(values);
      return this;
    }

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

    @Override
    public CharDatingBranchASelectReq mergeFrom(final CharDatingBranchASelectReq other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasOptionId()) {
        setOptionId(other.optionId);
      }
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      return this;
    }

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

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

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 8);
        output.writeUInt32NoTag(optionId);
      }
      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(optionId);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage);
      }
      return size;
    }

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

    @Override
    public CharDatingBranchASelectReq mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -14373744: {
            if (input.isAtField(FieldNames.optionId)) {
              if (!input.trySkipNullValue()) {
                optionId = 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 CharDatingBranchASelectReq clone() {
      return new CharDatingBranchASelectReq().copyFrom(this);
    }

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

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

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

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

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

    private enum CharDatingBranchASelectReqFactory implements MessageFactory<CharDatingBranchASelectReq> {
      INSTANCE;

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

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

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

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

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

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

    /**
     * <code>repeated uint32 BranchBOptionIds = 2;</code>
     */
    private final RepeatedInt branchBOptionIds = RepeatedInt.newEmptyInstance();

    private CharDatingBranchASelectResp() {
    }

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

    /**
     * <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 CharDatingBranchASelectResp 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 CharDatingBranchASelectResp 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 CharDatingBranchASelectResp 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 CharDatingBranchASelectResp setNextPackage(final byte... values) {
      bitField0_ |= 0x00000001;
      nextPackage.copyFrom(values);
      return this;
    }

    /**
     * <code>repeated uint32 LandmarkEventIds = 1;</code>
     * @return whether the landmarkEventIds field is set
     */
    public boolean hasLandmarkEventIds() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>repeated uint32 LandmarkEventIds = 1;</code>
     * @return this
     */
    public CharDatingBranchASelectResp clearLandmarkEventIds() {
      bitField0_ &= ~0x00000002;
      landmarkEventIds.clear();
      return this;
    }

    /**
     * <code>repeated uint32 LandmarkEventIds = 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 #getMutableLandmarkEventIds()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedInt getLandmarkEventIds() {
      return landmarkEventIds;
    }

    /**
     * <code>repeated uint32 LandmarkEventIds = 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 getMutableLandmarkEventIds() {
      bitField0_ |= 0x00000002;
      return landmarkEventIds;
    }

    /**
     * <code>repeated uint32 LandmarkEventIds = 1;</code>
     * @param value the landmarkEventIds to add
     * @return this
     */
    public CharDatingBranchASelectResp addLandmarkEventIds(final int value) {
      bitField0_ |= 0x00000002;
      landmarkEventIds.add(value);
      return this;
    }

    /**
     * <code>repeated uint32 LandmarkEventIds = 1;</code>
     * @param values the landmarkEventIds to add
     * @return this
     */
    public CharDatingBranchASelectResp addAllLandmarkEventIds(final int... values) {
      bitField0_ |= 0x00000002;
      landmarkEventIds.addAll(values);
      return this;
    }

    /**
     * <code>repeated uint32 BranchBOptionIds = 2;</code>
     * @return whether the branchBOptionIds field is set
     */
    public boolean hasBranchBOptionIds() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>repeated uint32 BranchBOptionIds = 2;</code>
     * @return this
     */
    public CharDatingBranchASelectResp clearBranchBOptionIds() {
      bitField0_ &= ~0x00000004;
      branchBOptionIds.clear();
      return this;
    }

    /**
     * <code>repeated uint32 BranchBOptionIds = 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 #getMutableBranchBOptionIds()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedInt getBranchBOptionIds() {
      return branchBOptionIds;
    }

    /**
     * <code>repeated uint32 BranchBOptionIds = 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 RepeatedInt getMutableBranchBOptionIds() {
      bitField0_ |= 0x00000004;
      return branchBOptionIds;
    }

    /**
     * <code>repeated uint32 BranchBOptionIds = 2;</code>
     * @param value the branchBOptionIds to add
     * @return this
     */
    public CharDatingBranchASelectResp addBranchBOptionIds(final int value) {
      bitField0_ |= 0x00000004;
      branchBOptionIds.add(value);
      return this;
    }

    /**
     * <code>repeated uint32 BranchBOptionIds = 2;</code>
     * @param values the branchBOptionIds to add
     * @return this
     */
    public CharDatingBranchASelectResp addAllBranchBOptionIds(final int... values) {
      bitField0_ |= 0x00000004;
      branchBOptionIds.addAll(values);
      return this;
    }

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

    @Override
    public CharDatingBranchASelectResp mergeFrom(final CharDatingBranchASelectResp other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasNextPackage()) {
        getMutableNextPackage().copyFrom(other.nextPackage);
      }
      if (other.hasLandmarkEventIds()) {
        getMutableLandmarkEventIds().addAll(other.landmarkEventIds);
      }
      if (other.hasBranchBOptionIds()) {
        getMutableBranchBOptionIds().addAll(other.branchBOptionIds);
      }
      return this;
    }

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

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof CharDatingBranchASelectResp)) {
        return false;
      }
      CharDatingBranchASelectResp other = (CharDatingBranchASelectResp) o;
      return bitField0_ == other.bitField0_
        && (!hasNextPackage() || nextPackage.equals(other.nextPackage))
        && (!hasLandmarkEventIds() || landmarkEventIds.equals(other.landmarkEventIds))
        && (!hasBranchBOptionIds() || branchBOptionIds.equals(other.branchBOptionIds));
    }

    @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 < landmarkEventIds.length(); i++) {
          output.writeRawByte((byte) 8);
          output.writeUInt32NoTag(landmarkEventIds.array()[i]);
        }
      }
      if ((bitField0_ & 0x00000004) != 0) {
        for (int i = 0; i < branchBOptionIds.length(); i++) {
          output.writeRawByte((byte) 16);
          output.writeUInt32NoTag(branchBOptionIds.array()[i]);
        }
      }
    }

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

    @Override
    @SuppressWarnings("fallthrough")
    public CharDatingBranchASelectResp 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: {
            // landmarkEventIds [packed=true]
            input.readPackedUInt32(landmarkEventIds, tag);
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // branchBOptionIds [packed=true]
            input.readPackedUInt32(branchBOptionIds, tag);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
          case 8: {
            // landmarkEventIds [packed=false]
            tag = input.readRepeatedUInt32(landmarkEventIds, tag);
            bitField0_ |= 0x00000002;
            break;
          }
          case 16: {
            // branchBOptionIds [packed=false]
            tag = input.readRepeatedUInt32(branchBOptionIds, tag);
            bitField0_ |= 0x00000004;
            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.writeRepeatedUInt32(FieldNames.landmarkEventIds, landmarkEventIds);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRepeatedUInt32(FieldNames.branchBOptionIds, branchBOptionIds);
      }
      output.endObject();
    }

    @Override
    public CharDatingBranchASelectResp 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 -1024194250: {
            if (input.isAtField(FieldNames.landmarkEventIds)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedUInt32(landmarkEventIds);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1818077405: {
            if (input.isAtField(FieldNames.branchBOptionIds)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedUInt32(branchBOptionIds);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum CharDatingBranchASelectRespFactory implements MessageFactory<CharDatingBranchASelectResp> {
      INSTANCE;

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

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

      static final FieldName landmarkEventIds = FieldName.forField("LandmarkEventIds");

      static final FieldName branchBOptionIds = FieldName.forField("BranchBOptionIds");
    }
  }
}
