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

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

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

    /**
     * <code>optional uint32 unk_int = 5;</code>
     */
    private int unkInt;

    /**
     * <code>optional uint32 group_id = 12;</code>
     */
    private int groupId;

    /**
     * <code>optional .RotateMapCsReq.NewMapRot rogue_map = 9;</code>
     */
    private final NewMapRot rogueMap = NewMapRot.newInstance();

    /**
     * <code>optional .MotionInfo motion = 13;</code>
     */
    private final MotionInfoOuterClass.MotionInfo motion = MotionInfoOuterClass.MotionInfo.newInstance();

    private RotateMapCsReq() {
    }

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

    /**
     * <code>optional uint32 unk_int = 5;</code>
     * @return whether the unkInt field is set
     */
    public boolean hasUnkInt() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional uint32 unk_int = 5;</code>
     * @return this
     */
    public RotateMapCsReq clearUnkInt() {
      bitField0_ &= ~0x00000001;
      unkInt = 0;
      return this;
    }

    /**
     * <code>optional uint32 unk_int = 5;</code>
     * @return the unkInt
     */
    public int getUnkInt() {
      return unkInt;
    }

    /**
     * <code>optional uint32 unk_int = 5;</code>
     * @param value the unkInt to set
     * @return this
     */
    public RotateMapCsReq setUnkInt(final int value) {
      bitField0_ |= 0x00000001;
      unkInt = value;
      return this;
    }

    /**
     * <code>optional uint32 group_id = 12;</code>
     * @return whether the groupId field is set
     */
    public boolean hasGroupId() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional uint32 group_id = 12;</code>
     * @return this
     */
    public RotateMapCsReq clearGroupId() {
      bitField0_ &= ~0x00000002;
      groupId = 0;
      return this;
    }

    /**
     * <code>optional uint32 group_id = 12;</code>
     * @return the groupId
     */
    public int getGroupId() {
      return groupId;
    }

    /**
     * <code>optional uint32 group_id = 12;</code>
     * @param value the groupId to set
     * @return this
     */
    public RotateMapCsReq setGroupId(final int value) {
      bitField0_ |= 0x00000002;
      groupId = value;
      return this;
    }

    /**
     * <code>optional .RotateMapCsReq.NewMapRot rogue_map = 9;</code>
     * @return whether the rogueMap field is set
     */
    public boolean hasRogueMap() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional .RotateMapCsReq.NewMapRot rogue_map = 9;</code>
     * @return this
     */
    public RotateMapCsReq clearRogueMap() {
      bitField0_ &= ~0x00000004;
      rogueMap.clear();
      return this;
    }

    /**
     * <code>optional .RotateMapCsReq.NewMapRot rogue_map = 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 #getMutableRogueMap()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public NewMapRot getRogueMap() {
      return rogueMap;
    }

    /**
     * <code>optional .RotateMapCsReq.NewMapRot rogue_map = 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 NewMapRot getMutableRogueMap() {
      bitField0_ |= 0x00000004;
      return rogueMap;
    }

    /**
     * <code>optional .RotateMapCsReq.NewMapRot rogue_map = 9;</code>
     * @param value the rogueMap to set
     * @return this
     */
    public RotateMapCsReq setRogueMap(final NewMapRot value) {
      bitField0_ |= 0x00000004;
      rogueMap.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .MotionInfo motion = 13;</code>
     * @return whether the motion field is set
     */
    public boolean hasMotion() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional .MotionInfo motion = 13;</code>
     * @return this
     */
    public RotateMapCsReq clearMotion() {
      bitField0_ &= ~0x00000008;
      motion.clear();
      return this;
    }

    /**
     * <code>optional .MotionInfo motion = 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 #getMutableMotion()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public MotionInfoOuterClass.MotionInfo getMotion() {
      return motion;
    }

    /**
     * <code>optional .MotionInfo motion = 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 MotionInfoOuterClass.MotionInfo getMutableMotion() {
      bitField0_ |= 0x00000008;
      return motion;
    }

    /**
     * <code>optional .MotionInfo motion = 13;</code>
     * @param value the motion to set
     * @return this
     */
    public RotateMapCsReq setMotion(final MotionInfoOuterClass.MotionInfo value) {
      bitField0_ |= 0x00000008;
      motion.copyFrom(value);
      return this;
    }

    @Override
    public RotateMapCsReq copyFrom(final RotateMapCsReq other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        unkInt = other.unkInt;
        groupId = other.groupId;
        rogueMap.copyFrom(other.rogueMap);
        motion.copyFrom(other.motion);
      }
      return this;
    }

    @Override
    public RotateMapCsReq mergeFrom(final RotateMapCsReq other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasUnkInt()) {
        setUnkInt(other.unkInt);
      }
      if (other.hasGroupId()) {
        setGroupId(other.groupId);
      }
      if (other.hasRogueMap()) {
        getMutableRogueMap().mergeFrom(other.rogueMap);
      }
      if (other.hasMotion()) {
        getMutableMotion().mergeFrom(other.motion);
      }
      return this;
    }

    @Override
    public RotateMapCsReq clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      unkInt = 0;
      groupId = 0;
      rogueMap.clear();
      motion.clear();
      return this;
    }

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof RotateMapCsReq)) {
        return false;
      }
      RotateMapCsReq other = (RotateMapCsReq) o;
      return bitField0_ == other.bitField0_
        && (!hasUnkInt() || unkInt == other.unkInt)
        && (!hasGroupId() || groupId == other.groupId)
        && (!hasRogueMap() || rogueMap.equals(other.rogueMap))
        && (!hasMotion() || motion.equals(other.motion));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 40);
        output.writeUInt32NoTag(unkInt);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 96);
        output.writeUInt32NoTag(groupId);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 74);
        output.writeMessageNoTag(rogueMap);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 106);
        output.writeMessageNoTag(motion);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(unkInt);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(rogueMap);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(motion);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public RotateMapCsReq mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 40: {
            // unkInt
            unkInt = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 96) {
              break;
            }
          }
          case 96: {
            // groupId
            groupId = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 74) {
              break;
            }
          }
          case 74: {
            // rogueMap
            input.readMessage(rogueMap);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 106) {
              break;
            }
          }
          case 106: {
            // motion
            input.readMessage(motion);
            bitField0_ |= 0x00000008;
            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.unkInt, unkInt);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.groupId, groupId);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeMessage(FieldNames.rogueMap, rogueMap);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeMessage(FieldNames.motion, motion);
      }
      output.endObject();
    }

    @Override
    public RotateMapCsReq mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -840508003:
          case -285293790: {
            if (input.isAtField(FieldNames.unkInt)) {
              if (!input.trySkipNullValue()) {
                unkInt = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 293428218:
          case 506361563: {
            if (input.isAtField(FieldNames.groupId)) {
              if (!input.trySkipNullValue()) {
                groupId = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -394483422:
          case 656463223: {
            if (input.isAtField(FieldNames.rogueMap)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(rogueMap);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1068318794: {
            if (input.isAtField(FieldNames.motion)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(motion);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

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

      /**
       * <code>optional float z = 4;</code>
       */
      private float z;

      /**
       * <code>optional float w = 8;</code>
       */
      private float w;

      /**
       * <code>optional float x = 9;</code>
       */
      private float x;

      /**
       * <code>optional float y = 14;</code>
       */
      private float y;

      private Vector4() {
      }

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

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

      /**
       * <code>optional float z = 4;</code>
       * @return this
       */
      public Vector4 clearZ() {
        bitField0_ &= ~0x00000001;
        z = 0F;
        return this;
      }

      /**
       * <code>optional float z = 4;</code>
       * @return the z
       */
      public float getZ() {
        return z;
      }

      /**
       * <code>optional float z = 4;</code>
       * @param value the z to set
       * @return this
       */
      public Vector4 setZ(final float value) {
        bitField0_ |= 0x00000001;
        z = value;
        return this;
      }

      /**
       * <code>optional float w = 8;</code>
       * @return whether the w field is set
       */
      public boolean hasW() {
        return (bitField0_ & 0x00000002) != 0;
      }

      /**
       * <code>optional float w = 8;</code>
       * @return this
       */
      public Vector4 clearW() {
        bitField0_ &= ~0x00000002;
        w = 0F;
        return this;
      }

      /**
       * <code>optional float w = 8;</code>
       * @return the w
       */
      public float getW() {
        return w;
      }

      /**
       * <code>optional float w = 8;</code>
       * @param value the w to set
       * @return this
       */
      public Vector4 setW(final float value) {
        bitField0_ |= 0x00000002;
        w = value;
        return this;
      }

      /**
       * <code>optional float x = 9;</code>
       * @return whether the x field is set
       */
      public boolean hasX() {
        return (bitField0_ & 0x00000004) != 0;
      }

      /**
       * <code>optional float x = 9;</code>
       * @return this
       */
      public Vector4 clearX() {
        bitField0_ &= ~0x00000004;
        x = 0F;
        return this;
      }

      /**
       * <code>optional float x = 9;</code>
       * @return the x
       */
      public float getX() {
        return x;
      }

      /**
       * <code>optional float x = 9;</code>
       * @param value the x to set
       * @return this
       */
      public Vector4 setX(final float value) {
        bitField0_ |= 0x00000004;
        x = value;
        return this;
      }

      /**
       * <code>optional float y = 14;</code>
       * @return whether the y field is set
       */
      public boolean hasY() {
        return (bitField0_ & 0x00000008) != 0;
      }

      /**
       * <code>optional float y = 14;</code>
       * @return this
       */
      public Vector4 clearY() {
        bitField0_ &= ~0x00000008;
        y = 0F;
        return this;
      }

      /**
       * <code>optional float y = 14;</code>
       * @return the y
       */
      public float getY() {
        return y;
      }

      /**
       * <code>optional float y = 14;</code>
       * @param value the y to set
       * @return this
       */
      public Vector4 setY(final float value) {
        bitField0_ |= 0x00000008;
        y = value;
        return this;
      }

      @Override
      public Vector4 copyFrom(final Vector4 other) {
        cachedSize = other.cachedSize;
        if ((bitField0_ | other.bitField0_) != 0) {
          bitField0_ = other.bitField0_;
          z = other.z;
          w = other.w;
          x = other.x;
          y = other.y;
        }
        return this;
      }

      @Override
      public Vector4 mergeFrom(final Vector4 other) {
        if (other.isEmpty()) {
          return this;
        }
        cachedSize = -1;
        if (other.hasZ()) {
          setZ(other.z);
        }
        if (other.hasW()) {
          setW(other.w);
        }
        if (other.hasX()) {
          setX(other.x);
        }
        if (other.hasY()) {
          setY(other.y);
        }
        return this;
      }

      @Override
      public Vector4 clear() {
        if (isEmpty()) {
          return this;
        }
        cachedSize = -1;
        bitField0_ = 0;
        z = 0F;
        w = 0F;
        x = 0F;
        y = 0F;
        return this;
      }

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

      @Override
      public boolean equals(Object o) {
        if (o == this) {
          return true;
        }
        if (!(o instanceof Vector4)) {
          return false;
        }
        Vector4 other = (Vector4) o;
        return bitField0_ == other.bitField0_
          && (!hasZ() || ProtoUtil.isEqual(z, other.z))
          && (!hasW() || ProtoUtil.isEqual(w, other.w))
          && (!hasX() || ProtoUtil.isEqual(x, other.x))
          && (!hasY() || ProtoUtil.isEqual(y, other.y));
      }

      @Override
      public void writeTo(final ProtoSink output) throws IOException {
        if ((bitField0_ & 0x00000001) != 0) {
          output.writeRawByte((byte) 37);
          output.writeFloatNoTag(z);
        }
        if ((bitField0_ & 0x00000002) != 0) {
          output.writeRawByte((byte) 69);
          output.writeFloatNoTag(w);
        }
        if ((bitField0_ & 0x00000004) != 0) {
          output.writeRawByte((byte) 77);
          output.writeFloatNoTag(x);
        }
        if ((bitField0_ & 0x00000008) != 0) {
          output.writeRawByte((byte) 117);
          output.writeFloatNoTag(y);
        }
      }

      @Override
      protected int computeSerializedSize() {
        int size = 0;
        if ((bitField0_ & 0x00000001) != 0) {
          size += 5;
        }
        if ((bitField0_ & 0x00000002) != 0) {
          size += 5;
        }
        if ((bitField0_ & 0x00000004) != 0) {
          size += 5;
        }
        if ((bitField0_ & 0x00000008) != 0) {
          size += 5;
        }
        return size;
      }

      @Override
      @SuppressWarnings("fallthrough")
      public Vector4 mergeFrom(final ProtoSource input) throws IOException {
        // Enabled Fall-Through Optimization (QuickBuffers)
        int tag = input.readTag();
        while (true) {
          switch (tag) {
            case 37: {
              // z
              z = input.readFloat();
              bitField0_ |= 0x00000001;
              tag = input.readTag();
              if (tag != 69) {
                break;
              }
            }
            case 69: {
              // w
              w = input.readFloat();
              bitField0_ |= 0x00000002;
              tag = input.readTag();
              if (tag != 77) {
                break;
              }
            }
            case 77: {
              // x
              x = input.readFloat();
              bitField0_ |= 0x00000004;
              tag = input.readTag();
              if (tag != 117) {
                break;
              }
            }
            case 117: {
              // y
              y = input.readFloat();
              bitField0_ |= 0x00000008;
              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.writeFloat(FieldNames.z, z);
        }
        if ((bitField0_ & 0x00000002) != 0) {
          output.writeFloat(FieldNames.w, w);
        }
        if ((bitField0_ & 0x00000004) != 0) {
          output.writeFloat(FieldNames.x, x);
        }
        if ((bitField0_ & 0x00000008) != 0) {
          output.writeFloat(FieldNames.y, y);
        }
        output.endObject();
      }

      @Override
      public Vector4 mergeFrom(final JsonSource input) throws IOException {
        if (!input.beginObject()) {
          return this;
        }
        while (!input.isAtEnd()) {
          switch (input.readFieldHash()) {
            case 122: {
              if (input.isAtField(FieldNames.z)) {
                if (!input.trySkipNullValue()) {
                  z = input.readFloat();
                  bitField0_ |= 0x00000001;
                }
              } else {
                input.skipUnknownField();
              }
              break;
            }
            case 119: {
              if (input.isAtField(FieldNames.w)) {
                if (!input.trySkipNullValue()) {
                  w = input.readFloat();
                  bitField0_ |= 0x00000002;
                }
              } else {
                input.skipUnknownField();
              }
              break;
            }
            case 120: {
              if (input.isAtField(FieldNames.x)) {
                if (!input.trySkipNullValue()) {
                  x = input.readFloat();
                  bitField0_ |= 0x00000004;
                }
              } else {
                input.skipUnknownField();
              }
              break;
            }
            case 121: {
              if (input.isAtField(FieldNames.y)) {
                if (!input.trySkipNullValue()) {
                  y = input.readFloat();
                  bitField0_ |= 0x00000008;
                }
              } else {
                input.skipUnknownField();
              }
              break;
            }
            default: {
              input.skipUnknownField();
              break;
            }
          }
        }
        input.endObject();
        return this;
      }

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

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

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

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

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

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

      private enum Vector4Factory implements MessageFactory<Vector4> {
        INSTANCE;

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

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

        static final FieldName w = FieldName.forField("w");

        static final FieldName x = FieldName.forField("x");

        static final FieldName y = FieldName.forField("y");
      }
    }

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

      /**
       * <code>optional .RotateMapCsReq.Vector4 vector4 = 8;</code>
       */
      private final Vector4 vector4 = Vector4.newInstance();

      /**
       * <code>optional .Vector vector3 = 11;</code>
       */
      private final VectorOuterClass.Vector vector3 = VectorOuterClass.Vector.newInstance();

      private NewMapRot() {
      }

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

      /**
       * <code>optional .RotateMapCsReq.Vector4 vector4 = 8;</code>
       * @return whether the vector4 field is set
       */
      public boolean hasVector4() {
        return (bitField0_ & 0x00000001) != 0;
      }

      /**
       * <code>optional .RotateMapCsReq.Vector4 vector4 = 8;</code>
       * @return this
       */
      public NewMapRot clearVector4() {
        bitField0_ &= ~0x00000001;
        vector4.clear();
        return this;
      }

      /**
       * <code>optional .RotateMapCsReq.Vector4 vector4 = 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 #getMutableVector4()} if you want to modify it.
       *
       * @return internal storage object for reading
       */
      public Vector4 getVector4() {
        return vector4;
      }

      /**
       * <code>optional .RotateMapCsReq.Vector4 vector4 = 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 Vector4 getMutableVector4() {
        bitField0_ |= 0x00000001;
        return vector4;
      }

      /**
       * <code>optional .RotateMapCsReq.Vector4 vector4 = 8;</code>
       * @param value the vector4 to set
       * @return this
       */
      public NewMapRot setVector4(final Vector4 value) {
        bitField0_ |= 0x00000001;
        vector4.copyFrom(value);
        return this;
      }

      /**
       * <code>optional .Vector vector3 = 11;</code>
       * @return whether the vector3 field is set
       */
      public boolean hasVector3() {
        return (bitField0_ & 0x00000002) != 0;
      }

      /**
       * <code>optional .Vector vector3 = 11;</code>
       * @return this
       */
      public NewMapRot clearVector3() {
        bitField0_ &= ~0x00000002;
        vector3.clear();
        return this;
      }

      /**
       * <code>optional .Vector vector3 = 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 #getMutableVector3()} if you want to modify it.
       *
       * @return internal storage object for reading
       */
      public VectorOuterClass.Vector getVector3() {
        return vector3;
      }

      /**
       * <code>optional .Vector vector3 = 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 VectorOuterClass.Vector getMutableVector3() {
        bitField0_ |= 0x00000002;
        return vector3;
      }

      /**
       * <code>optional .Vector vector3 = 11;</code>
       * @param value the vector3 to set
       * @return this
       */
      public NewMapRot setVector3(final VectorOuterClass.Vector value) {
        bitField0_ |= 0x00000002;
        vector3.copyFrom(value);
        return this;
      }

      @Override
      public NewMapRot copyFrom(final NewMapRot other) {
        cachedSize = other.cachedSize;
        if ((bitField0_ | other.bitField0_) != 0) {
          bitField0_ = other.bitField0_;
          vector4.copyFrom(other.vector4);
          vector3.copyFrom(other.vector3);
        }
        return this;
      }

      @Override
      public NewMapRot mergeFrom(final NewMapRot other) {
        if (other.isEmpty()) {
          return this;
        }
        cachedSize = -1;
        if (other.hasVector4()) {
          getMutableVector4().mergeFrom(other.vector4);
        }
        if (other.hasVector3()) {
          getMutableVector3().mergeFrom(other.vector3);
        }
        return this;
      }

      @Override
      public NewMapRot clear() {
        if (isEmpty()) {
          return this;
        }
        cachedSize = -1;
        bitField0_ = 0;
        vector4.clear();
        vector3.clear();
        return this;
      }

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

      @Override
      public boolean equals(Object o) {
        if (o == this) {
          return true;
        }
        if (!(o instanceof NewMapRot)) {
          return false;
        }
        NewMapRot other = (NewMapRot) o;
        return bitField0_ == other.bitField0_
          && (!hasVector4() || vector4.equals(other.vector4))
          && (!hasVector3() || vector3.equals(other.vector3));
      }

      @Override
      public void writeTo(final ProtoSink output) throws IOException {
        if ((bitField0_ & 0x00000001) != 0) {
          output.writeRawByte((byte) 66);
          output.writeMessageNoTag(vector4);
        }
        if ((bitField0_ & 0x00000002) != 0) {
          output.writeRawByte((byte) 90);
          output.writeMessageNoTag(vector3);
        }
      }

      @Override
      protected int computeSerializedSize() {
        int size = 0;
        if ((bitField0_ & 0x00000001) != 0) {
          size += 1 + ProtoSink.computeMessageSizeNoTag(vector4);
        }
        if ((bitField0_ & 0x00000002) != 0) {
          size += 1 + ProtoSink.computeMessageSizeNoTag(vector3);
        }
        return size;
      }

      @Override
      @SuppressWarnings("fallthrough")
      public NewMapRot mergeFrom(final ProtoSource input) throws IOException {
        // Enabled Fall-Through Optimization (QuickBuffers)
        int tag = input.readTag();
        while (true) {
          switch (tag) {
            case 66: {
              // vector4
              input.readMessage(vector4);
              bitField0_ |= 0x00000001;
              tag = input.readTag();
              if (tag != 90) {
                break;
              }
            }
            case 90: {
              // vector3
              input.readMessage(vector3);
              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.writeMessage(FieldNames.vector4, vector4);
        }
        if ((bitField0_ & 0x00000002) != 0) {
          output.writeMessage(FieldNames.vector3, vector3);
        }
        output.endObject();
      }

      @Override
      public NewMapRot mergeFrom(final JsonSource input) throws IOException {
        if (!input.beginObject()) {
          return this;
        }
        while (!input.isAtEnd()) {
          switch (input.readFieldHash()) {
            case 337790801: {
              if (input.isAtField(FieldNames.vector4)) {
                if (!input.trySkipNullValue()) {
                  input.readMessage(vector4);
                  bitField0_ |= 0x00000001;
                }
              } else {
                input.skipUnknownField();
              }
              break;
            }
            case 337790800: {
              if (input.isAtField(FieldNames.vector3)) {
                if (!input.trySkipNullValue()) {
                  input.readMessage(vector3);
                  bitField0_ |= 0x00000002;
                }
              } else {
                input.skipUnknownField();
              }
              break;
            }
            default: {
              input.skipUnknownField();
              break;
            }
          }
        }
        input.endObject();
        return this;
      }

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

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

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

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

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

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

      private enum NewMapRotFactory implements MessageFactory<NewMapRot> {
        INSTANCE;

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

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

        static final FieldName vector3 = FieldName.forField("vector3");
      }
    }

    private enum RotateMapCsReqFactory implements MessageFactory<RotateMapCsReq> {
      INSTANCE;

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

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

      static final FieldName groupId = FieldName.forField("groupId", "group_id");

      static final FieldName rogueMap = FieldName.forField("rogueMap", "rogue_map");

      static final FieldName motion = FieldName.forField("motion");
    }
  }
}
