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;
019
020public final class Controller {
021  private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1897,
022    "ChBjb250cm9sbGVyLnByb3RvEgl3cGkucHJvdG8iaAoWUHJvdG9idWZBcm1GZWVkZm9yd2FyZBIOCgJr" + 
023    "cxgBIAEoAVICa3MSDgoCa2cYAiABKAFSAmtnEg4KAmt2GAMgASgBUgJrdhIOCgJrYRgEIAEoAVICa2ES" + 
024    "DgoCZHQYBSABKAFSAmR0Ip4BCiRQcm90b2J1ZkRpZmZlcmVudGlhbERyaXZlRmVlZGZvcndhcmQSGwoJ" + 
025    "a3ZfbGluZWFyGAEgASgBUghrdkxpbmVhchIbCglrYV9saW5lYXIYAiABKAFSCGthTGluZWFyEh0KCmt2" + 
026    "X2FuZ3VsYXIYAyABKAFSCWt2QW5ndWxhchIdCgprYV9hbmd1bGFyGAQgASgBUglrYUFuZ3VsYXIibQob" + 
027    "UHJvdG9idWZFbGV2YXRvckZlZWRmb3J3YXJkEg4KAmtzGAEgASgBUgJrcxIOCgJrZxgCIAEoAVICa2cS" + 
028    "DgoCa3YYAyABKAFSAmt2Eg4KAmthGAQgASgBUgJrYRIOCgJkdBgFIAEoAVICZHQiYAoeUHJvdG9idWZT" + 
029    "aW1wbGVNb3RvckZlZWRmb3J3YXJkEg4KAmtzGAEgASgBUgJrcxIOCgJrdhgCIAEoAVICa3YSDgoCa2EY" + 
030    "AyABKAFSAmthEg4KAmR0GAQgASgBUgJkdCJSCiZQcm90b2J1ZkRpZmZlcmVudGlhbERyaXZlV2hlZWxW" + 
031    "b2x0YWdlcxISCgRsZWZ0GAEgASgBUgRsZWZ0EhQKBXJpZ2h0GAIgASgBUgVyaWdodEIaChhlZHUud3Bp" + 
032    "LmZpcnN0Lm1hdGgucHJvdG9K9QkKBhIEAAAnAQoICgEMEgMAABIKCAoBAhIDAgASCggKAQgSAwQAMQoJ" + 
033    "CgIIARIDBAAxCgoKAgQAEgQGAAwBCgoKAwQAARIDBggeCgsKBAQAAgASAwcCEAoMCgUEAAIABRIDBwII" + 
034    "CgwKBQQAAgABEgMHCQsKDAoFBAACAAMSAwcODwoLCgQEAAIBEgMIAhAKDAoFBAACAQUSAwgCCAoMCgUE" + 
035    "AAIBARIDCAkLCgwKBQQAAgEDEgMIDg8KCwoEBAACAhIDCQIQCgwKBQQAAgIFEgMJAggKDAoFBAACAgES" + 
036    "AwkJCwoMCgUEAAICAxIDCQ4PCgsKBAQAAgMSAwoCEAoMCgUEAAIDBRIDCgIICgwKBQQAAgMBEgMKCQsK" + 
037    "DAoFBAACAwMSAwoODwoLCgQEAAIEEgMLAhAKDAoFBAACBAUSAwsCCAoMCgUEAAIEARIDCwkLCgwKBQQA" + 
038    "AgQDEgMLDg8KCgoCBAESBA4AEwEKCgoDBAEBEgMOCCwKCwoEBAECABIDDwIXCgwKBQQBAgAFEgMPAggK" + 
039    "DAoFBAECAAESAw8JEgoMCgUEAQIAAxIDDxUWCgsKBAQBAgESAxACFwoMCgUEAQIBBRIDEAIICgwKBQQB" + 
040    "AgEBEgMQCRIKDAoFBAECAQMSAxAVFgoLCgQEAQICEgMRAhgKDAoFBAECAgUSAxECCAoMCgUEAQICARID" + 
041    "EQkTCgwKBQQBAgIDEgMRFhcKCwoEBAECAxIDEgIYCgwKBQQBAgMFEgMSAggKDAoFBAECAwESAxIJEwoM",
042    "CgUEAQIDAxIDEhYXCgoKAgQCEgQVABsBCgoKAwQCARIDFQgjCgsKBAQCAgASAxYCEAoMCgUEAgIABRID" + 
043    "FgIICgwKBQQCAgABEgMWCQsKDAoFBAICAAMSAxYODwoLCgQEAgIBEgMXAhAKDAoFBAICAQUSAxcCCAoM" + 
044    "CgUEAgIBARIDFwkLCgwKBQQCAgEDEgMXDg8KCwoEBAICAhIDGAIQCgwKBQQCAgIFEgMYAggKDAoFBAIC" + 
045    "AgESAxgJCwoMCgUEAgICAxIDGA4PCgsKBAQCAgMSAxkCEAoMCgUEAgIDBRIDGQIICgwKBQQCAgMBEgMZ" + 
046    "CQsKDAoFBAICAwMSAxkODwoLCgQEAgIEEgMaAhAKDAoFBAICBAUSAxoCCAoMCgUEAgIEARIDGgkLCgwK" + 
047    "BQQCAgQDEgMaDg8KCgoCBAMSBB0AIgEKCgoDBAMBEgMdCCYKCwoEBAMCABIDHgIQCgwKBQQDAgAFEgMe" + 
048    "AggKDAoFBAMCAAESAx4JCwoMCgUEAwIAAxIDHg4PCgsKBAQDAgESAx8CEAoMCgUEAwIBBRIDHwIICgwK" + 
049    "BQQDAgEBEgMfCQsKDAoFBAMCAQMSAx8ODwoLCgQEAwICEgMgAhAKDAoFBAMCAgUSAyACCAoMCgUEAwIC" + 
050    "ARIDIAkLCgwKBQQDAgIDEgMgDg8KCwoEBAMCAxIDIQIQCgwKBQQDAgMFEgMhAggKDAoFBAMCAwESAyEJ" + 
051    "CwoMCgUEAwIDAxIDIQ4PCgoKAgQEEgQkACcBCgoKAwQEARIDJAguCgsKBAQEAgASAyUCEgoMCgUEBAIA" + 
052    "BRIDJQIICgwKBQQEAgABEgMlCQ0KDAoFBAQCAAMSAyUQEQoLCgQEBAIBEgMmAhMKDAoFBAQCAQUSAyYC" + 
053    "CAoMCgUEBAIBARIDJgkOCgwKBQQEAgEDEgMmERJiBnByb3RvMw==");
054
055  static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("controller.proto", "wpi.proto", descriptorData);
056
057  static final Descriptors.Descriptor wpi_proto_ProtobufArmFeedforward_descriptor = descriptor.internalContainedType(31, 104, "ProtobufArmFeedforward", "wpi.proto.ProtobufArmFeedforward");
058
059  static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveFeedforward_descriptor = descriptor.internalContainedType(138, 158, "ProtobufDifferentialDriveFeedforward", "wpi.proto.ProtobufDifferentialDriveFeedforward");
060
061  static final Descriptors.Descriptor wpi_proto_ProtobufElevatorFeedforward_descriptor = descriptor.internalContainedType(298, 109, "ProtobufElevatorFeedforward", "wpi.proto.ProtobufElevatorFeedforward");
062
063  static final Descriptors.Descriptor wpi_proto_ProtobufSimpleMotorFeedforward_descriptor = descriptor.internalContainedType(409, 96, "ProtobufSimpleMotorFeedforward", "wpi.proto.ProtobufSimpleMotorFeedforward");
064
065  static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelVoltages_descriptor = descriptor.internalContainedType(507, 82, "ProtobufDifferentialDriveWheelVoltages", "wpi.proto.ProtobufDifferentialDriveWheelVoltages");
066
067  /**
068   * @return this proto file's descriptor.
069   */
070  public static Descriptors.FileDescriptor getDescriptor() {
071    return descriptor;
072  }
073
074  /**
075   * Protobuf type {@code ProtobufArmFeedforward}
076   */
077  public static final class ProtobufArmFeedforward extends ProtoMessage<ProtobufArmFeedforward> implements Cloneable {
078    private static final long serialVersionUID = 0L;
079
080    /**
081     * <code>optional double ks = 1;</code>
082     */
083    private double ks;
084
085    /**
086     * <code>optional double kg = 2;</code>
087     */
088    private double kg;
089
090    /**
091     * <code>optional double kv = 3;</code>
092     */
093    private double kv;
094
095    /**
096     * <code>optional double ka = 4;</code>
097     */
098    private double ka;
099
100    /**
101     * <code>optional double dt = 5;</code>
102     */
103    private double dt;
104
105    private ProtobufArmFeedforward() {
106    }
107
108    /**
109     * @return a new empty instance of {@code ProtobufArmFeedforward}
110     */
111    public static ProtobufArmFeedforward newInstance() {
112      return new ProtobufArmFeedforward();
113    }
114
115    /**
116     * <code>optional double ks = 1;</code>
117     * @return whether the ks field is set
118     */
119    public boolean hasKs() {
120      return (bitField0_ & 0x00000001) != 0;
121    }
122
123    /**
124     * <code>optional double ks = 1;</code>
125     * @return this
126     */
127    public ProtobufArmFeedforward clearKs() {
128      bitField0_ &= ~0x00000001;
129      ks = 0D;
130      return this;
131    }
132
133    /**
134     * <code>optional double ks = 1;</code>
135     * @return the ks
136     */
137    public double getKs() {
138      return ks;
139    }
140
141    /**
142     * <code>optional double ks = 1;</code>
143     * @param value the ks to set
144     * @return this
145     */
146    public ProtobufArmFeedforward setKs(final double value) {
147      bitField0_ |= 0x00000001;
148      ks = value;
149      return this;
150    }
151
152    /**
153     * <code>optional double kg = 2;</code>
154     * @return whether the kg field is set
155     */
156    public boolean hasKg() {
157      return (bitField0_ & 0x00000002) != 0;
158    }
159
160    /**
161     * <code>optional double kg = 2;</code>
162     * @return this
163     */
164    public ProtobufArmFeedforward clearKg() {
165      bitField0_ &= ~0x00000002;
166      kg = 0D;
167      return this;
168    }
169
170    /**
171     * <code>optional double kg = 2;</code>
172     * @return the kg
173     */
174    public double getKg() {
175      return kg;
176    }
177
178    /**
179     * <code>optional double kg = 2;</code>
180     * @param value the kg to set
181     * @return this
182     */
183    public ProtobufArmFeedforward setKg(final double value) {
184      bitField0_ |= 0x00000002;
185      kg = value;
186      return this;
187    }
188
189    /**
190     * <code>optional double kv = 3;</code>
191     * @return whether the kv field is set
192     */
193    public boolean hasKv() {
194      return (bitField0_ & 0x00000004) != 0;
195    }
196
197    /**
198     * <code>optional double kv = 3;</code>
199     * @return this
200     */
201    public ProtobufArmFeedforward clearKv() {
202      bitField0_ &= ~0x00000004;
203      kv = 0D;
204      return this;
205    }
206
207    /**
208     * <code>optional double kv = 3;</code>
209     * @return the kv
210     */
211    public double getKv() {
212      return kv;
213    }
214
215    /**
216     * <code>optional double kv = 3;</code>
217     * @param value the kv to set
218     * @return this
219     */
220    public ProtobufArmFeedforward setKv(final double value) {
221      bitField0_ |= 0x00000004;
222      kv = value;
223      return this;
224    }
225
226    /**
227     * <code>optional double ka = 4;</code>
228     * @return whether the ka field is set
229     */
230    public boolean hasKa() {
231      return (bitField0_ & 0x00000008) != 0;
232    }
233
234    /**
235     * <code>optional double ka = 4;</code>
236     * @return this
237     */
238    public ProtobufArmFeedforward clearKa() {
239      bitField0_ &= ~0x00000008;
240      ka = 0D;
241      return this;
242    }
243
244    /**
245     * <code>optional double ka = 4;</code>
246     * @return the ka
247     */
248    public double getKa() {
249      return ka;
250    }
251
252    /**
253     * <code>optional double ka = 4;</code>
254     * @param value the ka to set
255     * @return this
256     */
257    public ProtobufArmFeedforward setKa(final double value) {
258      bitField0_ |= 0x00000008;
259      ka = value;
260      return this;
261    }
262
263    /**
264     * <code>optional double dt = 5;</code>
265     * @return whether the dt field is set
266     */
267    public boolean hasDt() {
268      return (bitField0_ & 0x00000010) != 0;
269    }
270
271    /**
272     * <code>optional double dt = 5;</code>
273     * @return this
274     */
275    public ProtobufArmFeedforward clearDt() {
276      bitField0_ &= ~0x00000010;
277      dt = 0D;
278      return this;
279    }
280
281    /**
282     * <code>optional double dt = 5;</code>
283     * @return the dt
284     */
285    public double getDt() {
286      return dt;
287    }
288
289    /**
290     * <code>optional double dt = 5;</code>
291     * @param value the dt to set
292     * @return this
293     */
294    public ProtobufArmFeedforward setDt(final double value) {
295      bitField0_ |= 0x00000010;
296      dt = value;
297      return this;
298    }
299
300    @Override
301    public ProtobufArmFeedforward copyFrom(final ProtobufArmFeedforward other) {
302      cachedSize = other.cachedSize;
303      if ((bitField0_ | other.bitField0_) != 0) {
304        bitField0_ = other.bitField0_;
305        ks = other.ks;
306        kg = other.kg;
307        kv = other.kv;
308        ka = other.ka;
309        dt = other.dt;
310      }
311      return this;
312    }
313
314    @Override
315    public ProtobufArmFeedforward mergeFrom(final ProtobufArmFeedforward other) {
316      if (other.isEmpty()) {
317        return this;
318      }
319      cachedSize = -1;
320      if (other.hasKs()) {
321        setKs(other.ks);
322      }
323      if (other.hasKg()) {
324        setKg(other.kg);
325      }
326      if (other.hasKv()) {
327        setKv(other.kv);
328      }
329      if (other.hasKa()) {
330        setKa(other.ka);
331      }
332      if (other.hasDt()) {
333        setDt(other.dt);
334      }
335      return this;
336    }
337
338    @Override
339    public ProtobufArmFeedforward clear() {
340      if (isEmpty()) {
341        return this;
342      }
343      cachedSize = -1;
344      bitField0_ = 0;
345      ks = 0D;
346      kg = 0D;
347      kv = 0D;
348      ka = 0D;
349      dt = 0D;
350      return this;
351    }
352
353    @Override
354    public ProtobufArmFeedforward clearQuick() {
355      if (isEmpty()) {
356        return this;
357      }
358      cachedSize = -1;
359      bitField0_ = 0;
360      return this;
361    }
362
363    @Override
364    public boolean equals(Object o) {
365      if (o == this) {
366        return true;
367      }
368      if (!(o instanceof ProtobufArmFeedforward)) {
369        return false;
370      }
371      ProtobufArmFeedforward other = (ProtobufArmFeedforward) o;
372      return bitField0_ == other.bitField0_
373        && (!hasKs() || ProtoUtil.isEqual(ks, other.ks))
374        && (!hasKg() || ProtoUtil.isEqual(kg, other.kg))
375        && (!hasKv() || ProtoUtil.isEqual(kv, other.kv))
376        && (!hasKa() || ProtoUtil.isEqual(ka, other.ka))
377        && (!hasDt() || ProtoUtil.isEqual(dt, other.dt));
378    }
379
380    @Override
381    public void writeTo(final ProtoSink output) throws IOException {
382      if ((bitField0_ & 0x00000001) != 0) {
383        output.writeRawByte((byte) 9);
384        output.writeDoubleNoTag(ks);
385      }
386      if ((bitField0_ & 0x00000002) != 0) {
387        output.writeRawByte((byte) 17);
388        output.writeDoubleNoTag(kg);
389      }
390      if ((bitField0_ & 0x00000004) != 0) {
391        output.writeRawByte((byte) 25);
392        output.writeDoubleNoTag(kv);
393      }
394      if ((bitField0_ & 0x00000008) != 0) {
395        output.writeRawByte((byte) 33);
396        output.writeDoubleNoTag(ka);
397      }
398      if ((bitField0_ & 0x00000010) != 0) {
399        output.writeRawByte((byte) 41);
400        output.writeDoubleNoTag(dt);
401      }
402    }
403
404    @Override
405    protected int computeSerializedSize() {
406      int size = 0;
407      if ((bitField0_ & 0x00000001) != 0) {
408        size += 9;
409      }
410      if ((bitField0_ & 0x00000002) != 0) {
411        size += 9;
412      }
413      if ((bitField0_ & 0x00000004) != 0) {
414        size += 9;
415      }
416      if ((bitField0_ & 0x00000008) != 0) {
417        size += 9;
418      }
419      if ((bitField0_ & 0x00000010) != 0) {
420        size += 9;
421      }
422      return size;
423    }
424
425    @Override
426    @SuppressWarnings("fallthrough")
427    public ProtobufArmFeedforward mergeFrom(final ProtoSource input) throws IOException {
428      // Enabled Fall-Through Optimization (QuickBuffers)
429      int tag = input.readTag();
430      while (true) {
431        switch (tag) {
432          case 9: {
433            // ks
434            ks = input.readDouble();
435            bitField0_ |= 0x00000001;
436            tag = input.readTag();
437            if (tag != 17) {
438              break;
439            }
440          }
441          case 17: {
442            // kg
443            kg = input.readDouble();
444            bitField0_ |= 0x00000002;
445            tag = input.readTag();
446            if (tag != 25) {
447              break;
448            }
449          }
450          case 25: {
451            // kv
452            kv = input.readDouble();
453            bitField0_ |= 0x00000004;
454            tag = input.readTag();
455            if (tag != 33) {
456              break;
457            }
458          }
459          case 33: {
460            // ka
461            ka = input.readDouble();
462            bitField0_ |= 0x00000008;
463            tag = input.readTag();
464            if (tag != 41) {
465              break;
466            }
467          }
468          case 41: {
469            // dt
470            dt = input.readDouble();
471            bitField0_ |= 0x00000010;
472            tag = input.readTag();
473            if (tag != 0) {
474              break;
475            }
476          }
477          case 0: {
478            return this;
479          }
480          default: {
481            if (!input.skipField(tag)) {
482              return this;
483            }
484            tag = input.readTag();
485            break;
486          }
487        }
488      }
489    }
490
491    @Override
492    public void writeTo(final JsonSink output) throws IOException {
493      output.beginObject();
494      if ((bitField0_ & 0x00000001) != 0) {
495        output.writeDouble(FieldNames.ks, ks);
496      }
497      if ((bitField0_ & 0x00000002) != 0) {
498        output.writeDouble(FieldNames.kg, kg);
499      }
500      if ((bitField0_ & 0x00000004) != 0) {
501        output.writeDouble(FieldNames.kv, kv);
502      }
503      if ((bitField0_ & 0x00000008) != 0) {
504        output.writeDouble(FieldNames.ka, ka);
505      }
506      if ((bitField0_ & 0x00000010) != 0) {
507        output.writeDouble(FieldNames.dt, dt);
508      }
509      output.endObject();
510    }
511
512    @Override
513    public ProtobufArmFeedforward mergeFrom(final JsonSource input) throws IOException {
514      if (!input.beginObject()) {
515        return this;
516      }
517      while (!input.isAtEnd()) {
518        switch (input.readFieldHash()) {
519          case 3432: {
520            if (input.isAtField(FieldNames.ks)) {
521              if (!input.trySkipNullValue()) {
522                ks = input.readDouble();
523                bitField0_ |= 0x00000001;
524              }
525            } else {
526              input.skipUnknownField();
527            }
528            break;
529          }
530          case 3420: {
531            if (input.isAtField(FieldNames.kg)) {
532              if (!input.trySkipNullValue()) {
533                kg = input.readDouble();
534                bitField0_ |= 0x00000002;
535              }
536            } else {
537              input.skipUnknownField();
538            }
539            break;
540          }
541          case 3435: {
542            if (input.isAtField(FieldNames.kv)) {
543              if (!input.trySkipNullValue()) {
544                kv = input.readDouble();
545                bitField0_ |= 0x00000004;
546              }
547            } else {
548              input.skipUnknownField();
549            }
550            break;
551          }
552          case 3414: {
553            if (input.isAtField(FieldNames.ka)) {
554              if (!input.trySkipNullValue()) {
555                ka = input.readDouble();
556                bitField0_ |= 0x00000008;
557              }
558            } else {
559              input.skipUnknownField();
560            }
561            break;
562          }
563          case 3216: {
564            if (input.isAtField(FieldNames.dt)) {
565              if (!input.trySkipNullValue()) {
566                dt = input.readDouble();
567                bitField0_ |= 0x00000010;
568              }
569            } else {
570              input.skipUnknownField();
571            }
572            break;
573          }
574          default: {
575            input.skipUnknownField();
576            break;
577          }
578        }
579      }
580      input.endObject();
581      return this;
582    }
583
584    @Override
585    public ProtobufArmFeedforward clone() {
586      return new ProtobufArmFeedforward().copyFrom(this);
587    }
588
589    @Override
590    public boolean isEmpty() {
591      return ((bitField0_) == 0);
592    }
593
594    public static ProtobufArmFeedforward parseFrom(final byte[] data) throws
595        InvalidProtocolBufferException {
596      return ProtoMessage.mergeFrom(new ProtobufArmFeedforward(), data).checkInitialized();
597    }
598
599    public static ProtobufArmFeedforward parseFrom(final ProtoSource input) throws IOException {
600      return ProtoMessage.mergeFrom(new ProtobufArmFeedforward(), input).checkInitialized();
601    }
602
603    public static ProtobufArmFeedforward parseFrom(final JsonSource input) throws IOException {
604      return ProtoMessage.mergeFrom(new ProtobufArmFeedforward(), input).checkInitialized();
605    }
606
607    /**
608     * @return factory for creating ProtobufArmFeedforward messages
609     */
610    public static MessageFactory<ProtobufArmFeedforward> getFactory() {
611      return ProtobufArmFeedforwardFactory.INSTANCE;
612    }
613
614    /**
615     * @return this type's descriptor.
616     */
617    public static Descriptors.Descriptor getDescriptor() {
618      return Controller.wpi_proto_ProtobufArmFeedforward_descriptor;
619    }
620
621    private enum ProtobufArmFeedforwardFactory implements MessageFactory<ProtobufArmFeedforward> {
622      INSTANCE;
623
624      @Override
625      public ProtobufArmFeedforward create() {
626        return ProtobufArmFeedforward.newInstance();
627      }
628    }
629
630    /**
631     * Contains name constants used for serializing JSON
632     */
633    static class FieldNames {
634      static final FieldName ks = FieldName.forField("ks");
635
636      static final FieldName kg = FieldName.forField("kg");
637
638      static final FieldName kv = FieldName.forField("kv");
639
640      static final FieldName ka = FieldName.forField("ka");
641
642      static final FieldName dt = FieldName.forField("dt");
643    }
644  }
645
646  /**
647   * Protobuf type {@code ProtobufDifferentialDriveFeedforward}
648   */
649  public static final class ProtobufDifferentialDriveFeedforward extends ProtoMessage<ProtobufDifferentialDriveFeedforward> implements Cloneable {
650    private static final long serialVersionUID = 0L;
651
652    /**
653     * <code>optional double kv_linear = 1;</code>
654     */
655    private double kvLinear;
656
657    /**
658     * <code>optional double ka_linear = 2;</code>
659     */
660    private double kaLinear;
661
662    /**
663     * <code>optional double kv_angular = 3;</code>
664     */
665    private double kvAngular;
666
667    /**
668     * <code>optional double ka_angular = 4;</code>
669     */
670    private double kaAngular;
671
672    private ProtobufDifferentialDriveFeedforward() {
673    }
674
675    /**
676     * @return a new empty instance of {@code ProtobufDifferentialDriveFeedforward}
677     */
678    public static ProtobufDifferentialDriveFeedforward newInstance() {
679      return new ProtobufDifferentialDriveFeedforward();
680    }
681
682    /**
683     * <code>optional double kv_linear = 1;</code>
684     * @return whether the kvLinear field is set
685     */
686    public boolean hasKvLinear() {
687      return (bitField0_ & 0x00000001) != 0;
688    }
689
690    /**
691     * <code>optional double kv_linear = 1;</code>
692     * @return this
693     */
694    public ProtobufDifferentialDriveFeedforward clearKvLinear() {
695      bitField0_ &= ~0x00000001;
696      kvLinear = 0D;
697      return this;
698    }
699
700    /**
701     * <code>optional double kv_linear = 1;</code>
702     * @return the kvLinear
703     */
704    public double getKvLinear() {
705      return kvLinear;
706    }
707
708    /**
709     * <code>optional double kv_linear = 1;</code>
710     * @param value the kvLinear to set
711     * @return this
712     */
713    public ProtobufDifferentialDriveFeedforward setKvLinear(final double value) {
714      bitField0_ |= 0x00000001;
715      kvLinear = value;
716      return this;
717    }
718
719    /**
720     * <code>optional double ka_linear = 2;</code>
721     * @return whether the kaLinear field is set
722     */
723    public boolean hasKaLinear() {
724      return (bitField0_ & 0x00000002) != 0;
725    }
726
727    /**
728     * <code>optional double ka_linear = 2;</code>
729     * @return this
730     */
731    public ProtobufDifferentialDriveFeedforward clearKaLinear() {
732      bitField0_ &= ~0x00000002;
733      kaLinear = 0D;
734      return this;
735    }
736
737    /**
738     * <code>optional double ka_linear = 2;</code>
739     * @return the kaLinear
740     */
741    public double getKaLinear() {
742      return kaLinear;
743    }
744
745    /**
746     * <code>optional double ka_linear = 2;</code>
747     * @param value the kaLinear to set
748     * @return this
749     */
750    public ProtobufDifferentialDriveFeedforward setKaLinear(final double value) {
751      bitField0_ |= 0x00000002;
752      kaLinear = value;
753      return this;
754    }
755
756    /**
757     * <code>optional double kv_angular = 3;</code>
758     * @return whether the kvAngular field is set
759     */
760    public boolean hasKvAngular() {
761      return (bitField0_ & 0x00000004) != 0;
762    }
763
764    /**
765     * <code>optional double kv_angular = 3;</code>
766     * @return this
767     */
768    public ProtobufDifferentialDriveFeedforward clearKvAngular() {
769      bitField0_ &= ~0x00000004;
770      kvAngular = 0D;
771      return this;
772    }
773
774    /**
775     * <code>optional double kv_angular = 3;</code>
776     * @return the kvAngular
777     */
778    public double getKvAngular() {
779      return kvAngular;
780    }
781
782    /**
783     * <code>optional double kv_angular = 3;</code>
784     * @param value the kvAngular to set
785     * @return this
786     */
787    public ProtobufDifferentialDriveFeedforward setKvAngular(final double value) {
788      bitField0_ |= 0x00000004;
789      kvAngular = value;
790      return this;
791    }
792
793    /**
794     * <code>optional double ka_angular = 4;</code>
795     * @return whether the kaAngular field is set
796     */
797    public boolean hasKaAngular() {
798      return (bitField0_ & 0x00000008) != 0;
799    }
800
801    /**
802     * <code>optional double ka_angular = 4;</code>
803     * @return this
804     */
805    public ProtobufDifferentialDriveFeedforward clearKaAngular() {
806      bitField0_ &= ~0x00000008;
807      kaAngular = 0D;
808      return this;
809    }
810
811    /**
812     * <code>optional double ka_angular = 4;</code>
813     * @return the kaAngular
814     */
815    public double getKaAngular() {
816      return kaAngular;
817    }
818
819    /**
820     * <code>optional double ka_angular = 4;</code>
821     * @param value the kaAngular to set
822     * @return this
823     */
824    public ProtobufDifferentialDriveFeedforward setKaAngular(final double value) {
825      bitField0_ |= 0x00000008;
826      kaAngular = value;
827      return this;
828    }
829
830    @Override
831    public ProtobufDifferentialDriveFeedforward copyFrom(
832        final ProtobufDifferentialDriveFeedforward other) {
833      cachedSize = other.cachedSize;
834      if ((bitField0_ | other.bitField0_) != 0) {
835        bitField0_ = other.bitField0_;
836        kvLinear = other.kvLinear;
837        kaLinear = other.kaLinear;
838        kvAngular = other.kvAngular;
839        kaAngular = other.kaAngular;
840      }
841      return this;
842    }
843
844    @Override
845    public ProtobufDifferentialDriveFeedforward mergeFrom(
846        final ProtobufDifferentialDriveFeedforward other) {
847      if (other.isEmpty()) {
848        return this;
849      }
850      cachedSize = -1;
851      if (other.hasKvLinear()) {
852        setKvLinear(other.kvLinear);
853      }
854      if (other.hasKaLinear()) {
855        setKaLinear(other.kaLinear);
856      }
857      if (other.hasKvAngular()) {
858        setKvAngular(other.kvAngular);
859      }
860      if (other.hasKaAngular()) {
861        setKaAngular(other.kaAngular);
862      }
863      return this;
864    }
865
866    @Override
867    public ProtobufDifferentialDriveFeedforward clear() {
868      if (isEmpty()) {
869        return this;
870      }
871      cachedSize = -1;
872      bitField0_ = 0;
873      kvLinear = 0D;
874      kaLinear = 0D;
875      kvAngular = 0D;
876      kaAngular = 0D;
877      return this;
878    }
879
880    @Override
881    public ProtobufDifferentialDriveFeedforward clearQuick() {
882      if (isEmpty()) {
883        return this;
884      }
885      cachedSize = -1;
886      bitField0_ = 0;
887      return this;
888    }
889
890    @Override
891    public boolean equals(Object o) {
892      if (o == this) {
893        return true;
894      }
895      if (!(o instanceof ProtobufDifferentialDriveFeedforward)) {
896        return false;
897      }
898      ProtobufDifferentialDriveFeedforward other = (ProtobufDifferentialDriveFeedforward) o;
899      return bitField0_ == other.bitField0_
900        && (!hasKvLinear() || ProtoUtil.isEqual(kvLinear, other.kvLinear))
901        && (!hasKaLinear() || ProtoUtil.isEqual(kaLinear, other.kaLinear))
902        && (!hasKvAngular() || ProtoUtil.isEqual(kvAngular, other.kvAngular))
903        && (!hasKaAngular() || ProtoUtil.isEqual(kaAngular, other.kaAngular));
904    }
905
906    @Override
907    public void writeTo(final ProtoSink output) throws IOException {
908      if ((bitField0_ & 0x00000001) != 0) {
909        output.writeRawByte((byte) 9);
910        output.writeDoubleNoTag(kvLinear);
911      }
912      if ((bitField0_ & 0x00000002) != 0) {
913        output.writeRawByte((byte) 17);
914        output.writeDoubleNoTag(kaLinear);
915      }
916      if ((bitField0_ & 0x00000004) != 0) {
917        output.writeRawByte((byte) 25);
918        output.writeDoubleNoTag(kvAngular);
919      }
920      if ((bitField0_ & 0x00000008) != 0) {
921        output.writeRawByte((byte) 33);
922        output.writeDoubleNoTag(kaAngular);
923      }
924    }
925
926    @Override
927    protected int computeSerializedSize() {
928      int size = 0;
929      if ((bitField0_ & 0x00000001) != 0) {
930        size += 9;
931      }
932      if ((bitField0_ & 0x00000002) != 0) {
933        size += 9;
934      }
935      if ((bitField0_ & 0x00000004) != 0) {
936        size += 9;
937      }
938      if ((bitField0_ & 0x00000008) != 0) {
939        size += 9;
940      }
941      return size;
942    }
943
944    @Override
945    @SuppressWarnings("fallthrough")
946    public ProtobufDifferentialDriveFeedforward mergeFrom(final ProtoSource input) throws
947        IOException {
948      // Enabled Fall-Through Optimization (QuickBuffers)
949      int tag = input.readTag();
950      while (true) {
951        switch (tag) {
952          case 9: {
953            // kvLinear
954            kvLinear = input.readDouble();
955            bitField0_ |= 0x00000001;
956            tag = input.readTag();
957            if (tag != 17) {
958              break;
959            }
960          }
961          case 17: {
962            // kaLinear
963            kaLinear = input.readDouble();
964            bitField0_ |= 0x00000002;
965            tag = input.readTag();
966            if (tag != 25) {
967              break;
968            }
969          }
970          case 25: {
971            // kvAngular
972            kvAngular = input.readDouble();
973            bitField0_ |= 0x00000004;
974            tag = input.readTag();
975            if (tag != 33) {
976              break;
977            }
978          }
979          case 33: {
980            // kaAngular
981            kaAngular = input.readDouble();
982            bitField0_ |= 0x00000008;
983            tag = input.readTag();
984            if (tag != 0) {
985              break;
986            }
987          }
988          case 0: {
989            return this;
990          }
991          default: {
992            if (!input.skipField(tag)) {
993              return this;
994            }
995            tag = input.readTag();
996            break;
997          }
998        }
999      }
1000    }
1001
1002    @Override
1003    public void writeTo(final JsonSink output) throws IOException {
1004      output.beginObject();
1005      if ((bitField0_ & 0x00000001) != 0) {
1006        output.writeDouble(FieldNames.kvLinear, kvLinear);
1007      }
1008      if ((bitField0_ & 0x00000002) != 0) {
1009        output.writeDouble(FieldNames.kaLinear, kaLinear);
1010      }
1011      if ((bitField0_ & 0x00000004) != 0) {
1012        output.writeDouble(FieldNames.kvAngular, kvAngular);
1013      }
1014      if ((bitField0_ & 0x00000008) != 0) {
1015        output.writeDouble(FieldNames.kaAngular, kaAngular);
1016      }
1017      output.endObject();
1018    }
1019
1020    @Override
1021    public ProtobufDifferentialDriveFeedforward mergeFrom(final JsonSource input) throws
1022        IOException {
1023      if (!input.beginObject()) {
1024        return this;
1025      }
1026      while (!input.isAtEnd()) {
1027        switch (input.readFieldHash()) {
1028          case 1424526448:
1029          case 974889081: {
1030            if (input.isAtField(FieldNames.kvLinear)) {
1031              if (!input.trySkipNullValue()) {
1032                kvLinear = input.readDouble();
1033                bitField0_ |= 0x00000001;
1034              }
1035            } else {
1036              input.skipUnknownField();
1037            }
1038            break;
1039          }
1040          case -33181669:
1041          case -1264389586: {
1042            if (input.isAtField(FieldNames.kaLinear)) {
1043              if (!input.trySkipNullValue()) {
1044                kaLinear = input.readDouble();
1045                bitField0_ |= 0x00000002;
1046              }
1047            } else {
1048              input.skipUnknownField();
1049            }
1050            break;
1051          }
1052          case 175208951:
1053          case -878647538: {
1054            if (input.isAtField(FieldNames.kvAngular)) {
1055              if (!input.trySkipNullValue()) {
1056                kvAngular = input.readDouble();
1057                bitField0_ |= 0x00000004;
1058              }
1059            } else {
1060              input.skipUnknownField();
1061            }
1062            break;
1063          }
1064          case -2064069716:
1065          case -1576809479: {
1066            if (input.isAtField(FieldNames.kaAngular)) {
1067              if (!input.trySkipNullValue()) {
1068                kaAngular = input.readDouble();
1069                bitField0_ |= 0x00000008;
1070              }
1071            } else {
1072              input.skipUnknownField();
1073            }
1074            break;
1075          }
1076          default: {
1077            input.skipUnknownField();
1078            break;
1079          }
1080        }
1081      }
1082      input.endObject();
1083      return this;
1084    }
1085
1086    @Override
1087    public ProtobufDifferentialDriveFeedforward clone() {
1088      return new ProtobufDifferentialDriveFeedforward().copyFrom(this);
1089    }
1090
1091    @Override
1092    public boolean isEmpty() {
1093      return ((bitField0_) == 0);
1094    }
1095
1096    public static ProtobufDifferentialDriveFeedforward parseFrom(final byte[] data) throws
1097        InvalidProtocolBufferException {
1098      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveFeedforward(), data).checkInitialized();
1099    }
1100
1101    public static ProtobufDifferentialDriveFeedforward parseFrom(final ProtoSource input) throws
1102        IOException {
1103      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveFeedforward(), input).checkInitialized();
1104    }
1105
1106    public static ProtobufDifferentialDriveFeedforward parseFrom(final JsonSource input) throws
1107        IOException {
1108      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveFeedforward(), input).checkInitialized();
1109    }
1110
1111    /**
1112     * @return factory for creating ProtobufDifferentialDriveFeedforward messages
1113     */
1114    public static MessageFactory<ProtobufDifferentialDriveFeedforward> getFactory() {
1115      return ProtobufDifferentialDriveFeedforwardFactory.INSTANCE;
1116    }
1117
1118    /**
1119     * @return this type's descriptor.
1120     */
1121    public static Descriptors.Descriptor getDescriptor() {
1122      return Controller.wpi_proto_ProtobufDifferentialDriveFeedforward_descriptor;
1123    }
1124
1125    private enum ProtobufDifferentialDriveFeedforwardFactory implements MessageFactory<ProtobufDifferentialDriveFeedforward> {
1126      INSTANCE;
1127
1128      @Override
1129      public ProtobufDifferentialDriveFeedforward create() {
1130        return ProtobufDifferentialDriveFeedforward.newInstance();
1131      }
1132    }
1133
1134    /**
1135     * Contains name constants used for serializing JSON
1136     */
1137    static class FieldNames {
1138      static final FieldName kvLinear = FieldName.forField("kvLinear", "kv_linear");
1139
1140      static final FieldName kaLinear = FieldName.forField("kaLinear", "ka_linear");
1141
1142      static final FieldName kvAngular = FieldName.forField("kvAngular", "kv_angular");
1143
1144      static final FieldName kaAngular = FieldName.forField("kaAngular", "ka_angular");
1145    }
1146  }
1147
1148  /**
1149   * Protobuf type {@code ProtobufElevatorFeedforward}
1150   */
1151  public static final class ProtobufElevatorFeedforward extends ProtoMessage<ProtobufElevatorFeedforward> implements Cloneable {
1152    private static final long serialVersionUID = 0L;
1153
1154    /**
1155     * <code>optional double ks = 1;</code>
1156     */
1157    private double ks;
1158
1159    /**
1160     * <code>optional double kg = 2;</code>
1161     */
1162    private double kg;
1163
1164    /**
1165     * <code>optional double kv = 3;</code>
1166     */
1167    private double kv;
1168
1169    /**
1170     * <code>optional double ka = 4;</code>
1171     */
1172    private double ka;
1173
1174    /**
1175     * <code>optional double dt = 5;</code>
1176     */
1177    private double dt;
1178
1179    private ProtobufElevatorFeedforward() {
1180    }
1181
1182    /**
1183     * @return a new empty instance of {@code ProtobufElevatorFeedforward}
1184     */
1185    public static ProtobufElevatorFeedforward newInstance() {
1186      return new ProtobufElevatorFeedforward();
1187    }
1188
1189    /**
1190     * <code>optional double ks = 1;</code>
1191     * @return whether the ks field is set
1192     */
1193    public boolean hasKs() {
1194      return (bitField0_ & 0x00000001) != 0;
1195    }
1196
1197    /**
1198     * <code>optional double ks = 1;</code>
1199     * @return this
1200     */
1201    public ProtobufElevatorFeedforward clearKs() {
1202      bitField0_ &= ~0x00000001;
1203      ks = 0D;
1204      return this;
1205    }
1206
1207    /**
1208     * <code>optional double ks = 1;</code>
1209     * @return the ks
1210     */
1211    public double getKs() {
1212      return ks;
1213    }
1214
1215    /**
1216     * <code>optional double ks = 1;</code>
1217     * @param value the ks to set
1218     * @return this
1219     */
1220    public ProtobufElevatorFeedforward setKs(final double value) {
1221      bitField0_ |= 0x00000001;
1222      ks = value;
1223      return this;
1224    }
1225
1226    /**
1227     * <code>optional double kg = 2;</code>
1228     * @return whether the kg field is set
1229     */
1230    public boolean hasKg() {
1231      return (bitField0_ & 0x00000002) != 0;
1232    }
1233
1234    /**
1235     * <code>optional double kg = 2;</code>
1236     * @return this
1237     */
1238    public ProtobufElevatorFeedforward clearKg() {
1239      bitField0_ &= ~0x00000002;
1240      kg = 0D;
1241      return this;
1242    }
1243
1244    /**
1245     * <code>optional double kg = 2;</code>
1246     * @return the kg
1247     */
1248    public double getKg() {
1249      return kg;
1250    }
1251
1252    /**
1253     * <code>optional double kg = 2;</code>
1254     * @param value the kg to set
1255     * @return this
1256     */
1257    public ProtobufElevatorFeedforward setKg(final double value) {
1258      bitField0_ |= 0x00000002;
1259      kg = value;
1260      return this;
1261    }
1262
1263    /**
1264     * <code>optional double kv = 3;</code>
1265     * @return whether the kv field is set
1266     */
1267    public boolean hasKv() {
1268      return (bitField0_ & 0x00000004) != 0;
1269    }
1270
1271    /**
1272     * <code>optional double kv = 3;</code>
1273     * @return this
1274     */
1275    public ProtobufElevatorFeedforward clearKv() {
1276      bitField0_ &= ~0x00000004;
1277      kv = 0D;
1278      return this;
1279    }
1280
1281    /**
1282     * <code>optional double kv = 3;</code>
1283     * @return the kv
1284     */
1285    public double getKv() {
1286      return kv;
1287    }
1288
1289    /**
1290     * <code>optional double kv = 3;</code>
1291     * @param value the kv to set
1292     * @return this
1293     */
1294    public ProtobufElevatorFeedforward setKv(final double value) {
1295      bitField0_ |= 0x00000004;
1296      kv = value;
1297      return this;
1298    }
1299
1300    /**
1301     * <code>optional double ka = 4;</code>
1302     * @return whether the ka field is set
1303     */
1304    public boolean hasKa() {
1305      return (bitField0_ & 0x00000008) != 0;
1306    }
1307
1308    /**
1309     * <code>optional double ka = 4;</code>
1310     * @return this
1311     */
1312    public ProtobufElevatorFeedforward clearKa() {
1313      bitField0_ &= ~0x00000008;
1314      ka = 0D;
1315      return this;
1316    }
1317
1318    /**
1319     * <code>optional double ka = 4;</code>
1320     * @return the ka
1321     */
1322    public double getKa() {
1323      return ka;
1324    }
1325
1326    /**
1327     * <code>optional double ka = 4;</code>
1328     * @param value the ka to set
1329     * @return this
1330     */
1331    public ProtobufElevatorFeedforward setKa(final double value) {
1332      bitField0_ |= 0x00000008;
1333      ka = value;
1334      return this;
1335    }
1336
1337    /**
1338     * <code>optional double dt = 5;</code>
1339     * @return whether the dt field is set
1340     */
1341    public boolean hasDt() {
1342      return (bitField0_ & 0x00000010) != 0;
1343    }
1344
1345    /**
1346     * <code>optional double dt = 5;</code>
1347     * @return this
1348     */
1349    public ProtobufElevatorFeedforward clearDt() {
1350      bitField0_ &= ~0x00000010;
1351      dt = 0D;
1352      return this;
1353    }
1354
1355    /**
1356     * <code>optional double dt = 5;</code>
1357     * @return the dt
1358     */
1359    public double getDt() {
1360      return dt;
1361    }
1362
1363    /**
1364     * <code>optional double dt = 5;</code>
1365     * @param value the dt to set
1366     * @return this
1367     */
1368    public ProtobufElevatorFeedforward setDt(final double value) {
1369      bitField0_ |= 0x00000010;
1370      dt = value;
1371      return this;
1372    }
1373
1374    @Override
1375    public ProtobufElevatorFeedforward copyFrom(final ProtobufElevatorFeedforward other) {
1376      cachedSize = other.cachedSize;
1377      if ((bitField0_ | other.bitField0_) != 0) {
1378        bitField0_ = other.bitField0_;
1379        ks = other.ks;
1380        kg = other.kg;
1381        kv = other.kv;
1382        ka = other.ka;
1383        dt = other.dt;
1384      }
1385      return this;
1386    }
1387
1388    @Override
1389    public ProtobufElevatorFeedforward mergeFrom(final ProtobufElevatorFeedforward other) {
1390      if (other.isEmpty()) {
1391        return this;
1392      }
1393      cachedSize = -1;
1394      if (other.hasKs()) {
1395        setKs(other.ks);
1396      }
1397      if (other.hasKg()) {
1398        setKg(other.kg);
1399      }
1400      if (other.hasKv()) {
1401        setKv(other.kv);
1402      }
1403      if (other.hasKa()) {
1404        setKa(other.ka);
1405      }
1406      if (other.hasDt()) {
1407        setDt(other.dt);
1408      }
1409      return this;
1410    }
1411
1412    @Override
1413    public ProtobufElevatorFeedforward clear() {
1414      if (isEmpty()) {
1415        return this;
1416      }
1417      cachedSize = -1;
1418      bitField0_ = 0;
1419      ks = 0D;
1420      kg = 0D;
1421      kv = 0D;
1422      ka = 0D;
1423      dt = 0D;
1424      return this;
1425    }
1426
1427    @Override
1428    public ProtobufElevatorFeedforward clearQuick() {
1429      if (isEmpty()) {
1430        return this;
1431      }
1432      cachedSize = -1;
1433      bitField0_ = 0;
1434      return this;
1435    }
1436
1437    @Override
1438    public boolean equals(Object o) {
1439      if (o == this) {
1440        return true;
1441      }
1442      if (!(o instanceof ProtobufElevatorFeedforward)) {
1443        return false;
1444      }
1445      ProtobufElevatorFeedforward other = (ProtobufElevatorFeedforward) o;
1446      return bitField0_ == other.bitField0_
1447        && (!hasKs() || ProtoUtil.isEqual(ks, other.ks))
1448        && (!hasKg() || ProtoUtil.isEqual(kg, other.kg))
1449        && (!hasKv() || ProtoUtil.isEqual(kv, other.kv))
1450        && (!hasKa() || ProtoUtil.isEqual(ka, other.ka))
1451        && (!hasDt() || ProtoUtil.isEqual(dt, other.dt));
1452    }
1453
1454    @Override
1455    public void writeTo(final ProtoSink output) throws IOException {
1456      if ((bitField0_ & 0x00000001) != 0) {
1457        output.writeRawByte((byte) 9);
1458        output.writeDoubleNoTag(ks);
1459      }
1460      if ((bitField0_ & 0x00000002) != 0) {
1461        output.writeRawByte((byte) 17);
1462        output.writeDoubleNoTag(kg);
1463      }
1464      if ((bitField0_ & 0x00000004) != 0) {
1465        output.writeRawByte((byte) 25);
1466        output.writeDoubleNoTag(kv);
1467      }
1468      if ((bitField0_ & 0x00000008) != 0) {
1469        output.writeRawByte((byte) 33);
1470        output.writeDoubleNoTag(ka);
1471      }
1472      if ((bitField0_ & 0x00000010) != 0) {
1473        output.writeRawByte((byte) 41);
1474        output.writeDoubleNoTag(dt);
1475      }
1476    }
1477
1478    @Override
1479    protected int computeSerializedSize() {
1480      int size = 0;
1481      if ((bitField0_ & 0x00000001) != 0) {
1482        size += 9;
1483      }
1484      if ((bitField0_ & 0x00000002) != 0) {
1485        size += 9;
1486      }
1487      if ((bitField0_ & 0x00000004) != 0) {
1488        size += 9;
1489      }
1490      if ((bitField0_ & 0x00000008) != 0) {
1491        size += 9;
1492      }
1493      if ((bitField0_ & 0x00000010) != 0) {
1494        size += 9;
1495      }
1496      return size;
1497    }
1498
1499    @Override
1500    @SuppressWarnings("fallthrough")
1501    public ProtobufElevatorFeedforward mergeFrom(final ProtoSource input) throws IOException {
1502      // Enabled Fall-Through Optimization (QuickBuffers)
1503      int tag = input.readTag();
1504      while (true) {
1505        switch (tag) {
1506          case 9: {
1507            // ks
1508            ks = input.readDouble();
1509            bitField0_ |= 0x00000001;
1510            tag = input.readTag();
1511            if (tag != 17) {
1512              break;
1513            }
1514          }
1515          case 17: {
1516            // kg
1517            kg = input.readDouble();
1518            bitField0_ |= 0x00000002;
1519            tag = input.readTag();
1520            if (tag != 25) {
1521              break;
1522            }
1523          }
1524          case 25: {
1525            // kv
1526            kv = input.readDouble();
1527            bitField0_ |= 0x00000004;
1528            tag = input.readTag();
1529            if (tag != 33) {
1530              break;
1531            }
1532          }
1533          case 33: {
1534            // ka
1535            ka = input.readDouble();
1536            bitField0_ |= 0x00000008;
1537            tag = input.readTag();
1538            if (tag != 41) {
1539              break;
1540            }
1541          }
1542          case 41: {
1543            // dt
1544            dt = input.readDouble();
1545            bitField0_ |= 0x00000010;
1546            tag = input.readTag();
1547            if (tag != 0) {
1548              break;
1549            }
1550          }
1551          case 0: {
1552            return this;
1553          }
1554          default: {
1555            if (!input.skipField(tag)) {
1556              return this;
1557            }
1558            tag = input.readTag();
1559            break;
1560          }
1561        }
1562      }
1563    }
1564
1565    @Override
1566    public void writeTo(final JsonSink output) throws IOException {
1567      output.beginObject();
1568      if ((bitField0_ & 0x00000001) != 0) {
1569        output.writeDouble(FieldNames.ks, ks);
1570      }
1571      if ((bitField0_ & 0x00000002) != 0) {
1572        output.writeDouble(FieldNames.kg, kg);
1573      }
1574      if ((bitField0_ & 0x00000004) != 0) {
1575        output.writeDouble(FieldNames.kv, kv);
1576      }
1577      if ((bitField0_ & 0x00000008) != 0) {
1578        output.writeDouble(FieldNames.ka, ka);
1579      }
1580      if ((bitField0_ & 0x00000010) != 0) {
1581        output.writeDouble(FieldNames.dt, dt);
1582      }
1583      output.endObject();
1584    }
1585
1586    @Override
1587    public ProtobufElevatorFeedforward mergeFrom(final JsonSource input) throws IOException {
1588      if (!input.beginObject()) {
1589        return this;
1590      }
1591      while (!input.isAtEnd()) {
1592        switch (input.readFieldHash()) {
1593          case 3432: {
1594            if (input.isAtField(FieldNames.ks)) {
1595              if (!input.trySkipNullValue()) {
1596                ks = input.readDouble();
1597                bitField0_ |= 0x00000001;
1598              }
1599            } else {
1600              input.skipUnknownField();
1601            }
1602            break;
1603          }
1604          case 3420: {
1605            if (input.isAtField(FieldNames.kg)) {
1606              if (!input.trySkipNullValue()) {
1607                kg = input.readDouble();
1608                bitField0_ |= 0x00000002;
1609              }
1610            } else {
1611              input.skipUnknownField();
1612            }
1613            break;
1614          }
1615          case 3435: {
1616            if (input.isAtField(FieldNames.kv)) {
1617              if (!input.trySkipNullValue()) {
1618                kv = input.readDouble();
1619                bitField0_ |= 0x00000004;
1620              }
1621            } else {
1622              input.skipUnknownField();
1623            }
1624            break;
1625          }
1626          case 3414: {
1627            if (input.isAtField(FieldNames.ka)) {
1628              if (!input.trySkipNullValue()) {
1629                ka = input.readDouble();
1630                bitField0_ |= 0x00000008;
1631              }
1632            } else {
1633              input.skipUnknownField();
1634            }
1635            break;
1636          }
1637          case 3216: {
1638            if (input.isAtField(FieldNames.dt)) {
1639              if (!input.trySkipNullValue()) {
1640                dt = input.readDouble();
1641                bitField0_ |= 0x00000010;
1642              }
1643            } else {
1644              input.skipUnknownField();
1645            }
1646            break;
1647          }
1648          default: {
1649            input.skipUnknownField();
1650            break;
1651          }
1652        }
1653      }
1654      input.endObject();
1655      return this;
1656    }
1657
1658    @Override
1659    public ProtobufElevatorFeedforward clone() {
1660      return new ProtobufElevatorFeedforward().copyFrom(this);
1661    }
1662
1663    @Override
1664    public boolean isEmpty() {
1665      return ((bitField0_) == 0);
1666    }
1667
1668    public static ProtobufElevatorFeedforward parseFrom(final byte[] data) throws
1669        InvalidProtocolBufferException {
1670      return ProtoMessage.mergeFrom(new ProtobufElevatorFeedforward(), data).checkInitialized();
1671    }
1672
1673    public static ProtobufElevatorFeedforward parseFrom(final ProtoSource input) throws
1674        IOException {
1675      return ProtoMessage.mergeFrom(new ProtobufElevatorFeedforward(), input).checkInitialized();
1676    }
1677
1678    public static ProtobufElevatorFeedforward parseFrom(final JsonSource input) throws IOException {
1679      return ProtoMessage.mergeFrom(new ProtobufElevatorFeedforward(), input).checkInitialized();
1680    }
1681
1682    /**
1683     * @return factory for creating ProtobufElevatorFeedforward messages
1684     */
1685    public static MessageFactory<ProtobufElevatorFeedforward> getFactory() {
1686      return ProtobufElevatorFeedforwardFactory.INSTANCE;
1687    }
1688
1689    /**
1690     * @return this type's descriptor.
1691     */
1692    public static Descriptors.Descriptor getDescriptor() {
1693      return Controller.wpi_proto_ProtobufElevatorFeedforward_descriptor;
1694    }
1695
1696    private enum ProtobufElevatorFeedforwardFactory implements MessageFactory<ProtobufElevatorFeedforward> {
1697      INSTANCE;
1698
1699      @Override
1700      public ProtobufElevatorFeedforward create() {
1701        return ProtobufElevatorFeedforward.newInstance();
1702      }
1703    }
1704
1705    /**
1706     * Contains name constants used for serializing JSON
1707     */
1708    static class FieldNames {
1709      static final FieldName ks = FieldName.forField("ks");
1710
1711      static final FieldName kg = FieldName.forField("kg");
1712
1713      static final FieldName kv = FieldName.forField("kv");
1714
1715      static final FieldName ka = FieldName.forField("ka");
1716
1717      static final FieldName dt = FieldName.forField("dt");
1718    }
1719  }
1720
1721  /**
1722   * Protobuf type {@code ProtobufSimpleMotorFeedforward}
1723   */
1724  public static final class ProtobufSimpleMotorFeedforward extends ProtoMessage<ProtobufSimpleMotorFeedforward> implements Cloneable {
1725    private static final long serialVersionUID = 0L;
1726
1727    /**
1728     * <code>optional double ks = 1;</code>
1729     */
1730    private double ks;
1731
1732    /**
1733     * <code>optional double kv = 2;</code>
1734     */
1735    private double kv;
1736
1737    /**
1738     * <code>optional double ka = 3;</code>
1739     */
1740    private double ka;
1741
1742    /**
1743     * <code>optional double dt = 4;</code>
1744     */
1745    private double dt;
1746
1747    private ProtobufSimpleMotorFeedforward() {
1748    }
1749
1750    /**
1751     * @return a new empty instance of {@code ProtobufSimpleMotorFeedforward}
1752     */
1753    public static ProtobufSimpleMotorFeedforward newInstance() {
1754      return new ProtobufSimpleMotorFeedforward();
1755    }
1756
1757    /**
1758     * <code>optional double ks = 1;</code>
1759     * @return whether the ks field is set
1760     */
1761    public boolean hasKs() {
1762      return (bitField0_ & 0x00000001) != 0;
1763    }
1764
1765    /**
1766     * <code>optional double ks = 1;</code>
1767     * @return this
1768     */
1769    public ProtobufSimpleMotorFeedforward clearKs() {
1770      bitField0_ &= ~0x00000001;
1771      ks = 0D;
1772      return this;
1773    }
1774
1775    /**
1776     * <code>optional double ks = 1;</code>
1777     * @return the ks
1778     */
1779    public double getKs() {
1780      return ks;
1781    }
1782
1783    /**
1784     * <code>optional double ks = 1;</code>
1785     * @param value the ks to set
1786     * @return this
1787     */
1788    public ProtobufSimpleMotorFeedforward setKs(final double value) {
1789      bitField0_ |= 0x00000001;
1790      ks = value;
1791      return this;
1792    }
1793
1794    /**
1795     * <code>optional double kv = 2;</code>
1796     * @return whether the kv field is set
1797     */
1798    public boolean hasKv() {
1799      return (bitField0_ & 0x00000002) != 0;
1800    }
1801
1802    /**
1803     * <code>optional double kv = 2;</code>
1804     * @return this
1805     */
1806    public ProtobufSimpleMotorFeedforward clearKv() {
1807      bitField0_ &= ~0x00000002;
1808      kv = 0D;
1809      return this;
1810    }
1811
1812    /**
1813     * <code>optional double kv = 2;</code>
1814     * @return the kv
1815     */
1816    public double getKv() {
1817      return kv;
1818    }
1819
1820    /**
1821     * <code>optional double kv = 2;</code>
1822     * @param value the kv to set
1823     * @return this
1824     */
1825    public ProtobufSimpleMotorFeedforward setKv(final double value) {
1826      bitField0_ |= 0x00000002;
1827      kv = value;
1828      return this;
1829    }
1830
1831    /**
1832     * <code>optional double ka = 3;</code>
1833     * @return whether the ka field is set
1834     */
1835    public boolean hasKa() {
1836      return (bitField0_ & 0x00000004) != 0;
1837    }
1838
1839    /**
1840     * <code>optional double ka = 3;</code>
1841     * @return this
1842     */
1843    public ProtobufSimpleMotorFeedforward clearKa() {
1844      bitField0_ &= ~0x00000004;
1845      ka = 0D;
1846      return this;
1847    }
1848
1849    /**
1850     * <code>optional double ka = 3;</code>
1851     * @return the ka
1852     */
1853    public double getKa() {
1854      return ka;
1855    }
1856
1857    /**
1858     * <code>optional double ka = 3;</code>
1859     * @param value the ka to set
1860     * @return this
1861     */
1862    public ProtobufSimpleMotorFeedforward setKa(final double value) {
1863      bitField0_ |= 0x00000004;
1864      ka = value;
1865      return this;
1866    }
1867
1868    /**
1869     * <code>optional double dt = 4;</code>
1870     * @return whether the dt field is set
1871     */
1872    public boolean hasDt() {
1873      return (bitField0_ & 0x00000008) != 0;
1874    }
1875
1876    /**
1877     * <code>optional double dt = 4;</code>
1878     * @return this
1879     */
1880    public ProtobufSimpleMotorFeedforward clearDt() {
1881      bitField0_ &= ~0x00000008;
1882      dt = 0D;
1883      return this;
1884    }
1885
1886    /**
1887     * <code>optional double dt = 4;</code>
1888     * @return the dt
1889     */
1890    public double getDt() {
1891      return dt;
1892    }
1893
1894    /**
1895     * <code>optional double dt = 4;</code>
1896     * @param value the dt to set
1897     * @return this
1898     */
1899    public ProtobufSimpleMotorFeedforward setDt(final double value) {
1900      bitField0_ |= 0x00000008;
1901      dt = value;
1902      return this;
1903    }
1904
1905    @Override
1906    public ProtobufSimpleMotorFeedforward copyFrom(final ProtobufSimpleMotorFeedforward other) {
1907      cachedSize = other.cachedSize;
1908      if ((bitField0_ | other.bitField0_) != 0) {
1909        bitField0_ = other.bitField0_;
1910        ks = other.ks;
1911        kv = other.kv;
1912        ka = other.ka;
1913        dt = other.dt;
1914      }
1915      return this;
1916    }
1917
1918    @Override
1919    public ProtobufSimpleMotorFeedforward mergeFrom(final ProtobufSimpleMotorFeedforward other) {
1920      if (other.isEmpty()) {
1921        return this;
1922      }
1923      cachedSize = -1;
1924      if (other.hasKs()) {
1925        setKs(other.ks);
1926      }
1927      if (other.hasKv()) {
1928        setKv(other.kv);
1929      }
1930      if (other.hasKa()) {
1931        setKa(other.ka);
1932      }
1933      if (other.hasDt()) {
1934        setDt(other.dt);
1935      }
1936      return this;
1937    }
1938
1939    @Override
1940    public ProtobufSimpleMotorFeedforward clear() {
1941      if (isEmpty()) {
1942        return this;
1943      }
1944      cachedSize = -1;
1945      bitField0_ = 0;
1946      ks = 0D;
1947      kv = 0D;
1948      ka = 0D;
1949      dt = 0D;
1950      return this;
1951    }
1952
1953    @Override
1954    public ProtobufSimpleMotorFeedforward clearQuick() {
1955      if (isEmpty()) {
1956        return this;
1957      }
1958      cachedSize = -1;
1959      bitField0_ = 0;
1960      return this;
1961    }
1962
1963    @Override
1964    public boolean equals(Object o) {
1965      if (o == this) {
1966        return true;
1967      }
1968      if (!(o instanceof ProtobufSimpleMotorFeedforward)) {
1969        return false;
1970      }
1971      ProtobufSimpleMotorFeedforward other = (ProtobufSimpleMotorFeedforward) o;
1972      return bitField0_ == other.bitField0_
1973        && (!hasKs() || ProtoUtil.isEqual(ks, other.ks))
1974        && (!hasKv() || ProtoUtil.isEqual(kv, other.kv))
1975        && (!hasKa() || ProtoUtil.isEqual(ka, other.ka))
1976        && (!hasDt() || ProtoUtil.isEqual(dt, other.dt));
1977    }
1978
1979    @Override
1980    public void writeTo(final ProtoSink output) throws IOException {
1981      if ((bitField0_ & 0x00000001) != 0) {
1982        output.writeRawByte((byte) 9);
1983        output.writeDoubleNoTag(ks);
1984      }
1985      if ((bitField0_ & 0x00000002) != 0) {
1986        output.writeRawByte((byte) 17);
1987        output.writeDoubleNoTag(kv);
1988      }
1989      if ((bitField0_ & 0x00000004) != 0) {
1990        output.writeRawByte((byte) 25);
1991        output.writeDoubleNoTag(ka);
1992      }
1993      if ((bitField0_ & 0x00000008) != 0) {
1994        output.writeRawByte((byte) 33);
1995        output.writeDoubleNoTag(dt);
1996      }
1997    }
1998
1999    @Override
2000    protected int computeSerializedSize() {
2001      int size = 0;
2002      if ((bitField0_ & 0x00000001) != 0) {
2003        size += 9;
2004      }
2005      if ((bitField0_ & 0x00000002) != 0) {
2006        size += 9;
2007      }
2008      if ((bitField0_ & 0x00000004) != 0) {
2009        size += 9;
2010      }
2011      if ((bitField0_ & 0x00000008) != 0) {
2012        size += 9;
2013      }
2014      return size;
2015    }
2016
2017    @Override
2018    @SuppressWarnings("fallthrough")
2019    public ProtobufSimpleMotorFeedforward mergeFrom(final ProtoSource input) throws IOException {
2020      // Enabled Fall-Through Optimization (QuickBuffers)
2021      int tag = input.readTag();
2022      while (true) {
2023        switch (tag) {
2024          case 9: {
2025            // ks
2026            ks = input.readDouble();
2027            bitField0_ |= 0x00000001;
2028            tag = input.readTag();
2029            if (tag != 17) {
2030              break;
2031            }
2032          }
2033          case 17: {
2034            // kv
2035            kv = input.readDouble();
2036            bitField0_ |= 0x00000002;
2037            tag = input.readTag();
2038            if (tag != 25) {
2039              break;
2040            }
2041          }
2042          case 25: {
2043            // ka
2044            ka = input.readDouble();
2045            bitField0_ |= 0x00000004;
2046            tag = input.readTag();
2047            if (tag != 33) {
2048              break;
2049            }
2050          }
2051          case 33: {
2052            // dt
2053            dt = input.readDouble();
2054            bitField0_ |= 0x00000008;
2055            tag = input.readTag();
2056            if (tag != 0) {
2057              break;
2058            }
2059          }
2060          case 0: {
2061            return this;
2062          }
2063          default: {
2064            if (!input.skipField(tag)) {
2065              return this;
2066            }
2067            tag = input.readTag();
2068            break;
2069          }
2070        }
2071      }
2072    }
2073
2074    @Override
2075    public void writeTo(final JsonSink output) throws IOException {
2076      output.beginObject();
2077      if ((bitField0_ & 0x00000001) != 0) {
2078        output.writeDouble(FieldNames.ks, ks);
2079      }
2080      if ((bitField0_ & 0x00000002) != 0) {
2081        output.writeDouble(FieldNames.kv, kv);
2082      }
2083      if ((bitField0_ & 0x00000004) != 0) {
2084        output.writeDouble(FieldNames.ka, ka);
2085      }
2086      if ((bitField0_ & 0x00000008) != 0) {
2087        output.writeDouble(FieldNames.dt, dt);
2088      }
2089      output.endObject();
2090    }
2091
2092    @Override
2093    public ProtobufSimpleMotorFeedforward mergeFrom(final JsonSource input) throws IOException {
2094      if (!input.beginObject()) {
2095        return this;
2096      }
2097      while (!input.isAtEnd()) {
2098        switch (input.readFieldHash()) {
2099          case 3432: {
2100            if (input.isAtField(FieldNames.ks)) {
2101              if (!input.trySkipNullValue()) {
2102                ks = input.readDouble();
2103                bitField0_ |= 0x00000001;
2104              }
2105            } else {
2106              input.skipUnknownField();
2107            }
2108            break;
2109          }
2110          case 3435: {
2111            if (input.isAtField(FieldNames.kv)) {
2112              if (!input.trySkipNullValue()) {
2113                kv = input.readDouble();
2114                bitField0_ |= 0x00000002;
2115              }
2116            } else {
2117              input.skipUnknownField();
2118            }
2119            break;
2120          }
2121          case 3414: {
2122            if (input.isAtField(FieldNames.ka)) {
2123              if (!input.trySkipNullValue()) {
2124                ka = input.readDouble();
2125                bitField0_ |= 0x00000004;
2126              }
2127            } else {
2128              input.skipUnknownField();
2129            }
2130            break;
2131          }
2132          case 3216: {
2133            if (input.isAtField(FieldNames.dt)) {
2134              if (!input.trySkipNullValue()) {
2135                dt = input.readDouble();
2136                bitField0_ |= 0x00000008;
2137              }
2138            } else {
2139              input.skipUnknownField();
2140            }
2141            break;
2142          }
2143          default: {
2144            input.skipUnknownField();
2145            break;
2146          }
2147        }
2148      }
2149      input.endObject();
2150      return this;
2151    }
2152
2153    @Override
2154    public ProtobufSimpleMotorFeedforward clone() {
2155      return new ProtobufSimpleMotorFeedforward().copyFrom(this);
2156    }
2157
2158    @Override
2159    public boolean isEmpty() {
2160      return ((bitField0_) == 0);
2161    }
2162
2163    public static ProtobufSimpleMotorFeedforward parseFrom(final byte[] data) throws
2164        InvalidProtocolBufferException {
2165      return ProtoMessage.mergeFrom(new ProtobufSimpleMotorFeedforward(), data).checkInitialized();
2166    }
2167
2168    public static ProtobufSimpleMotorFeedforward parseFrom(final ProtoSource input) throws
2169        IOException {
2170      return ProtoMessage.mergeFrom(new ProtobufSimpleMotorFeedforward(), input).checkInitialized();
2171    }
2172
2173    public static ProtobufSimpleMotorFeedforward parseFrom(final JsonSource input) throws
2174        IOException {
2175      return ProtoMessage.mergeFrom(new ProtobufSimpleMotorFeedforward(), input).checkInitialized();
2176    }
2177
2178    /**
2179     * @return factory for creating ProtobufSimpleMotorFeedforward messages
2180     */
2181    public static MessageFactory<ProtobufSimpleMotorFeedforward> getFactory() {
2182      return ProtobufSimpleMotorFeedforwardFactory.INSTANCE;
2183    }
2184
2185    /**
2186     * @return this type's descriptor.
2187     */
2188    public static Descriptors.Descriptor getDescriptor() {
2189      return Controller.wpi_proto_ProtobufSimpleMotorFeedforward_descriptor;
2190    }
2191
2192    private enum ProtobufSimpleMotorFeedforwardFactory implements MessageFactory<ProtobufSimpleMotorFeedforward> {
2193      INSTANCE;
2194
2195      @Override
2196      public ProtobufSimpleMotorFeedforward create() {
2197        return ProtobufSimpleMotorFeedforward.newInstance();
2198      }
2199    }
2200
2201    /**
2202     * Contains name constants used for serializing JSON
2203     */
2204    static class FieldNames {
2205      static final FieldName ks = FieldName.forField("ks");
2206
2207      static final FieldName kv = FieldName.forField("kv");
2208
2209      static final FieldName ka = FieldName.forField("ka");
2210
2211      static final FieldName dt = FieldName.forField("dt");
2212    }
2213  }
2214
2215  /**
2216   * Protobuf type {@code ProtobufDifferentialDriveWheelVoltages}
2217   */
2218  public static final class ProtobufDifferentialDriveWheelVoltages extends ProtoMessage<ProtobufDifferentialDriveWheelVoltages> implements Cloneable {
2219    private static final long serialVersionUID = 0L;
2220
2221    /**
2222     * <code>optional double left = 1;</code>
2223     */
2224    private double left;
2225
2226    /**
2227     * <code>optional double right = 2;</code>
2228     */
2229    private double right;
2230
2231    private ProtobufDifferentialDriveWheelVoltages() {
2232    }
2233
2234    /**
2235     * @return a new empty instance of {@code ProtobufDifferentialDriveWheelVoltages}
2236     */
2237    public static ProtobufDifferentialDriveWheelVoltages newInstance() {
2238      return new ProtobufDifferentialDriveWheelVoltages();
2239    }
2240
2241    /**
2242     * <code>optional double left = 1;</code>
2243     * @return whether the left field is set
2244     */
2245    public boolean hasLeft() {
2246      return (bitField0_ & 0x00000001) != 0;
2247    }
2248
2249    /**
2250     * <code>optional double left = 1;</code>
2251     * @return this
2252     */
2253    public ProtobufDifferentialDriveWheelVoltages clearLeft() {
2254      bitField0_ &= ~0x00000001;
2255      left = 0D;
2256      return this;
2257    }
2258
2259    /**
2260     * <code>optional double left = 1;</code>
2261     * @return the left
2262     */
2263    public double getLeft() {
2264      return left;
2265    }
2266
2267    /**
2268     * <code>optional double left = 1;</code>
2269     * @param value the left to set
2270     * @return this
2271     */
2272    public ProtobufDifferentialDriveWheelVoltages setLeft(final double value) {
2273      bitField0_ |= 0x00000001;
2274      left = value;
2275      return this;
2276    }
2277
2278    /**
2279     * <code>optional double right = 2;</code>
2280     * @return whether the right field is set
2281     */
2282    public boolean hasRight() {
2283      return (bitField0_ & 0x00000002) != 0;
2284    }
2285
2286    /**
2287     * <code>optional double right = 2;</code>
2288     * @return this
2289     */
2290    public ProtobufDifferentialDriveWheelVoltages clearRight() {
2291      bitField0_ &= ~0x00000002;
2292      right = 0D;
2293      return this;
2294    }
2295
2296    /**
2297     * <code>optional double right = 2;</code>
2298     * @return the right
2299     */
2300    public double getRight() {
2301      return right;
2302    }
2303
2304    /**
2305     * <code>optional double right = 2;</code>
2306     * @param value the right to set
2307     * @return this
2308     */
2309    public ProtobufDifferentialDriveWheelVoltages setRight(final double value) {
2310      bitField0_ |= 0x00000002;
2311      right = value;
2312      return this;
2313    }
2314
2315    @Override
2316    public ProtobufDifferentialDriveWheelVoltages copyFrom(
2317        final ProtobufDifferentialDriveWheelVoltages other) {
2318      cachedSize = other.cachedSize;
2319      if ((bitField0_ | other.bitField0_) != 0) {
2320        bitField0_ = other.bitField0_;
2321        left = other.left;
2322        right = other.right;
2323      }
2324      return this;
2325    }
2326
2327    @Override
2328    public ProtobufDifferentialDriveWheelVoltages mergeFrom(
2329        final ProtobufDifferentialDriveWheelVoltages other) {
2330      if (other.isEmpty()) {
2331        return this;
2332      }
2333      cachedSize = -1;
2334      if (other.hasLeft()) {
2335        setLeft(other.left);
2336      }
2337      if (other.hasRight()) {
2338        setRight(other.right);
2339      }
2340      return this;
2341    }
2342
2343    @Override
2344    public ProtobufDifferentialDriveWheelVoltages clear() {
2345      if (isEmpty()) {
2346        return this;
2347      }
2348      cachedSize = -1;
2349      bitField0_ = 0;
2350      left = 0D;
2351      right = 0D;
2352      return this;
2353    }
2354
2355    @Override
2356    public ProtobufDifferentialDriveWheelVoltages clearQuick() {
2357      if (isEmpty()) {
2358        return this;
2359      }
2360      cachedSize = -1;
2361      bitField0_ = 0;
2362      return this;
2363    }
2364
2365    @Override
2366    public boolean equals(Object o) {
2367      if (o == this) {
2368        return true;
2369      }
2370      if (!(o instanceof ProtobufDifferentialDriveWheelVoltages)) {
2371        return false;
2372      }
2373      ProtobufDifferentialDriveWheelVoltages other = (ProtobufDifferentialDriveWheelVoltages) o;
2374      return bitField0_ == other.bitField0_
2375        && (!hasLeft() || ProtoUtil.isEqual(left, other.left))
2376        && (!hasRight() || ProtoUtil.isEqual(right, other.right));
2377    }
2378
2379    @Override
2380    public void writeTo(final ProtoSink output) throws IOException {
2381      if ((bitField0_ & 0x00000001) != 0) {
2382        output.writeRawByte((byte) 9);
2383        output.writeDoubleNoTag(left);
2384      }
2385      if ((bitField0_ & 0x00000002) != 0) {
2386        output.writeRawByte((byte) 17);
2387        output.writeDoubleNoTag(right);
2388      }
2389    }
2390
2391    @Override
2392    protected int computeSerializedSize() {
2393      int size = 0;
2394      if ((bitField0_ & 0x00000001) != 0) {
2395        size += 9;
2396      }
2397      if ((bitField0_ & 0x00000002) != 0) {
2398        size += 9;
2399      }
2400      return size;
2401    }
2402
2403    @Override
2404    @SuppressWarnings("fallthrough")
2405    public ProtobufDifferentialDriveWheelVoltages mergeFrom(final ProtoSource input) throws
2406        IOException {
2407      // Enabled Fall-Through Optimization (QuickBuffers)
2408      int tag = input.readTag();
2409      while (true) {
2410        switch (tag) {
2411          case 9: {
2412            // left
2413            left = input.readDouble();
2414            bitField0_ |= 0x00000001;
2415            tag = input.readTag();
2416            if (tag != 17) {
2417              break;
2418            }
2419          }
2420          case 17: {
2421            // right
2422            right = input.readDouble();
2423            bitField0_ |= 0x00000002;
2424            tag = input.readTag();
2425            if (tag != 0) {
2426              break;
2427            }
2428          }
2429          case 0: {
2430            return this;
2431          }
2432          default: {
2433            if (!input.skipField(tag)) {
2434              return this;
2435            }
2436            tag = input.readTag();
2437            break;
2438          }
2439        }
2440      }
2441    }
2442
2443    @Override
2444    public void writeTo(final JsonSink output) throws IOException {
2445      output.beginObject();
2446      if ((bitField0_ & 0x00000001) != 0) {
2447        output.writeDouble(FieldNames.left, left);
2448      }
2449      if ((bitField0_ & 0x00000002) != 0) {
2450        output.writeDouble(FieldNames.right, right);
2451      }
2452      output.endObject();
2453    }
2454
2455    @Override
2456    public ProtobufDifferentialDriveWheelVoltages mergeFrom(final JsonSource input) throws
2457        IOException {
2458      if (!input.beginObject()) {
2459        return this;
2460      }
2461      while (!input.isAtEnd()) {
2462        switch (input.readFieldHash()) {
2463          case 3317767: {
2464            if (input.isAtField(FieldNames.left)) {
2465              if (!input.trySkipNullValue()) {
2466                left = input.readDouble();
2467                bitField0_ |= 0x00000001;
2468              }
2469            } else {
2470              input.skipUnknownField();
2471            }
2472            break;
2473          }
2474          case 108511772: {
2475            if (input.isAtField(FieldNames.right)) {
2476              if (!input.trySkipNullValue()) {
2477                right = input.readDouble();
2478                bitField0_ |= 0x00000002;
2479              }
2480            } else {
2481              input.skipUnknownField();
2482            }
2483            break;
2484          }
2485          default: {
2486            input.skipUnknownField();
2487            break;
2488          }
2489        }
2490      }
2491      input.endObject();
2492      return this;
2493    }
2494
2495    @Override
2496    public ProtobufDifferentialDriveWheelVoltages clone() {
2497      return new ProtobufDifferentialDriveWheelVoltages().copyFrom(this);
2498    }
2499
2500    @Override
2501    public boolean isEmpty() {
2502      return ((bitField0_) == 0);
2503    }
2504
2505    public static ProtobufDifferentialDriveWheelVoltages parseFrom(final byte[] data) throws
2506        InvalidProtocolBufferException {
2507      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelVoltages(), data).checkInitialized();
2508    }
2509
2510    public static ProtobufDifferentialDriveWheelVoltages parseFrom(final ProtoSource input) throws
2511        IOException {
2512      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelVoltages(), input).checkInitialized();
2513    }
2514
2515    public static ProtobufDifferentialDriveWheelVoltages parseFrom(final JsonSource input) throws
2516        IOException {
2517      return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelVoltages(), input).checkInitialized();
2518    }
2519
2520    /**
2521     * @return factory for creating ProtobufDifferentialDriveWheelVoltages messages
2522     */
2523    public static MessageFactory<ProtobufDifferentialDriveWheelVoltages> getFactory() {
2524      return ProtobufDifferentialDriveWheelVoltagesFactory.INSTANCE;
2525    }
2526
2527    /**
2528     * @return this type's descriptor.
2529     */
2530    public static Descriptors.Descriptor getDescriptor() {
2531      return Controller.wpi_proto_ProtobufDifferentialDriveWheelVoltages_descriptor;
2532    }
2533
2534    private enum ProtobufDifferentialDriveWheelVoltagesFactory implements MessageFactory<ProtobufDifferentialDriveWheelVoltages> {
2535      INSTANCE;
2536
2537      @Override
2538      public ProtobufDifferentialDriveWheelVoltages create() {
2539        return ProtobufDifferentialDriveWheelVoltages.newInstance();
2540      }
2541    }
2542
2543    /**
2544     * Contains name constants used for serializing JSON
2545     */
2546    static class FieldNames {
2547      static final FieldName left = FieldName.forField("left");
2548
2549      static final FieldName right = FieldName.forField("right");
2550    }
2551  }
2552}