001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004// Code generated by protocol buffer compiler. Do not edit!
005package edu.wpi.first.math.proto;
006
007import java.io.IOException;
008import us.hebi.quickbuf.Descriptors;
009import us.hebi.quickbuf.FieldName;
010import us.hebi.quickbuf.InvalidProtocolBufferException;
011import us.hebi.quickbuf.JsonSink;
012import us.hebi.quickbuf.JsonSource;
013import us.hebi.quickbuf.MessageFactory;
014import us.hebi.quickbuf.ProtoMessage;
015import us.hebi.quickbuf.ProtoSink;
016import us.hebi.quickbuf.ProtoSource;
017import us.hebi.quickbuf.ProtoUtil;
018import us.hebi.quickbuf.RepeatedByte;
019import us.hebi.quickbuf.RepeatedMessage;
020
021public final class Kinematics {
022  private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(3208,
023    "ChBraW5lbWF0aWNzLnByb3RvEgl3cGkucHJvdG8aEGdlb21ldHJ5MmQucHJvdG8iTQoVUHJvdG9idWZD" + 
024    "aGFzc2lzU3BlZWRzEg4KAnZ4GAEgASgBUgJ2eBIOCgJ2eRgCIAEoAVICdnkSFAoFb21lZ2EYAyABKAFS" + 
025    "BW9tZWdhIkYKI1Byb3RvYnVmRGlmZmVyZW50aWFsRHJpdmVLaW5lbWF0aWNzEh8KC3RyYWNrX3dpZHRo" + 
026    "GAEgASgBUgp0cmFja1dpZHRoIlAKJFByb3RvYnVmRGlmZmVyZW50aWFsRHJpdmVXaGVlbFNwZWVkcxIS" + 
027    "CgRsZWZ0GAEgASgBUgRsZWZ0EhQKBXJpZ2h0GAIgASgBUgVyaWdodCKkAgoeUHJvdG9idWZNZWNhbnVt" + 
028    "RHJpdmVLaW5lbWF0aWNzEj8KCmZyb250X2xlZnQYASABKAsyIC53cGkucHJvdG8uUHJvdG9idWZUcmFu" + 
029    "c2xhdGlvbjJkUglmcm9udExlZnQSQQoLZnJvbnRfcmlnaHQYAiABKAsyIC53cGkucHJvdG8uUHJvdG9i" + 
030    "dWZUcmFuc2xhdGlvbjJkUgpmcm9udFJpZ2h0Ej0KCXJlYXJfbGVmdBgDIAEoCzIgLndwaS5wcm90by5Q" + 
031    "cm90b2J1ZlRyYW5zbGF0aW9uMmRSCHJlYXJMZWZ0Ej8KCnJlYXJfcmlnaHQYBCABKAsyIC53cGkucHJv" + 
032    "dG8uUHJvdG9idWZUcmFuc2xhdGlvbjJkUglyZWFyUmlnaHQinwEKIVByb3RvYnVmTWVjYW51bURyaXZl" + 
033    "TW90b3JWb2x0YWdlcxIdCgpmcm9udF9sZWZ0GAEgASgBUglmcm9udExlZnQSHwoLZnJvbnRfcmlnaHQY" + 
034    "AiABKAFSCmZyb250UmlnaHQSGwoJcmVhcl9sZWZ0GAMgASgBUghyZWFyTGVmdBIdCgpyZWFyX3JpZ2h0" + 
035    "GAQgASgBUglyZWFyUmlnaHQioAEKIlByb3RvYnVmTWVjYW51bURyaXZlV2hlZWxQb3NpdGlvbnMSHQoK" + 
036    "ZnJvbnRfbGVmdBgBIAEoAVIJZnJvbnRMZWZ0Eh8KC2Zyb250X3JpZ2h0GAIgASgBUgpmcm9udFJpZ2h0" + 
037    "EhsKCXJlYXJfbGVmdBgDIAEoAVIIcmVhckxlZnQSHQoKcmVhcl9yaWdodBgEIAEoAVIJcmVhclJpZ2h0" + 
038    "Ip0BCh9Qcm90b2J1Zk1lY2FudW1Ecml2ZVdoZWVsU3BlZWRzEh0KCmZyb250X2xlZnQYASABKAFSCWZy" + 
039    "b250TGVmdBIfCgtmcm9udF9yaWdodBgCIAEoAVIKZnJvbnRSaWdodBIbCglyZWFyX2xlZnQYAyABKAFS" + 
040    "CHJlYXJMZWZ0Eh0KCnJlYXJfcmlnaHQYBCABKAFSCXJlYXJSaWdodCJbCh1Qcm90b2J1ZlN3ZXJ2ZURy" + 
041    "aXZlS2luZW1hdGljcxI6Cgdtb2R1bGVzGAEgAygLMiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRp" + 
042    "b24yZFIHbW9kdWxlcyJvChxQcm90b2J1ZlN3ZXJ2ZU1vZHVsZVBvc2l0aW9uEhoKCGRpc3RhbmNlGAEg",
043    "ASgBUghkaXN0YW5jZRIzCgVhbmdsZRgCIAEoCzIdLndwaS5wcm90by5Qcm90b2J1ZlJvdGF0aW9uMmRS" + 
044    "BWFuZ2xlImYKGVByb3RvYnVmU3dlcnZlTW9kdWxlU3RhdGUSFAoFc3BlZWQYASABKAFSBXNwZWVkEjMK" + 
045    "BWFuZ2xlGAIgASgLMh0ud3BpLnByb3RvLlByb3RvYnVmUm90YXRpb24yZFIFYW5nbGVCGgoYZWR1Lndw" + 
046    "aS5maXJzdC5tYXRoLnByb3RvSocOCgYSBAAAPwEKCAoBDBIDAAASCggKAQISAwIAEgoJCgIDABIDBAAa" + 
047    "CggKAQgSAwYAMQoJCgIIARIDBgAxCgoKAgQAEgQIAAwBCgoKAwQAARIDCAgdCgsKBAQAAgASAwkCEAoM" + 
048    "CgUEAAIABRIDCQIICgwKBQQAAgABEgMJCQsKDAoFBAACAAMSAwkODwoLCgQEAAIBEgMKAhAKDAoFBAAC" + 
049    "AQUSAwoCCAoMCgUEAAIBARIDCgkLCgwKBQQAAgEDEgMKDg8KCwoEBAACAhIDCwITCgwKBQQAAgIFEgML" + 
050    "AggKDAoFBAACAgESAwsJDgoMCgUEAAICAxIDCxESCgoKAgQBEgQOABABCgoKAwQBARIDDggrCgsKBAQB" + 
051    "AgASAw8CGQoMCgUEAQIABRIDDwIICgwKBQQBAgABEgMPCRQKDAoFBAECAAMSAw8XGAoKCgIEAhIEEgAV" + 
052    "AQoKCgMEAgESAxIILAoLCgQEAgIAEgMTAhIKDAoFBAICAAUSAxMCCAoMCgUEAgIAARIDEwkNCgwKBQQC" + 
053    "AgADEgMTEBEKCwoEBAICARIDFAITCgwKBQQCAgEFEgMUAggKDAoFBAICAQESAxQJDgoMCgUEAgIBAxID" + 
054    "FBESCgoKAgQDEgQXABwBCgoKAwQDARIDFwgmCgsKBAQDAgASAxgCJwoMCgUEAwIABhIDGAIXCgwKBQQD" + 
055    "AgABEgMYGCIKDAoFBAMCAAMSAxglJgoLCgQEAwIBEgMZAigKDAoFBAMCAQYSAxkCFwoMCgUEAwIBARID" + 
056    "GRgjCgwKBQQDAgEDEgMZJicKCwoEBAMCAhIDGgImCgwKBQQDAgIGEgMaAhcKDAoFBAMCAgESAxoYIQoM" + 
057    "CgUEAwICAxIDGiQlCgsKBAQDAgMSAxsCJwoMCgUEAwIDBhIDGwIXCgwKBQQDAgMBEgMbGCIKDAoFBAMC" + 
058    "AwMSAxslJgoKCgIEBBIEHgAjAQoKCgMEBAESAx4IKQoLCgQEBAIAEgMfAhgKDAoFBAQCAAUSAx8CCAoM" + 
059    "CgUEBAIAARIDHwkTCgwKBQQEAgADEgMfFhcKCwoEBAQCARIDIAIZCgwKBQQEAgEFEgMgAggKDAoFBAQC" + 
060    "AQESAyAJFAoMCgUEBAIBAxIDIBcYCgsKBAQEAgISAyECFwoMCgUEBAICBRIDIQIICgwKBQQEAgIBEgMh" + 
061    "CRIKDAoFBAQCAgMSAyEVFgoLCgQEBAIDEgMiAhgKDAoFBAQCAwUSAyICCAoMCgUEBAIDARIDIgkTCgwK" + 
062    "BQQEAgMDEgMiFhcKCgoCBAUSBCUAKgEKCgoDBAUBEgMlCCoKCwoEBAUCABIDJgIYCgwKBQQFAgAFEgMm",
063    "AggKDAoFBAUCAAESAyYJEwoMCgUEBQIAAxIDJhYXCgsKBAQFAgESAycCGQoMCgUEBQIBBRIDJwIICgwK" + 
064    "BQQFAgEBEgMnCRQKDAoFBAUCAQMSAycXGAoLCgQEBQICEgMoAhcKDAoFBAUCAgUSAygCCAoMCgUEBQIC" + 
065    "ARIDKAkSCgwKBQQFAgIDEgMoFRYKCwoEBAUCAxIDKQIYCgwKBQQFAgMFEgMpAggKDAoFBAUCAwESAykJ" + 
066    "EwoMCgUEBQIDAxIDKRYXCgoKAgQGEgQsADEBCgoKAwQGARIDLAgnCgsKBAQGAgASAy0CGAoMCgUEBgIA" + 
067    "BRIDLQIICgwKBQQGAgABEgMtCRMKDAoFBAYCAAMSAy0WFwoLCgQEBgIBEgMuAhkKDAoFBAYCAQUSAy4C" + 
068    "CAoMCgUEBgIBARIDLgkUCgwKBQQGAgEDEgMuFxgKCwoEBAYCAhIDLwIXCgwKBQQGAgIFEgMvAggKDAoF" + 
069    "BAYCAgESAy8JEgoMCgUEBgICAxIDLxUWCgsKBAQGAgMSAzACGAoMCgUEBgIDBRIDMAIICgwKBQQGAgMB" + 
070    "EgMwCRMKDAoFBAYCAwMSAzAWFwoKCgIEBxIEMwA1AQoKCgMEBwESAzMIJQoLCgQEBwIAEgM0Ai0KDAoF" + 
071    "BAcCAAQSAzQCCgoMCgUEBwIABhIDNAsgCgwKBQQHAgABEgM0ISgKDAoFBAcCAAMSAzQrLAoKCgIECBIE" + 
072    "NwA6AQoKCgMECAESAzcIJAoLCgQECAIAEgM4AhYKDAoFBAgCAAUSAzgCCAoMCgUECAIAARIDOAkRCgwK" + 
073    "BQQIAgADEgM4FBUKCwoEBAgCARIDOQIfCgwKBQQIAgEGEgM5AhQKDAoFBAgCAQESAzkVGgoMCgUECAIB" + 
074    "AxIDOR0eCgoKAgQJEgQ8AD8BCgoKAwQJARIDPAghCgsKBAQJAgASAz0CEwoMCgUECQIABRIDPQIICgwK" + 
075    "BQQJAgABEgM9CQ4KDAoFBAkCAAMSAz0REgoLCgQECQIBEgM+Ah8KDAoFBAkCAQYSAz4CFAoMCgUECQIB" + 
076    "ARIDPhUaCgwKBQQJAgEDEgM+HR5iBnByb3RvMw==");
077
078  static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("kinematics.proto", "wpi.proto", descriptorData, Geometry2D.getDescriptor());
079
080  static final Descriptors.Descriptor wpi_proto_ProtobufChassisSpeeds_descriptor = descriptor.internalContainedType(49, 77, "ProtobufChassisSpeeds", "wpi.proto.ProtobufChassisSpeeds");
081
082  static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveKinematics_descriptor = descriptor.internalContainedType(128, 70, "ProtobufDifferentialDriveKinematics", "wpi.proto.ProtobufDifferentialDriveKinematics");
083
084  static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelSpeeds_descriptor = descriptor.internalContainedType(200, 80, "ProtobufDifferentialDriveWheelSpeeds", "wpi.proto.ProtobufDifferentialDriveWheelSpeeds");
085
086  static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveKinematics_descriptor = descriptor.internalContainedType(283, 292, "ProtobufMecanumDriveKinematics", "wpi.proto.ProtobufMecanumDriveKinematics");
087
088  static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveMotorVoltages_descriptor = descriptor.internalContainedType(578, 159, "ProtobufMecanumDriveMotorVoltages", "wpi.proto.ProtobufMecanumDriveMotorVoltages");
089
090  static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelPositions_descriptor = descriptor.internalContainedType(740, 160, "ProtobufMecanumDriveWheelPositions", "wpi.proto.ProtobufMecanumDriveWheelPositions");
091
092  static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelSpeeds_descriptor = descriptor.internalContainedType(903, 157, "ProtobufMecanumDriveWheelSpeeds", "wpi.proto.ProtobufMecanumDriveWheelSpeeds");
093
094  static final Descriptors.Descriptor wpi_proto_ProtobufSwerveDriveKinematics_descriptor = descriptor.internalContainedType(1062, 91, "ProtobufSwerveDriveKinematics", "wpi.proto.ProtobufSwerveDriveKinematics");
095
096  static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModulePosition_descriptor = descriptor.internalContainedType(1155, 111, "ProtobufSwerveModulePosition", "wpi.proto.ProtobufSwerveModulePosition");
097
098  static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModuleState_descriptor = descriptor.internalContainedType(1268, 102, "ProtobufSwerveModuleState", "wpi.proto.ProtobufSwerveModuleState");
099
100  /**
101   * @return this proto file's descriptor.
102   */
103  public static Descriptors.FileDescriptor getDescriptor() {
104    return descriptor;
105  }
106
107  /**
108   * Protobuf type {@code ProtobufChassisSpeeds}
109   */
110  public static final class ProtobufChassisSpeeds extends ProtoMessage<ProtobufChassisSpeeds> implements Cloneable {
111    private static final long serialVersionUID = 0L;
112
113    /**
114     * <code>optional double vx = 1;</code>
115     */
116    private double vx;
117
118    /**
119     * <code>optional double vy = 2;</code>
120     */
121    private double vy;
122
123    /**
124     * <code>optional double omega = 3;</code>
125     */
126    private double omega;
127
128    private ProtobufChassisSpeeds() {
129    }
130
131    /**
132     * @return a new empty instance of {@code ProtobufChassisSpeeds}
133     */
134    public static ProtobufChassisSpeeds newInstance() {
135      return new ProtobufChassisSpeeds();
136    }
137
138    /**
139     * <code>optional double vx = 1;</code>
140     * @return whether the vx field is set
141     */
142    public boolean hasVx() {
143      return (bitField0_ & 0x00000001) != 0;
144    }
145
146    /**
147     * <code>optional double vx = 1;</code>
148     * @return this
149     */
150    public ProtobufChassisSpeeds clearVx() {
151      bitField0_ &= ~0x00000001;
152      vx = 0D;
153      return this;
154    }
155
156    /**
157     * <code>optional double vx = 1;</code>
158     * @return the vx
159     */
160    public double getVx() {
161      return vx;
162    }
163
164    /**
165     * <code>optional double vx = 1;</code>
166     * @param value the vx to set
167     * @return this
168     */
169    public ProtobufChassisSpeeds setVx(final double value) {
170      bitField0_ |= 0x00000001;
171      vx = value;
172      return this;
173    }
174
175    /**
176     * <code>optional double vy = 2;</code>
177     * @return whether the vy field is set
178     */
179    public boolean hasVy() {
180      return (bitField0_ & 0x00000002) != 0;
181    }
182
183    /**
184     * <code>optional double vy = 2;</code>
185     * @return this
186     */
187    public ProtobufChassisSpeeds clearVy() {
188      bitField0_ &= ~0x00000002;
189      vy = 0D;
190      return this;
191    }
192
193    /**
194     * <code>optional double vy = 2;</code>
195     * @return the vy
196     */
197    public double getVy() {
198      return vy;
199    }
200
201    /**
202     * <code>optional double vy = 2;</code>
203     * @param value the vy to set
204     * @return this
205     */
206    public ProtobufChassisSpeeds setVy(final double value) {
207      bitField0_ |= 0x00000002;
208      vy = value;
209      return this;
210    }
211
212    /**
213     * <code>optional double omega = 3;</code>
214     * @return whether the omega field is set
215     */
216    public boolean hasOmega() {
217      return (bitField0_ & 0x00000004) != 0;
218    }
219
220    /**
221     * <code>optional double omega = 3;</code>
222     * @return this
223     */
224    public ProtobufChassisSpeeds clearOmega() {
225      bitField0_ &= ~0x00000004;
226      omega = 0D;
227      return this;
228    }
229
230    /**
231     * <code>optional double omega = 3;</code>
232     * @return the omega
233     */
234    public double getOmega() {
235      return omega;
236    }
237
238    /**
239     * <code>optional double omega = 3;</code>
240     * @param value the omega to set
241     * @return this
242     */
243    public ProtobufChassisSpeeds setOmega(final double value) {
244      bitField0_ |= 0x00000004;
245      omega = value;
246      return this;
247    }
248
249    @Override
250    public ProtobufChassisSpeeds copyFrom(final ProtobufChassisSpeeds other) {
251      cachedSize = other.cachedSize;
252      if ((bitField0_ | other.bitField0_) != 0) {
253        bitField0_ = other.bitField0_;
254        vx = other.vx;
255        vy = other.vy;
256        omega = other.omega;
257      }
258      return this;
259    }
260
261    @Override
262    public ProtobufChassisSpeeds mergeFrom(final ProtobufChassisSpeeds other) {
263      if (other.isEmpty()) {
264        return this;
265      }
266      cachedSize = -1;
267      if (other.hasVx()) {
268        setVx(other.vx);
269      }
270      if (other.hasVy()) {
271        setVy(other.vy);
272      }
273      if (other.hasOmega()) {
274        setOmega(other.omega);
275      }
276      return this;
277    }
278
279    @Override
280    public ProtobufChassisSpeeds clear() {
281      if (isEmpty()) {
282        return this;
283      }
284      cachedSize = -1;
285      bitField0_ = 0;
286      vx = 0D;
287      vy = 0D;
288      omega = 0D;
289      return this;
290    }
291
292    @Override
293    public ProtobufChassisSpeeds clearQuick() {
294      if (isEmpty()) {
295        return this;
296      }
297      cachedSize = -1;
298      bitField0_ = 0;
299      return this;
300    }
301
302    @Override
303    public boolean equals(Object o) {
304      if (o == this) {
305        return true;
306      }
307      if (!(o instanceof ProtobufChassisSpeeds)) {
308        return false;
309      }
310      ProtobufChassisSpeeds other = (ProtobufChassisSpeeds) o;
311      return bitField0_ == other.bitField0_
312        && (!hasVx() || ProtoUtil.isEqual(vx, other.vx))
313        && (!hasVy() || ProtoUtil.isEqual(vy, other.vy))
314        && (!hasOmega() || ProtoUtil.isEqual(omega, other.omega));
315    }
316
317    @Override
318    public void writeTo(final ProtoSink output) throws IOException {
319      if ((bitField0_ & 0x00000001) != 0) {
320        output.writeRawByte((byte) 9);
321        output.writeDoubleNoTag(vx);
322      }
323      if ((bitField0_ & 0x00000002) != 0) {
324        output.writeRawByte((byte) 17);
325        output.writeDoubleNoTag(vy);
326      }
327      if ((bitField0_ & 0x00000004) != 0) {
328        output.writeRawByte((byte) 25);
329        output.writeDoubleNoTag(omega);
330      }
331    }
332
333    @Override
334    protected int computeSerializedSize() {
335      int size = 0;
336      if ((bitField0_ & 0x00000001) != 0) {
337        size += 9;
338      }
339      if ((bitField0_ & 0x00000002) != 0) {
340        size += 9;
341      }
342      if ((bitField0_ & 0x00000004) != 0) {
343        size += 9;
344      }
345      return size;
346    }
347
348    @Override
349    @SuppressWarnings("fallthrough")
350    public ProtobufChassisSpeeds mergeFrom(final ProtoSource input) throws IOException {
351      // Enabled Fall-Through Optimization (QuickBuffers)
352      int tag = input.readTag();
353      while (true) {
354        switch (tag) {
355          case 9: {
356            // vx
357            vx = input.readDouble();
358            bitField0_ |= 0x00000001;
359            tag = input.readTag();
360            if (tag != 17) {
361              break;
362            }
363          }
364          case 17: {
365            // vy
366            vy = input.readDouble();
367            bitField0_ |= 0x00000002;
368            tag = input.readTag();
369            if (tag != 25) {
370              break;
371            }
372          }
373          case 25: {
374            // omega
375            omega = input.readDouble();
376            bitField0_ |= 0x00000004;
377            tag = input.readTag();
378            if (tag != 0) {
379              break;
380            }
381          }
382          case 0: {
383            return this;
384          }
385          default: {
386            if (!input.skipField(tag)) {
387              return this;
388            }
389            tag = input.readTag();
390            break;
391          }
392        }
393      }
394    }
395
396    @Override
397    public void writeTo(final JsonSink output) throws IOException {
398      output.beginObject();
399      if ((bitField0_ & 0x00000001) != 0) {
400        output.writeDouble(FieldNames.vx, vx);
401      }
402      if ((bitField0_ & 0x00000002) != 0) {
403        output.writeDouble(FieldNames.vy, vy);
404      }
405      if ((bitField0_ & 0x00000004) != 0) {
406        output.writeDouble(FieldNames.omega, omega);
407      }
408      output.endObject();
409    }
410
411    @Override
412    public ProtobufChassisSpeeds mergeFrom(final JsonSource input) throws IOException {
413      if (!input.beginObject()) {
414        return this;
415      }
416      while (!input.isAtEnd()) {
417        switch (input.readFieldHash()) {
418          case 3778: {
419            if (input.isAtField(FieldNames.vx)) {
420              if (!input.trySkipNullValue()) {
421                vx = input.readDouble();
422                bitField0_ |= 0x00000001;
423              }
424            } else {
425              input.skipUnknownField();
426            }
427            break;
428          }
429          case 3779: {
430            if (input.isAtField(FieldNames.vy)) {
431              if (!input.trySkipNullValue()) {
432                vy = input.readDouble();
433                bitField0_ |= 0x00000002;
434              }
435            } else {
436              input.skipUnknownField();
437            }
438            break;
439          }
440          case 105858401: {
441            if (input.isAtField(FieldNames.omega)) {
442              if (!input.trySkipNullValue()) {
443                omega = input.readDouble();
444                bitField0_ |= 0x00000004;
445              }
446            } else {
447              input.skipUnknownField();
448            }
449            break;
450          }
451          default: {
452            input.skipUnknownField();
453            break;
454          }
455        }
456      }
457      input.endObject();
458      return this;
459    }
460
461    @Override
462    public ProtobufChassisSpeeds clone() {
463      return new ProtobufChassisSpeeds().copyFrom(this);
464    }
465
466    @Override
467    public boolean isEmpty() {
468      return ((bitField0_) == 0);
469    }
470
471    public static ProtobufChassisSpeeds parseFrom(final byte[] data) throws
472        InvalidProtocolBufferException {
473      return ProtoMessage.mergeFrom(new ProtobufChassisSpeeds(), data).checkInitialized();
474    }
475
476    public static ProtobufChassisSpeeds parseFrom(final ProtoSource input) throws IOException {
477      return ProtoMessage.mergeFrom(new ProtobufChassisSpeeds(), input).checkInitialized();
478    }
479
480    public static ProtobufChassisSpeeds parseFrom(final JsonSource input) throws IOException {
481      return ProtoMessage.mergeFrom(new ProtobufChassisSpeeds(), input).checkInitialized();
482    }
483
484    /**
485     * @return factory for creating ProtobufChassisSpeeds messages
486     */
487    public static MessageFactory<ProtobufChassisSpeeds> getFactory() {
488      return ProtobufChassisSpeedsFactory.INSTANCE;
489    }
490
491    /**
492     * @return this type's descriptor.
493     */
494    public static Descriptors.Descriptor getDescriptor() {
495      return Kinematics.wpi_proto_ProtobufChassisSpeeds_descriptor;
496    }
497
498    private enum ProtobufChassisSpeedsFactory implements MessageFactory<ProtobufChassisSpeeds> {
499      INSTANCE;
500
501      @Override
502      public ProtobufChassisSpeeds create() {
503        return ProtobufChassisSpeeds.newInstance();
504      }
505    }
506
507    /**
508     * Contains name constants used for serializing JSON
509     */
510    static class FieldNames {
511      static final FieldName vx = FieldName.forField("vx");
512
513      static final FieldName vy = FieldName.forField("vy");
514
515      static final FieldName omega = FieldName.forField("omega");
516    }
517  }
518
519  /**
520   * Protobuf type {@code ProtobufDifferentialDriveKinematics}
521   */
522  public static final class ProtobufDifferentialDriveKinematics extends ProtoMessage<ProtobufDifferentialDriveKinematics> implements Cloneable {
523    private static final long serialVersionUID = 0L;
524
525    /**
526     * <code>optional double track_width = 1;</code>
527     */
528    private double trackWidth;
529
530    private ProtobufDifferentialDriveKinematics() {
531    }
532
533    /**
534     * @return a new empty instance of {@code ProtobufDifferentialDriveKinematics}
535     */
536    public static ProtobufDifferentialDriveKinematics newInstance() {
537      return new ProtobufDifferentialDriveKinematics();
538    }
539
540    /**
541     * <code>optional double track_width = 1;</code>
542     * @return whether the trackWidth field is set
543     */
544    public boolean hasTrackWidth() {
545      return (bitField0_ & 0x00000001) != 0;
546    }
547
548    /**
549     * <code>optional double track_width = 1;</code>
550     * @return this
551     */
552    public ProtobufDifferentialDriveKinematics clearTrackWidth() {
553      bitField0_ &= ~0x00000001;
554      trackWidth = 0D;
555      return this;
556    }
557
558    /**
559     * <code>optional double track_width = 1;</code>
560     * @return the trackWidth
561     */
562    public double getTrackWidth() {
563      return trackWidth;
564    }
565
566    /**
567     * <code>optional double track_width = 1;</code>
568     * @param value the trackWidth to set
569     * @return this
570     */
571    public ProtobufDifferentialDriveKinematics setTrackWidth(final double value) {
572      bitField0_ |= 0x00000001;
573      trackWidth = value;
574      return this;
575    }
576
577    @Override
578    public ProtobufDifferentialDriveKinematics copyFrom(
579        final ProtobufDifferentialDriveKinematics other) {
580      cachedSize = other.cachedSize;
581      if ((bitField0_ | other.bitField0_) != 0) {
582        bitField0_ = other.bitField0_;
583        trackWidth = other.trackWidth;
584      }
585      return this;
586    }
587
588    @Override
589    public ProtobufDifferentialDriveKinematics mergeFrom(
590        final ProtobufDifferentialDriveKinematics other) {
591      if (other.isEmpty()) {
592        return this;
593      }
594      cachedSize = -1;
595      if (other.hasTrackWidth()) {
596        setTrackWidth(other.trackWidth);
597      }
598      return this;
599    }
600
601    @Override
602    public ProtobufDifferentialDriveKinematics clear() {
603      if (isEmpty()) {
604        return this;
605      }
606      cachedSize = -1;
607      bitField0_ = 0;
608      trackWidth = 0D;
609      return this;
610    }
611
612    @Override
613    public ProtobufDifferentialDriveKinematics clearQuick() {
614      if (isEmpty()) {
615        return this;
616      }
617      cachedSize = -1;
618      bitField0_ = 0;
619      return this;
620    }
621
622    @Override
623    public boolean equals(Object o) {
624      if (o == this) {
625        return true;
626      }
627      if (!(o instanceof ProtobufDifferentialDriveKinematics)) {
628        return false;
629      }
630      ProtobufDifferentialDriveKinematics other = (ProtobufDifferentialDriveKinematics) o;
631      return bitField0_ == other.bitField0_
632        && (!hasTrackWidth() || ProtoUtil.isEqual(trackWidth, other.trackWidth));
633    }
634
635    @Override
636    public void writeTo(final ProtoSink output) throws IOException {
637      if ((bitField0_ & 0x00000001) != 0) {
638        output.writeRawByte((byte) 9);
639        output.writeDoubleNoTag(trackWidth);
640      }
641    }
642
643    @Override
644    protected int computeSerializedSize() {
645      int size = 0;
646      if ((bitField0_ & 0x00000001) != 0) {
647        size += 9;
648      }
649      return size;
650    }
651
652    @Override
653    @SuppressWarnings("fallthrough")
654    public ProtobufDifferentialDriveKinematics mergeFrom(final ProtoSource input) throws
655        IOException {
656      // Enabled Fall-Through Optimization (QuickBuffers)
657      int tag = input.readTag();
658      while (true) {
659        switch (tag) {
660          case 9: {
661            // trackWidth
662            trackWidth = input.readDouble();
663            bitField0_ |= 0x00000001;
664            tag = input.readTag();
665            if (tag != 0) {
666              break;
667            }
668          }
669          case 0: {
670            return this;
671          }
672          default: {
673            if (!input.skipField(tag)) {
674              return this;
675            }
676            tag = input.readTag();
677            break;
678          }
679        }
680      }
681    }
682
683    @Override
684    public void writeTo(final JsonSink output) throws IOException {
685      output.beginObject();
686      if ((bitField0_ & 0x00000001) != 0) {
687        output.writeDouble(FieldNames.trackWidth, trackWidth);
688      }
689      output.endObject();
690    }
691
692    @Override
693    public ProtobufDifferentialDriveKinematics mergeFrom(final JsonSource input) throws
694        IOException {
695      if (!input.beginObject()) {
696        return this;
697      }
698      while (!input.isAtEnd()) {
699        switch (input.readFieldHash()) {
700          case 1152213819:
701          case 1600986578: {
702            if (input.isAtField(FieldNames.trackWidth)) {
703              if (!input.trySkipNullValue()) {
704                trackWidth = input.readDouble();
705                bitField0_ |= 0x00000001;
706              }
707            } else {
708              input.skipUnknownField();
709            }
710            break;
711          }
712          default: {
713            input.skipUnknownField();
714            break;
715          }
716        }
717      }
718      input.endObject();
719      return this;
720    }
721
722    @Override
723    public ProtobufDifferentialDriveKinematics clone() {
724      return new ProtobufDifferentialDriveKinematics().copyFrom(this);
725    }
726
727    @Override
728    public boolean isEmpty() {
729      return ((bitField0_) == 0);
730    }
731
732    public static ProtobufDifferentialDriveKinematics parseFrom(final byte[] data) throws
733        InvalidProtocolBufferException {
734      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveKinematics(), data).checkInitialized();
735    }
736
737    public static ProtobufDifferentialDriveKinematics parseFrom(final ProtoSource input) throws
738        IOException {
739      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveKinematics(), input).checkInitialized();
740    }
741
742    public static ProtobufDifferentialDriveKinematics parseFrom(final JsonSource input) throws
743        IOException {
744      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveKinematics(), input).checkInitialized();
745    }
746
747    /**
748     * @return factory for creating ProtobufDifferentialDriveKinematics messages
749     */
750    public static MessageFactory<ProtobufDifferentialDriveKinematics> getFactory() {
751      return ProtobufDifferentialDriveKinematicsFactory.INSTANCE;
752    }
753
754    /**
755     * @return this type's descriptor.
756     */
757    public static Descriptors.Descriptor getDescriptor() {
758      return Kinematics.wpi_proto_ProtobufDifferentialDriveKinematics_descriptor;
759    }
760
761    private enum ProtobufDifferentialDriveKinematicsFactory implements MessageFactory<ProtobufDifferentialDriveKinematics> {
762      INSTANCE;
763
764      @Override
765      public ProtobufDifferentialDriveKinematics create() {
766        return ProtobufDifferentialDriveKinematics.newInstance();
767      }
768    }
769
770    /**
771     * Contains name constants used for serializing JSON
772     */
773    static class FieldNames {
774      static final FieldName trackWidth = FieldName.forField("trackWidth", "track_width");
775    }
776  }
777
778  /**
779   * Protobuf type {@code ProtobufDifferentialDriveWheelSpeeds}
780   */
781  public static final class ProtobufDifferentialDriveWheelSpeeds extends ProtoMessage<ProtobufDifferentialDriveWheelSpeeds> implements Cloneable {
782    private static final long serialVersionUID = 0L;
783
784    /**
785     * <code>optional double left = 1;</code>
786     */
787    private double left;
788
789    /**
790     * <code>optional double right = 2;</code>
791     */
792    private double right;
793
794    private ProtobufDifferentialDriveWheelSpeeds() {
795    }
796
797    /**
798     * @return a new empty instance of {@code ProtobufDifferentialDriveWheelSpeeds}
799     */
800    public static ProtobufDifferentialDriveWheelSpeeds newInstance() {
801      return new ProtobufDifferentialDriveWheelSpeeds();
802    }
803
804    /**
805     * <code>optional double left = 1;</code>
806     * @return whether the left field is set
807     */
808    public boolean hasLeft() {
809      return (bitField0_ & 0x00000001) != 0;
810    }
811
812    /**
813     * <code>optional double left = 1;</code>
814     * @return this
815     */
816    public ProtobufDifferentialDriveWheelSpeeds clearLeft() {
817      bitField0_ &= ~0x00000001;
818      left = 0D;
819      return this;
820    }
821
822    /**
823     * <code>optional double left = 1;</code>
824     * @return the left
825     */
826    public double getLeft() {
827      return left;
828    }
829
830    /**
831     * <code>optional double left = 1;</code>
832     * @param value the left to set
833     * @return this
834     */
835    public ProtobufDifferentialDriveWheelSpeeds setLeft(final double value) {
836      bitField0_ |= 0x00000001;
837      left = value;
838      return this;
839    }
840
841    /**
842     * <code>optional double right = 2;</code>
843     * @return whether the right field is set
844     */
845    public boolean hasRight() {
846      return (bitField0_ & 0x00000002) != 0;
847    }
848
849    /**
850     * <code>optional double right = 2;</code>
851     * @return this
852     */
853    public ProtobufDifferentialDriveWheelSpeeds clearRight() {
854      bitField0_ &= ~0x00000002;
855      right = 0D;
856      return this;
857    }
858
859    /**
860     * <code>optional double right = 2;</code>
861     * @return the right
862     */
863    public double getRight() {
864      return right;
865    }
866
867    /**
868     * <code>optional double right = 2;</code>
869     * @param value the right to set
870     * @return this
871     */
872    public ProtobufDifferentialDriveWheelSpeeds setRight(final double value) {
873      bitField0_ |= 0x00000002;
874      right = value;
875      return this;
876    }
877
878    @Override
879    public ProtobufDifferentialDriveWheelSpeeds copyFrom(
880        final ProtobufDifferentialDriveWheelSpeeds other) {
881      cachedSize = other.cachedSize;
882      if ((bitField0_ | other.bitField0_) != 0) {
883        bitField0_ = other.bitField0_;
884        left = other.left;
885        right = other.right;
886      }
887      return this;
888    }
889
890    @Override
891    public ProtobufDifferentialDriveWheelSpeeds mergeFrom(
892        final ProtobufDifferentialDriveWheelSpeeds other) {
893      if (other.isEmpty()) {
894        return this;
895      }
896      cachedSize = -1;
897      if (other.hasLeft()) {
898        setLeft(other.left);
899      }
900      if (other.hasRight()) {
901        setRight(other.right);
902      }
903      return this;
904    }
905
906    @Override
907    public ProtobufDifferentialDriveWheelSpeeds clear() {
908      if (isEmpty()) {
909        return this;
910      }
911      cachedSize = -1;
912      bitField0_ = 0;
913      left = 0D;
914      right = 0D;
915      return this;
916    }
917
918    @Override
919    public ProtobufDifferentialDriveWheelSpeeds clearQuick() {
920      if (isEmpty()) {
921        return this;
922      }
923      cachedSize = -1;
924      bitField0_ = 0;
925      return this;
926    }
927
928    @Override
929    public boolean equals(Object o) {
930      if (o == this) {
931        return true;
932      }
933      if (!(o instanceof ProtobufDifferentialDriveWheelSpeeds)) {
934        return false;
935      }
936      ProtobufDifferentialDriveWheelSpeeds other = (ProtobufDifferentialDriveWheelSpeeds) o;
937      return bitField0_ == other.bitField0_
938        && (!hasLeft() || ProtoUtil.isEqual(left, other.left))
939        && (!hasRight() || ProtoUtil.isEqual(right, other.right));
940    }
941
942    @Override
943    public void writeTo(final ProtoSink output) throws IOException {
944      if ((bitField0_ & 0x00000001) != 0) {
945        output.writeRawByte((byte) 9);
946        output.writeDoubleNoTag(left);
947      }
948      if ((bitField0_ & 0x00000002) != 0) {
949        output.writeRawByte((byte) 17);
950        output.writeDoubleNoTag(right);
951      }
952    }
953
954    @Override
955    protected int computeSerializedSize() {
956      int size = 0;
957      if ((bitField0_ & 0x00000001) != 0) {
958        size += 9;
959      }
960      if ((bitField0_ & 0x00000002) != 0) {
961        size += 9;
962      }
963      return size;
964    }
965
966    @Override
967    @SuppressWarnings("fallthrough")
968    public ProtobufDifferentialDriveWheelSpeeds mergeFrom(final ProtoSource input) throws
969        IOException {
970      // Enabled Fall-Through Optimization (QuickBuffers)
971      int tag = input.readTag();
972      while (true) {
973        switch (tag) {
974          case 9: {
975            // left
976            left = input.readDouble();
977            bitField0_ |= 0x00000001;
978            tag = input.readTag();
979            if (tag != 17) {
980              break;
981            }
982          }
983          case 17: {
984            // right
985            right = input.readDouble();
986            bitField0_ |= 0x00000002;
987            tag = input.readTag();
988            if (tag != 0) {
989              break;
990            }
991          }
992          case 0: {
993            return this;
994          }
995          default: {
996            if (!input.skipField(tag)) {
997              return this;
998            }
999            tag = input.readTag();
1000            break;
1001          }
1002        }
1003      }
1004    }
1005
1006    @Override
1007    public void writeTo(final JsonSink output) throws IOException {
1008      output.beginObject();
1009      if ((bitField0_ & 0x00000001) != 0) {
1010        output.writeDouble(FieldNames.left, left);
1011      }
1012      if ((bitField0_ & 0x00000002) != 0) {
1013        output.writeDouble(FieldNames.right, right);
1014      }
1015      output.endObject();
1016    }
1017
1018    @Override
1019    public ProtobufDifferentialDriveWheelSpeeds mergeFrom(final JsonSource input) throws
1020        IOException {
1021      if (!input.beginObject()) {
1022        return this;
1023      }
1024      while (!input.isAtEnd()) {
1025        switch (input.readFieldHash()) {
1026          case 3317767: {
1027            if (input.isAtField(FieldNames.left)) {
1028              if (!input.trySkipNullValue()) {
1029                left = input.readDouble();
1030                bitField0_ |= 0x00000001;
1031              }
1032            } else {
1033              input.skipUnknownField();
1034            }
1035            break;
1036          }
1037          case 108511772: {
1038            if (input.isAtField(FieldNames.right)) {
1039              if (!input.trySkipNullValue()) {
1040                right = input.readDouble();
1041                bitField0_ |= 0x00000002;
1042              }
1043            } else {
1044              input.skipUnknownField();
1045            }
1046            break;
1047          }
1048          default: {
1049            input.skipUnknownField();
1050            break;
1051          }
1052        }
1053      }
1054      input.endObject();
1055      return this;
1056    }
1057
1058    @Override
1059    public ProtobufDifferentialDriveWheelSpeeds clone() {
1060      return new ProtobufDifferentialDriveWheelSpeeds().copyFrom(this);
1061    }
1062
1063    @Override
1064    public boolean isEmpty() {
1065      return ((bitField0_) == 0);
1066    }
1067
1068    public static ProtobufDifferentialDriveWheelSpeeds parseFrom(final byte[] data) throws
1069        InvalidProtocolBufferException {
1070      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelSpeeds(), data).checkInitialized();
1071    }
1072
1073    public static ProtobufDifferentialDriveWheelSpeeds parseFrom(final ProtoSource input) throws
1074        IOException {
1075      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelSpeeds(), input).checkInitialized();
1076    }
1077
1078    public static ProtobufDifferentialDriveWheelSpeeds parseFrom(final JsonSource input) throws
1079        IOException {
1080      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelSpeeds(), input).checkInitialized();
1081    }
1082
1083    /**
1084     * @return factory for creating ProtobufDifferentialDriveWheelSpeeds messages
1085     */
1086    public static MessageFactory<ProtobufDifferentialDriveWheelSpeeds> getFactory() {
1087      return ProtobufDifferentialDriveWheelSpeedsFactory.INSTANCE;
1088    }
1089
1090    /**
1091     * @return this type's descriptor.
1092     */
1093    public static Descriptors.Descriptor getDescriptor() {
1094      return Kinematics.wpi_proto_ProtobufDifferentialDriveWheelSpeeds_descriptor;
1095    }
1096
1097    private enum ProtobufDifferentialDriveWheelSpeedsFactory implements MessageFactory<ProtobufDifferentialDriveWheelSpeeds> {
1098      INSTANCE;
1099
1100      @Override
1101      public ProtobufDifferentialDriveWheelSpeeds create() {
1102        return ProtobufDifferentialDriveWheelSpeeds.newInstance();
1103      }
1104    }
1105
1106    /**
1107     * Contains name constants used for serializing JSON
1108     */
1109    static class FieldNames {
1110      static final FieldName left = FieldName.forField("left");
1111
1112      static final FieldName right = FieldName.forField("right");
1113    }
1114  }
1115
1116  /**
1117   * Protobuf type {@code ProtobufMecanumDriveKinematics}
1118   */
1119  public static final class ProtobufMecanumDriveKinematics extends ProtoMessage<ProtobufMecanumDriveKinematics> implements Cloneable {
1120    private static final long serialVersionUID = 0L;
1121
1122    /**
1123     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
1124     */
1125    private final Geometry2D.ProtobufTranslation2d frontLeft = Geometry2D.ProtobufTranslation2d.newInstance();
1126
1127    /**
1128     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
1129     */
1130    private final Geometry2D.ProtobufTranslation2d frontRight = Geometry2D.ProtobufTranslation2d.newInstance();
1131
1132    /**
1133     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
1134     */
1135    private final Geometry2D.ProtobufTranslation2d rearLeft = Geometry2D.ProtobufTranslation2d.newInstance();
1136
1137    /**
1138     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
1139     */
1140    private final Geometry2D.ProtobufTranslation2d rearRight = Geometry2D.ProtobufTranslation2d.newInstance();
1141
1142    private ProtobufMecanumDriveKinematics() {
1143    }
1144
1145    /**
1146     * @return a new empty instance of {@code ProtobufMecanumDriveKinematics}
1147     */
1148    public static ProtobufMecanumDriveKinematics newInstance() {
1149      return new ProtobufMecanumDriveKinematics();
1150    }
1151
1152    /**
1153     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
1154     * @return whether the frontLeft field is set
1155     */
1156    public boolean hasFrontLeft() {
1157      return (bitField0_ & 0x00000001) != 0;
1158    }
1159
1160    /**
1161     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
1162     * @return this
1163     */
1164    public ProtobufMecanumDriveKinematics clearFrontLeft() {
1165      bitField0_ &= ~0x00000001;
1166      frontLeft.clear();
1167      return this;
1168    }
1169
1170    /**
1171     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
1172     *
1173     * This method returns the internal storage object without modifying any has state.
1174     * The returned object should not be modified and be treated as read-only.
1175     *
1176     * Use {@link #getMutableFrontLeft()} if you want to modify it.
1177     *
1178     * @return internal storage object for reading
1179     */
1180    public Geometry2D.ProtobufTranslation2d getFrontLeft() {
1181      return frontLeft;
1182    }
1183
1184    /**
1185     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
1186     *
1187     * This method returns the internal storage object and sets the corresponding
1188     * has state. The returned object will become part of this message and its
1189     * contents may be modified as long as the has state is not cleared.
1190     *
1191     * @return internal storage object for modifications
1192     */
1193    public Geometry2D.ProtobufTranslation2d getMutableFrontLeft() {
1194      bitField0_ |= 0x00000001;
1195      return frontLeft;
1196    }
1197
1198    /**
1199     * <code>optional .wpi.proto.ProtobufTranslation2d front_left = 1;</code>
1200     * @param value the frontLeft to set
1201     * @return this
1202     */
1203    public ProtobufMecanumDriveKinematics setFrontLeft(
1204        final Geometry2D.ProtobufTranslation2d value) {
1205      bitField0_ |= 0x00000001;
1206      frontLeft.copyFrom(value);
1207      return this;
1208    }
1209
1210    /**
1211     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
1212     * @return whether the frontRight field is set
1213     */
1214    public boolean hasFrontRight() {
1215      return (bitField0_ & 0x00000002) != 0;
1216    }
1217
1218    /**
1219     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
1220     * @return this
1221     */
1222    public ProtobufMecanumDriveKinematics clearFrontRight() {
1223      bitField0_ &= ~0x00000002;
1224      frontRight.clear();
1225      return this;
1226    }
1227
1228    /**
1229     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
1230     *
1231     * This method returns the internal storage object without modifying any has state.
1232     * The returned object should not be modified and be treated as read-only.
1233     *
1234     * Use {@link #getMutableFrontRight()} if you want to modify it.
1235     *
1236     * @return internal storage object for reading
1237     */
1238    public Geometry2D.ProtobufTranslation2d getFrontRight() {
1239      return frontRight;
1240    }
1241
1242    /**
1243     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
1244     *
1245     * This method returns the internal storage object and sets the corresponding
1246     * has state. The returned object will become part of this message and its
1247     * contents may be modified as long as the has state is not cleared.
1248     *
1249     * @return internal storage object for modifications
1250     */
1251    public Geometry2D.ProtobufTranslation2d getMutableFrontRight() {
1252      bitField0_ |= 0x00000002;
1253      return frontRight;
1254    }
1255
1256    /**
1257     * <code>optional .wpi.proto.ProtobufTranslation2d front_right = 2;</code>
1258     * @param value the frontRight to set
1259     * @return this
1260     */
1261    public ProtobufMecanumDriveKinematics setFrontRight(
1262        final Geometry2D.ProtobufTranslation2d value) {
1263      bitField0_ |= 0x00000002;
1264      frontRight.copyFrom(value);
1265      return this;
1266    }
1267
1268    /**
1269     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
1270     * @return whether the rearLeft field is set
1271     */
1272    public boolean hasRearLeft() {
1273      return (bitField0_ & 0x00000004) != 0;
1274    }
1275
1276    /**
1277     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
1278     * @return this
1279     */
1280    public ProtobufMecanumDriveKinematics clearRearLeft() {
1281      bitField0_ &= ~0x00000004;
1282      rearLeft.clear();
1283      return this;
1284    }
1285
1286    /**
1287     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
1288     *
1289     * This method returns the internal storage object without modifying any has state.
1290     * The returned object should not be modified and be treated as read-only.
1291     *
1292     * Use {@link #getMutableRearLeft()} if you want to modify it.
1293     *
1294     * @return internal storage object for reading
1295     */
1296    public Geometry2D.ProtobufTranslation2d getRearLeft() {
1297      return rearLeft;
1298    }
1299
1300    /**
1301     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
1302     *
1303     * This method returns the internal storage object and sets the corresponding
1304     * has state. The returned object will become part of this message and its
1305     * contents may be modified as long as the has state is not cleared.
1306     *
1307     * @return internal storage object for modifications
1308     */
1309    public Geometry2D.ProtobufTranslation2d getMutableRearLeft() {
1310      bitField0_ |= 0x00000004;
1311      return rearLeft;
1312    }
1313
1314    /**
1315     * <code>optional .wpi.proto.ProtobufTranslation2d rear_left = 3;</code>
1316     * @param value the rearLeft to set
1317     * @return this
1318     */
1319    public ProtobufMecanumDriveKinematics setRearLeft(
1320        final Geometry2D.ProtobufTranslation2d value) {
1321      bitField0_ |= 0x00000004;
1322      rearLeft.copyFrom(value);
1323      return this;
1324    }
1325
1326    /**
1327     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
1328     * @return whether the rearRight field is set
1329     */
1330    public boolean hasRearRight() {
1331      return (bitField0_ & 0x00000008) != 0;
1332    }
1333
1334    /**
1335     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
1336     * @return this
1337     */
1338    public ProtobufMecanumDriveKinematics clearRearRight() {
1339      bitField0_ &= ~0x00000008;
1340      rearRight.clear();
1341      return this;
1342    }
1343
1344    /**
1345     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
1346     *
1347     * This method returns the internal storage object without modifying any has state.
1348     * The returned object should not be modified and be treated as read-only.
1349     *
1350     * Use {@link #getMutableRearRight()} if you want to modify it.
1351     *
1352     * @return internal storage object for reading
1353     */
1354    public Geometry2D.ProtobufTranslation2d getRearRight() {
1355      return rearRight;
1356    }
1357
1358    /**
1359     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
1360     *
1361     * This method returns the internal storage object and sets the corresponding
1362     * has state. The returned object will become part of this message and its
1363     * contents may be modified as long as the has state is not cleared.
1364     *
1365     * @return internal storage object for modifications
1366     */
1367    public Geometry2D.ProtobufTranslation2d getMutableRearRight() {
1368      bitField0_ |= 0x00000008;
1369      return rearRight;
1370    }
1371
1372    /**
1373     * <code>optional .wpi.proto.ProtobufTranslation2d rear_right = 4;</code>
1374     * @param value the rearRight to set
1375     * @return this
1376     */
1377    public ProtobufMecanumDriveKinematics setRearRight(
1378        final Geometry2D.ProtobufTranslation2d value) {
1379      bitField0_ |= 0x00000008;
1380      rearRight.copyFrom(value);
1381      return this;
1382    }
1383
1384    @Override
1385    public ProtobufMecanumDriveKinematics copyFrom(final ProtobufMecanumDriveKinematics other) {
1386      cachedSize = other.cachedSize;
1387      if ((bitField0_ | other.bitField0_) != 0) {
1388        bitField0_ = other.bitField0_;
1389        frontLeft.copyFrom(other.frontLeft);
1390        frontRight.copyFrom(other.frontRight);
1391        rearLeft.copyFrom(other.rearLeft);
1392        rearRight.copyFrom(other.rearRight);
1393      }
1394      return this;
1395    }
1396
1397    @Override
1398    public ProtobufMecanumDriveKinematics mergeFrom(final ProtobufMecanumDriveKinematics other) {
1399      if (other.isEmpty()) {
1400        return this;
1401      }
1402      cachedSize = -1;
1403      if (other.hasFrontLeft()) {
1404        getMutableFrontLeft().mergeFrom(other.frontLeft);
1405      }
1406      if (other.hasFrontRight()) {
1407        getMutableFrontRight().mergeFrom(other.frontRight);
1408      }
1409      if (other.hasRearLeft()) {
1410        getMutableRearLeft().mergeFrom(other.rearLeft);
1411      }
1412      if (other.hasRearRight()) {
1413        getMutableRearRight().mergeFrom(other.rearRight);
1414      }
1415      return this;
1416    }
1417
1418    @Override
1419    public ProtobufMecanumDriveKinematics clear() {
1420      if (isEmpty()) {
1421        return this;
1422      }
1423      cachedSize = -1;
1424      bitField0_ = 0;
1425      frontLeft.clear();
1426      frontRight.clear();
1427      rearLeft.clear();
1428      rearRight.clear();
1429      return this;
1430    }
1431
1432    @Override
1433    public ProtobufMecanumDriveKinematics clearQuick() {
1434      if (isEmpty()) {
1435        return this;
1436      }
1437      cachedSize = -1;
1438      bitField0_ = 0;
1439      frontLeft.clearQuick();
1440      frontRight.clearQuick();
1441      rearLeft.clearQuick();
1442      rearRight.clearQuick();
1443      return this;
1444    }
1445
1446    @Override
1447    public boolean equals(Object o) {
1448      if (o == this) {
1449        return true;
1450      }
1451      if (!(o instanceof ProtobufMecanumDriveKinematics)) {
1452        return false;
1453      }
1454      ProtobufMecanumDriveKinematics other = (ProtobufMecanumDriveKinematics) o;
1455      return bitField0_ == other.bitField0_
1456        && (!hasFrontLeft() || frontLeft.equals(other.frontLeft))
1457        && (!hasFrontRight() || frontRight.equals(other.frontRight))
1458        && (!hasRearLeft() || rearLeft.equals(other.rearLeft))
1459        && (!hasRearRight() || rearRight.equals(other.rearRight));
1460    }
1461
1462    @Override
1463    public void writeTo(final ProtoSink output) throws IOException {
1464      if ((bitField0_ & 0x00000001) != 0) {
1465        output.writeRawByte((byte) 10);
1466        output.writeMessageNoTag(frontLeft);
1467      }
1468      if ((bitField0_ & 0x00000002) != 0) {
1469        output.writeRawByte((byte) 18);
1470        output.writeMessageNoTag(frontRight);
1471      }
1472      if ((bitField0_ & 0x00000004) != 0) {
1473        output.writeRawByte((byte) 26);
1474        output.writeMessageNoTag(rearLeft);
1475      }
1476      if ((bitField0_ & 0x00000008) != 0) {
1477        output.writeRawByte((byte) 34);
1478        output.writeMessageNoTag(rearRight);
1479      }
1480    }
1481
1482    @Override
1483    protected int computeSerializedSize() {
1484      int size = 0;
1485      if ((bitField0_ & 0x00000001) != 0) {
1486        size += 1 + ProtoSink.computeMessageSizeNoTag(frontLeft);
1487      }
1488      if ((bitField0_ & 0x00000002) != 0) {
1489        size += 1 + ProtoSink.computeMessageSizeNoTag(frontRight);
1490      }
1491      if ((bitField0_ & 0x00000004) != 0) {
1492        size += 1 + ProtoSink.computeMessageSizeNoTag(rearLeft);
1493      }
1494      if ((bitField0_ & 0x00000008) != 0) {
1495        size += 1 + ProtoSink.computeMessageSizeNoTag(rearRight);
1496      }
1497      return size;
1498    }
1499
1500    @Override
1501    @SuppressWarnings("fallthrough")
1502    public ProtobufMecanumDriveKinematics mergeFrom(final ProtoSource input) throws IOException {
1503      // Enabled Fall-Through Optimization (QuickBuffers)
1504      int tag = input.readTag();
1505      while (true) {
1506        switch (tag) {
1507          case 10: {
1508            // frontLeft
1509            input.readMessage(frontLeft);
1510            bitField0_ |= 0x00000001;
1511            tag = input.readTag();
1512            if (tag != 18) {
1513              break;
1514            }
1515          }
1516          case 18: {
1517            // frontRight
1518            input.readMessage(frontRight);
1519            bitField0_ |= 0x00000002;
1520            tag = input.readTag();
1521            if (tag != 26) {
1522              break;
1523            }
1524          }
1525          case 26: {
1526            // rearLeft
1527            input.readMessage(rearLeft);
1528            bitField0_ |= 0x00000004;
1529            tag = input.readTag();
1530            if (tag != 34) {
1531              break;
1532            }
1533          }
1534          case 34: {
1535            // rearRight
1536            input.readMessage(rearRight);
1537            bitField0_ |= 0x00000008;
1538            tag = input.readTag();
1539            if (tag != 0) {
1540              break;
1541            }
1542          }
1543          case 0: {
1544            return this;
1545          }
1546          default: {
1547            if (!input.skipField(tag)) {
1548              return this;
1549            }
1550            tag = input.readTag();
1551            break;
1552          }
1553        }
1554      }
1555    }
1556
1557    @Override
1558    public void writeTo(final JsonSink output) throws IOException {
1559      output.beginObject();
1560      if ((bitField0_ & 0x00000001) != 0) {
1561        output.writeMessage(FieldNames.frontLeft, frontLeft);
1562      }
1563      if ((bitField0_ & 0x00000002) != 0) {
1564        output.writeMessage(FieldNames.frontRight, frontRight);
1565      }
1566      if ((bitField0_ & 0x00000004) != 0) {
1567        output.writeMessage(FieldNames.rearLeft, rearLeft);
1568      }
1569      if ((bitField0_ & 0x00000008) != 0) {
1570        output.writeMessage(FieldNames.rearRight, rearRight);
1571      }
1572      output.endObject();
1573    }
1574
1575    @Override
1576    public ProtobufMecanumDriveKinematics mergeFrom(final JsonSource input) throws IOException {
1577      if (!input.beginObject()) {
1578        return this;
1579      }
1580      while (!input.isAtEnd()) {
1581        switch (input.readFieldHash()) {
1582          case 127514064:
1583          case -324277155: {
1584            if (input.isAtField(FieldNames.frontLeft)) {
1585              if (!input.trySkipNullValue()) {
1586                input.readMessage(frontLeft);
1587                bitField0_ |= 0x00000001;
1588              }
1589            } else {
1590              input.skipUnknownField();
1591            }
1592            break;
1593          }
1594          case -336370317:
1595          case -1456996218: {
1596            if (input.isAtField(FieldNames.frontRight)) {
1597              if (!input.trySkipNullValue()) {
1598                input.readMessage(frontRight);
1599                bitField0_ |= 0x00000002;
1600              }
1601            } else {
1602              input.skipUnknownField();
1603            }
1604            break;
1605          }
1606          case -854852661:
1607          case -712874558: {
1608            if (input.isAtField(FieldNames.rearLeft)) {
1609              if (!input.trySkipNullValue()) {
1610                input.readMessage(rearLeft);
1611                bitField0_ |= 0x00000004;
1612              }
1613            } else {
1614              input.skipUnknownField();
1615            }
1616            break;
1617          }
1618          case -724967720:
1619          case -618613823: {
1620            if (input.isAtField(FieldNames.rearRight)) {
1621              if (!input.trySkipNullValue()) {
1622                input.readMessage(rearRight);
1623                bitField0_ |= 0x00000008;
1624              }
1625            } else {
1626              input.skipUnknownField();
1627            }
1628            break;
1629          }
1630          default: {
1631            input.skipUnknownField();
1632            break;
1633          }
1634        }
1635      }
1636      input.endObject();
1637      return this;
1638    }
1639
1640    @Override
1641    public ProtobufMecanumDriveKinematics clone() {
1642      return new ProtobufMecanumDriveKinematics().copyFrom(this);
1643    }
1644
1645    @Override
1646    public boolean isEmpty() {
1647      return ((bitField0_) == 0);
1648    }
1649
1650    public static ProtobufMecanumDriveKinematics parseFrom(final byte[] data) throws
1651        InvalidProtocolBufferException {
1652      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveKinematics(), data).checkInitialized();
1653    }
1654
1655    public static ProtobufMecanumDriveKinematics parseFrom(final ProtoSource input) throws
1656        IOException {
1657      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveKinematics(), input).checkInitialized();
1658    }
1659
1660    public static ProtobufMecanumDriveKinematics parseFrom(final JsonSource input) throws
1661        IOException {
1662      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveKinematics(), input).checkInitialized();
1663    }
1664
1665    /**
1666     * @return factory for creating ProtobufMecanumDriveKinematics messages
1667     */
1668    public static MessageFactory<ProtobufMecanumDriveKinematics> getFactory() {
1669      return ProtobufMecanumDriveKinematicsFactory.INSTANCE;
1670    }
1671
1672    /**
1673     * @return this type's descriptor.
1674     */
1675    public static Descriptors.Descriptor getDescriptor() {
1676      return Kinematics.wpi_proto_ProtobufMecanumDriveKinematics_descriptor;
1677    }
1678
1679    private enum ProtobufMecanumDriveKinematicsFactory implements MessageFactory<ProtobufMecanumDriveKinematics> {
1680      INSTANCE;
1681
1682      @Override
1683      public ProtobufMecanumDriveKinematics create() {
1684        return ProtobufMecanumDriveKinematics.newInstance();
1685      }
1686    }
1687
1688    /**
1689     * Contains name constants used for serializing JSON
1690     */
1691    static class FieldNames {
1692      static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left");
1693
1694      static final FieldName frontRight = FieldName.forField("frontRight", "front_right");
1695
1696      static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left");
1697
1698      static final FieldName rearRight = FieldName.forField("rearRight", "rear_right");
1699    }
1700  }
1701
1702  /**
1703   * Protobuf type {@code ProtobufMecanumDriveMotorVoltages}
1704   */
1705  public static final class ProtobufMecanumDriveMotorVoltages extends ProtoMessage<ProtobufMecanumDriveMotorVoltages> implements Cloneable {
1706    private static final long serialVersionUID = 0L;
1707
1708    /**
1709     * <code>optional double front_left = 1;</code>
1710     */
1711    private double frontLeft;
1712
1713    /**
1714     * <code>optional double front_right = 2;</code>
1715     */
1716    private double frontRight;
1717
1718    /**
1719     * <code>optional double rear_left = 3;</code>
1720     */
1721    private double rearLeft;
1722
1723    /**
1724     * <code>optional double rear_right = 4;</code>
1725     */
1726    private double rearRight;
1727
1728    private ProtobufMecanumDriveMotorVoltages() {
1729    }
1730
1731    /**
1732     * @return a new empty instance of {@code ProtobufMecanumDriveMotorVoltages}
1733     */
1734    public static ProtobufMecanumDriveMotorVoltages newInstance() {
1735      return new ProtobufMecanumDriveMotorVoltages();
1736    }
1737
1738    /**
1739     * <code>optional double front_left = 1;</code>
1740     * @return whether the frontLeft field is set
1741     */
1742    public boolean hasFrontLeft() {
1743      return (bitField0_ & 0x00000001) != 0;
1744    }
1745
1746    /**
1747     * <code>optional double front_left = 1;</code>
1748     * @return this
1749     */
1750    public ProtobufMecanumDriveMotorVoltages clearFrontLeft() {
1751      bitField0_ &= ~0x00000001;
1752      frontLeft = 0D;
1753      return this;
1754    }
1755
1756    /**
1757     * <code>optional double front_left = 1;</code>
1758     * @return the frontLeft
1759     */
1760    public double getFrontLeft() {
1761      return frontLeft;
1762    }
1763
1764    /**
1765     * <code>optional double front_left = 1;</code>
1766     * @param value the frontLeft to set
1767     * @return this
1768     */
1769    public ProtobufMecanumDriveMotorVoltages setFrontLeft(final double value) {
1770      bitField0_ |= 0x00000001;
1771      frontLeft = value;
1772      return this;
1773    }
1774
1775    /**
1776     * <code>optional double front_right = 2;</code>
1777     * @return whether the frontRight field is set
1778     */
1779    public boolean hasFrontRight() {
1780      return (bitField0_ & 0x00000002) != 0;
1781    }
1782
1783    /**
1784     * <code>optional double front_right = 2;</code>
1785     * @return this
1786     */
1787    public ProtobufMecanumDriveMotorVoltages clearFrontRight() {
1788      bitField0_ &= ~0x00000002;
1789      frontRight = 0D;
1790      return this;
1791    }
1792
1793    /**
1794     * <code>optional double front_right = 2;</code>
1795     * @return the frontRight
1796     */
1797    public double getFrontRight() {
1798      return frontRight;
1799    }
1800
1801    /**
1802     * <code>optional double front_right = 2;</code>
1803     * @param value the frontRight to set
1804     * @return this
1805     */
1806    public ProtobufMecanumDriveMotorVoltages setFrontRight(final double value) {
1807      bitField0_ |= 0x00000002;
1808      frontRight = value;
1809      return this;
1810    }
1811
1812    /**
1813     * <code>optional double rear_left = 3;</code>
1814     * @return whether the rearLeft field is set
1815     */
1816    public boolean hasRearLeft() {
1817      return (bitField0_ & 0x00000004) != 0;
1818    }
1819
1820    /**
1821     * <code>optional double rear_left = 3;</code>
1822     * @return this
1823     */
1824    public ProtobufMecanumDriveMotorVoltages clearRearLeft() {
1825      bitField0_ &= ~0x00000004;
1826      rearLeft = 0D;
1827      return this;
1828    }
1829
1830    /**
1831     * <code>optional double rear_left = 3;</code>
1832     * @return the rearLeft
1833     */
1834    public double getRearLeft() {
1835      return rearLeft;
1836    }
1837
1838    /**
1839     * <code>optional double rear_left = 3;</code>
1840     * @param value the rearLeft to set
1841     * @return this
1842     */
1843    public ProtobufMecanumDriveMotorVoltages setRearLeft(final double value) {
1844      bitField0_ |= 0x00000004;
1845      rearLeft = value;
1846      return this;
1847    }
1848
1849    /**
1850     * <code>optional double rear_right = 4;</code>
1851     * @return whether the rearRight field is set
1852     */
1853    public boolean hasRearRight() {
1854      return (bitField0_ & 0x00000008) != 0;
1855    }
1856
1857    /**
1858     * <code>optional double rear_right = 4;</code>
1859     * @return this
1860     */
1861    public ProtobufMecanumDriveMotorVoltages clearRearRight() {
1862      bitField0_ &= ~0x00000008;
1863      rearRight = 0D;
1864      return this;
1865    }
1866
1867    /**
1868     * <code>optional double rear_right = 4;</code>
1869     * @return the rearRight
1870     */
1871    public double getRearRight() {
1872      return rearRight;
1873    }
1874
1875    /**
1876     * <code>optional double rear_right = 4;</code>
1877     * @param value the rearRight to set
1878     * @return this
1879     */
1880    public ProtobufMecanumDriveMotorVoltages setRearRight(final double value) {
1881      bitField0_ |= 0x00000008;
1882      rearRight = value;
1883      return this;
1884    }
1885
1886    @Override
1887    public ProtobufMecanumDriveMotorVoltages copyFrom(
1888        final ProtobufMecanumDriveMotorVoltages other) {
1889      cachedSize = other.cachedSize;
1890      if ((bitField0_ | other.bitField0_) != 0) {
1891        bitField0_ = other.bitField0_;
1892        frontLeft = other.frontLeft;
1893        frontRight = other.frontRight;
1894        rearLeft = other.rearLeft;
1895        rearRight = other.rearRight;
1896      }
1897      return this;
1898    }
1899
1900    @Override
1901    public ProtobufMecanumDriveMotorVoltages mergeFrom(
1902        final ProtobufMecanumDriveMotorVoltages other) {
1903      if (other.isEmpty()) {
1904        return this;
1905      }
1906      cachedSize = -1;
1907      if (other.hasFrontLeft()) {
1908        setFrontLeft(other.frontLeft);
1909      }
1910      if (other.hasFrontRight()) {
1911        setFrontRight(other.frontRight);
1912      }
1913      if (other.hasRearLeft()) {
1914        setRearLeft(other.rearLeft);
1915      }
1916      if (other.hasRearRight()) {
1917        setRearRight(other.rearRight);
1918      }
1919      return this;
1920    }
1921
1922    @Override
1923    public ProtobufMecanumDriveMotorVoltages clear() {
1924      if (isEmpty()) {
1925        return this;
1926      }
1927      cachedSize = -1;
1928      bitField0_ = 0;
1929      frontLeft = 0D;
1930      frontRight = 0D;
1931      rearLeft = 0D;
1932      rearRight = 0D;
1933      return this;
1934    }
1935
1936    @Override
1937    public ProtobufMecanumDriveMotorVoltages clearQuick() {
1938      if (isEmpty()) {
1939        return this;
1940      }
1941      cachedSize = -1;
1942      bitField0_ = 0;
1943      return this;
1944    }
1945
1946    @Override
1947    public boolean equals(Object o) {
1948      if (o == this) {
1949        return true;
1950      }
1951      if (!(o instanceof ProtobufMecanumDriveMotorVoltages)) {
1952        return false;
1953      }
1954      ProtobufMecanumDriveMotorVoltages other = (ProtobufMecanumDriveMotorVoltages) o;
1955      return bitField0_ == other.bitField0_
1956        && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft))
1957        && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight))
1958        && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft))
1959        && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight));
1960    }
1961
1962    @Override
1963    public void writeTo(final ProtoSink output) throws IOException {
1964      if ((bitField0_ & 0x00000001) != 0) {
1965        output.writeRawByte((byte) 9);
1966        output.writeDoubleNoTag(frontLeft);
1967      }
1968      if ((bitField0_ & 0x00000002) != 0) {
1969        output.writeRawByte((byte) 17);
1970        output.writeDoubleNoTag(frontRight);
1971      }
1972      if ((bitField0_ & 0x00000004) != 0) {
1973        output.writeRawByte((byte) 25);
1974        output.writeDoubleNoTag(rearLeft);
1975      }
1976      if ((bitField0_ & 0x00000008) != 0) {
1977        output.writeRawByte((byte) 33);
1978        output.writeDoubleNoTag(rearRight);
1979      }
1980    }
1981
1982    @Override
1983    protected int computeSerializedSize() {
1984      int size = 0;
1985      if ((bitField0_ & 0x00000001) != 0) {
1986        size += 9;
1987      }
1988      if ((bitField0_ & 0x00000002) != 0) {
1989        size += 9;
1990      }
1991      if ((bitField0_ & 0x00000004) != 0) {
1992        size += 9;
1993      }
1994      if ((bitField0_ & 0x00000008) != 0) {
1995        size += 9;
1996      }
1997      return size;
1998    }
1999
2000    @Override
2001    @SuppressWarnings("fallthrough")
2002    public ProtobufMecanumDriveMotorVoltages mergeFrom(final ProtoSource input) throws IOException {
2003      // Enabled Fall-Through Optimization (QuickBuffers)
2004      int tag = input.readTag();
2005      while (true) {
2006        switch (tag) {
2007          case 9: {
2008            // frontLeft
2009            frontLeft = input.readDouble();
2010            bitField0_ |= 0x00000001;
2011            tag = input.readTag();
2012            if (tag != 17) {
2013              break;
2014            }
2015          }
2016          case 17: {
2017            // frontRight
2018            frontRight = input.readDouble();
2019            bitField0_ |= 0x00000002;
2020            tag = input.readTag();
2021            if (tag != 25) {
2022              break;
2023            }
2024          }
2025          case 25: {
2026            // rearLeft
2027            rearLeft = input.readDouble();
2028            bitField0_ |= 0x00000004;
2029            tag = input.readTag();
2030            if (tag != 33) {
2031              break;
2032            }
2033          }
2034          case 33: {
2035            // rearRight
2036            rearRight = input.readDouble();
2037            bitField0_ |= 0x00000008;
2038            tag = input.readTag();
2039            if (tag != 0) {
2040              break;
2041            }
2042          }
2043          case 0: {
2044            return this;
2045          }
2046          default: {
2047            if (!input.skipField(tag)) {
2048              return this;
2049            }
2050            tag = input.readTag();
2051            break;
2052          }
2053        }
2054      }
2055    }
2056
2057    @Override
2058    public void writeTo(final JsonSink output) throws IOException {
2059      output.beginObject();
2060      if ((bitField0_ & 0x00000001) != 0) {
2061        output.writeDouble(FieldNames.frontLeft, frontLeft);
2062      }
2063      if ((bitField0_ & 0x00000002) != 0) {
2064        output.writeDouble(FieldNames.frontRight, frontRight);
2065      }
2066      if ((bitField0_ & 0x00000004) != 0) {
2067        output.writeDouble(FieldNames.rearLeft, rearLeft);
2068      }
2069      if ((bitField0_ & 0x00000008) != 0) {
2070        output.writeDouble(FieldNames.rearRight, rearRight);
2071      }
2072      output.endObject();
2073    }
2074
2075    @Override
2076    public ProtobufMecanumDriveMotorVoltages mergeFrom(final JsonSource input) throws IOException {
2077      if (!input.beginObject()) {
2078        return this;
2079      }
2080      while (!input.isAtEnd()) {
2081        switch (input.readFieldHash()) {
2082          case 127514064:
2083          case -324277155: {
2084            if (input.isAtField(FieldNames.frontLeft)) {
2085              if (!input.trySkipNullValue()) {
2086                frontLeft = input.readDouble();
2087                bitField0_ |= 0x00000001;
2088              }
2089            } else {
2090              input.skipUnknownField();
2091            }
2092            break;
2093          }
2094          case -336370317:
2095          case -1456996218: {
2096            if (input.isAtField(FieldNames.frontRight)) {
2097              if (!input.trySkipNullValue()) {
2098                frontRight = input.readDouble();
2099                bitField0_ |= 0x00000002;
2100              }
2101            } else {
2102              input.skipUnknownField();
2103            }
2104            break;
2105          }
2106          case -854852661:
2107          case -712874558: {
2108            if (input.isAtField(FieldNames.rearLeft)) {
2109              if (!input.trySkipNullValue()) {
2110                rearLeft = input.readDouble();
2111                bitField0_ |= 0x00000004;
2112              }
2113            } else {
2114              input.skipUnknownField();
2115            }
2116            break;
2117          }
2118          case -724967720:
2119          case -618613823: {
2120            if (input.isAtField(FieldNames.rearRight)) {
2121              if (!input.trySkipNullValue()) {
2122                rearRight = input.readDouble();
2123                bitField0_ |= 0x00000008;
2124              }
2125            } else {
2126              input.skipUnknownField();
2127            }
2128            break;
2129          }
2130          default: {
2131            input.skipUnknownField();
2132            break;
2133          }
2134        }
2135      }
2136      input.endObject();
2137      return this;
2138    }
2139
2140    @Override
2141    public ProtobufMecanumDriveMotorVoltages clone() {
2142      return new ProtobufMecanumDriveMotorVoltages().copyFrom(this);
2143    }
2144
2145    @Override
2146    public boolean isEmpty() {
2147      return ((bitField0_) == 0);
2148    }
2149
2150    public static ProtobufMecanumDriveMotorVoltages parseFrom(final byte[] data) throws
2151        InvalidProtocolBufferException {
2152      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveMotorVoltages(), data).checkInitialized();
2153    }
2154
2155    public static ProtobufMecanumDriveMotorVoltages parseFrom(final ProtoSource input) throws
2156        IOException {
2157      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveMotorVoltages(), input).checkInitialized();
2158    }
2159
2160    public static ProtobufMecanumDriveMotorVoltages parseFrom(final JsonSource input) throws
2161        IOException {
2162      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveMotorVoltages(), input).checkInitialized();
2163    }
2164
2165    /**
2166     * @return factory for creating ProtobufMecanumDriveMotorVoltages messages
2167     */
2168    public static MessageFactory<ProtobufMecanumDriveMotorVoltages> getFactory() {
2169      return ProtobufMecanumDriveMotorVoltagesFactory.INSTANCE;
2170    }
2171
2172    /**
2173     * @return this type's descriptor.
2174     */
2175    public static Descriptors.Descriptor getDescriptor() {
2176      return Kinematics.wpi_proto_ProtobufMecanumDriveMotorVoltages_descriptor;
2177    }
2178
2179    private enum ProtobufMecanumDriveMotorVoltagesFactory implements MessageFactory<ProtobufMecanumDriveMotorVoltages> {
2180      INSTANCE;
2181
2182      @Override
2183      public ProtobufMecanumDriveMotorVoltages create() {
2184        return ProtobufMecanumDriveMotorVoltages.newInstance();
2185      }
2186    }
2187
2188    /**
2189     * Contains name constants used for serializing JSON
2190     */
2191    static class FieldNames {
2192      static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left");
2193
2194      static final FieldName frontRight = FieldName.forField("frontRight", "front_right");
2195
2196      static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left");
2197
2198      static final FieldName rearRight = FieldName.forField("rearRight", "rear_right");
2199    }
2200  }
2201
2202  /**
2203   * Protobuf type {@code ProtobufMecanumDriveWheelPositions}
2204   */
2205  public static final class ProtobufMecanumDriveWheelPositions extends ProtoMessage<ProtobufMecanumDriveWheelPositions> implements Cloneable {
2206    private static final long serialVersionUID = 0L;
2207
2208    /**
2209     * <code>optional double front_left = 1;</code>
2210     */
2211    private double frontLeft;
2212
2213    /**
2214     * <code>optional double front_right = 2;</code>
2215     */
2216    private double frontRight;
2217
2218    /**
2219     * <code>optional double rear_left = 3;</code>
2220     */
2221    private double rearLeft;
2222
2223    /**
2224     * <code>optional double rear_right = 4;</code>
2225     */
2226    private double rearRight;
2227
2228    private ProtobufMecanumDriveWheelPositions() {
2229    }
2230
2231    /**
2232     * @return a new empty instance of {@code ProtobufMecanumDriveWheelPositions}
2233     */
2234    public static ProtobufMecanumDriveWheelPositions newInstance() {
2235      return new ProtobufMecanumDriveWheelPositions();
2236    }
2237
2238    /**
2239     * <code>optional double front_left = 1;</code>
2240     * @return whether the frontLeft field is set
2241     */
2242    public boolean hasFrontLeft() {
2243      return (bitField0_ & 0x00000001) != 0;
2244    }
2245
2246    /**
2247     * <code>optional double front_left = 1;</code>
2248     * @return this
2249     */
2250    public ProtobufMecanumDriveWheelPositions clearFrontLeft() {
2251      bitField0_ &= ~0x00000001;
2252      frontLeft = 0D;
2253      return this;
2254    }
2255
2256    /**
2257     * <code>optional double front_left = 1;</code>
2258     * @return the frontLeft
2259     */
2260    public double getFrontLeft() {
2261      return frontLeft;
2262    }
2263
2264    /**
2265     * <code>optional double front_left = 1;</code>
2266     * @param value the frontLeft to set
2267     * @return this
2268     */
2269    public ProtobufMecanumDriveWheelPositions setFrontLeft(final double value) {
2270      bitField0_ |= 0x00000001;
2271      frontLeft = value;
2272      return this;
2273    }
2274
2275    /**
2276     * <code>optional double front_right = 2;</code>
2277     * @return whether the frontRight field is set
2278     */
2279    public boolean hasFrontRight() {
2280      return (bitField0_ & 0x00000002) != 0;
2281    }
2282
2283    /**
2284     * <code>optional double front_right = 2;</code>
2285     * @return this
2286     */
2287    public ProtobufMecanumDriveWheelPositions clearFrontRight() {
2288      bitField0_ &= ~0x00000002;
2289      frontRight = 0D;
2290      return this;
2291    }
2292
2293    /**
2294     * <code>optional double front_right = 2;</code>
2295     * @return the frontRight
2296     */
2297    public double getFrontRight() {
2298      return frontRight;
2299    }
2300
2301    /**
2302     * <code>optional double front_right = 2;</code>
2303     * @param value the frontRight to set
2304     * @return this
2305     */
2306    public ProtobufMecanumDriveWheelPositions setFrontRight(final double value) {
2307      bitField0_ |= 0x00000002;
2308      frontRight = value;
2309      return this;
2310    }
2311
2312    /**
2313     * <code>optional double rear_left = 3;</code>
2314     * @return whether the rearLeft field is set
2315     */
2316    public boolean hasRearLeft() {
2317      return (bitField0_ & 0x00000004) != 0;
2318    }
2319
2320    /**
2321     * <code>optional double rear_left = 3;</code>
2322     * @return this
2323     */
2324    public ProtobufMecanumDriveWheelPositions clearRearLeft() {
2325      bitField0_ &= ~0x00000004;
2326      rearLeft = 0D;
2327      return this;
2328    }
2329
2330    /**
2331     * <code>optional double rear_left = 3;</code>
2332     * @return the rearLeft
2333     */
2334    public double getRearLeft() {
2335      return rearLeft;
2336    }
2337
2338    /**
2339     * <code>optional double rear_left = 3;</code>
2340     * @param value the rearLeft to set
2341     * @return this
2342     */
2343    public ProtobufMecanumDriveWheelPositions setRearLeft(final double value) {
2344      bitField0_ |= 0x00000004;
2345      rearLeft = value;
2346      return this;
2347    }
2348
2349    /**
2350     * <code>optional double rear_right = 4;</code>
2351     * @return whether the rearRight field is set
2352     */
2353    public boolean hasRearRight() {
2354      return (bitField0_ & 0x00000008) != 0;
2355    }
2356
2357    /**
2358     * <code>optional double rear_right = 4;</code>
2359     * @return this
2360     */
2361    public ProtobufMecanumDriveWheelPositions clearRearRight() {
2362      bitField0_ &= ~0x00000008;
2363      rearRight = 0D;
2364      return this;
2365    }
2366
2367    /**
2368     * <code>optional double rear_right = 4;</code>
2369     * @return the rearRight
2370     */
2371    public double getRearRight() {
2372      return rearRight;
2373    }
2374
2375    /**
2376     * <code>optional double rear_right = 4;</code>
2377     * @param value the rearRight to set
2378     * @return this
2379     */
2380    public ProtobufMecanumDriveWheelPositions setRearRight(final double value) {
2381      bitField0_ |= 0x00000008;
2382      rearRight = value;
2383      return this;
2384    }
2385
2386    @Override
2387    public ProtobufMecanumDriveWheelPositions copyFrom(
2388        final ProtobufMecanumDriveWheelPositions other) {
2389      cachedSize = other.cachedSize;
2390      if ((bitField0_ | other.bitField0_) != 0) {
2391        bitField0_ = other.bitField0_;
2392        frontLeft = other.frontLeft;
2393        frontRight = other.frontRight;
2394        rearLeft = other.rearLeft;
2395        rearRight = other.rearRight;
2396      }
2397      return this;
2398    }
2399
2400    @Override
2401    public ProtobufMecanumDriveWheelPositions mergeFrom(
2402        final ProtobufMecanumDriveWheelPositions other) {
2403      if (other.isEmpty()) {
2404        return this;
2405      }
2406      cachedSize = -1;
2407      if (other.hasFrontLeft()) {
2408        setFrontLeft(other.frontLeft);
2409      }
2410      if (other.hasFrontRight()) {
2411        setFrontRight(other.frontRight);
2412      }
2413      if (other.hasRearLeft()) {
2414        setRearLeft(other.rearLeft);
2415      }
2416      if (other.hasRearRight()) {
2417        setRearRight(other.rearRight);
2418      }
2419      return this;
2420    }
2421
2422    @Override
2423    public ProtobufMecanumDriveWheelPositions clear() {
2424      if (isEmpty()) {
2425        return this;
2426      }
2427      cachedSize = -1;
2428      bitField0_ = 0;
2429      frontLeft = 0D;
2430      frontRight = 0D;
2431      rearLeft = 0D;
2432      rearRight = 0D;
2433      return this;
2434    }
2435
2436    @Override
2437    public ProtobufMecanumDriveWheelPositions clearQuick() {
2438      if (isEmpty()) {
2439        return this;
2440      }
2441      cachedSize = -1;
2442      bitField0_ = 0;
2443      return this;
2444    }
2445
2446    @Override
2447    public boolean equals(Object o) {
2448      if (o == this) {
2449        return true;
2450      }
2451      if (!(o instanceof ProtobufMecanumDriveWheelPositions)) {
2452        return false;
2453      }
2454      ProtobufMecanumDriveWheelPositions other = (ProtobufMecanumDriveWheelPositions) o;
2455      return bitField0_ == other.bitField0_
2456        && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft))
2457        && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight))
2458        && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft))
2459        && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight));
2460    }
2461
2462    @Override
2463    public void writeTo(final ProtoSink output) throws IOException {
2464      if ((bitField0_ & 0x00000001) != 0) {
2465        output.writeRawByte((byte) 9);
2466        output.writeDoubleNoTag(frontLeft);
2467      }
2468      if ((bitField0_ & 0x00000002) != 0) {
2469        output.writeRawByte((byte) 17);
2470        output.writeDoubleNoTag(frontRight);
2471      }
2472      if ((bitField0_ & 0x00000004) != 0) {
2473        output.writeRawByte((byte) 25);
2474        output.writeDoubleNoTag(rearLeft);
2475      }
2476      if ((bitField0_ & 0x00000008) != 0) {
2477        output.writeRawByte((byte) 33);
2478        output.writeDoubleNoTag(rearRight);
2479      }
2480    }
2481
2482    @Override
2483    protected int computeSerializedSize() {
2484      int size = 0;
2485      if ((bitField0_ & 0x00000001) != 0) {
2486        size += 9;
2487      }
2488      if ((bitField0_ & 0x00000002) != 0) {
2489        size += 9;
2490      }
2491      if ((bitField0_ & 0x00000004) != 0) {
2492        size += 9;
2493      }
2494      if ((bitField0_ & 0x00000008) != 0) {
2495        size += 9;
2496      }
2497      return size;
2498    }
2499
2500    @Override
2501    @SuppressWarnings("fallthrough")
2502    public ProtobufMecanumDriveWheelPositions mergeFrom(final ProtoSource input) throws
2503        IOException {
2504      // Enabled Fall-Through Optimization (QuickBuffers)
2505      int tag = input.readTag();
2506      while (true) {
2507        switch (tag) {
2508          case 9: {
2509            // frontLeft
2510            frontLeft = input.readDouble();
2511            bitField0_ |= 0x00000001;
2512            tag = input.readTag();
2513            if (tag != 17) {
2514              break;
2515            }
2516          }
2517          case 17: {
2518            // frontRight
2519            frontRight = input.readDouble();
2520            bitField0_ |= 0x00000002;
2521            tag = input.readTag();
2522            if (tag != 25) {
2523              break;
2524            }
2525          }
2526          case 25: {
2527            // rearLeft
2528            rearLeft = input.readDouble();
2529            bitField0_ |= 0x00000004;
2530            tag = input.readTag();
2531            if (tag != 33) {
2532              break;
2533            }
2534          }
2535          case 33: {
2536            // rearRight
2537            rearRight = input.readDouble();
2538            bitField0_ |= 0x00000008;
2539            tag = input.readTag();
2540            if (tag != 0) {
2541              break;
2542            }
2543          }
2544          case 0: {
2545            return this;
2546          }
2547          default: {
2548            if (!input.skipField(tag)) {
2549              return this;
2550            }
2551            tag = input.readTag();
2552            break;
2553          }
2554        }
2555      }
2556    }
2557
2558    @Override
2559    public void writeTo(final JsonSink output) throws IOException {
2560      output.beginObject();
2561      if ((bitField0_ & 0x00000001) != 0) {
2562        output.writeDouble(FieldNames.frontLeft, frontLeft);
2563      }
2564      if ((bitField0_ & 0x00000002) != 0) {
2565        output.writeDouble(FieldNames.frontRight, frontRight);
2566      }
2567      if ((bitField0_ & 0x00000004) != 0) {
2568        output.writeDouble(FieldNames.rearLeft, rearLeft);
2569      }
2570      if ((bitField0_ & 0x00000008) != 0) {
2571        output.writeDouble(FieldNames.rearRight, rearRight);
2572      }
2573      output.endObject();
2574    }
2575
2576    @Override
2577    public ProtobufMecanumDriveWheelPositions mergeFrom(final JsonSource input) throws IOException {
2578      if (!input.beginObject()) {
2579        return this;
2580      }
2581      while (!input.isAtEnd()) {
2582        switch (input.readFieldHash()) {
2583          case 127514064:
2584          case -324277155: {
2585            if (input.isAtField(FieldNames.frontLeft)) {
2586              if (!input.trySkipNullValue()) {
2587                frontLeft = input.readDouble();
2588                bitField0_ |= 0x00000001;
2589              }
2590            } else {
2591              input.skipUnknownField();
2592            }
2593            break;
2594          }
2595          case -336370317:
2596          case -1456996218: {
2597            if (input.isAtField(FieldNames.frontRight)) {
2598              if (!input.trySkipNullValue()) {
2599                frontRight = input.readDouble();
2600                bitField0_ |= 0x00000002;
2601              }
2602            } else {
2603              input.skipUnknownField();
2604            }
2605            break;
2606          }
2607          case -854852661:
2608          case -712874558: {
2609            if (input.isAtField(FieldNames.rearLeft)) {
2610              if (!input.trySkipNullValue()) {
2611                rearLeft = input.readDouble();
2612                bitField0_ |= 0x00000004;
2613              }
2614            } else {
2615              input.skipUnknownField();
2616            }
2617            break;
2618          }
2619          case -724967720:
2620          case -618613823: {
2621            if (input.isAtField(FieldNames.rearRight)) {
2622              if (!input.trySkipNullValue()) {
2623                rearRight = input.readDouble();
2624                bitField0_ |= 0x00000008;
2625              }
2626            } else {
2627              input.skipUnknownField();
2628            }
2629            break;
2630          }
2631          default: {
2632            input.skipUnknownField();
2633            break;
2634          }
2635        }
2636      }
2637      input.endObject();
2638      return this;
2639    }
2640
2641    @Override
2642    public ProtobufMecanumDriveWheelPositions clone() {
2643      return new ProtobufMecanumDriveWheelPositions().copyFrom(this);
2644    }
2645
2646    @Override
2647    public boolean isEmpty() {
2648      return ((bitField0_) == 0);
2649    }
2650
2651    public static ProtobufMecanumDriveWheelPositions parseFrom(final byte[] data) throws
2652        InvalidProtocolBufferException {
2653      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelPositions(), data).checkInitialized();
2654    }
2655
2656    public static ProtobufMecanumDriveWheelPositions parseFrom(final ProtoSource input) throws
2657        IOException {
2658      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelPositions(), input).checkInitialized();
2659    }
2660
2661    public static ProtobufMecanumDriveWheelPositions parseFrom(final JsonSource input) throws
2662        IOException {
2663      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelPositions(), input).checkInitialized();
2664    }
2665
2666    /**
2667     * @return factory for creating ProtobufMecanumDriveWheelPositions messages
2668     */
2669    public static MessageFactory<ProtobufMecanumDriveWheelPositions> getFactory() {
2670      return ProtobufMecanumDriveWheelPositionsFactory.INSTANCE;
2671    }
2672
2673    /**
2674     * @return this type's descriptor.
2675     */
2676    public static Descriptors.Descriptor getDescriptor() {
2677      return Kinematics.wpi_proto_ProtobufMecanumDriveWheelPositions_descriptor;
2678    }
2679
2680    private enum ProtobufMecanumDriveWheelPositionsFactory implements MessageFactory<ProtobufMecanumDriveWheelPositions> {
2681      INSTANCE;
2682
2683      @Override
2684      public ProtobufMecanumDriveWheelPositions create() {
2685        return ProtobufMecanumDriveWheelPositions.newInstance();
2686      }
2687    }
2688
2689    /**
2690     * Contains name constants used for serializing JSON
2691     */
2692    static class FieldNames {
2693      static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left");
2694
2695      static final FieldName frontRight = FieldName.forField("frontRight", "front_right");
2696
2697      static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left");
2698
2699      static final FieldName rearRight = FieldName.forField("rearRight", "rear_right");
2700    }
2701  }
2702
2703  /**
2704   * Protobuf type {@code ProtobufMecanumDriveWheelSpeeds}
2705   */
2706  public static final class ProtobufMecanumDriveWheelSpeeds extends ProtoMessage<ProtobufMecanumDriveWheelSpeeds> implements Cloneable {
2707    private static final long serialVersionUID = 0L;
2708
2709    /**
2710     * <code>optional double front_left = 1;</code>
2711     */
2712    private double frontLeft;
2713
2714    /**
2715     * <code>optional double front_right = 2;</code>
2716     */
2717    private double frontRight;
2718
2719    /**
2720     * <code>optional double rear_left = 3;</code>
2721     */
2722    private double rearLeft;
2723
2724    /**
2725     * <code>optional double rear_right = 4;</code>
2726     */
2727    private double rearRight;
2728
2729    private ProtobufMecanumDriveWheelSpeeds() {
2730    }
2731
2732    /**
2733     * @return a new empty instance of {@code ProtobufMecanumDriveWheelSpeeds}
2734     */
2735    public static ProtobufMecanumDriveWheelSpeeds newInstance() {
2736      return new ProtobufMecanumDriveWheelSpeeds();
2737    }
2738
2739    /**
2740     * <code>optional double front_left = 1;</code>
2741     * @return whether the frontLeft field is set
2742     */
2743    public boolean hasFrontLeft() {
2744      return (bitField0_ & 0x00000001) != 0;
2745    }
2746
2747    /**
2748     * <code>optional double front_left = 1;</code>
2749     * @return this
2750     */
2751    public ProtobufMecanumDriveWheelSpeeds clearFrontLeft() {
2752      bitField0_ &= ~0x00000001;
2753      frontLeft = 0D;
2754      return this;
2755    }
2756
2757    /**
2758     * <code>optional double front_left = 1;</code>
2759     * @return the frontLeft
2760     */
2761    public double getFrontLeft() {
2762      return frontLeft;
2763    }
2764
2765    /**
2766     * <code>optional double front_left = 1;</code>
2767     * @param value the frontLeft to set
2768     * @return this
2769     */
2770    public ProtobufMecanumDriveWheelSpeeds setFrontLeft(final double value) {
2771      bitField0_ |= 0x00000001;
2772      frontLeft = value;
2773      return this;
2774    }
2775
2776    /**
2777     * <code>optional double front_right = 2;</code>
2778     * @return whether the frontRight field is set
2779     */
2780    public boolean hasFrontRight() {
2781      return (bitField0_ & 0x00000002) != 0;
2782    }
2783
2784    /**
2785     * <code>optional double front_right = 2;</code>
2786     * @return this
2787     */
2788    public ProtobufMecanumDriveWheelSpeeds clearFrontRight() {
2789      bitField0_ &= ~0x00000002;
2790      frontRight = 0D;
2791      return this;
2792    }
2793
2794    /**
2795     * <code>optional double front_right = 2;</code>
2796     * @return the frontRight
2797     */
2798    public double getFrontRight() {
2799      return frontRight;
2800    }
2801
2802    /**
2803     * <code>optional double front_right = 2;</code>
2804     * @param value the frontRight to set
2805     * @return this
2806     */
2807    public ProtobufMecanumDriveWheelSpeeds setFrontRight(final double value) {
2808      bitField0_ |= 0x00000002;
2809      frontRight = value;
2810      return this;
2811    }
2812
2813    /**
2814     * <code>optional double rear_left = 3;</code>
2815     * @return whether the rearLeft field is set
2816     */
2817    public boolean hasRearLeft() {
2818      return (bitField0_ & 0x00000004) != 0;
2819    }
2820
2821    /**
2822     * <code>optional double rear_left = 3;</code>
2823     * @return this
2824     */
2825    public ProtobufMecanumDriveWheelSpeeds clearRearLeft() {
2826      bitField0_ &= ~0x00000004;
2827      rearLeft = 0D;
2828      return this;
2829    }
2830
2831    /**
2832     * <code>optional double rear_left = 3;</code>
2833     * @return the rearLeft
2834     */
2835    public double getRearLeft() {
2836      return rearLeft;
2837    }
2838
2839    /**
2840     * <code>optional double rear_left = 3;</code>
2841     * @param value the rearLeft to set
2842     * @return this
2843     */
2844    public ProtobufMecanumDriveWheelSpeeds setRearLeft(final double value) {
2845      bitField0_ |= 0x00000004;
2846      rearLeft = value;
2847      return this;
2848    }
2849
2850    /**
2851     * <code>optional double rear_right = 4;</code>
2852     * @return whether the rearRight field is set
2853     */
2854    public boolean hasRearRight() {
2855      return (bitField0_ & 0x00000008) != 0;
2856    }
2857
2858    /**
2859     * <code>optional double rear_right = 4;</code>
2860     * @return this
2861     */
2862    public ProtobufMecanumDriveWheelSpeeds clearRearRight() {
2863      bitField0_ &= ~0x00000008;
2864      rearRight = 0D;
2865      return this;
2866    }
2867
2868    /**
2869     * <code>optional double rear_right = 4;</code>
2870     * @return the rearRight
2871     */
2872    public double getRearRight() {
2873      return rearRight;
2874    }
2875
2876    /**
2877     * <code>optional double rear_right = 4;</code>
2878     * @param value the rearRight to set
2879     * @return this
2880     */
2881    public ProtobufMecanumDriveWheelSpeeds setRearRight(final double value) {
2882      bitField0_ |= 0x00000008;
2883      rearRight = value;
2884      return this;
2885    }
2886
2887    @Override
2888    public ProtobufMecanumDriveWheelSpeeds copyFrom(final ProtobufMecanumDriveWheelSpeeds other) {
2889      cachedSize = other.cachedSize;
2890      if ((bitField0_ | other.bitField0_) != 0) {
2891        bitField0_ = other.bitField0_;
2892        frontLeft = other.frontLeft;
2893        frontRight = other.frontRight;
2894        rearLeft = other.rearLeft;
2895        rearRight = other.rearRight;
2896      }
2897      return this;
2898    }
2899
2900    @Override
2901    public ProtobufMecanumDriveWheelSpeeds mergeFrom(final ProtobufMecanumDriveWheelSpeeds other) {
2902      if (other.isEmpty()) {
2903        return this;
2904      }
2905      cachedSize = -1;
2906      if (other.hasFrontLeft()) {
2907        setFrontLeft(other.frontLeft);
2908      }
2909      if (other.hasFrontRight()) {
2910        setFrontRight(other.frontRight);
2911      }
2912      if (other.hasRearLeft()) {
2913        setRearLeft(other.rearLeft);
2914      }
2915      if (other.hasRearRight()) {
2916        setRearRight(other.rearRight);
2917      }
2918      return this;
2919    }
2920
2921    @Override
2922    public ProtobufMecanumDriveWheelSpeeds clear() {
2923      if (isEmpty()) {
2924        return this;
2925      }
2926      cachedSize = -1;
2927      bitField0_ = 0;
2928      frontLeft = 0D;
2929      frontRight = 0D;
2930      rearLeft = 0D;
2931      rearRight = 0D;
2932      return this;
2933    }
2934
2935    @Override
2936    public ProtobufMecanumDriveWheelSpeeds clearQuick() {
2937      if (isEmpty()) {
2938        return this;
2939      }
2940      cachedSize = -1;
2941      bitField0_ = 0;
2942      return this;
2943    }
2944
2945    @Override
2946    public boolean equals(Object o) {
2947      if (o == this) {
2948        return true;
2949      }
2950      if (!(o instanceof ProtobufMecanumDriveWheelSpeeds)) {
2951        return false;
2952      }
2953      ProtobufMecanumDriveWheelSpeeds other = (ProtobufMecanumDriveWheelSpeeds) o;
2954      return bitField0_ == other.bitField0_
2955        && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft))
2956        && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight))
2957        && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft))
2958        && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight));
2959    }
2960
2961    @Override
2962    public void writeTo(final ProtoSink output) throws IOException {
2963      if ((bitField0_ & 0x00000001) != 0) {
2964        output.writeRawByte((byte) 9);
2965        output.writeDoubleNoTag(frontLeft);
2966      }
2967      if ((bitField0_ & 0x00000002) != 0) {
2968        output.writeRawByte((byte) 17);
2969        output.writeDoubleNoTag(frontRight);
2970      }
2971      if ((bitField0_ & 0x00000004) != 0) {
2972        output.writeRawByte((byte) 25);
2973        output.writeDoubleNoTag(rearLeft);
2974      }
2975      if ((bitField0_ & 0x00000008) != 0) {
2976        output.writeRawByte((byte) 33);
2977        output.writeDoubleNoTag(rearRight);
2978      }
2979    }
2980
2981    @Override
2982    protected int computeSerializedSize() {
2983      int size = 0;
2984      if ((bitField0_ & 0x00000001) != 0) {
2985        size += 9;
2986      }
2987      if ((bitField0_ & 0x00000002) != 0) {
2988        size += 9;
2989      }
2990      if ((bitField0_ & 0x00000004) != 0) {
2991        size += 9;
2992      }
2993      if ((bitField0_ & 0x00000008) != 0) {
2994        size += 9;
2995      }
2996      return size;
2997    }
2998
2999    @Override
3000    @SuppressWarnings("fallthrough")
3001    public ProtobufMecanumDriveWheelSpeeds mergeFrom(final ProtoSource input) throws IOException {
3002      // Enabled Fall-Through Optimization (QuickBuffers)
3003      int tag = input.readTag();
3004      while (true) {
3005        switch (tag) {
3006          case 9: {
3007            // frontLeft
3008            frontLeft = input.readDouble();
3009            bitField0_ |= 0x00000001;
3010            tag = input.readTag();
3011            if (tag != 17) {
3012              break;
3013            }
3014          }
3015          case 17: {
3016            // frontRight
3017            frontRight = input.readDouble();
3018            bitField0_ |= 0x00000002;
3019            tag = input.readTag();
3020            if (tag != 25) {
3021              break;
3022            }
3023          }
3024          case 25: {
3025            // rearLeft
3026            rearLeft = input.readDouble();
3027            bitField0_ |= 0x00000004;
3028            tag = input.readTag();
3029            if (tag != 33) {
3030              break;
3031            }
3032          }
3033          case 33: {
3034            // rearRight
3035            rearRight = input.readDouble();
3036            bitField0_ |= 0x00000008;
3037            tag = input.readTag();
3038            if (tag != 0) {
3039              break;
3040            }
3041          }
3042          case 0: {
3043            return this;
3044          }
3045          default: {
3046            if (!input.skipField(tag)) {
3047              return this;
3048            }
3049            tag = input.readTag();
3050            break;
3051          }
3052        }
3053      }
3054    }
3055
3056    @Override
3057    public void writeTo(final JsonSink output) throws IOException {
3058      output.beginObject();
3059      if ((bitField0_ & 0x00000001) != 0) {
3060        output.writeDouble(FieldNames.frontLeft, frontLeft);
3061      }
3062      if ((bitField0_ & 0x00000002) != 0) {
3063        output.writeDouble(FieldNames.frontRight, frontRight);
3064      }
3065      if ((bitField0_ & 0x00000004) != 0) {
3066        output.writeDouble(FieldNames.rearLeft, rearLeft);
3067      }
3068      if ((bitField0_ & 0x00000008) != 0) {
3069        output.writeDouble(FieldNames.rearRight, rearRight);
3070      }
3071      output.endObject();
3072    }
3073
3074    @Override
3075    public ProtobufMecanumDriveWheelSpeeds mergeFrom(final JsonSource input) throws IOException {
3076      if (!input.beginObject()) {
3077        return this;
3078      }
3079      while (!input.isAtEnd()) {
3080        switch (input.readFieldHash()) {
3081          case 127514064:
3082          case -324277155: {
3083            if (input.isAtField(FieldNames.frontLeft)) {
3084              if (!input.trySkipNullValue()) {
3085                frontLeft = input.readDouble();
3086                bitField0_ |= 0x00000001;
3087              }
3088            } else {
3089              input.skipUnknownField();
3090            }
3091            break;
3092          }
3093          case -336370317:
3094          case -1456996218: {
3095            if (input.isAtField(FieldNames.frontRight)) {
3096              if (!input.trySkipNullValue()) {
3097                frontRight = input.readDouble();
3098                bitField0_ |= 0x00000002;
3099              }
3100            } else {
3101              input.skipUnknownField();
3102            }
3103            break;
3104          }
3105          case -854852661:
3106          case -712874558: {
3107            if (input.isAtField(FieldNames.rearLeft)) {
3108              if (!input.trySkipNullValue()) {
3109                rearLeft = input.readDouble();
3110                bitField0_ |= 0x00000004;
3111              }
3112            } else {
3113              input.skipUnknownField();
3114            }
3115            break;
3116          }
3117          case -724967720:
3118          case -618613823: {
3119            if (input.isAtField(FieldNames.rearRight)) {
3120              if (!input.trySkipNullValue()) {
3121                rearRight = input.readDouble();
3122                bitField0_ |= 0x00000008;
3123              }
3124            } else {
3125              input.skipUnknownField();
3126            }
3127            break;
3128          }
3129          default: {
3130            input.skipUnknownField();
3131            break;
3132          }
3133        }
3134      }
3135      input.endObject();
3136      return this;
3137    }
3138
3139    @Override
3140    public ProtobufMecanumDriveWheelSpeeds clone() {
3141      return new ProtobufMecanumDriveWheelSpeeds().copyFrom(this);
3142    }
3143
3144    @Override
3145    public boolean isEmpty() {
3146      return ((bitField0_) == 0);
3147    }
3148
3149    public static ProtobufMecanumDriveWheelSpeeds parseFrom(final byte[] data) throws
3150        InvalidProtocolBufferException {
3151      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelSpeeds(), data).checkInitialized();
3152    }
3153
3154    public static ProtobufMecanumDriveWheelSpeeds parseFrom(final ProtoSource input) throws
3155        IOException {
3156      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelSpeeds(), input).checkInitialized();
3157    }
3158
3159    public static ProtobufMecanumDriveWheelSpeeds parseFrom(final JsonSource input) throws
3160        IOException {
3161      return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelSpeeds(), input).checkInitialized();
3162    }
3163
3164    /**
3165     * @return factory for creating ProtobufMecanumDriveWheelSpeeds messages
3166     */
3167    public static MessageFactory<ProtobufMecanumDriveWheelSpeeds> getFactory() {
3168      return ProtobufMecanumDriveWheelSpeedsFactory.INSTANCE;
3169    }
3170
3171    /**
3172     * @return this type's descriptor.
3173     */
3174    public static Descriptors.Descriptor getDescriptor() {
3175      return Kinematics.wpi_proto_ProtobufMecanumDriveWheelSpeeds_descriptor;
3176    }
3177
3178    private enum ProtobufMecanumDriveWheelSpeedsFactory implements MessageFactory<ProtobufMecanumDriveWheelSpeeds> {
3179      INSTANCE;
3180
3181      @Override
3182      public ProtobufMecanumDriveWheelSpeeds create() {
3183        return ProtobufMecanumDriveWheelSpeeds.newInstance();
3184      }
3185    }
3186
3187    /**
3188     * Contains name constants used for serializing JSON
3189     */
3190    static class FieldNames {
3191      static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left");
3192
3193      static final FieldName frontRight = FieldName.forField("frontRight", "front_right");
3194
3195      static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left");
3196
3197      static final FieldName rearRight = FieldName.forField("rearRight", "rear_right");
3198    }
3199  }
3200
3201  /**
3202   * Protobuf type {@code ProtobufSwerveDriveKinematics}
3203   */
3204  public static final class ProtobufSwerveDriveKinematics extends ProtoMessage<ProtobufSwerveDriveKinematics> implements Cloneable {
3205    private static final long serialVersionUID = 0L;
3206
3207    /**
3208     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
3209     */
3210    private final RepeatedMessage<Geometry2D.ProtobufTranslation2d> modules = RepeatedMessage.newEmptyInstance(Geometry2D.ProtobufTranslation2d.getFactory());
3211
3212    private ProtobufSwerveDriveKinematics() {
3213    }
3214
3215    /**
3216     * @return a new empty instance of {@code ProtobufSwerveDriveKinematics}
3217     */
3218    public static ProtobufSwerveDriveKinematics newInstance() {
3219      return new ProtobufSwerveDriveKinematics();
3220    }
3221
3222    /**
3223     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
3224     * @return whether the modules field is set
3225     */
3226    public boolean hasModules() {
3227      return (bitField0_ & 0x00000001) != 0;
3228    }
3229
3230    /**
3231     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
3232     * @return this
3233     */
3234    public ProtobufSwerveDriveKinematics clearModules() {
3235      bitField0_ &= ~0x00000001;
3236      modules.clear();
3237      return this;
3238    }
3239
3240    /**
3241     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
3242     *
3243     * This method returns the internal storage object without modifying any has state.
3244     * The returned object should not be modified and be treated as read-only.
3245     *
3246     * Use {@link #getMutableModules()} if you want to modify it.
3247     *
3248     * @return internal storage object for reading
3249     */
3250    public RepeatedMessage<Geometry2D.ProtobufTranslation2d> getModules() {
3251      return modules;
3252    }
3253
3254    /**
3255     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
3256     *
3257     * This method returns the internal storage object and sets the corresponding
3258     * has state. The returned object will become part of this message and its
3259     * contents may be modified as long as the has state is not cleared.
3260     *
3261     * @return internal storage object for modifications
3262     */
3263    public RepeatedMessage<Geometry2D.ProtobufTranslation2d> getMutableModules() {
3264      bitField0_ |= 0x00000001;
3265      return modules;
3266    }
3267
3268    /**
3269     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
3270     * @param value the modules to add
3271     * @return this
3272     */
3273    public ProtobufSwerveDriveKinematics addModules(final Geometry2D.ProtobufTranslation2d value) {
3274      bitField0_ |= 0x00000001;
3275      modules.add(value);
3276      return this;
3277    }
3278
3279    /**
3280     * <code>repeated .wpi.proto.ProtobufTranslation2d modules = 1;</code>
3281     * @param values the modules to add
3282     * @return this
3283     */
3284    public ProtobufSwerveDriveKinematics addAllModules(
3285        final Geometry2D.ProtobufTranslation2d... values) {
3286      bitField0_ |= 0x00000001;
3287      modules.addAll(values);
3288      return this;
3289    }
3290
3291    @Override
3292    public ProtobufSwerveDriveKinematics copyFrom(final ProtobufSwerveDriveKinematics other) {
3293      cachedSize = other.cachedSize;
3294      if ((bitField0_ | other.bitField0_) != 0) {
3295        bitField0_ = other.bitField0_;
3296        modules.copyFrom(other.modules);
3297      }
3298      return this;
3299    }
3300
3301    @Override
3302    public ProtobufSwerveDriveKinematics mergeFrom(final ProtobufSwerveDriveKinematics other) {
3303      if (other.isEmpty()) {
3304        return this;
3305      }
3306      cachedSize = -1;
3307      if (other.hasModules()) {
3308        getMutableModules().addAll(other.modules);
3309      }
3310      return this;
3311    }
3312
3313    @Override
3314    public ProtobufSwerveDriveKinematics clear() {
3315      if (isEmpty()) {
3316        return this;
3317      }
3318      cachedSize = -1;
3319      bitField0_ = 0;
3320      modules.clear();
3321      return this;
3322    }
3323
3324    @Override
3325    public ProtobufSwerveDriveKinematics clearQuick() {
3326      if (isEmpty()) {
3327        return this;
3328      }
3329      cachedSize = -1;
3330      bitField0_ = 0;
3331      modules.clearQuick();
3332      return this;
3333    }
3334
3335    @Override
3336    public boolean equals(Object o) {
3337      if (o == this) {
3338        return true;
3339      }
3340      if (!(o instanceof ProtobufSwerveDriveKinematics)) {
3341        return false;
3342      }
3343      ProtobufSwerveDriveKinematics other = (ProtobufSwerveDriveKinematics) o;
3344      return bitField0_ == other.bitField0_
3345        && (!hasModules() || modules.equals(other.modules));
3346    }
3347
3348    @Override
3349    public void writeTo(final ProtoSink output) throws IOException {
3350      if ((bitField0_ & 0x00000001) != 0) {
3351        for (int i = 0; i < modules.length(); i++) {
3352          output.writeRawByte((byte) 10);
3353          output.writeMessageNoTag(modules.get(i));
3354        }
3355      }
3356    }
3357
3358    @Override
3359    protected int computeSerializedSize() {
3360      int size = 0;
3361      if ((bitField0_ & 0x00000001) != 0) {
3362        size += (1 * modules.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(modules);
3363      }
3364      return size;
3365    }
3366
3367    @Override
3368    @SuppressWarnings("fallthrough")
3369    public ProtobufSwerveDriveKinematics mergeFrom(final ProtoSource input) throws IOException {
3370      // Enabled Fall-Through Optimization (QuickBuffers)
3371      int tag = input.readTag();
3372      while (true) {
3373        switch (tag) {
3374          case 10: {
3375            // modules
3376            tag = input.readRepeatedMessage(modules, tag);
3377            bitField0_ |= 0x00000001;
3378            if (tag != 0) {
3379              break;
3380            }
3381          }
3382          case 0: {
3383            return this;
3384          }
3385          default: {
3386            if (!input.skipField(tag)) {
3387              return this;
3388            }
3389            tag = input.readTag();
3390            break;
3391          }
3392        }
3393      }
3394    }
3395
3396    @Override
3397    public void writeTo(final JsonSink output) throws IOException {
3398      output.beginObject();
3399      if ((bitField0_ & 0x00000001) != 0) {
3400        output.writeRepeatedMessage(FieldNames.modules, modules);
3401      }
3402      output.endObject();
3403    }
3404
3405    @Override
3406    public ProtobufSwerveDriveKinematics mergeFrom(final JsonSource input) throws IOException {
3407      if (!input.beginObject()) {
3408        return this;
3409      }
3410      while (!input.isAtEnd()) {
3411        switch (input.readFieldHash()) {
3412          case 1227433863: {
3413            if (input.isAtField(FieldNames.modules)) {
3414              if (!input.trySkipNullValue()) {
3415                input.readRepeatedMessage(modules);
3416                bitField0_ |= 0x00000001;
3417              }
3418            } else {
3419              input.skipUnknownField();
3420            }
3421            break;
3422          }
3423          default: {
3424            input.skipUnknownField();
3425            break;
3426          }
3427        }
3428      }
3429      input.endObject();
3430      return this;
3431    }
3432
3433    @Override
3434    public ProtobufSwerveDriveKinematics clone() {
3435      return new ProtobufSwerveDriveKinematics().copyFrom(this);
3436    }
3437
3438    @Override
3439    public boolean isEmpty() {
3440      return ((bitField0_) == 0);
3441    }
3442
3443    public static ProtobufSwerveDriveKinematics parseFrom(final byte[] data) throws
3444        InvalidProtocolBufferException {
3445      return ProtoMessage.mergeFrom(new ProtobufSwerveDriveKinematics(), data).checkInitialized();
3446    }
3447
3448    public static ProtobufSwerveDriveKinematics parseFrom(final ProtoSource input) throws
3449        IOException {
3450      return ProtoMessage.mergeFrom(new ProtobufSwerveDriveKinematics(), input).checkInitialized();
3451    }
3452
3453    public static ProtobufSwerveDriveKinematics parseFrom(final JsonSource input) throws
3454        IOException {
3455      return ProtoMessage.mergeFrom(new ProtobufSwerveDriveKinematics(), input).checkInitialized();
3456    }
3457
3458    /**
3459     * @return factory for creating ProtobufSwerveDriveKinematics messages
3460     */
3461    public static MessageFactory<ProtobufSwerveDriveKinematics> getFactory() {
3462      return ProtobufSwerveDriveKinematicsFactory.INSTANCE;
3463    }
3464
3465    /**
3466     * @return this type's descriptor.
3467     */
3468    public static Descriptors.Descriptor getDescriptor() {
3469      return Kinematics.wpi_proto_ProtobufSwerveDriveKinematics_descriptor;
3470    }
3471
3472    private enum ProtobufSwerveDriveKinematicsFactory implements MessageFactory<ProtobufSwerveDriveKinematics> {
3473      INSTANCE;
3474
3475      @Override
3476      public ProtobufSwerveDriveKinematics create() {
3477        return ProtobufSwerveDriveKinematics.newInstance();
3478      }
3479    }
3480
3481    /**
3482     * Contains name constants used for serializing JSON
3483     */
3484    static class FieldNames {
3485      static final FieldName modules = FieldName.forField("modules");
3486    }
3487  }
3488
3489  /**
3490   * Protobuf type {@code ProtobufSwerveModulePosition}
3491   */
3492  public static final class ProtobufSwerveModulePosition extends ProtoMessage<ProtobufSwerveModulePosition> implements Cloneable {
3493    private static final long serialVersionUID = 0L;
3494
3495    /**
3496     * <code>optional double distance = 1;</code>
3497     */
3498    private double distance;
3499
3500    /**
3501     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3502     */
3503    private final Geometry2D.ProtobufRotation2d angle = Geometry2D.ProtobufRotation2d.newInstance();
3504
3505    private ProtobufSwerveModulePosition() {
3506    }
3507
3508    /**
3509     * @return a new empty instance of {@code ProtobufSwerveModulePosition}
3510     */
3511    public static ProtobufSwerveModulePosition newInstance() {
3512      return new ProtobufSwerveModulePosition();
3513    }
3514
3515    /**
3516     * <code>optional double distance = 1;</code>
3517     * @return whether the distance field is set
3518     */
3519    public boolean hasDistance() {
3520      return (bitField0_ & 0x00000001) != 0;
3521    }
3522
3523    /**
3524     * <code>optional double distance = 1;</code>
3525     * @return this
3526     */
3527    public ProtobufSwerveModulePosition clearDistance() {
3528      bitField0_ &= ~0x00000001;
3529      distance = 0D;
3530      return this;
3531    }
3532
3533    /**
3534     * <code>optional double distance = 1;</code>
3535     * @return the distance
3536     */
3537    public double getDistance() {
3538      return distance;
3539    }
3540
3541    /**
3542     * <code>optional double distance = 1;</code>
3543     * @param value the distance to set
3544     * @return this
3545     */
3546    public ProtobufSwerveModulePosition setDistance(final double value) {
3547      bitField0_ |= 0x00000001;
3548      distance = value;
3549      return this;
3550    }
3551
3552    /**
3553     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3554     * @return whether the angle field is set
3555     */
3556    public boolean hasAngle() {
3557      return (bitField0_ & 0x00000002) != 0;
3558    }
3559
3560    /**
3561     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3562     * @return this
3563     */
3564    public ProtobufSwerveModulePosition clearAngle() {
3565      bitField0_ &= ~0x00000002;
3566      angle.clear();
3567      return this;
3568    }
3569
3570    /**
3571     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3572     *
3573     * This method returns the internal storage object without modifying any has state.
3574     * The returned object should not be modified and be treated as read-only.
3575     *
3576     * Use {@link #getMutableAngle()} if you want to modify it.
3577     *
3578     * @return internal storage object for reading
3579     */
3580    public Geometry2D.ProtobufRotation2d getAngle() {
3581      return angle;
3582    }
3583
3584    /**
3585     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3586     *
3587     * This method returns the internal storage object and sets the corresponding
3588     * has state. The returned object will become part of this message and its
3589     * contents may be modified as long as the has state is not cleared.
3590     *
3591     * @return internal storage object for modifications
3592     */
3593    public Geometry2D.ProtobufRotation2d getMutableAngle() {
3594      bitField0_ |= 0x00000002;
3595      return angle;
3596    }
3597
3598    /**
3599     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3600     * @param value the angle to set
3601     * @return this
3602     */
3603    public ProtobufSwerveModulePosition setAngle(final Geometry2D.ProtobufRotation2d value) {
3604      bitField0_ |= 0x00000002;
3605      angle.copyFrom(value);
3606      return this;
3607    }
3608
3609    @Override
3610    public ProtobufSwerveModulePosition copyFrom(final ProtobufSwerveModulePosition other) {
3611      cachedSize = other.cachedSize;
3612      if ((bitField0_ | other.bitField0_) != 0) {
3613        bitField0_ = other.bitField0_;
3614        distance = other.distance;
3615        angle.copyFrom(other.angle);
3616      }
3617      return this;
3618    }
3619
3620    @Override
3621    public ProtobufSwerveModulePosition mergeFrom(final ProtobufSwerveModulePosition other) {
3622      if (other.isEmpty()) {
3623        return this;
3624      }
3625      cachedSize = -1;
3626      if (other.hasDistance()) {
3627        setDistance(other.distance);
3628      }
3629      if (other.hasAngle()) {
3630        getMutableAngle().mergeFrom(other.angle);
3631      }
3632      return this;
3633    }
3634
3635    @Override
3636    public ProtobufSwerveModulePosition clear() {
3637      if (isEmpty()) {
3638        return this;
3639      }
3640      cachedSize = -1;
3641      bitField0_ = 0;
3642      distance = 0D;
3643      angle.clear();
3644      return this;
3645    }
3646
3647    @Override
3648    public ProtobufSwerveModulePosition clearQuick() {
3649      if (isEmpty()) {
3650        return this;
3651      }
3652      cachedSize = -1;
3653      bitField0_ = 0;
3654      angle.clearQuick();
3655      return this;
3656    }
3657
3658    @Override
3659    public boolean equals(Object o) {
3660      if (o == this) {
3661        return true;
3662      }
3663      if (!(o instanceof ProtobufSwerveModulePosition)) {
3664        return false;
3665      }
3666      ProtobufSwerveModulePosition other = (ProtobufSwerveModulePosition) o;
3667      return bitField0_ == other.bitField0_
3668        && (!hasDistance() || ProtoUtil.isEqual(distance, other.distance))
3669        && (!hasAngle() || angle.equals(other.angle));
3670    }
3671
3672    @Override
3673    public void writeTo(final ProtoSink output) throws IOException {
3674      if ((bitField0_ & 0x00000001) != 0) {
3675        output.writeRawByte((byte) 9);
3676        output.writeDoubleNoTag(distance);
3677      }
3678      if ((bitField0_ & 0x00000002) != 0) {
3679        output.writeRawByte((byte) 18);
3680        output.writeMessageNoTag(angle);
3681      }
3682    }
3683
3684    @Override
3685    protected int computeSerializedSize() {
3686      int size = 0;
3687      if ((bitField0_ & 0x00000001) != 0) {
3688        size += 9;
3689      }
3690      if ((bitField0_ & 0x00000002) != 0) {
3691        size += 1 + ProtoSink.computeMessageSizeNoTag(angle);
3692      }
3693      return size;
3694    }
3695
3696    @Override
3697    @SuppressWarnings("fallthrough")
3698    public ProtobufSwerveModulePosition mergeFrom(final ProtoSource input) throws IOException {
3699      // Enabled Fall-Through Optimization (QuickBuffers)
3700      int tag = input.readTag();
3701      while (true) {
3702        switch (tag) {
3703          case 9: {
3704            // distance
3705            distance = input.readDouble();
3706            bitField0_ |= 0x00000001;
3707            tag = input.readTag();
3708            if (tag != 18) {
3709              break;
3710            }
3711          }
3712          case 18: {
3713            // angle
3714            input.readMessage(angle);
3715            bitField0_ |= 0x00000002;
3716            tag = input.readTag();
3717            if (tag != 0) {
3718              break;
3719            }
3720          }
3721          case 0: {
3722            return this;
3723          }
3724          default: {
3725            if (!input.skipField(tag)) {
3726              return this;
3727            }
3728            tag = input.readTag();
3729            break;
3730          }
3731        }
3732      }
3733    }
3734
3735    @Override
3736    public void writeTo(final JsonSink output) throws IOException {
3737      output.beginObject();
3738      if ((bitField0_ & 0x00000001) != 0) {
3739        output.writeDouble(FieldNames.distance, distance);
3740      }
3741      if ((bitField0_ & 0x00000002) != 0) {
3742        output.writeMessage(FieldNames.angle, angle);
3743      }
3744      output.endObject();
3745    }
3746
3747    @Override
3748    public ProtobufSwerveModulePosition mergeFrom(final JsonSource input) throws IOException {
3749      if (!input.beginObject()) {
3750        return this;
3751      }
3752      while (!input.isAtEnd()) {
3753        switch (input.readFieldHash()) {
3754          case 288459765: {
3755            if (input.isAtField(FieldNames.distance)) {
3756              if (!input.trySkipNullValue()) {
3757                distance = input.readDouble();
3758                bitField0_ |= 0x00000001;
3759              }
3760            } else {
3761              input.skipUnknownField();
3762            }
3763            break;
3764          }
3765          case 92960979: {
3766            if (input.isAtField(FieldNames.angle)) {
3767              if (!input.trySkipNullValue()) {
3768                input.readMessage(angle);
3769                bitField0_ |= 0x00000002;
3770              }
3771            } else {
3772              input.skipUnknownField();
3773            }
3774            break;
3775          }
3776          default: {
3777            input.skipUnknownField();
3778            break;
3779          }
3780        }
3781      }
3782      input.endObject();
3783      return this;
3784    }
3785
3786    @Override
3787    public ProtobufSwerveModulePosition clone() {
3788      return new ProtobufSwerveModulePosition().copyFrom(this);
3789    }
3790
3791    @Override
3792    public boolean isEmpty() {
3793      return ((bitField0_) == 0);
3794    }
3795
3796    public static ProtobufSwerveModulePosition parseFrom(final byte[] data) throws
3797        InvalidProtocolBufferException {
3798      return ProtoMessage.mergeFrom(new ProtobufSwerveModulePosition(), data).checkInitialized();
3799    }
3800
3801    public static ProtobufSwerveModulePosition parseFrom(final ProtoSource input) throws
3802        IOException {
3803      return ProtoMessage.mergeFrom(new ProtobufSwerveModulePosition(), input).checkInitialized();
3804    }
3805
3806    public static ProtobufSwerveModulePosition parseFrom(final JsonSource input) throws
3807        IOException {
3808      return ProtoMessage.mergeFrom(new ProtobufSwerveModulePosition(), input).checkInitialized();
3809    }
3810
3811    /**
3812     * @return factory for creating ProtobufSwerveModulePosition messages
3813     */
3814    public static MessageFactory<ProtobufSwerveModulePosition> getFactory() {
3815      return ProtobufSwerveModulePositionFactory.INSTANCE;
3816    }
3817
3818    /**
3819     * @return this type's descriptor.
3820     */
3821    public static Descriptors.Descriptor getDescriptor() {
3822      return Kinematics.wpi_proto_ProtobufSwerveModulePosition_descriptor;
3823    }
3824
3825    private enum ProtobufSwerveModulePositionFactory implements MessageFactory<ProtobufSwerveModulePosition> {
3826      INSTANCE;
3827
3828      @Override
3829      public ProtobufSwerveModulePosition create() {
3830        return ProtobufSwerveModulePosition.newInstance();
3831      }
3832    }
3833
3834    /**
3835     * Contains name constants used for serializing JSON
3836     */
3837    static class FieldNames {
3838      static final FieldName distance = FieldName.forField("distance");
3839
3840      static final FieldName angle = FieldName.forField("angle");
3841    }
3842  }
3843
3844  /**
3845   * Protobuf type {@code ProtobufSwerveModuleState}
3846   */
3847  public static final class ProtobufSwerveModuleState extends ProtoMessage<ProtobufSwerveModuleState> implements Cloneable {
3848    private static final long serialVersionUID = 0L;
3849
3850    /**
3851     * <code>optional double speed = 1;</code>
3852     */
3853    private double speed;
3854
3855    /**
3856     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3857     */
3858    private final Geometry2D.ProtobufRotation2d angle = Geometry2D.ProtobufRotation2d.newInstance();
3859
3860    private ProtobufSwerveModuleState() {
3861    }
3862
3863    /**
3864     * @return a new empty instance of {@code ProtobufSwerveModuleState}
3865     */
3866    public static ProtobufSwerveModuleState newInstance() {
3867      return new ProtobufSwerveModuleState();
3868    }
3869
3870    /**
3871     * <code>optional double speed = 1;</code>
3872     * @return whether the speed field is set
3873     */
3874    public boolean hasSpeed() {
3875      return (bitField0_ & 0x00000001) != 0;
3876    }
3877
3878    /**
3879     * <code>optional double speed = 1;</code>
3880     * @return this
3881     */
3882    public ProtobufSwerveModuleState clearSpeed() {
3883      bitField0_ &= ~0x00000001;
3884      speed = 0D;
3885      return this;
3886    }
3887
3888    /**
3889     * <code>optional double speed = 1;</code>
3890     * @return the speed
3891     */
3892    public double getSpeed() {
3893      return speed;
3894    }
3895
3896    /**
3897     * <code>optional double speed = 1;</code>
3898     * @param value the speed to set
3899     * @return this
3900     */
3901    public ProtobufSwerveModuleState setSpeed(final double value) {
3902      bitField0_ |= 0x00000001;
3903      speed = value;
3904      return this;
3905    }
3906
3907    /**
3908     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3909     * @return whether the angle field is set
3910     */
3911    public boolean hasAngle() {
3912      return (bitField0_ & 0x00000002) != 0;
3913    }
3914
3915    /**
3916     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3917     * @return this
3918     */
3919    public ProtobufSwerveModuleState clearAngle() {
3920      bitField0_ &= ~0x00000002;
3921      angle.clear();
3922      return this;
3923    }
3924
3925    /**
3926     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3927     *
3928     * This method returns the internal storage object without modifying any has state.
3929     * The returned object should not be modified and be treated as read-only.
3930     *
3931     * Use {@link #getMutableAngle()} if you want to modify it.
3932     *
3933     * @return internal storage object for reading
3934     */
3935    public Geometry2D.ProtobufRotation2d getAngle() {
3936      return angle;
3937    }
3938
3939    /**
3940     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3941     *
3942     * This method returns the internal storage object and sets the corresponding
3943     * has state. The returned object will become part of this message and its
3944     * contents may be modified as long as the has state is not cleared.
3945     *
3946     * @return internal storage object for modifications
3947     */
3948    public Geometry2D.ProtobufRotation2d getMutableAngle() {
3949      bitField0_ |= 0x00000002;
3950      return angle;
3951    }
3952
3953    /**
3954     * <code>optional .wpi.proto.ProtobufRotation2d angle = 2;</code>
3955     * @param value the angle to set
3956     * @return this
3957     */
3958    public ProtobufSwerveModuleState setAngle(final Geometry2D.ProtobufRotation2d value) {
3959      bitField0_ |= 0x00000002;
3960      angle.copyFrom(value);
3961      return this;
3962    }
3963
3964    @Override
3965    public ProtobufSwerveModuleState copyFrom(final ProtobufSwerveModuleState other) {
3966      cachedSize = other.cachedSize;
3967      if ((bitField0_ | other.bitField0_) != 0) {
3968        bitField0_ = other.bitField0_;
3969        speed = other.speed;
3970        angle.copyFrom(other.angle);
3971      }
3972      return this;
3973    }
3974
3975    @Override
3976    public ProtobufSwerveModuleState mergeFrom(final ProtobufSwerveModuleState other) {
3977      if (other.isEmpty()) {
3978        return this;
3979      }
3980      cachedSize = -1;
3981      if (other.hasSpeed()) {
3982        setSpeed(other.speed);
3983      }
3984      if (other.hasAngle()) {
3985        getMutableAngle().mergeFrom(other.angle);
3986      }
3987      return this;
3988    }
3989
3990    @Override
3991    public ProtobufSwerveModuleState clear() {
3992      if (isEmpty()) {
3993        return this;
3994      }
3995      cachedSize = -1;
3996      bitField0_ = 0;
3997      speed = 0D;
3998      angle.clear();
3999      return this;
4000    }
4001
4002    @Override
4003    public ProtobufSwerveModuleState clearQuick() {
4004      if (isEmpty()) {
4005        return this;
4006      }
4007      cachedSize = -1;
4008      bitField0_ = 0;
4009      angle.clearQuick();
4010      return this;
4011    }
4012
4013    @Override
4014    public boolean equals(Object o) {
4015      if (o == this) {
4016        return true;
4017      }
4018      if (!(o instanceof ProtobufSwerveModuleState)) {
4019        return false;
4020      }
4021      ProtobufSwerveModuleState other = (ProtobufSwerveModuleState) o;
4022      return bitField0_ == other.bitField0_
4023        && (!hasSpeed() || ProtoUtil.isEqual(speed, other.speed))
4024        && (!hasAngle() || angle.equals(other.angle));
4025    }
4026
4027    @Override
4028    public void writeTo(final ProtoSink output) throws IOException {
4029      if ((bitField0_ & 0x00000001) != 0) {
4030        output.writeRawByte((byte) 9);
4031        output.writeDoubleNoTag(speed);
4032      }
4033      if ((bitField0_ & 0x00000002) != 0) {
4034        output.writeRawByte((byte) 18);
4035        output.writeMessageNoTag(angle);
4036      }
4037    }
4038
4039    @Override
4040    protected int computeSerializedSize() {
4041      int size = 0;
4042      if ((bitField0_ & 0x00000001) != 0) {
4043        size += 9;
4044      }
4045      if ((bitField0_ & 0x00000002) != 0) {
4046        size += 1 + ProtoSink.computeMessageSizeNoTag(angle);
4047      }
4048      return size;
4049    }
4050
4051    @Override
4052    @SuppressWarnings("fallthrough")
4053    public ProtobufSwerveModuleState mergeFrom(final ProtoSource input) throws IOException {
4054      // Enabled Fall-Through Optimization (QuickBuffers)
4055      int tag = input.readTag();
4056      while (true) {
4057        switch (tag) {
4058          case 9: {
4059            // speed
4060            speed = input.readDouble();
4061            bitField0_ |= 0x00000001;
4062            tag = input.readTag();
4063            if (tag != 18) {
4064              break;
4065            }
4066          }
4067          case 18: {
4068            // angle
4069            input.readMessage(angle);
4070            bitField0_ |= 0x00000002;
4071            tag = input.readTag();
4072            if (tag != 0) {
4073              break;
4074            }
4075          }
4076          case 0: {
4077            return this;
4078          }
4079          default: {
4080            if (!input.skipField(tag)) {
4081              return this;
4082            }
4083            tag = input.readTag();
4084            break;
4085          }
4086        }
4087      }
4088    }
4089
4090    @Override
4091    public void writeTo(final JsonSink output) throws IOException {
4092      output.beginObject();
4093      if ((bitField0_ & 0x00000001) != 0) {
4094        output.writeDouble(FieldNames.speed, speed);
4095      }
4096      if ((bitField0_ & 0x00000002) != 0) {
4097        output.writeMessage(FieldNames.angle, angle);
4098      }
4099      output.endObject();
4100    }
4101
4102    @Override
4103    public ProtobufSwerveModuleState mergeFrom(final JsonSource input) throws IOException {
4104      if (!input.beginObject()) {
4105        return this;
4106      }
4107      while (!input.isAtEnd()) {
4108        switch (input.readFieldHash()) {
4109          case 109641799: {
4110            if (input.isAtField(FieldNames.speed)) {
4111              if (!input.trySkipNullValue()) {
4112                speed = input.readDouble();
4113                bitField0_ |= 0x00000001;
4114              }
4115            } else {
4116              input.skipUnknownField();
4117            }
4118            break;
4119          }
4120          case 92960979: {
4121            if (input.isAtField(FieldNames.angle)) {
4122              if (!input.trySkipNullValue()) {
4123                input.readMessage(angle);
4124                bitField0_ |= 0x00000002;
4125              }
4126            } else {
4127              input.skipUnknownField();
4128            }
4129            break;
4130          }
4131          default: {
4132            input.skipUnknownField();
4133            break;
4134          }
4135        }
4136      }
4137      input.endObject();
4138      return this;
4139    }
4140
4141    @Override
4142    public ProtobufSwerveModuleState clone() {
4143      return new ProtobufSwerveModuleState().copyFrom(this);
4144    }
4145
4146    @Override
4147    public boolean isEmpty() {
4148      return ((bitField0_) == 0);
4149    }
4150
4151    public static ProtobufSwerveModuleState parseFrom(final byte[] data) throws
4152        InvalidProtocolBufferException {
4153      return ProtoMessage.mergeFrom(new ProtobufSwerveModuleState(), data).checkInitialized();
4154    }
4155
4156    public static ProtobufSwerveModuleState parseFrom(final ProtoSource input) throws IOException {
4157      return ProtoMessage.mergeFrom(new ProtobufSwerveModuleState(), input).checkInitialized();
4158    }
4159
4160    public static ProtobufSwerveModuleState parseFrom(final JsonSource input) throws IOException {
4161      return ProtoMessage.mergeFrom(new ProtobufSwerveModuleState(), input).checkInitialized();
4162    }
4163
4164    /**
4165     * @return factory for creating ProtobufSwerveModuleState messages
4166     */
4167    public static MessageFactory<ProtobufSwerveModuleState> getFactory() {
4168      return ProtobufSwerveModuleStateFactory.INSTANCE;
4169    }
4170
4171    /**
4172     * @return this type's descriptor.
4173     */
4174    public static Descriptors.Descriptor getDescriptor() {
4175      return Kinematics.wpi_proto_ProtobufSwerveModuleState_descriptor;
4176    }
4177
4178    private enum ProtobufSwerveModuleStateFactory implements MessageFactory<ProtobufSwerveModuleState> {
4179      INSTANCE;
4180
4181      @Override
4182      public ProtobufSwerveModuleState create() {
4183        return ProtobufSwerveModuleState.newInstance();
4184      }
4185    }
4186
4187    /**
4188     * Contains name constants used for serializing JSON
4189     */
4190    static class FieldNames {
4191      static final FieldName speed = FieldName.forField("speed");
4192
4193      static final FieldName angle = FieldName.forField("angle");
4194    }
4195  }
4196}