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