// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
// Code generated by protocol buffer compiler. Do not edit!
package edu.wpi.first.math.proto;

import java.io.IOException;
import us.hebi.quickbuf.Descriptors;
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;
import us.hebi.quickbuf.RepeatedByte;
import us.hebi.quickbuf.RepeatedMessage;

public final class Kinematics {
  private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(3021,
    "ChBraW5lbWF0aWNzLnByb3RvEgl3cGkucHJvdG8aEGdlb21ldHJ5MmQucHJvdG8iTQoVUHJvdG9idWZD" + 
    "aGFzc2lzU3BlZWRzEg4KAnZ4GAEgASgBUgJ2eBIOCgJ2eRgCIAEoAVICdnkSFAoFb21lZ2EYAyABKAFS" + 
    "BW9tZWdhIkYKI1Byb3RvYnVmRGlmZmVyZW50aWFsRHJpdmVLaW5lbWF0aWNzEh8KC3RyYWNrX3dpZHRo" + 
    "GAEgASgBUgp0cmFja1dpZHRoIlAKJFByb3RvYnVmRGlmZmVyZW50aWFsRHJpdmVXaGVlbFNwZWVkcxIS" + 
    "CgRsZWZ0GAEgASgBUgRsZWZ0EhQKBXJpZ2h0GAIgASgBUgVyaWdodCJTCidQcm90b2J1ZkRpZmZlcmVu" + 
    "dGlhbERyaXZlV2hlZWxQb3NpdGlvbnMSEgoEbGVmdBgBIAEoAVIEbGVmdBIUCgVyaWdodBgCIAEoAVIF" + 
    "cmlnaHQipAIKHlByb3RvYnVmTWVjYW51bURyaXZlS2luZW1hdGljcxI/Cgpmcm9udF9sZWZ0GAEgASgL" + 
    "MiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIJZnJvbnRMZWZ0EkEKC2Zyb250X3JpZ2h0" + 
    "GAIgASgLMiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIKZnJvbnRSaWdodBI9CglyZWFy" + 
    "X2xlZnQYAyABKAsyIC53cGkucHJvdG8uUHJvdG9idWZUcmFuc2xhdGlvbjJkUghyZWFyTGVmdBI/Cgpy" + 
    "ZWFyX3JpZ2h0GAQgASgLMiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIJcmVhclJpZ2h0" + 
    "IqABCiJQcm90b2J1Zk1lY2FudW1Ecml2ZVdoZWVsUG9zaXRpb25zEh0KCmZyb250X2xlZnQYASABKAFS" + 
    "CWZyb250TGVmdBIfCgtmcm9udF9yaWdodBgCIAEoAVIKZnJvbnRSaWdodBIbCglyZWFyX2xlZnQYAyAB" + 
    "KAFSCHJlYXJMZWZ0Eh0KCnJlYXJfcmlnaHQYBCABKAFSCXJlYXJSaWdodCKdAQofUHJvdG9idWZNZWNh" + 
    "bnVtRHJpdmVXaGVlbFNwZWVkcxIdCgpmcm9udF9sZWZ0GAEgASgBUglmcm9udExlZnQSHwoLZnJvbnRf" + 
    "cmlnaHQYAiABKAFSCmZyb250UmlnaHQSGwoJcmVhcl9sZWZ0GAMgASgBUghyZWFyTGVmdBIdCgpyZWFy" + 
    "X3JpZ2h0GAQgASgBUglyZWFyUmlnaHQiWwodUHJvdG9idWZTd2VydmVEcml2ZUtpbmVtYXRpY3MSOgoH" + 
    "bW9kdWxlcxgBIAMoCzIgLndwaS5wcm90by5Qcm90b2J1ZlRyYW5zbGF0aW9uMmRSB21vZHVsZXMibwoc" + 
    "UHJvdG9idWZTd2VydmVNb2R1bGVQb3NpdGlvbhIaCghkaXN0YW5jZRgBIAEoAVIIZGlzdGFuY2USMwoF" + 
    "YW5nbGUYAiABKAsyHS53cGkucHJvdG8uUHJvdG9idWZSb3RhdGlvbjJkUgVhbmdsZSJmChlQcm90b2J1",
    "ZlN3ZXJ2ZU1vZHVsZVN0YXRlEhQKBXNwZWVkGAEgASgBUgVzcGVlZBIzCgVhbmdsZRgCIAEoCzIdLndw" + 
    "aS5wcm90by5Qcm90b2J1ZlJvdGF0aW9uMmRSBWFuZ2xlQhoKGGVkdS53cGkuZmlyc3QubWF0aC5wcm90" + 
    "b0qZDQoGEgQAAD0BCggKAQwSAwAAEgoICgECEgMCABIKCQoCAwASAwQAGgoICgEIEgMGADEKCQoCCAES" + 
    "AwYAMQoKCgIEABIECAAMAQoKCgMEAAESAwgIHQoLCgQEAAIAEgMJAhAKDAoFBAACAAUSAwkCCAoMCgUE" + 
    "AAIAARIDCQkLCgwKBQQAAgADEgMJDg8KCwoEBAACARIDCgIQCgwKBQQAAgEFEgMKAggKDAoFBAACAQES" + 
    "AwoJCwoMCgUEAAIBAxIDCg4PCgsKBAQAAgISAwsCEwoMCgUEAAICBRIDCwIICgwKBQQAAgIBEgMLCQ4K" + 
    "DAoFBAACAgMSAwsREgoKCgIEARIEDgAQAQoKCgMEAQESAw4IKwoLCgQEAQIAEgMPAhkKDAoFBAECAAUS" + 
    "Aw8CCAoMCgUEAQIAARIDDwkUCgwKBQQBAgADEgMPFxgKCgoCBAISBBIAFQEKCgoDBAIBEgMSCCwKCwoE" + 
    "BAICABIDEwISCgwKBQQCAgAFEgMTAggKDAoFBAICAAESAxMJDQoMCgUEAgIAAxIDExARCgsKBAQCAgES" + 
    "AxQCEwoMCgUEAgIBBRIDFAIICgwKBQQCAgEBEgMUCQ4KDAoFBAICAQMSAxQREgoKCgIEAxIEFwAaAQoK" + 
    "CgMEAwESAxcILwoLCgQEAwIAEgMYAhIKDAoFBAMCAAUSAxgCCAoMCgUEAwIAARIDGAkNCgwKBQQDAgAD" + 
    "EgMYEBEKCwoEBAMCARIDGQITCgwKBQQDAgEFEgMZAggKDAoFBAMCAQESAxkJDgoMCgUEAwIBAxIDGRES" + 
    "CgoKAgQEEgQcACEBCgoKAwQEARIDHAgmCgsKBAQEAgASAx0CJwoMCgUEBAIABhIDHQIXCgwKBQQEAgAB" + 
    "EgMdGCIKDAoFBAQCAAMSAx0lJgoLCgQEBAIBEgMeAigKDAoFBAQCAQYSAx4CFwoMCgUEBAIBARIDHhgj" + 
    "CgwKBQQEAgEDEgMeJicKCwoEBAQCAhIDHwImCgwKBQQEAgIGEgMfAhcKDAoFBAQCAgESAx8YIQoMCgUE" + 
    "BAICAxIDHyQlCgsKBAQEAgMSAyACJwoMCgUEBAIDBhIDIAIXCgwKBQQEAgMBEgMgGCIKDAoFBAQCAwMS" + 
    "AyAlJgoKCgIEBRIEIwAoAQoKCgMEBQESAyMIKgoLCgQEBQIAEgMkAhgKDAoFBAUCAAUSAyQCCAoMCgUE" + 
    "BQIAARIDJAkTCgwKBQQFAgADEgMkFhcKCwoEBAUCARIDJQIZCgwKBQQFAgEFEgMlAggKDAoFBAUCAQES" + 
    "AyUJFAoMCgUEBQIBAxIDJRcYCgsKBAQFAgISAyYCFwoMCgUEBQICBRIDJgIICgwKBQQFAgIBEgMmCRIK" + 
    "DAoFBAUCAgMSAyYVFgoLCgQEBQIDEgMnAhgKDAoFBAUCAwUSAycCCAoMCgUEBQIDARIDJwkTCgwKBQQF",
    "AgMDEgMnFhcKCgoCBAYSBCoALwEKCgoDBAYBEgMqCCcKCwoEBAYCABIDKwIYCgwKBQQGAgAFEgMrAggK" + 
    "DAoFBAYCAAESAysJEwoMCgUEBgIAAxIDKxYXCgsKBAQGAgESAywCGQoMCgUEBgIBBRIDLAIICgwKBQQG" + 
    "AgEBEgMsCRQKDAoFBAYCAQMSAywXGAoLCgQEBgICEgMtAhcKDAoFBAYCAgUSAy0CCAoMCgUEBgICARID" + 
    "LQkSCgwKBQQGAgIDEgMtFRYKCwoEBAYCAxIDLgIYCgwKBQQGAgMFEgMuAggKDAoFBAYCAwESAy4JEwoM" + 
    "CgUEBgIDAxIDLhYXCgoKAgQHEgQxADMBCgoKAwQHARIDMQglCgsKBAQHAgASAzICLQoMCgUEBwIABBID" + 
    "MgIKCgwKBQQHAgAGEgMyCyAKDAoFBAcCAAESAzIhKAoMCgUEBwIAAxIDMissCgoKAgQIEgQ1ADgBCgoK" + 
    "AwQIARIDNQgkCgsKBAQIAgASAzYCFgoMCgUECAIABRIDNgIICgwKBQQIAgABEgM2CREKDAoFBAgCAAMS" + 
    "AzYUFQoLCgQECAIBEgM3Ah8KDAoFBAgCAQYSAzcCFAoMCgUECAIBARIDNxUaCgwKBQQIAgEDEgM3HR4K" + 
    "CgoCBAkSBDoAPQEKCgoDBAkBEgM6CCEKCwoEBAkCABIDOwITCgwKBQQJAgAFEgM7AggKDAoFBAkCAAES" + 
    "AzsJDgoMCgUECQIAAxIDOxESCgsKBAQJAgESAzwCHwoMCgUECQIBBhIDPAIUCgwKBQQJAgEBEgM8FRoK" + 
    "DAoFBAkCAQMSAzwdHmIGcHJvdG8z");

  static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("kinematics.proto", "wpi.proto", descriptorData, Geometry2D.getDescriptor());

  static final Descriptors.Descriptor wpi_proto_ProtobufChassisSpeeds_descriptor = descriptor.internalContainedType(49, 77, "ProtobufChassisSpeeds", "wpi.proto.ProtobufChassisSpeeds");

  static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveKinematics_descriptor = descriptor.internalContainedType(128, 70, "ProtobufDifferentialDriveKinematics", "wpi.proto.ProtobufDifferentialDriveKinematics");

  static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelSpeeds_descriptor = descriptor.internalContainedType(200, 80, "ProtobufDifferentialDriveWheelSpeeds", "wpi.proto.ProtobufDifferentialDriveWheelSpeeds");

  static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelPositions_descriptor = descriptor.internalContainedType(282, 83, "ProtobufDifferentialDriveWheelPositions", "wpi.proto.ProtobufDifferentialDriveWheelPositions");

  static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveKinematics_descriptor = descriptor.internalContainedType(368, 292, "ProtobufMecanumDriveKinematics", "wpi.proto.ProtobufMecanumDriveKinematics");

  static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelPositions_descriptor = descriptor.internalContainedType(663, 160, "ProtobufMecanumDriveWheelPositions", "wpi.proto.ProtobufMecanumDriveWheelPositions");

  static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelSpeeds_descriptor = descriptor.internalContainedType(826, 157, "ProtobufMecanumDriveWheelSpeeds", "wpi.proto.ProtobufMecanumDriveWheelSpeeds");

  static final Descriptors.Descriptor wpi_proto_ProtobufSwerveDriveKinematics_descriptor = descriptor.internalContainedType(985, 91, "ProtobufSwerveDriveKinematics", "wpi.proto.ProtobufSwerveDriveKinematics");

  static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModulePosition_descriptor = descriptor.internalContainedType(1078, 111, "ProtobufSwerveModulePosition", "wpi.proto.ProtobufSwerveModulePosition");

  static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModuleState_descriptor = descriptor.internalContainedType(1191, 102, "ProtobufSwerveModuleState", "wpi.proto.ProtobufSwerveModuleState");

  /**
   * @return this proto file's descriptor.
   */
  public static Descriptors.FileDescriptor getDescriptor() {
    return descriptor;
  }

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

    /**
     * <code>optional double vx = 1;</code>
     */
    private double vx;

    /**
     * <code>optional double vy = 2;</code>
     */
    private double vy;

    /**
     * <code>optional double omega = 3;</code>
     */
    private double omega;

    private ProtobufChassisSpeeds() {
    }

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

    /**
     * <code>optional double vx = 1;</code>
     * @return whether the vx field is set
     */
    public boolean hasVx() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double vx = 1;</code>
     * @return this
     */
    public ProtobufChassisSpeeds clearVx() {
      bitField0_ &= ~0x00000001;
      vx = 0D;
      return this;
    }

    /**
     * <code>optional double vx = 1;</code>
     * @return the vx
     */
    public double getVx() {
      return vx;
    }

    /**
     * <code>optional double vx = 1;</code>
     * @param value the vx to set
     * @return this
     */
    public ProtobufChassisSpeeds setVx(final double value) {
      bitField0_ |= 0x00000001;
      vx = value;
      return this;
    }

    /**
     * <code>optional double vy = 2;</code>
     * @return whether the vy field is set
     */
    public boolean hasVy() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional double vy = 2;</code>
     * @return this
     */
    public ProtobufChassisSpeeds clearVy() {
      bitField0_ &= ~0x00000002;
      vy = 0D;
      return this;
    }

    /**
     * <code>optional double vy = 2;</code>
     * @return the vy
     */
    public double getVy() {
      return vy;
    }

    /**
     * <code>optional double vy = 2;</code>
     * @param value the vy to set
     * @return this
     */
    public ProtobufChassisSpeeds setVy(final double value) {
      bitField0_ |= 0x00000002;
      vy = value;
      return this;
    }

    /**
     * <code>optional double omega = 3;</code>
     * @return whether the omega field is set
     */
    public boolean hasOmega() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional double omega = 3;</code>
     * @return this
     */
    public ProtobufChassisSpeeds clearOmega() {
      bitField0_ &= ~0x00000004;
      omega = 0D;
      return this;
    }

    /**
     * <code>optional double omega = 3;</code>
     * @return the omega
     */
    public double getOmega() {
      return omega;
    }

    /**
     * <code>optional double omega = 3;</code>
     * @param value the omega to set
     * @return this
     */
    public ProtobufChassisSpeeds setOmega(final double value) {
      bitField0_ |= 0x00000004;
      omega = value;
      return this;
    }

    @Override
    public ProtobufChassisSpeeds copyFrom(final ProtobufChassisSpeeds other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        vx = other.vx;
        vy = other.vy;
        omega = other.omega;
      }
      return this;
    }

    @Override
    public ProtobufChassisSpeeds mergeFrom(final ProtobufChassisSpeeds other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasVx()) {
        setVx(other.vx);
      }
      if (other.hasVy()) {
        setVy(other.vy);
      }
      if (other.hasOmega()) {
        setOmega(other.omega);
      }
      return this;
    }

    @Override
    public ProtobufChassisSpeeds clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      vx = 0D;
      vy = 0D;
      omega = 0D;
      return this;
    }

    @Override
    public ProtobufChassisSpeeds 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 ProtobufChassisSpeeds)) {
        return false;
      }
      ProtobufChassisSpeeds other = (ProtobufChassisSpeeds) o;
      return bitField0_ == other.bitField0_
        && (!hasVx() || ProtoUtil.isEqual(vx, other.vx))
        && (!hasVy() || ProtoUtil.isEqual(vy, other.vy))
        && (!hasOmega() || ProtoUtil.isEqual(omega, other.omega));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(vx);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 17);
        output.writeDoubleNoTag(vy);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 25);
        output.writeDoubleNoTag(omega);
      }
    }

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

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufChassisSpeeds mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 9: {
            // vx
            vx = input.readDouble();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 17) {
              break;
            }
          }
          case 17: {
            // vy
            vy = input.readDouble();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 25) {
              break;
            }
          }
          case 25: {
            // omega
            omega = input.readDouble();
            bitField0_ |= 0x00000004;
            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.writeDouble(FieldNames.vx, vx);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeDouble(FieldNames.vy, vy);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeDouble(FieldNames.omega, omega);
      }
      output.endObject();
    }

    @Override
    public ProtobufChassisSpeeds mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 3778: {
            if (input.isAtField(FieldNames.vx)) {
              if (!input.trySkipNullValue()) {
                vx = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3779: {
            if (input.isAtField(FieldNames.vy)) {
              if (!input.trySkipNullValue()) {
                vy = input.readDouble();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 105858401: {
            if (input.isAtField(FieldNames.omega)) {
              if (!input.trySkipNullValue()) {
                omega = input.readDouble();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufChassisSpeeds_descriptor;
    }

    private enum ProtobufChassisSpeedsFactory implements MessageFactory<ProtobufChassisSpeeds> {
      INSTANCE;

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

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

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

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

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

    /**
     * <code>optional double track_width = 1;</code>
     */
    private double trackWidth;

    private ProtobufDifferentialDriveKinematics() {
    }

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

    /**
     * <code>optional double track_width = 1;</code>
     * @return whether the trackWidth field is set
     */
    public boolean hasTrackWidth() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double track_width = 1;</code>
     * @return this
     */
    public ProtobufDifferentialDriveKinematics clearTrackWidth() {
      bitField0_ &= ~0x00000001;
      trackWidth = 0D;
      return this;
    }

    /**
     * <code>optional double track_width = 1;</code>
     * @return the trackWidth
     */
    public double getTrackWidth() {
      return trackWidth;
    }

    /**
     * <code>optional double track_width = 1;</code>
     * @param value the trackWidth to set
     * @return this
     */
    public ProtobufDifferentialDriveKinematics setTrackWidth(final double value) {
      bitField0_ |= 0x00000001;
      trackWidth = value;
      return this;
    }

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

    @Override
    public ProtobufDifferentialDriveKinematics mergeFrom(
        final ProtobufDifferentialDriveKinematics other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasTrackWidth()) {
        setTrackWidth(other.trackWidth);
      }
      return this;
    }

    @Override
    public ProtobufDifferentialDriveKinematics clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      trackWidth = 0D;
      return this;
    }

    @Override
    public ProtobufDifferentialDriveKinematics 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 ProtobufDifferentialDriveKinematics)) {
        return false;
      }
      ProtobufDifferentialDriveKinematics other = (ProtobufDifferentialDriveKinematics) o;
      return bitField0_ == other.bitField0_
        && (!hasTrackWidth() || ProtoUtil.isEqual(trackWidth, other.trackWidth));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(trackWidth);
      }
    }

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

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufDifferentialDriveKinematics mergeFrom(final ProtoSource input) throws
        IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 9: {
            // trackWidth
            trackWidth = input.readDouble();
            bitField0_ |= 0x00000001;
            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.writeDouble(FieldNames.trackWidth, trackWidth);
      }
      output.endObject();
    }

    @Override
    public ProtobufDifferentialDriveKinematics mergeFrom(final JsonSource input) throws
        IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 1152213819:
          case 1600986578: {
            if (input.isAtField(FieldNames.trackWidth)) {
              if (!input.trySkipNullValue()) {
                trackWidth = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufDifferentialDriveKinematics_descriptor;
    }

    private enum ProtobufDifferentialDriveKinematicsFactory implements MessageFactory<ProtobufDifferentialDriveKinematics> {
      INSTANCE;

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

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

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

    /**
     * <code>optional double left = 1;</code>
     */
    private double left;

    /**
     * <code>optional double right = 2;</code>
     */
    private double right;

    private ProtobufDifferentialDriveWheelSpeeds() {
    }

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

    /**
     * <code>optional double left = 1;</code>
     * @return whether the left field is set
     */
    public boolean hasLeft() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double left = 1;</code>
     * @return this
     */
    public ProtobufDifferentialDriveWheelSpeeds clearLeft() {
      bitField0_ &= ~0x00000001;
      left = 0D;
      return this;
    }

    /**
     * <code>optional double left = 1;</code>
     * @return the left
     */
    public double getLeft() {
      return left;
    }

    /**
     * <code>optional double left = 1;</code>
     * @param value the left to set
     * @return this
     */
    public ProtobufDifferentialDriveWheelSpeeds setLeft(final double value) {
      bitField0_ |= 0x00000001;
      left = value;
      return this;
    }

    /**
     * <code>optional double right = 2;</code>
     * @return whether the right field is set
     */
    public boolean hasRight() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional double right = 2;</code>
     * @return this
     */
    public ProtobufDifferentialDriveWheelSpeeds clearRight() {
      bitField0_ &= ~0x00000002;
      right = 0D;
      return this;
    }

    /**
     * <code>optional double right = 2;</code>
     * @return the right
     */
    public double getRight() {
      return right;
    }

    /**
     * <code>optional double right = 2;</code>
     * @param value the right to set
     * @return this
     */
    public ProtobufDifferentialDriveWheelSpeeds setRight(final double value) {
      bitField0_ |= 0x00000002;
      right = value;
      return this;
    }

    @Override
    public ProtobufDifferentialDriveWheelSpeeds copyFrom(
        final ProtobufDifferentialDriveWheelSpeeds other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        left = other.left;
        right = other.right;
      }
      return this;
    }

    @Override
    public ProtobufDifferentialDriveWheelSpeeds mergeFrom(
        final ProtobufDifferentialDriveWheelSpeeds other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasLeft()) {
        setLeft(other.left);
      }
      if (other.hasRight()) {
        setRight(other.right);
      }
      return this;
    }

    @Override
    public ProtobufDifferentialDriveWheelSpeeds clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      left = 0D;
      right = 0D;
      return this;
    }

    @Override
    public ProtobufDifferentialDriveWheelSpeeds 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 ProtobufDifferentialDriveWheelSpeeds)) {
        return false;
      }
      ProtobufDifferentialDriveWheelSpeeds other = (ProtobufDifferentialDriveWheelSpeeds) o;
      return bitField0_ == other.bitField0_
        && (!hasLeft() || ProtoUtil.isEqual(left, other.left))
        && (!hasRight() || ProtoUtil.isEqual(right, other.right));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(left);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 17);
        output.writeDoubleNoTag(right);
      }
    }

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

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufDifferentialDriveWheelSpeeds mergeFrom(final ProtoSource input) throws
        IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 9: {
            // left
            left = input.readDouble();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 17) {
              break;
            }
          }
          case 17: {
            // right
            right = input.readDouble();
            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.writeDouble(FieldNames.left, left);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeDouble(FieldNames.right, right);
      }
      output.endObject();
    }

    @Override
    public ProtobufDifferentialDriveWheelSpeeds mergeFrom(final JsonSource input) throws
        IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 3317767: {
            if (input.isAtField(FieldNames.left)) {
              if (!input.trySkipNullValue()) {
                left = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 108511772: {
            if (input.isAtField(FieldNames.right)) {
              if (!input.trySkipNullValue()) {
                right = input.readDouble();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufDifferentialDriveWheelSpeeds_descriptor;
    }

    private enum ProtobufDifferentialDriveWheelSpeedsFactory implements MessageFactory<ProtobufDifferentialDriveWheelSpeeds> {
      INSTANCE;

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

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

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

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

    /**
     * <code>optional double left = 1;</code>
     */
    private double left;

    /**
     * <code>optional double right = 2;</code>
     */
    private double right;

    private ProtobufDifferentialDriveWheelPositions() {
    }

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

    /**
     * <code>optional double left = 1;</code>
     * @return whether the left field is set
     */
    public boolean hasLeft() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double left = 1;</code>
     * @return this
     */
    public ProtobufDifferentialDriveWheelPositions clearLeft() {
      bitField0_ &= ~0x00000001;
      left = 0D;
      return this;
    }

    /**
     * <code>optional double left = 1;</code>
     * @return the left
     */
    public double getLeft() {
      return left;
    }

    /**
     * <code>optional double left = 1;</code>
     * @param value the left to set
     * @return this
     */
    public ProtobufDifferentialDriveWheelPositions setLeft(final double value) {
      bitField0_ |= 0x00000001;
      left = value;
      return this;
    }

    /**
     * <code>optional double right = 2;</code>
     * @return whether the right field is set
     */
    public boolean hasRight() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional double right = 2;</code>
     * @return this
     */
    public ProtobufDifferentialDriveWheelPositions clearRight() {
      bitField0_ &= ~0x00000002;
      right = 0D;
      return this;
    }

    /**
     * <code>optional double right = 2;</code>
     * @return the right
     */
    public double getRight() {
      return right;
    }

    /**
     * <code>optional double right = 2;</code>
     * @param value the right to set
     * @return this
     */
    public ProtobufDifferentialDriveWheelPositions setRight(final double value) {
      bitField0_ |= 0x00000002;
      right = value;
      return this;
    }

    @Override
    public ProtobufDifferentialDriveWheelPositions copyFrom(
        final ProtobufDifferentialDriveWheelPositions other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        left = other.left;
        right = other.right;
      }
      return this;
    }

    @Override
    public ProtobufDifferentialDriveWheelPositions mergeFrom(
        final ProtobufDifferentialDriveWheelPositions other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasLeft()) {
        setLeft(other.left);
      }
      if (other.hasRight()) {
        setRight(other.right);
      }
      return this;
    }

    @Override
    public ProtobufDifferentialDriveWheelPositions clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      left = 0D;
      right = 0D;
      return this;
    }

    @Override
    public ProtobufDifferentialDriveWheelPositions 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 ProtobufDifferentialDriveWheelPositions)) {
        return false;
      }
      ProtobufDifferentialDriveWheelPositions other = (ProtobufDifferentialDriveWheelPositions) o;
      return bitField0_ == other.bitField0_
        && (!hasLeft() || ProtoUtil.isEqual(left, other.left))
        && (!hasRight() || ProtoUtil.isEqual(right, other.right));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(left);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 17);
        output.writeDoubleNoTag(right);
      }
    }

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

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufDifferentialDriveWheelPositions mergeFrom(final ProtoSource input) throws
        IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 9: {
            // left
            left = input.readDouble();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 17) {
              break;
            }
          }
          case 17: {
            // right
            right = input.readDouble();
            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.writeDouble(FieldNames.left, left);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeDouble(FieldNames.right, right);
      }
      output.endObject();
    }

    @Override
    public ProtobufDifferentialDriveWheelPositions mergeFrom(final JsonSource input) throws
        IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 3317767: {
            if (input.isAtField(FieldNames.left)) {
              if (!input.trySkipNullValue()) {
                left = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 108511772: {
            if (input.isAtField(FieldNames.right)) {
              if (!input.trySkipNullValue()) {
                right = input.readDouble();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufDifferentialDriveWheelPositions_descriptor;
    }

    private enum ProtobufDifferentialDriveWheelPositionsFactory implements MessageFactory<ProtobufDifferentialDriveWheelPositions> {
      INSTANCE;

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

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

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

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

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
     */
    private final Geometry2D.ProtobufTranslation2d frontLeft = Geometry2D.ProtobufTranslation2d.newInstance();

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
     */
    private final Geometry2D.ProtobufTranslation2d frontRight = Geometry2D.ProtobufTranslation2d.newInstance();

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
     */
    private final Geometry2D.ProtobufTranslation2d rearLeft = Geometry2D.ProtobufTranslation2d.newInstance();

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
     */
    private final Geometry2D.ProtobufTranslation2d rearRight = Geometry2D.ProtobufTranslation2d.newInstance();

    private ProtobufMecanumDriveKinematics() {
    }

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

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
     * @return whether the frontLeft field is set
     */
    public boolean hasFrontLeft() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
     * @return this
     */
    public ProtobufMecanumDriveKinematics clearFrontLeft() {
      bitField0_ &= ~0x00000001;
      frontLeft.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 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 #getMutableFrontLeft()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Geometry2D.ProtobufTranslation2d getFrontLeft() {
      return frontLeft;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 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 Geometry2D.ProtobufTranslation2d getMutableFrontLeft() {
      bitField0_ |= 0x00000001;
      return frontLeft;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
     * @param value the frontLeft to set
     * @return this
     */
    public ProtobufMecanumDriveKinematics setFrontLeft(
        final Geometry2D.ProtobufTranslation2d value) {
      bitField0_ |= 0x00000001;
      frontLeft.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
     * @return whether the frontRight field is set
     */
    public boolean hasFrontRight() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
     * @return this
     */
    public ProtobufMecanumDriveKinematics clearFrontRight() {
      bitField0_ &= ~0x00000002;
      frontRight.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 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 #getMutableFrontRight()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Geometry2D.ProtobufTranslation2d getFrontRight() {
      return frontRight;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 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 Geometry2D.ProtobufTranslation2d getMutableFrontRight() {
      bitField0_ |= 0x00000002;
      return frontRight;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
     * @param value the frontRight to set
     * @return this
     */
    public ProtobufMecanumDriveKinematics setFrontRight(
        final Geometry2D.ProtobufTranslation2d value) {
      bitField0_ |= 0x00000002;
      frontRight.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
     * @return whether the rearLeft field is set
     */
    public boolean hasRearLeft() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
     * @return this
     */
    public ProtobufMecanumDriveKinematics clearRearLeft() {
      bitField0_ &= ~0x00000004;
      rearLeft.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 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 #getMutableRearLeft()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Geometry2D.ProtobufTranslation2d getRearLeft() {
      return rearLeft;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 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 Geometry2D.ProtobufTranslation2d getMutableRearLeft() {
      bitField0_ |= 0x00000004;
      return rearLeft;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
     * @param value the rearLeft to set
     * @return this
     */
    public ProtobufMecanumDriveKinematics setRearLeft(
        final Geometry2D.ProtobufTranslation2d value) {
      bitField0_ |= 0x00000004;
      rearLeft.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
     * @return whether the rearRight field is set
     */
    public boolean hasRearRight() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
     * @return this
     */
    public ProtobufMecanumDriveKinematics clearRearRight() {
      bitField0_ &= ~0x00000008;
      rearRight.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 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 #getMutableRearRight()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Geometry2D.ProtobufTranslation2d getRearRight() {
      return rearRight;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 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 Geometry2D.ProtobufTranslation2d getMutableRearRight() {
      bitField0_ |= 0x00000008;
      return rearRight;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
     * @param value the rearRight to set
     * @return this
     */
    public ProtobufMecanumDriveKinematics setRearRight(
        final Geometry2D.ProtobufTranslation2d value) {
      bitField0_ |= 0x00000008;
      rearRight.copyFrom(value);
      return this;
    }

    @Override
    public ProtobufMecanumDriveKinematics copyFrom(final ProtobufMecanumDriveKinematics other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        frontLeft.copyFrom(other.frontLeft);
        frontRight.copyFrom(other.frontRight);
        rearLeft.copyFrom(other.rearLeft);
        rearRight.copyFrom(other.rearRight);
      }
      return this;
    }

    @Override
    public ProtobufMecanumDriveKinematics mergeFrom(final ProtobufMecanumDriveKinematics other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasFrontLeft()) {
        getMutableFrontLeft().mergeFrom(other.frontLeft);
      }
      if (other.hasFrontRight()) {
        getMutableFrontRight().mergeFrom(other.frontRight);
      }
      if (other.hasRearLeft()) {
        getMutableRearLeft().mergeFrom(other.rearLeft);
      }
      if (other.hasRearRight()) {
        getMutableRearRight().mergeFrom(other.rearRight);
      }
      return this;
    }

    @Override
    public ProtobufMecanumDriveKinematics clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      frontLeft.clear();
      frontRight.clear();
      rearLeft.clear();
      rearRight.clear();
      return this;
    }

    @Override
    public ProtobufMecanumDriveKinematics clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      frontLeft.clearQuick();
      frontRight.clearQuick();
      rearLeft.clearQuick();
      rearRight.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufMecanumDriveKinematics)) {
        return false;
      }
      ProtobufMecanumDriveKinematics other = (ProtobufMecanumDriveKinematics) o;
      return bitField0_ == other.bitField0_
        && (!hasFrontLeft() || frontLeft.equals(other.frontLeft))
        && (!hasFrontRight() || frontRight.equals(other.frontRight))
        && (!hasRearLeft() || rearLeft.equals(other.rearLeft))
        && (!hasRearRight() || rearRight.equals(other.rearRight));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 10);
        output.writeMessageNoTag(frontLeft);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 18);
        output.writeMessageNoTag(frontRight);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 26);
        output.writeMessageNoTag(rearLeft);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 34);
        output.writeMessageNoTag(rearRight);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(frontLeft);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(frontRight);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(rearLeft);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(rearRight);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufMecanumDriveKinematics mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 10: {
            // frontLeft
            input.readMessage(frontLeft);
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // frontRight
            input.readMessage(frontRight);
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // rearLeft
            input.readMessage(rearLeft);
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 34) {
              break;
            }
          }
          case 34: {
            // rearRight
            input.readMessage(rearRight);
            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.writeMessage(FieldNames.frontLeft, frontLeft);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeMessage(FieldNames.frontRight, frontRight);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeMessage(FieldNames.rearLeft, rearLeft);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeMessage(FieldNames.rearRight, rearRight);
      }
      output.endObject();
    }

    @Override
    public ProtobufMecanumDriveKinematics mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 127514064:
          case -324277155: {
            if (input.isAtField(FieldNames.frontLeft)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(frontLeft);
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -336370317:
          case -1456996218: {
            if (input.isAtField(FieldNames.frontRight)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(frontRight);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -854852661:
          case -712874558: {
            if (input.isAtField(FieldNames.rearLeft)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(rearLeft);
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -724967720:
          case -618613823: {
            if (input.isAtField(FieldNames.rearRight)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(rearRight);
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufMecanumDriveKinematics_descriptor;
    }

    private enum ProtobufMecanumDriveKinematicsFactory implements MessageFactory<ProtobufMecanumDriveKinematics> {
      INSTANCE;

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

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

      static final FieldName frontRight = FieldName.forField("frontRight", "front_right");

      static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left");

      static final FieldName rearRight = FieldName.forField("rearRight", "rear_right");
    }
  }

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

    /**
     * <code>optional double front_left = 1;</code>
     */
    private double frontLeft;

    /**
     * <code>optional double front_right = 2;</code>
     */
    private double frontRight;

    /**
     * <code>optional double rear_left = 3;</code>
     */
    private double rearLeft;

    /**
     * <code>optional double rear_right = 4;</code>
     */
    private double rearRight;

    private ProtobufMecanumDriveWheelPositions() {
    }

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

    /**
     * <code>optional double front_left = 1;</code>
     * @return whether the frontLeft field is set
     */
    public boolean hasFrontLeft() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double front_left = 1;</code>
     * @return this
     */
    public ProtobufMecanumDriveWheelPositions clearFrontLeft() {
      bitField0_ &= ~0x00000001;
      frontLeft = 0D;
      return this;
    }

    /**
     * <code>optional double front_left = 1;</code>
     * @return the frontLeft
     */
    public double getFrontLeft() {
      return frontLeft;
    }

    /**
     * <code>optional double front_left = 1;</code>
     * @param value the frontLeft to set
     * @return this
     */
    public ProtobufMecanumDriveWheelPositions setFrontLeft(final double value) {
      bitField0_ |= 0x00000001;
      frontLeft = value;
      return this;
    }

    /**
     * <code>optional double front_right = 2;</code>
     * @return whether the frontRight field is set
     */
    public boolean hasFrontRight() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional double front_right = 2;</code>
     * @return this
     */
    public ProtobufMecanumDriveWheelPositions clearFrontRight() {
      bitField0_ &= ~0x00000002;
      frontRight = 0D;
      return this;
    }

    /**
     * <code>optional double front_right = 2;</code>
     * @return the frontRight
     */
    public double getFrontRight() {
      return frontRight;
    }

    /**
     * <code>optional double front_right = 2;</code>
     * @param value the frontRight to set
     * @return this
     */
    public ProtobufMecanumDriveWheelPositions setFrontRight(final double value) {
      bitField0_ |= 0x00000002;
      frontRight = value;
      return this;
    }

    /**
     * <code>optional double rear_left = 3;</code>
     * @return whether the rearLeft field is set
     */
    public boolean hasRearLeft() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional double rear_left = 3;</code>
     * @return this
     */
    public ProtobufMecanumDriveWheelPositions clearRearLeft() {
      bitField0_ &= ~0x00000004;
      rearLeft = 0D;
      return this;
    }

    /**
     * <code>optional double rear_left = 3;</code>
     * @return the rearLeft
     */
    public double getRearLeft() {
      return rearLeft;
    }

    /**
     * <code>optional double rear_left = 3;</code>
     * @param value the rearLeft to set
     * @return this
     */
    public ProtobufMecanumDriveWheelPositions setRearLeft(final double value) {
      bitField0_ |= 0x00000004;
      rearLeft = value;
      return this;
    }

    /**
     * <code>optional double rear_right = 4;</code>
     * @return whether the rearRight field is set
     */
    public boolean hasRearRight() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional double rear_right = 4;</code>
     * @return this
     */
    public ProtobufMecanumDriveWheelPositions clearRearRight() {
      bitField0_ &= ~0x00000008;
      rearRight = 0D;
      return this;
    }

    /**
     * <code>optional double rear_right = 4;</code>
     * @return the rearRight
     */
    public double getRearRight() {
      return rearRight;
    }

    /**
     * <code>optional double rear_right = 4;</code>
     * @param value the rearRight to set
     * @return this
     */
    public ProtobufMecanumDriveWheelPositions setRearRight(final double value) {
      bitField0_ |= 0x00000008;
      rearRight = value;
      return this;
    }

    @Override
    public ProtobufMecanumDriveWheelPositions copyFrom(
        final ProtobufMecanumDriveWheelPositions other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        frontLeft = other.frontLeft;
        frontRight = other.frontRight;
        rearLeft = other.rearLeft;
        rearRight = other.rearRight;
      }
      return this;
    }

    @Override
    public ProtobufMecanumDriveWheelPositions mergeFrom(
        final ProtobufMecanumDriveWheelPositions other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasFrontLeft()) {
        setFrontLeft(other.frontLeft);
      }
      if (other.hasFrontRight()) {
        setFrontRight(other.frontRight);
      }
      if (other.hasRearLeft()) {
        setRearLeft(other.rearLeft);
      }
      if (other.hasRearRight()) {
        setRearRight(other.rearRight);
      }
      return this;
    }

    @Override
    public ProtobufMecanumDriveWheelPositions clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      frontLeft = 0D;
      frontRight = 0D;
      rearLeft = 0D;
      rearRight = 0D;
      return this;
    }

    @Override
    public ProtobufMecanumDriveWheelPositions 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 ProtobufMecanumDriveWheelPositions)) {
        return false;
      }
      ProtobufMecanumDriveWheelPositions other = (ProtobufMecanumDriveWheelPositions) o;
      return bitField0_ == other.bitField0_
        && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft))
        && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight))
        && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft))
        && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(frontLeft);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 17);
        output.writeDoubleNoTag(frontRight);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 25);
        output.writeDoubleNoTag(rearLeft);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 33);
        output.writeDoubleNoTag(rearRight);
      }
    }

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

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufMecanumDriveWheelPositions mergeFrom(final ProtoSource input) throws
        IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 9: {
            // frontLeft
            frontLeft = input.readDouble();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 17) {
              break;
            }
          }
          case 17: {
            // frontRight
            frontRight = input.readDouble();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 25) {
              break;
            }
          }
          case 25: {
            // rearLeft
            rearLeft = input.readDouble();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 33) {
              break;
            }
          }
          case 33: {
            // rearRight
            rearRight = input.readDouble();
            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.writeDouble(FieldNames.frontLeft, frontLeft);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeDouble(FieldNames.frontRight, frontRight);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeDouble(FieldNames.rearLeft, rearLeft);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeDouble(FieldNames.rearRight, rearRight);
      }
      output.endObject();
    }

    @Override
    public ProtobufMecanumDriveWheelPositions mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 127514064:
          case -324277155: {
            if (input.isAtField(FieldNames.frontLeft)) {
              if (!input.trySkipNullValue()) {
                frontLeft = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -336370317:
          case -1456996218: {
            if (input.isAtField(FieldNames.frontRight)) {
              if (!input.trySkipNullValue()) {
                frontRight = input.readDouble();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -854852661:
          case -712874558: {
            if (input.isAtField(FieldNames.rearLeft)) {
              if (!input.trySkipNullValue()) {
                rearLeft = input.readDouble();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -724967720:
          case -618613823: {
            if (input.isAtField(FieldNames.rearRight)) {
              if (!input.trySkipNullValue()) {
                rearRight = input.readDouble();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufMecanumDriveWheelPositions_descriptor;
    }

    private enum ProtobufMecanumDriveWheelPositionsFactory implements MessageFactory<ProtobufMecanumDriveWheelPositions> {
      INSTANCE;

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

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

      static final FieldName frontRight = FieldName.forField("frontRight", "front_right");

      static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left");

      static final FieldName rearRight = FieldName.forField("rearRight", "rear_right");
    }
  }

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

    /**
     * <code>optional double front_left = 1;</code>
     */
    private double frontLeft;

    /**
     * <code>optional double front_right = 2;</code>
     */
    private double frontRight;

    /**
     * <code>optional double rear_left = 3;</code>
     */
    private double rearLeft;

    /**
     * <code>optional double rear_right = 4;</code>
     */
    private double rearRight;

    private ProtobufMecanumDriveWheelSpeeds() {
    }

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

    /**
     * <code>optional double front_left = 1;</code>
     * @return whether the frontLeft field is set
     */
    public boolean hasFrontLeft() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double front_left = 1;</code>
     * @return this
     */
    public ProtobufMecanumDriveWheelSpeeds clearFrontLeft() {
      bitField0_ &= ~0x00000001;
      frontLeft = 0D;
      return this;
    }

    /**
     * <code>optional double front_left = 1;</code>
     * @return the frontLeft
     */
    public double getFrontLeft() {
      return frontLeft;
    }

    /**
     * <code>optional double front_left = 1;</code>
     * @param value the frontLeft to set
     * @return this
     */
    public ProtobufMecanumDriveWheelSpeeds setFrontLeft(final double value) {
      bitField0_ |= 0x00000001;
      frontLeft = value;
      return this;
    }

    /**
     * <code>optional double front_right = 2;</code>
     * @return whether the frontRight field is set
     */
    public boolean hasFrontRight() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional double front_right = 2;</code>
     * @return this
     */
    public ProtobufMecanumDriveWheelSpeeds clearFrontRight() {
      bitField0_ &= ~0x00000002;
      frontRight = 0D;
      return this;
    }

    /**
     * <code>optional double front_right = 2;</code>
     * @return the frontRight
     */
    public double getFrontRight() {
      return frontRight;
    }

    /**
     * <code>optional double front_right = 2;</code>
     * @param value the frontRight to set
     * @return this
     */
    public ProtobufMecanumDriveWheelSpeeds setFrontRight(final double value) {
      bitField0_ |= 0x00000002;
      frontRight = value;
      return this;
    }

    /**
     * <code>optional double rear_left = 3;</code>
     * @return whether the rearLeft field is set
     */
    public boolean hasRearLeft() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional double rear_left = 3;</code>
     * @return this
     */
    public ProtobufMecanumDriveWheelSpeeds clearRearLeft() {
      bitField0_ &= ~0x00000004;
      rearLeft = 0D;
      return this;
    }

    /**
     * <code>optional double rear_left = 3;</code>
     * @return the rearLeft
     */
    public double getRearLeft() {
      return rearLeft;
    }

    /**
     * <code>optional double rear_left = 3;</code>
     * @param value the rearLeft to set
     * @return this
     */
    public ProtobufMecanumDriveWheelSpeeds setRearLeft(final double value) {
      bitField0_ |= 0x00000004;
      rearLeft = value;
      return this;
    }

    /**
     * <code>optional double rear_right = 4;</code>
     * @return whether the rearRight field is set
     */
    public boolean hasRearRight() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional double rear_right = 4;</code>
     * @return this
     */
    public ProtobufMecanumDriveWheelSpeeds clearRearRight() {
      bitField0_ &= ~0x00000008;
      rearRight = 0D;
      return this;
    }

    /**
     * <code>optional double rear_right = 4;</code>
     * @return the rearRight
     */
    public double getRearRight() {
      return rearRight;
    }

    /**
     * <code>optional double rear_right = 4;</code>
     * @param value the rearRight to set
     * @return this
     */
    public ProtobufMecanumDriveWheelSpeeds setRearRight(final double value) {
      bitField0_ |= 0x00000008;
      rearRight = value;
      return this;
    }

    @Override
    public ProtobufMecanumDriveWheelSpeeds copyFrom(final ProtobufMecanumDriveWheelSpeeds other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        frontLeft = other.frontLeft;
        frontRight = other.frontRight;
        rearLeft = other.rearLeft;
        rearRight = other.rearRight;
      }
      return this;
    }

    @Override
    public ProtobufMecanumDriveWheelSpeeds mergeFrom(final ProtobufMecanumDriveWheelSpeeds other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasFrontLeft()) {
        setFrontLeft(other.frontLeft);
      }
      if (other.hasFrontRight()) {
        setFrontRight(other.frontRight);
      }
      if (other.hasRearLeft()) {
        setRearLeft(other.rearLeft);
      }
      if (other.hasRearRight()) {
        setRearRight(other.rearRight);
      }
      return this;
    }

    @Override
    public ProtobufMecanumDriveWheelSpeeds clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      frontLeft = 0D;
      frontRight = 0D;
      rearLeft = 0D;
      rearRight = 0D;
      return this;
    }

    @Override
    public ProtobufMecanumDriveWheelSpeeds 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 ProtobufMecanumDriveWheelSpeeds)) {
        return false;
      }
      ProtobufMecanumDriveWheelSpeeds other = (ProtobufMecanumDriveWheelSpeeds) o;
      return bitField0_ == other.bitField0_
        && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft))
        && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight))
        && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft))
        && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(frontLeft);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 17);
        output.writeDoubleNoTag(frontRight);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 25);
        output.writeDoubleNoTag(rearLeft);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 33);
        output.writeDoubleNoTag(rearRight);
      }
    }

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

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufMecanumDriveWheelSpeeds mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 9: {
            // frontLeft
            frontLeft = input.readDouble();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 17) {
              break;
            }
          }
          case 17: {
            // frontRight
            frontRight = input.readDouble();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 25) {
              break;
            }
          }
          case 25: {
            // rearLeft
            rearLeft = input.readDouble();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 33) {
              break;
            }
          }
          case 33: {
            // rearRight
            rearRight = input.readDouble();
            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.writeDouble(FieldNames.frontLeft, frontLeft);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeDouble(FieldNames.frontRight, frontRight);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeDouble(FieldNames.rearLeft, rearLeft);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeDouble(FieldNames.rearRight, rearRight);
      }
      output.endObject();
    }

    @Override
    public ProtobufMecanumDriveWheelSpeeds mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 127514064:
          case -324277155: {
            if (input.isAtField(FieldNames.frontLeft)) {
              if (!input.trySkipNullValue()) {
                frontLeft = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -336370317:
          case -1456996218: {
            if (input.isAtField(FieldNames.frontRight)) {
              if (!input.trySkipNullValue()) {
                frontRight = input.readDouble();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -854852661:
          case -712874558: {
            if (input.isAtField(FieldNames.rearLeft)) {
              if (!input.trySkipNullValue()) {
                rearLeft = input.readDouble();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -724967720:
          case -618613823: {
            if (input.isAtField(FieldNames.rearRight)) {
              if (!input.trySkipNullValue()) {
                rearRight = input.readDouble();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufMecanumDriveWheelSpeeds_descriptor;
    }

    private enum ProtobufMecanumDriveWheelSpeedsFactory implements MessageFactory<ProtobufMecanumDriveWheelSpeeds> {
      INSTANCE;

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

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

      static final FieldName frontRight = FieldName.forField("frontRight", "front_right");

      static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left");

      static final FieldName rearRight = FieldName.forField("rearRight", "rear_right");
    }
  }

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

    /**
     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
     */
    private final RepeatedMessage<Geometry2D.ProtobufTranslation2d> modules = RepeatedMessage.newEmptyInstance(Geometry2D.ProtobufTranslation2d.getFactory());

    private ProtobufSwerveDriveKinematics() {
    }

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

    /**
     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
     * @return whether the modules field is set
     */
    public boolean hasModules() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
     * @return this
     */
    public ProtobufSwerveDriveKinematics clearModules() {
      bitField0_ &= ~0x00000001;
      modules.clear();
      return this;
    }

    /**
     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 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 #getMutableModules()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public RepeatedMessage<Geometry2D.ProtobufTranslation2d> getModules() {
      return modules;
    }

    /**
     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 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<Geometry2D.ProtobufTranslation2d> getMutableModules() {
      bitField0_ |= 0x00000001;
      return modules;
    }

    /**
     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
     * @param value the modules to add
     * @return this
     */
    public ProtobufSwerveDriveKinematics addModules(final Geometry2D.ProtobufTranslation2d value) {
      bitField0_ |= 0x00000001;
      modules.add(value);
      return this;
    }

    /**
     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
     * @param values the modules to add
     * @return this
     */
    public ProtobufSwerveDriveKinematics addAllModules(
        final Geometry2D.ProtobufTranslation2d... values) {
      bitField0_ |= 0x00000001;
      modules.addAll(values);
      return this;
    }

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

    @Override
    public ProtobufSwerveDriveKinematics mergeFrom(final ProtobufSwerveDriveKinematics other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasModules()) {
        getMutableModules().addAll(other.modules);
      }
      return this;
    }

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

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufSwerveDriveKinematics)) {
        return false;
      }
      ProtobufSwerveDriveKinematics other = (ProtobufSwerveDriveKinematics) o;
      return bitField0_ == other.bitField0_
        && (!hasModules() || modules.equals(other.modules));
    }

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

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

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufSwerveDriveKinematics mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 10: {
            // modules
            tag = input.readRepeatedMessage(modules, tag);
            bitField0_ |= 0x00000001;
            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.writeRepeatedMessage(FieldNames.modules, modules);
      }
      output.endObject();
    }

    @Override
    public ProtobufSwerveDriveKinematics mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 1227433863: {
            if (input.isAtField(FieldNames.modules)) {
              if (!input.trySkipNullValue()) {
                input.readRepeatedMessage(modules);
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufSwerveDriveKinematics_descriptor;
    }

    private enum ProtobufSwerveDriveKinematicsFactory implements MessageFactory<ProtobufSwerveDriveKinematics> {
      INSTANCE;

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

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

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

    /**
     * <code>optional double distance = 1;</code>
     */
    private double distance;

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
     */
    private final Geometry2D.ProtobufRotation2d angle = Geometry2D.ProtobufRotation2d.newInstance();

    private ProtobufSwerveModulePosition() {
    }

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

    /**
     * <code>optional double distance = 1;</code>
     * @return whether the distance field is set
     */
    public boolean hasDistance() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double distance = 1;</code>
     * @return this
     */
    public ProtobufSwerveModulePosition clearDistance() {
      bitField0_ &= ~0x00000001;
      distance = 0D;
      return this;
    }

    /**
     * <code>optional double distance = 1;</code>
     * @return the distance
     */
    public double getDistance() {
      return distance;
    }

    /**
     * <code>optional double distance = 1;</code>
     * @param value the distance to set
     * @return this
     */
    public ProtobufSwerveModulePosition setDistance(final double value) {
      bitField0_ |= 0x00000001;
      distance = value;
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
     * @return whether the angle field is set
     */
    public boolean hasAngle() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
     * @return this
     */
    public ProtobufSwerveModulePosition clearAngle() {
      bitField0_ &= ~0x00000002;
      angle.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 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 #getMutableAngle()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Geometry2D.ProtobufRotation2d getAngle() {
      return angle;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 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 Geometry2D.ProtobufRotation2d getMutableAngle() {
      bitField0_ |= 0x00000002;
      return angle;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
     * @param value the angle to set
     * @return this
     */
    public ProtobufSwerveModulePosition setAngle(final Geometry2D.ProtobufRotation2d value) {
      bitField0_ |= 0x00000002;
      angle.copyFrom(value);
      return this;
    }

    @Override
    public ProtobufSwerveModulePosition copyFrom(final ProtobufSwerveModulePosition other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        distance = other.distance;
        angle.copyFrom(other.angle);
      }
      return this;
    }

    @Override
    public ProtobufSwerveModulePosition mergeFrom(final ProtobufSwerveModulePosition other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasDistance()) {
        setDistance(other.distance);
      }
      if (other.hasAngle()) {
        getMutableAngle().mergeFrom(other.angle);
      }
      return this;
    }

    @Override
    public ProtobufSwerveModulePosition clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      distance = 0D;
      angle.clear();
      return this;
    }

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufSwerveModulePosition)) {
        return false;
      }
      ProtobufSwerveModulePosition other = (ProtobufSwerveModulePosition) o;
      return bitField0_ == other.bitField0_
        && (!hasDistance() || ProtoUtil.isEqual(distance, other.distance))
        && (!hasAngle() || angle.equals(other.angle));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(distance);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 18);
        output.writeMessageNoTag(angle);
      }
    }

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

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

    @Override
    public ProtobufSwerveModulePosition mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 288459765: {
            if (input.isAtField(FieldNames.distance)) {
              if (!input.trySkipNullValue()) {
                distance = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 92960979: {
            if (input.isAtField(FieldNames.angle)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(angle);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufSwerveModulePosition_descriptor;
    }

    private enum ProtobufSwerveModulePositionFactory implements MessageFactory<ProtobufSwerveModulePosition> {
      INSTANCE;

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

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

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

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

    /**
     * <code>optional double speed = 1;</code>
     */
    private double speed;

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
     */
    private final Geometry2D.ProtobufRotation2d angle = Geometry2D.ProtobufRotation2d.newInstance();

    private ProtobufSwerveModuleState() {
    }

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

    /**
     * <code>optional double speed = 1;</code>
     * @return whether the speed field is set
     */
    public boolean hasSpeed() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double speed = 1;</code>
     * @return this
     */
    public ProtobufSwerveModuleState clearSpeed() {
      bitField0_ &= ~0x00000001;
      speed = 0D;
      return this;
    }

    /**
     * <code>optional double speed = 1;</code>
     * @return the speed
     */
    public double getSpeed() {
      return speed;
    }

    /**
     * <code>optional double speed = 1;</code>
     * @param value the speed to set
     * @return this
     */
    public ProtobufSwerveModuleState setSpeed(final double value) {
      bitField0_ |= 0x00000001;
      speed = value;
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
     * @return whether the angle field is set
     */
    public boolean hasAngle() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
     * @return this
     */
    public ProtobufSwerveModuleState clearAngle() {
      bitField0_ &= ~0x00000002;
      angle.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 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 #getMutableAngle()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public Geometry2D.ProtobufRotation2d getAngle() {
      return angle;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 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 Geometry2D.ProtobufRotation2d getMutableAngle() {
      bitField0_ |= 0x00000002;
      return angle;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
     * @param value the angle to set
     * @return this
     */
    public ProtobufSwerveModuleState setAngle(final Geometry2D.ProtobufRotation2d value) {
      bitField0_ |= 0x00000002;
      angle.copyFrom(value);
      return this;
    }

    @Override
    public ProtobufSwerveModuleState copyFrom(final ProtobufSwerveModuleState other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        speed = other.speed;
        angle.copyFrom(other.angle);
      }
      return this;
    }

    @Override
    public ProtobufSwerveModuleState mergeFrom(final ProtobufSwerveModuleState other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasSpeed()) {
        setSpeed(other.speed);
      }
      if (other.hasAngle()) {
        getMutableAngle().mergeFrom(other.angle);
      }
      return this;
    }

    @Override
    public ProtobufSwerveModuleState clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      speed = 0D;
      angle.clear();
      return this;
    }

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

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufSwerveModuleState)) {
        return false;
      }
      ProtobufSwerveModuleState other = (ProtobufSwerveModuleState) o;
      return bitField0_ == other.bitField0_
        && (!hasSpeed() || ProtoUtil.isEqual(speed, other.speed))
        && (!hasAngle() || angle.equals(other.angle));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(speed);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 18);
        output.writeMessageNoTag(angle);
      }
    }

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

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

    @Override
    public ProtobufSwerveModuleState mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 109641799: {
            if (input.isAtField(FieldNames.speed)) {
              if (!input.trySkipNullValue()) {
                speed = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 92960979: {
            if (input.isAtField(FieldNames.angle)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(angle);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Kinematics.wpi_proto_ProtobufSwerveModuleState_descriptor;
    }

    private enum ProtobufSwerveModuleStateFactory implements MessageFactory<ProtobufSwerveModuleState> {
      INSTANCE;

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

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

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