001// Code generated by protocol buffer compiler. Do not edit!
002package org.photonvision.proto;
003
004import edu.wpi.first.math.proto.Geometry3D;
005import java.io.IOException;
006import us.hebi.quickbuf.Descriptors;
007import us.hebi.quickbuf.FieldName;
008import us.hebi.quickbuf.InvalidProtocolBufferException;
009import us.hebi.quickbuf.JsonSink;
010import us.hebi.quickbuf.JsonSource;
011import us.hebi.quickbuf.MessageFactory;
012import us.hebi.quickbuf.ProtoMessage;
013import us.hebi.quickbuf.ProtoSink;
014import us.hebi.quickbuf.ProtoSource;
015import us.hebi.quickbuf.ProtoUtil;
016import us.hebi.quickbuf.RepeatedByte;
017import us.hebi.quickbuf.RepeatedInt;
018import us.hebi.quickbuf.RepeatedMessage;
019
020public final class Photon {
021  private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(4171,
022    "CgxwaG90b24ucHJvdG8SEnBob3RvbnZpc2lvbi5wcm90bxoQZ2VvbWV0cnkzZC5wcm90byIyChRQcm90" + 
023    "b2J1ZlRhcmdldENvcm5lchIMCgF4GAEgASgBUgF4EgwKAXkYAiABKAFSAXkiigIKEVByb3RvYnVmUE5Q" + 
024    "UmVzdWx0EjIKBGJlc3QYAiABKAsyHi53cGkucHJvdG8uUHJvdG9idWZUcmFuc2Zvcm0zZFIEYmVzdBIm" + 
025    "Cg9iZXN0X3JlcHJval9lcnIYAyABKAFSDWJlc3RSZXByb2pFcnISNQoDYWx0GAQgASgLMh4ud3BpLnBy" + 
026    "b3RvLlByb3RvYnVmVHJhbnNmb3JtM2RIAFIDYWx0iAEBEikKDmFsdF9yZXByb2pfZXJyGAUgASgBSAFS" + 
027    "DGFsdFJlcHJvakVycogBARIcCglhbWJpZ3VpdHkYBiABKAFSCWFtYmlndWl0eUIGCgRfYWx0QhEKD19h" + 
028    "bHRfcmVwcm9qX2VyciKYAQocUHJvdG9idWZNdWx0aVRhcmdldFBOUFJlc3VsdBJMCg5lc3RpbWF0ZWRf" + 
029    "cG9zZRgBIAEoCzIlLnBob3RvbnZpc2lvbi5wcm90by5Qcm90b2J1ZlBOUFJlc3VsdFINZXN0aW1hdGVk" + 
030    "UG9zZRIqChFmaWR1Y2lhbF9pZHNfdXNlZBgCIAMoBVIPZmlkdWNpYWxJZHNVc2VkIuMEChtQcm90b2J1" + 
031    "ZlBob3RvblRyYWNrZWRUYXJnZXQSEAoDeWF3GAEgASgBUgN5YXcSFAoFcGl0Y2gYAiABKAFSBXBpdGNo" + 
032    "EhIKBGFyZWEYAyABKAFSBGFyZWESEgoEc2tldxgEIAEoAVIEc2tldxIfCgtmaWR1Y2lhbF9pZBgFIAEo" + 
033    "BVIKZmlkdWNpYWxJZBJRChViZXN0X2NhbWVyYV90b190YXJnZXQYBiABKAsyHi53cGkucHJvdG8uUHJv" + 
034    "dG9idWZUcmFuc2Zvcm0zZFISYmVzdENhbWVyYVRvVGFyZ2V0Ek8KFGFsdF9jYW1lcmFfdG9fdGFyZ2V0" + 
035    "GAcgASgLMh4ud3BpLnByb3RvLlByb3RvYnVmVHJhbnNmb3JtM2RSEWFsdENhbWVyYVRvVGFyZ2V0EiUK" + 
036    "DnBvc2VfYW1iaWd1aXR5GAggASgBUg1wb3NlQW1iaWd1aXR5ElsKFW1pbl9hcmVhX3JlY3RfY29ybmVy" + 
037    "cxgJIAMoCzIoLnBob3RvbnZpc2lvbi5wcm90by5Qcm90b2J1ZlRhcmdldENvcm5lclISbWluQXJlYVJl" + 
038    "Y3RDb3JuZXJzElMKEGRldGVjdGVkX2Nvcm5lcnMYCiADKAsyKC5waG90b252aXNpb24ucHJvdG8uUHJv" + 
039    "dG9idWZUYXJnZXRDb3JuZXJSD2RldGVjdGVkQ29ybmVycxIoChBvYmpfZGV0ZWN0aW9uX2lkGAsgASgF" + 
040    "Ug5vYmpEZXRlY3Rpb25JZBIsChJvYmpfZGV0ZWN0aW9uX2NvbmYYDCABKAJSEG9iakRldGVjdGlvbkNv" + 
041    "bmYi4wMKHFByb3RvYnVmUGhvdG9uUGlwZWxpbmVSZXN1bHQSIQoKbGF0ZW5jeV9tcxgBIAEoAUICGAFS",
042    "CWxhdGVuY3lNcxJJCgd0YXJnZXRzGAIgAygLMi8ucGhvdG9udmlzaW9uLnByb3RvLlByb3RvYnVmUGhv" + 
043    "dG9uVHJhY2tlZFRhcmdldFIHdGFyZ2V0cxJlChNtdWx0aV90YXJnZXRfcmVzdWx0GAMgASgLMjAucGhv" + 
044    "dG9udmlzaW9uLnByb3RvLlByb3RvYnVmTXVsdGlUYXJnZXRQTlBSZXN1bHRIAFIRbXVsdGlUYXJnZXRS" + 
045    "ZXN1bHSIAQESHwoLc2VxdWVuY2VfaWQYBCABKANSCnNlcXVlbmNlSWQSOAoYY2FwdHVyZV90aW1lc3Rh" + 
046    "bXBfbWljcm9zGAUgASgDUhZjYXB0dXJlVGltZXN0YW1wTWljcm9zEj0KG250X3B1Ymxpc2hfdGltZXN0" + 
047    "YW1wX21pY3JvcxgGIAEoA1IYbnRQdWJsaXNoVGltZXN0YW1wTWljcm9zEjwKG3RpbWVfc2luY2VfbGFz" + 
048    "dF9wb25nX21pY3JvcxgHIAEoA1IXdGltZVNpbmNlTGFzdFBvbmdNaWNyb3NCFgoUX211bHRpX3Rhcmdl" + 
049    "dF9yZXN1bHRCGAoWb3JnLnBob3RvbnZpc2lvbi5wcm90b0rKEwoGEgQRAEUBCpoFCgEMEgMRABIyjwUK" + 
050    "IENvcHlyaWdodCAoQykgUGhvdG9uIFZpc2lvbi4KCiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2Fy" + 
051    "ZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQogaXQgdW5kZXIgdGhlIHRlcm1z" + 
052    "IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKIHRoZSBGcmVl" + 
053    "IFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlIExpY2Vuc2UsIG9yCiAo" + 
054    "YXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgoKIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmli" + 
055    "dXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAogYnV0IFdJVEhPVVQgQU5ZIFdB" + 
056    "UlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKIE1FUkNIQU5UQUJJTElU" + 
057    "WSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUKIEdOVSBHZW5lcmFs" + 
058    "IFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuCgogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVk" + 
059    "IGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKIGFsb25nIHdpdGggdGhpcyBw" + 
060    "cm9ncmFtLiAgSWYgbm90LCBzZWUgPGh0dHBzOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvPi4KCggKAQIS" + 
061    "AxMAGwoJCgIDABIDFQAaCggKAQgSAxcALwoJCgIIARIDFwAvCgoKAgQAEgQZABwBCgoKAwQAARIDGQgc",
062    "CgsKBAQAAgASAxoCDwoMCgUEAAIABRIDGgIICgwKBQQAAgABEgMaCQoKDAoFBAACAAMSAxoNDgoLCgQE" + 
063    "AAIBEgMbAg8KDAoFBAACAQUSAxsCCAoMCgUEAAIBARIDGwkKCgwKBQQAAgEDEgMbDQ4KCgoCBAESBB4A" + 
064    "JAEKCgoDBAEBEgMeCBkKCwoEBAECABIDHwIpCgwKBQQBAgAGEgMfAh8KDAoFBAECAAESAx8gJAoMCgUE" + 
065    "AQIAAxIDHycoCgsKBAQBAgESAyACHQoMCgUEAQIBBRIDIAIICgwKBQQBAgEBEgMgCRgKDAoFBAECAQMS" + 
066    "AyAbHAoLCgQEAQICEgMhAjEKDAoFBAECAgQSAyECCgoMCgUEAQICBhIDIQsoCgwKBQQBAgIBEgMhKSwK" + 
067    "DAoFBAECAgMSAyEvMAoLCgQEAQIDEgMiAiUKDAoFBAECAwQSAyICCgoMCgUEAQIDBRIDIgsRCgwKBQQB" + 
068    "AgMBEgMiEiAKDAoFBAECAwMSAyIjJAoLCgQEAQIEEgMjAhcKDAoFBAECBAUSAyMCCAoMCgUEAQIEARID" + 
069    "IwkSCgwKBQQBAgQDEgMjFRYKCgoCBAISBCYAKQEKCgoDBAIBEgMmCCQKCwoEBAICABIDJwInCgwKBQQC" + 
070    "AgAGEgMnAhMKDAoFBAICAAESAycUIgoMCgUEAgIAAxIDJyUmCgsKBAQCAgESAygCJwoMCgUEAgIBBBID" + 
071    "KAIKCgwKBQQCAgEFEgMoCxAKDAoFBAICAQESAygRIgoMCgUEAgIBAxIDKCUmCgoKAgQDEgQrADkBCgoK" + 
072    "AwQDARIDKwgjCgsKBAQDAgASAywCEQoMCgUEAwIABRIDLAIICgwKBQQDAgABEgMsCQwKDAoFBAMCAAMS" + 
073    "AywPEAoLCgQEAwIBEgMtAhMKDAoFBAMCAQUSAy0CCAoMCgUEAwIBARIDLQkOCgwKBQQDAgEDEgMtERIK" + 
074    "CwoEBAMCAhIDLgISCgwKBQQDAgIFEgMuAggKDAoFBAMCAgESAy4JDQoMCgUEAwICAxIDLhARCgsKBAQD" + 
075    "AgMSAy8CEgoMCgUEAwIDBRIDLwIICgwKBQQDAgMBEgMvCQ0KDAoFBAMCAwMSAy8QEQoLCgQEAwIEEgMw" + 
076    "AhgKDAoFBAMCBAUSAzACBwoMCgUEAwIEARIDMAgTCgwKBQQDAgQDEgMwFhcKCwoEBAMCBRIDMQI6CgwK" + 
077    "BQQDAgUGEgMxAh8KDAoFBAMCBQESAzEgNQoMCgUEAwIFAxIDMTg5CgsKBAQDAgYSAzICOQoMCgUEAwIG" + 
078    "BhIDMgIfCgwKBQQDAgYBEgMyIDQKDAoFBAMCBgMSAzI3OAoLCgQEAwIHEgMzAhwKDAoFBAMCBwUSAzMC" + 
079    "CAoMCgUEAwIHARIDMwkXCgwKBQQDAgcDEgMzGhsKCwoEBAMCCBIDNAI6CgwKBQQDAggEEgM0AgoKDAoF" + 
080    "BAMCCAYSAzQLHwoMCgUEAwIIARIDNCA1CgwKBQQDAggDEgM0ODkKCwoEBAMCCRIDNQI2CgwKBQQDAgkE" + 
081    "EgM1AgoKDAoFBAMCCQYSAzULHwoMCgUEAwIJARIDNSAwCgwKBQQDAgkDEgM1MzUKCwoEBAMCChIDNwIe",
082    "CgwKBQQDAgoFEgM3AgcKDAoFBAMCCgESAzcIGAoMCgUEAwIKAxIDNxsdCgsKBAQDAgsSAzgCIAoMCgUE" + 
083    "AwILBRIDOAIHCgwKBQQDAgsBEgM4CBoKDAoFBAMCCwMSAzgdHwoKCgIEBBIEOwBFAQoKCgMEBAESAzsI" + 
084    "JAoLCgQEBAIAEgM8AiwKDAoFBAQCAAUSAzwCCAoMCgUEBAIAARIDPAkTCgwKBQQEAgADEgM8FhcKDAoF" + 
085    "BAQCAAgSAzwYKwoNCgYEBAIACAMSAzwZKgoLCgQEBAIBEgM+AjMKDAoFBAQCAQQSAz4CCgoMCgUEBAIB" + 
086    "BhIDPgsmCgwKBQQEAgEBEgM+Jy4KDAoFBAQCAQMSAz4xMgoLCgQEBAICEgM/AkAKDAoFBAQCAgQSAz8C" + 
087    "CgoMCgUEBAICBhIDPwsnCgwKBQQEAgIBEgM/KDsKDAoFBAQCAgMSAz8+PwoLCgQEBAIDEgNBAhgKDAoF" + 
088    "BAQCAwUSA0ECBwoMCgUEBAIDARIDQQgTCgwKBQQEAgMDEgNBFhcKCwoEBAQCBBIDQgIlCgwKBQQEAgQF" + 
089    "EgNCAgcKDAoFBAQCBAESA0IIIAoMCgUEBAIEAxIDQiMkCgsKBAQEAgUSA0MCKAoMCgUEBAIFBRIDQwIH" + 
090    "CgwKBQQEAgUBEgNDCCMKDAoFBAQCBQMSA0MmJwoLCgQEBAIGEgNEAigKDAoFBAQCBgUSA0QCBwoMCgUE" + 
091    "BAIGARIDRAgjCgwKBQQEAgYDEgNEJidiBnByb3RvMw==");
092
093  static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("photon.proto", "photonvision.proto", descriptorData, Geometry3D.getDescriptor());
094
095  static final Descriptors.Descriptor photonvision_proto_ProtobufTargetCorner_descriptor = descriptor.internalContainedType(54, 50, "ProtobufTargetCorner", "photonvision.proto.ProtobufTargetCorner");
096
097  static final Descriptors.Descriptor photonvision_proto_ProtobufPNPResult_descriptor = descriptor.internalContainedType(107, 266, "ProtobufPNPResult", "photonvision.proto.ProtobufPNPResult");
098
099  static final Descriptors.Descriptor photonvision_proto_ProtobufMultiTargetPNPResult_descriptor = descriptor.internalContainedType(376, 152, "ProtobufMultiTargetPNPResult", "photonvision.proto.ProtobufMultiTargetPNPResult");
100
101  static final Descriptors.Descriptor photonvision_proto_ProtobufPhotonTrackedTarget_descriptor = descriptor.internalContainedType(531, 611, "ProtobufPhotonTrackedTarget", "photonvision.proto.ProtobufPhotonTrackedTarget");
102
103  static final Descriptors.Descriptor photonvision_proto_ProtobufPhotonPipelineResult_descriptor = descriptor.internalContainedType(1145, 483, "ProtobufPhotonPipelineResult", "photonvision.proto.ProtobufPhotonPipelineResult");
104
105  /**
106   * @return this proto file's descriptor.
107   */
108  public static Descriptors.FileDescriptor getDescriptor() {
109    return descriptor;
110  }
111
112  /**
113   * Protobuf type {@code ProtobufTargetCorner}
114   */
115  public static final class ProtobufTargetCorner extends ProtoMessage<ProtobufTargetCorner> implements Cloneable {
116    private static final long serialVersionUID = 0L;
117
118    /**
119     * <code>optional double x = 1;</code>
120     */
121    private double x;
122
123    /**
124     * <code>optional double y = 2;</code>
125     */
126    private double y;
127
128    private ProtobufTargetCorner() {
129    }
130
131    /**
132     * @return a new empty instance of {@code ProtobufTargetCorner}
133     */
134    public static ProtobufTargetCorner newInstance() {
135      return new ProtobufTargetCorner();
136    }
137
138    /**
139     * <code>optional double x = 1;</code>
140     * @return whether the x field is set
141     */
142    public boolean hasX() {
143      return (bitField0_ & 0x00000001) != 0;
144    }
145
146    /**
147     * <code>optional double x = 1;</code>
148     * @return this
149     */
150    public ProtobufTargetCorner clearX() {
151      bitField0_ &= ~0x00000001;
152      x = 0D;
153      return this;
154    }
155
156    /**
157     * <code>optional double x = 1;</code>
158     * @return the x
159     */
160    public double getX() {
161      return x;
162    }
163
164    /**
165     * <code>optional double x = 1;</code>
166     * @param value the x to set
167     * @return this
168     */
169    public ProtobufTargetCorner setX(final double value) {
170      bitField0_ |= 0x00000001;
171      x = value;
172      return this;
173    }
174
175    /**
176     * <code>optional double y = 2;</code>
177     * @return whether the y field is set
178     */
179    public boolean hasY() {
180      return (bitField0_ & 0x00000002) != 0;
181    }
182
183    /**
184     * <code>optional double y = 2;</code>
185     * @return this
186     */
187    public ProtobufTargetCorner clearY() {
188      bitField0_ &= ~0x00000002;
189      y = 0D;
190      return this;
191    }
192
193    /**
194     * <code>optional double y = 2;</code>
195     * @return the y
196     */
197    public double getY() {
198      return y;
199    }
200
201    /**
202     * <code>optional double y = 2;</code>
203     * @param value the y to set
204     * @return this
205     */
206    public ProtobufTargetCorner setY(final double value) {
207      bitField0_ |= 0x00000002;
208      y = value;
209      return this;
210    }
211
212    @Override
213    public ProtobufTargetCorner copyFrom(final ProtobufTargetCorner other) {
214      cachedSize = other.cachedSize;
215      if ((bitField0_ | other.bitField0_) != 0) {
216        bitField0_ = other.bitField0_;
217        x = other.x;
218        y = other.y;
219      }
220      return this;
221    }
222
223    @Override
224    public ProtobufTargetCorner mergeFrom(final ProtobufTargetCorner other) {
225      if (other.isEmpty()) {
226        return this;
227      }
228      cachedSize = -1;
229      if (other.hasX()) {
230        setX(other.x);
231      }
232      if (other.hasY()) {
233        setY(other.y);
234      }
235      return this;
236    }
237
238    @Override
239    public ProtobufTargetCorner clear() {
240      if (isEmpty()) {
241        return this;
242      }
243      cachedSize = -1;
244      bitField0_ = 0;
245      x = 0D;
246      y = 0D;
247      return this;
248    }
249
250    @Override
251    public ProtobufTargetCorner clearQuick() {
252      if (isEmpty()) {
253        return this;
254      }
255      cachedSize = -1;
256      bitField0_ = 0;
257      return this;
258    }
259
260    @Override
261    public boolean equals(Object o) {
262      if (o == this) {
263        return true;
264      }
265      if (!(o instanceof ProtobufTargetCorner)) {
266        return false;
267      }
268      ProtobufTargetCorner other = (ProtobufTargetCorner) o;
269      return bitField0_ == other.bitField0_
270        && (!hasX() || ProtoUtil.isEqual(x, other.x))
271        && (!hasY() || ProtoUtil.isEqual(y, other.y));
272    }
273
274    @Override
275    public void writeTo(final ProtoSink output) throws IOException {
276      if ((bitField0_ & 0x00000001) != 0) {
277        output.writeRawByte((byte) 9);
278        output.writeDoubleNoTag(x);
279      }
280      if ((bitField0_ & 0x00000002) != 0) {
281        output.writeRawByte((byte) 17);
282        output.writeDoubleNoTag(y);
283      }
284    }
285
286    @Override
287    protected int computeSerializedSize() {
288      int size = 0;
289      if ((bitField0_ & 0x00000001) != 0) {
290        size += 9;
291      }
292      if ((bitField0_ & 0x00000002) != 0) {
293        size += 9;
294      }
295      return size;
296    }
297
298    @Override
299    @SuppressWarnings("fallthrough")
300    public ProtobufTargetCorner mergeFrom(final ProtoSource input) throws IOException {
301      // Enabled Fall-Through Optimization (QuickBuffers)
302      int tag = input.readTag();
303      while (true) {
304        switch (tag) {
305          case 9: {
306            // x
307            x = input.readDouble();
308            bitField0_ |= 0x00000001;
309            tag = input.readTag();
310            if (tag != 17) {
311              break;
312            }
313          }
314          case 17: {
315            // y
316            y = input.readDouble();
317            bitField0_ |= 0x00000002;
318            tag = input.readTag();
319            if (tag != 0) {
320              break;
321            }
322          }
323          case 0: {
324            return this;
325          }
326          default: {
327            if (!input.skipField(tag)) {
328              return this;
329            }
330            tag = input.readTag();
331            break;
332          }
333        }
334      }
335    }
336
337    @Override
338    public void writeTo(final JsonSink output) throws IOException {
339      output.beginObject();
340      if ((bitField0_ & 0x00000001) != 0) {
341        output.writeDouble(FieldNames.x, x);
342      }
343      if ((bitField0_ & 0x00000002) != 0) {
344        output.writeDouble(FieldNames.y, y);
345      }
346      output.endObject();
347    }
348
349    @Override
350    public ProtobufTargetCorner mergeFrom(final JsonSource input) throws IOException {
351      if (!input.beginObject()) {
352        return this;
353      }
354      while (!input.isAtEnd()) {
355        switch (input.readFieldHash()) {
356          case 120: {
357            if (input.isAtField(FieldNames.x)) {
358              if (!input.trySkipNullValue()) {
359                x = input.readDouble();
360                bitField0_ |= 0x00000001;
361              }
362            } else {
363              input.skipUnknownField();
364            }
365            break;
366          }
367          case 121: {
368            if (input.isAtField(FieldNames.y)) {
369              if (!input.trySkipNullValue()) {
370                y = input.readDouble();
371                bitField0_ |= 0x00000002;
372              }
373            } else {
374              input.skipUnknownField();
375            }
376            break;
377          }
378          default: {
379            input.skipUnknownField();
380            break;
381          }
382        }
383      }
384      input.endObject();
385      return this;
386    }
387
388    @Override
389    public ProtobufTargetCorner clone() {
390      return new ProtobufTargetCorner().copyFrom(this);
391    }
392
393    @Override
394    public boolean isEmpty() {
395      return ((bitField0_) == 0);
396    }
397
398    public static ProtobufTargetCorner parseFrom(final byte[] data) throws
399        InvalidProtocolBufferException {
400      return ProtoMessage.mergeFrom(new ProtobufTargetCorner(), data).checkInitialized();
401    }
402
403    public static ProtobufTargetCorner parseFrom(final ProtoSource input) throws IOException {
404      return ProtoMessage.mergeFrom(new ProtobufTargetCorner(), input).checkInitialized();
405    }
406
407    public static ProtobufTargetCorner parseFrom(final JsonSource input) throws IOException {
408      return ProtoMessage.mergeFrom(new ProtobufTargetCorner(), input).checkInitialized();
409    }
410
411    /**
412     * @return factory for creating ProtobufTargetCorner messages
413     */
414    public static MessageFactory<ProtobufTargetCorner> getFactory() {
415      return ProtobufTargetCornerFactory.INSTANCE;
416    }
417
418    /**
419     * @return this type's descriptor.
420     */
421    public static Descriptors.Descriptor getDescriptor() {
422      return Photon.photonvision_proto_ProtobufTargetCorner_descriptor;
423    }
424
425    private enum ProtobufTargetCornerFactory implements MessageFactory<ProtobufTargetCorner> {
426      INSTANCE;
427
428      @Override
429      public ProtobufTargetCorner create() {
430        return ProtobufTargetCorner.newInstance();
431      }
432    }
433
434    /**
435     * Contains name constants used for serializing JSON
436     */
437    static class FieldNames {
438      static final FieldName x = FieldName.forField("x");
439
440      static final FieldName y = FieldName.forField("y");
441    }
442  }
443
444  /**
445   * Protobuf type {@code ProtobufPNPResult}
446   */
447  public static final class ProtobufPNPResult extends ProtoMessage<ProtobufPNPResult> implements Cloneable {
448    private static final long serialVersionUID = 0L;
449
450    /**
451     * <code>optional double best_reproj_err = 3;</code>
452     */
453    private double bestReprojErr;
454
455    /**
456     * <code>optional double alt_reproj_err = 5;</code>
457     */
458    private double altReprojErr;
459
460    /**
461     * <code>optional double ambiguity = 6;</code>
462     */
463    private double ambiguity;
464
465    /**
466     * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code>
467     */
468    private final Geometry3D.ProtobufTransform3d best = Geometry3D.ProtobufTransform3d.newInstance();
469
470    /**
471     * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code>
472     */
473    private final Geometry3D.ProtobufTransform3d alt = Geometry3D.ProtobufTransform3d.newInstance();
474
475    private ProtobufPNPResult() {
476    }
477
478    /**
479     * @return a new empty instance of {@code ProtobufPNPResult}
480     */
481    public static ProtobufPNPResult newInstance() {
482      return new ProtobufPNPResult();
483    }
484
485    /**
486     * <code>optional double best_reproj_err = 3;</code>
487     * @return whether the bestReprojErr field is set
488     */
489    public boolean hasBestReprojErr() {
490      return (bitField0_ & 0x00000004) != 0;
491    }
492
493    /**
494     * <code>optional double best_reproj_err = 3;</code>
495     * @return this
496     */
497    public ProtobufPNPResult clearBestReprojErr() {
498      bitField0_ &= ~0x00000004;
499      bestReprojErr = 0D;
500      return this;
501    }
502
503    /**
504     * <code>optional double best_reproj_err = 3;</code>
505     * @return the bestReprojErr
506     */
507    public double getBestReprojErr() {
508      return bestReprojErr;
509    }
510
511    /**
512     * <code>optional double best_reproj_err = 3;</code>
513     * @param value the bestReprojErr to set
514     * @return this
515     */
516    public ProtobufPNPResult setBestReprojErr(final double value) {
517      bitField0_ |= 0x00000004;
518      bestReprojErr = value;
519      return this;
520    }
521
522    /**
523     * <code>optional double alt_reproj_err = 5;</code>
524     * @return whether the altReprojErr field is set
525     */
526    public boolean hasAltReprojErr() {
527      return (bitField0_ & 0x00000001) != 0;
528    }
529
530    /**
531     * <code>optional double alt_reproj_err = 5;</code>
532     * @return this
533     */
534    public ProtobufPNPResult clearAltReprojErr() {
535      bitField0_ &= ~0x00000001;
536      altReprojErr = 0D;
537      return this;
538    }
539
540    /**
541     * <code>optional double alt_reproj_err = 5;</code>
542     * @return the altReprojErr
543     */
544    public double getAltReprojErr() {
545      return altReprojErr;
546    }
547
548    /**
549     * <code>optional double alt_reproj_err = 5;</code>
550     * @param value the altReprojErr to set
551     * @return this
552     */
553    public ProtobufPNPResult setAltReprojErr(final double value) {
554      bitField0_ |= 0x00000001;
555      altReprojErr = value;
556      return this;
557    }
558
559    /**
560     * <code>optional double ambiguity = 6;</code>
561     * @return whether the ambiguity field is set
562     */
563    public boolean hasAmbiguity() {
564      return (bitField0_ & 0x00000008) != 0;
565    }
566
567    /**
568     * <code>optional double ambiguity = 6;</code>
569     * @return this
570     */
571    public ProtobufPNPResult clearAmbiguity() {
572      bitField0_ &= ~0x00000008;
573      ambiguity = 0D;
574      return this;
575    }
576
577    /**
578     * <code>optional double ambiguity = 6;</code>
579     * @return the ambiguity
580     */
581    public double getAmbiguity() {
582      return ambiguity;
583    }
584
585    /**
586     * <code>optional double ambiguity = 6;</code>
587     * @param value the ambiguity to set
588     * @return this
589     */
590    public ProtobufPNPResult setAmbiguity(final double value) {
591      bitField0_ |= 0x00000008;
592      ambiguity = value;
593      return this;
594    }
595
596    /**
597     * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code>
598     * @return whether the best field is set
599     */
600    public boolean hasBest() {
601      return (bitField0_ & 0x00000010) != 0;
602    }
603
604    /**
605     * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code>
606     * @return this
607     */
608    public ProtobufPNPResult clearBest() {
609      bitField0_ &= ~0x00000010;
610      best.clear();
611      return this;
612    }
613
614    /**
615     * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code>
616     *
617     * This method returns the internal storage object without modifying any has state.
618     * The returned object should not be modified and be treated as read-only.
619     *
620     * Use {@link #getMutableBest()} if you want to modify it.
621     *
622     * @return internal storage object for reading
623     */
624    public Geometry3D.ProtobufTransform3d getBest() {
625      return best;
626    }
627
628    /**
629     * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code>
630     *
631     * This method returns the internal storage object and sets the corresponding
632     * has state. The returned object will become part of this message and its
633     * contents may be modified as long as the has state is not cleared.
634     *
635     * @return internal storage object for modifications
636     */
637    public Geometry3D.ProtobufTransform3d getMutableBest() {
638      bitField0_ |= 0x00000010;
639      return best;
640    }
641
642    /**
643     * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code>
644     * @param value the best to set
645     * @return this
646     */
647    public ProtobufPNPResult setBest(final Geometry3D.ProtobufTransform3d value) {
648      bitField0_ |= 0x00000010;
649      best.copyFrom(value);
650      return this;
651    }
652
653    /**
654     * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code>
655     * @return whether the alt field is set
656     */
657    public boolean hasAlt() {
658      return (bitField0_ & 0x00000002) != 0;
659    }
660
661    /**
662     * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code>
663     * @return this
664     */
665    public ProtobufPNPResult clearAlt() {
666      bitField0_ &= ~0x00000002;
667      alt.clear();
668      return this;
669    }
670
671    /**
672     * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code>
673     *
674     * This method returns the internal storage object without modifying any has state.
675     * The returned object should not be modified and be treated as read-only.
676     *
677     * Use {@link #getMutableAlt()} if you want to modify it.
678     *
679     * @return internal storage object for reading
680     */
681    public Geometry3D.ProtobufTransform3d getAlt() {
682      return alt;
683    }
684
685    /**
686     * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code>
687     *
688     * This method returns the internal storage object and sets the corresponding
689     * has state. The returned object will become part of this message and its
690     * contents may be modified as long as the has state is not cleared.
691     *
692     * @return internal storage object for modifications
693     */
694    public Geometry3D.ProtobufTransform3d getMutableAlt() {
695      bitField0_ |= 0x00000002;
696      return alt;
697    }
698
699    /**
700     * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code>
701     * @param value the alt to set
702     * @return this
703     */
704    public ProtobufPNPResult setAlt(final Geometry3D.ProtobufTransform3d value) {
705      bitField0_ |= 0x00000002;
706      alt.copyFrom(value);
707      return this;
708    }
709
710    @Override
711    public ProtobufPNPResult copyFrom(final ProtobufPNPResult other) {
712      cachedSize = other.cachedSize;
713      if ((bitField0_ | other.bitField0_) != 0) {
714        bitField0_ = other.bitField0_;
715        bestReprojErr = other.bestReprojErr;
716        altReprojErr = other.altReprojErr;
717        ambiguity = other.ambiguity;
718        best.copyFrom(other.best);
719        alt.copyFrom(other.alt);
720      }
721      return this;
722    }
723
724    @Override
725    public ProtobufPNPResult mergeFrom(final ProtobufPNPResult other) {
726      if (other.isEmpty()) {
727        return this;
728      }
729      cachedSize = -1;
730      if (other.hasBestReprojErr()) {
731        setBestReprojErr(other.bestReprojErr);
732      }
733      if (other.hasAltReprojErr()) {
734        setAltReprojErr(other.altReprojErr);
735      }
736      if (other.hasAmbiguity()) {
737        setAmbiguity(other.ambiguity);
738      }
739      if (other.hasBest()) {
740        getMutableBest().mergeFrom(other.best);
741      }
742      if (other.hasAlt()) {
743        getMutableAlt().mergeFrom(other.alt);
744      }
745      return this;
746    }
747
748    @Override
749    public ProtobufPNPResult clear() {
750      if (isEmpty()) {
751        return this;
752      }
753      cachedSize = -1;
754      bitField0_ = 0;
755      bestReprojErr = 0D;
756      altReprojErr = 0D;
757      ambiguity = 0D;
758      best.clear();
759      alt.clear();
760      return this;
761    }
762
763    @Override
764    public ProtobufPNPResult clearQuick() {
765      if (isEmpty()) {
766        return this;
767      }
768      cachedSize = -1;
769      bitField0_ = 0;
770      best.clearQuick();
771      alt.clearQuick();
772      return this;
773    }
774
775    @Override
776    public boolean equals(Object o) {
777      if (o == this) {
778        return true;
779      }
780      if (!(o instanceof ProtobufPNPResult)) {
781        return false;
782      }
783      ProtobufPNPResult other = (ProtobufPNPResult) o;
784      return bitField0_ == other.bitField0_
785        && (!hasBestReprojErr() || ProtoUtil.isEqual(bestReprojErr, other.bestReprojErr))
786        && (!hasAltReprojErr() || ProtoUtil.isEqual(altReprojErr, other.altReprojErr))
787        && (!hasAmbiguity() || ProtoUtil.isEqual(ambiguity, other.ambiguity))
788        && (!hasBest() || best.equals(other.best))
789        && (!hasAlt() || alt.equals(other.alt));
790    }
791
792    @Override
793    public void writeTo(final ProtoSink output) throws IOException {
794      if ((bitField0_ & 0x00000004) != 0) {
795        output.writeRawByte((byte) 25);
796        output.writeDoubleNoTag(bestReprojErr);
797      }
798      if ((bitField0_ & 0x00000001) != 0) {
799        output.writeRawByte((byte) 41);
800        output.writeDoubleNoTag(altReprojErr);
801      }
802      if ((bitField0_ & 0x00000008) != 0) {
803        output.writeRawByte((byte) 49);
804        output.writeDoubleNoTag(ambiguity);
805      }
806      if ((bitField0_ & 0x00000010) != 0) {
807        output.writeRawByte((byte) 18);
808        output.writeMessageNoTag(best);
809      }
810      if ((bitField0_ & 0x00000002) != 0) {
811        output.writeRawByte((byte) 34);
812        output.writeMessageNoTag(alt);
813      }
814    }
815
816    @Override
817    protected int computeSerializedSize() {
818      int size = 0;
819      if ((bitField0_ & 0x00000004) != 0) {
820        size += 9;
821      }
822      if ((bitField0_ & 0x00000001) != 0) {
823        size += 9;
824      }
825      if ((bitField0_ & 0x00000008) != 0) {
826        size += 9;
827      }
828      if ((bitField0_ & 0x00000010) != 0) {
829        size += 1 + ProtoSink.computeMessageSizeNoTag(best);
830      }
831      if ((bitField0_ & 0x00000002) != 0) {
832        size += 1 + ProtoSink.computeMessageSizeNoTag(alt);
833      }
834      return size;
835    }
836
837    @Override
838    @SuppressWarnings("fallthrough")
839    public ProtobufPNPResult mergeFrom(final ProtoSource input) throws IOException {
840      // Enabled Fall-Through Optimization (QuickBuffers)
841      int tag = input.readTag();
842      while (true) {
843        switch (tag) {
844          case 25: {
845            // bestReprojErr
846            bestReprojErr = input.readDouble();
847            bitField0_ |= 0x00000004;
848            tag = input.readTag();
849            if (tag != 41) {
850              break;
851            }
852          }
853          case 41: {
854            // altReprojErr
855            altReprojErr = input.readDouble();
856            bitField0_ |= 0x00000001;
857            tag = input.readTag();
858            if (tag != 49) {
859              break;
860            }
861          }
862          case 49: {
863            // ambiguity
864            ambiguity = input.readDouble();
865            bitField0_ |= 0x00000008;
866            tag = input.readTag();
867            if (tag != 18) {
868              break;
869            }
870          }
871          case 18: {
872            // best
873            input.readMessage(best);
874            bitField0_ |= 0x00000010;
875            tag = input.readTag();
876            if (tag != 34) {
877              break;
878            }
879          }
880          case 34: {
881            // alt
882            input.readMessage(alt);
883            bitField0_ |= 0x00000002;
884            tag = input.readTag();
885            if (tag != 0) {
886              break;
887            }
888          }
889          case 0: {
890            return this;
891          }
892          default: {
893            if (!input.skipField(tag)) {
894              return this;
895            }
896            tag = input.readTag();
897            break;
898          }
899        }
900      }
901    }
902
903    @Override
904    public void writeTo(final JsonSink output) throws IOException {
905      output.beginObject();
906      if ((bitField0_ & 0x00000004) != 0) {
907        output.writeDouble(FieldNames.bestReprojErr, bestReprojErr);
908      }
909      if ((bitField0_ & 0x00000001) != 0) {
910        output.writeDouble(FieldNames.altReprojErr, altReprojErr);
911      }
912      if ((bitField0_ & 0x00000008) != 0) {
913        output.writeDouble(FieldNames.ambiguity, ambiguity);
914      }
915      if ((bitField0_ & 0x00000010) != 0) {
916        output.writeMessage(FieldNames.best, best);
917      }
918      if ((bitField0_ & 0x00000002) != 0) {
919        output.writeMessage(FieldNames.alt, alt);
920      }
921      output.endObject();
922    }
923
924    @Override
925    public ProtobufPNPResult mergeFrom(final JsonSource input) throws IOException {
926      if (!input.beginObject()) {
927        return this;
928      }
929      while (!input.isAtEnd()) {
930        switch (input.readFieldHash()) {
931          case 1385456049:
932          case 1893923313: {
933            if (input.isAtField(FieldNames.bestReprojErr)) {
934              if (!input.trySkipNullValue()) {
935                bestReprojErr = input.readDouble();
936                bitField0_ |= 0x00000004;
937              }
938            } else {
939              input.skipUnknownField();
940            }
941            break;
942          }
943          case -748393588:
944          case -36177652: {
945            if (input.isAtField(FieldNames.altReprojErr)) {
946              if (!input.trySkipNullValue()) {
947                altReprojErr = input.readDouble();
948                bitField0_ |= 0x00000001;
949              }
950            } else {
951              input.skipUnknownField();
952            }
953            break;
954          }
955          case 1644162925: {
956            if (input.isAtField(FieldNames.ambiguity)) {
957              if (!input.trySkipNullValue()) {
958                ambiguity = input.readDouble();
959                bitField0_ |= 0x00000008;
960              }
961            } else {
962              input.skipUnknownField();
963            }
964            break;
965          }
966          case 3020260: {
967            if (input.isAtField(FieldNames.best)) {
968              if (!input.trySkipNullValue()) {
969                input.readMessage(best);
970                bitField0_ |= 0x00000010;
971              }
972            } else {
973              input.skipUnknownField();
974            }
975            break;
976          }
977          case 96681: {
978            if (input.isAtField(FieldNames.alt)) {
979              if (!input.trySkipNullValue()) {
980                input.readMessage(alt);
981                bitField0_ |= 0x00000002;
982              }
983            } else {
984              input.skipUnknownField();
985            }
986            break;
987          }
988          default: {
989            input.skipUnknownField();
990            break;
991          }
992        }
993      }
994      input.endObject();
995      return this;
996    }
997
998    @Override
999    public ProtobufPNPResult clone() {
1000      return new ProtobufPNPResult().copyFrom(this);
1001    }
1002
1003    @Override
1004    public boolean isEmpty() {
1005      return ((bitField0_) == 0);
1006    }
1007
1008    public static ProtobufPNPResult parseFrom(final byte[] data) throws
1009        InvalidProtocolBufferException {
1010      return ProtoMessage.mergeFrom(new ProtobufPNPResult(), data).checkInitialized();
1011    }
1012
1013    public static ProtobufPNPResult parseFrom(final ProtoSource input) throws IOException {
1014      return ProtoMessage.mergeFrom(new ProtobufPNPResult(), input).checkInitialized();
1015    }
1016
1017    public static ProtobufPNPResult parseFrom(final JsonSource input) throws IOException {
1018      return ProtoMessage.mergeFrom(new ProtobufPNPResult(), input).checkInitialized();
1019    }
1020
1021    /**
1022     * @return factory for creating ProtobufPNPResult messages
1023     */
1024    public static MessageFactory<ProtobufPNPResult> getFactory() {
1025      return ProtobufPNPResultFactory.INSTANCE;
1026    }
1027
1028    /**
1029     * @return this type's descriptor.
1030     */
1031    public static Descriptors.Descriptor getDescriptor() {
1032      return Photon.photonvision_proto_ProtobufPNPResult_descriptor;
1033    }
1034
1035    private enum ProtobufPNPResultFactory implements MessageFactory<ProtobufPNPResult> {
1036      INSTANCE;
1037
1038      @Override
1039      public ProtobufPNPResult create() {
1040        return ProtobufPNPResult.newInstance();
1041      }
1042    }
1043
1044    /**
1045     * Contains name constants used for serializing JSON
1046     */
1047    static class FieldNames {
1048      static final FieldName bestReprojErr = FieldName.forField("bestReprojErr", "best_reproj_err");
1049
1050      static final FieldName altReprojErr = FieldName.forField("altReprojErr", "alt_reproj_err");
1051
1052      static final FieldName ambiguity = FieldName.forField("ambiguity");
1053
1054      static final FieldName best = FieldName.forField("best");
1055
1056      static final FieldName alt = FieldName.forField("alt");
1057    }
1058  }
1059
1060  /**
1061   * Protobuf type {@code ProtobufMultiTargetPNPResult}
1062   */
1063  public static final class ProtobufMultiTargetPNPResult extends ProtoMessage<ProtobufMultiTargetPNPResult> implements Cloneable {
1064    private static final long serialVersionUID = 0L;
1065
1066    /**
1067     * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code>
1068     */
1069    private final ProtobufPNPResult estimatedPose = ProtobufPNPResult.newInstance();
1070
1071    /**
1072     * <code>repeated int32 fiducial_ids_used = 2;</code>
1073     */
1074    private final RepeatedInt fiducialIdsUsed = RepeatedInt.newEmptyInstance();
1075
1076    private ProtobufMultiTargetPNPResult() {
1077    }
1078
1079    /**
1080     * @return a new empty instance of {@code ProtobufMultiTargetPNPResult}
1081     */
1082    public static ProtobufMultiTargetPNPResult newInstance() {
1083      return new ProtobufMultiTargetPNPResult();
1084    }
1085
1086    /**
1087     * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code>
1088     * @return whether the estimatedPose field is set
1089     */
1090    public boolean hasEstimatedPose() {
1091      return (bitField0_ & 0x00000001) != 0;
1092    }
1093
1094    /**
1095     * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code>
1096     * @return this
1097     */
1098    public ProtobufMultiTargetPNPResult clearEstimatedPose() {
1099      bitField0_ &= ~0x00000001;
1100      estimatedPose.clear();
1101      return this;
1102    }
1103
1104    /**
1105     * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code>
1106     *
1107     * This method returns the internal storage object without modifying any has state.
1108     * The returned object should not be modified and be treated as read-only.
1109     *
1110     * Use {@link #getMutableEstimatedPose()} if you want to modify it.
1111     *
1112     * @return internal storage object for reading
1113     */
1114    public ProtobufPNPResult getEstimatedPose() {
1115      return estimatedPose;
1116    }
1117
1118    /**
1119     * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code>
1120     *
1121     * This method returns the internal storage object and sets the corresponding
1122     * has state. The returned object will become part of this message and its
1123     * contents may be modified as long as the has state is not cleared.
1124     *
1125     * @return internal storage object for modifications
1126     */
1127    public ProtobufPNPResult getMutableEstimatedPose() {
1128      bitField0_ |= 0x00000001;
1129      return estimatedPose;
1130    }
1131
1132    /**
1133     * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code>
1134     * @param value the estimatedPose to set
1135     * @return this
1136     */
1137    public ProtobufMultiTargetPNPResult setEstimatedPose(final ProtobufPNPResult value) {
1138      bitField0_ |= 0x00000001;
1139      estimatedPose.copyFrom(value);
1140      return this;
1141    }
1142
1143    /**
1144     * <code>repeated int32 fiducial_ids_used = 2;</code>
1145     * @return whether the fiducialIdsUsed field is set
1146     */
1147    public boolean hasFiducialIdsUsed() {
1148      return (bitField0_ & 0x00000002) != 0;
1149    }
1150
1151    /**
1152     * <code>repeated int32 fiducial_ids_used = 2;</code>
1153     * @return this
1154     */
1155    public ProtobufMultiTargetPNPResult clearFiducialIdsUsed() {
1156      bitField0_ &= ~0x00000002;
1157      fiducialIdsUsed.clear();
1158      return this;
1159    }
1160
1161    /**
1162     * <code>repeated int32 fiducial_ids_used = 2;</code>
1163     *
1164     * This method returns the internal storage object without modifying any has state.
1165     * The returned object should not be modified and be treated as read-only.
1166     *
1167     * Use {@link #getMutableFiducialIdsUsed()} if you want to modify it.
1168     *
1169     * @return internal storage object for reading
1170     */
1171    public RepeatedInt getFiducialIdsUsed() {
1172      return fiducialIdsUsed;
1173    }
1174
1175    /**
1176     * <code>repeated int32 fiducial_ids_used = 2;</code>
1177     *
1178     * This method returns the internal storage object and sets the corresponding
1179     * has state. The returned object will become part of this message and its
1180     * contents may be modified as long as the has state is not cleared.
1181     *
1182     * @return internal storage object for modifications
1183     */
1184    public RepeatedInt getMutableFiducialIdsUsed() {
1185      bitField0_ |= 0x00000002;
1186      return fiducialIdsUsed;
1187    }
1188
1189    /**
1190     * <code>repeated int32 fiducial_ids_used = 2;</code>
1191     * @param value the fiducialIdsUsed to add
1192     * @return this
1193     */
1194    public ProtobufMultiTargetPNPResult addFiducialIdsUsed(final int value) {
1195      bitField0_ |= 0x00000002;
1196      fiducialIdsUsed.add(value);
1197      return this;
1198    }
1199
1200    /**
1201     * <code>repeated int32 fiducial_ids_used = 2;</code>
1202     * @param values the fiducialIdsUsed to add
1203     * @return this
1204     */
1205    public ProtobufMultiTargetPNPResult addAllFiducialIdsUsed(final int... values) {
1206      bitField0_ |= 0x00000002;
1207      fiducialIdsUsed.addAll(values);
1208      return this;
1209    }
1210
1211    @Override
1212    public ProtobufMultiTargetPNPResult copyFrom(final ProtobufMultiTargetPNPResult other) {
1213      cachedSize = other.cachedSize;
1214      if ((bitField0_ | other.bitField0_) != 0) {
1215        bitField0_ = other.bitField0_;
1216        estimatedPose.copyFrom(other.estimatedPose);
1217        fiducialIdsUsed.copyFrom(other.fiducialIdsUsed);
1218      }
1219      return this;
1220    }
1221
1222    @Override
1223    public ProtobufMultiTargetPNPResult mergeFrom(final ProtobufMultiTargetPNPResult other) {
1224      if (other.isEmpty()) {
1225        return this;
1226      }
1227      cachedSize = -1;
1228      if (other.hasEstimatedPose()) {
1229        getMutableEstimatedPose().mergeFrom(other.estimatedPose);
1230      }
1231      if (other.hasFiducialIdsUsed()) {
1232        getMutableFiducialIdsUsed().addAll(other.fiducialIdsUsed);
1233      }
1234      return this;
1235    }
1236
1237    @Override
1238    public ProtobufMultiTargetPNPResult clear() {
1239      if (isEmpty()) {
1240        return this;
1241      }
1242      cachedSize = -1;
1243      bitField0_ = 0;
1244      estimatedPose.clear();
1245      fiducialIdsUsed.clear();
1246      return this;
1247    }
1248
1249    @Override
1250    public ProtobufMultiTargetPNPResult clearQuick() {
1251      if (isEmpty()) {
1252        return this;
1253      }
1254      cachedSize = -1;
1255      bitField0_ = 0;
1256      estimatedPose.clearQuick();
1257      fiducialIdsUsed.clear();
1258      return this;
1259    }
1260
1261    @Override
1262    public boolean equals(Object o) {
1263      if (o == this) {
1264        return true;
1265      }
1266      if (!(o instanceof ProtobufMultiTargetPNPResult)) {
1267        return false;
1268      }
1269      ProtobufMultiTargetPNPResult other = (ProtobufMultiTargetPNPResult) o;
1270      return bitField0_ == other.bitField0_
1271        && (!hasEstimatedPose() || estimatedPose.equals(other.estimatedPose))
1272        && (!hasFiducialIdsUsed() || fiducialIdsUsed.equals(other.fiducialIdsUsed));
1273    }
1274
1275    @Override
1276    public void writeTo(final ProtoSink output) throws IOException {
1277      if ((bitField0_ & 0x00000001) != 0) {
1278        output.writeRawByte((byte) 10);
1279        output.writeMessageNoTag(estimatedPose);
1280      }
1281      if ((bitField0_ & 0x00000002) != 0) {
1282        for (int i = 0; i < fiducialIdsUsed.length(); i++) {
1283          output.writeRawByte((byte) 16);
1284          output.writeInt32NoTag(fiducialIdsUsed.array()[i]);
1285        }
1286      }
1287    }
1288
1289    @Override
1290    protected int computeSerializedSize() {
1291      int size = 0;
1292      if ((bitField0_ & 0x00000001) != 0) {
1293        size += 1 + ProtoSink.computeMessageSizeNoTag(estimatedPose);
1294      }
1295      if ((bitField0_ & 0x00000002) != 0) {
1296        size += (1 * fiducialIdsUsed.length()) + ProtoSink.computeRepeatedInt32SizeNoTag(fiducialIdsUsed);
1297      }
1298      return size;
1299    }
1300
1301    @Override
1302    @SuppressWarnings("fallthrough")
1303    public ProtobufMultiTargetPNPResult mergeFrom(final ProtoSource input) throws IOException {
1304      // Enabled Fall-Through Optimization (QuickBuffers)
1305      int tag = input.readTag();
1306      while (true) {
1307        switch (tag) {
1308          case 10: {
1309            // estimatedPose
1310            input.readMessage(estimatedPose);
1311            bitField0_ |= 0x00000001;
1312            tag = input.readTag();
1313            if (tag != 18) {
1314              break;
1315            }
1316          }
1317          case 18: {
1318            // fiducialIdsUsed [packed=true]
1319            input.readPackedInt32(fiducialIdsUsed, tag);
1320            bitField0_ |= 0x00000002;
1321            tag = input.readTag();
1322            if (tag != 0) {
1323              break;
1324            }
1325          }
1326          case 0: {
1327            return this;
1328          }
1329          default: {
1330            if (!input.skipField(tag)) {
1331              return this;
1332            }
1333            tag = input.readTag();
1334            break;
1335          }
1336          case 16: {
1337            // fiducialIdsUsed [packed=false]
1338            tag = input.readRepeatedInt32(fiducialIdsUsed, tag);
1339            bitField0_ |= 0x00000002;
1340            break;
1341          }
1342        }
1343      }
1344    }
1345
1346    @Override
1347    public void writeTo(final JsonSink output) throws IOException {
1348      output.beginObject();
1349      if ((bitField0_ & 0x00000001) != 0) {
1350        output.writeMessage(FieldNames.estimatedPose, estimatedPose);
1351      }
1352      if ((bitField0_ & 0x00000002) != 0) {
1353        output.writeRepeatedInt32(FieldNames.fiducialIdsUsed, fiducialIdsUsed);
1354      }
1355      output.endObject();
1356    }
1357
1358    @Override
1359    public ProtobufMultiTargetPNPResult mergeFrom(final JsonSource input) throws IOException {
1360      if (!input.beginObject()) {
1361        return this;
1362      }
1363      while (!input.isAtEnd()) {
1364        switch (input.readFieldHash()) {
1365          case 1611140845:
1366          case -1580362060: {
1367            if (input.isAtField(FieldNames.estimatedPose)) {
1368              if (!input.trySkipNullValue()) {
1369                input.readMessage(estimatedPose);
1370                bitField0_ |= 0x00000001;
1371              }
1372            } else {
1373              input.skipUnknownField();
1374            }
1375            break;
1376          }
1377          case -1358357200:
1378          case -283141570: {
1379            if (input.isAtField(FieldNames.fiducialIdsUsed)) {
1380              if (!input.trySkipNullValue()) {
1381                input.readRepeatedInt32(fiducialIdsUsed);
1382                bitField0_ |= 0x00000002;
1383              }
1384            } else {
1385              input.skipUnknownField();
1386            }
1387            break;
1388          }
1389          default: {
1390            input.skipUnknownField();
1391            break;
1392          }
1393        }
1394      }
1395      input.endObject();
1396      return this;
1397    }
1398
1399    @Override
1400    public ProtobufMultiTargetPNPResult clone() {
1401      return new ProtobufMultiTargetPNPResult().copyFrom(this);
1402    }
1403
1404    @Override
1405    public boolean isEmpty() {
1406      return ((bitField0_) == 0);
1407    }
1408
1409    public static ProtobufMultiTargetPNPResult parseFrom(final byte[] data) throws
1410        InvalidProtocolBufferException {
1411      return ProtoMessage.mergeFrom(new ProtobufMultiTargetPNPResult(), data).checkInitialized();
1412    }
1413
1414    public static ProtobufMultiTargetPNPResult parseFrom(final ProtoSource input) throws
1415        IOException {
1416      return ProtoMessage.mergeFrom(new ProtobufMultiTargetPNPResult(), input).checkInitialized();
1417    }
1418
1419    public static ProtobufMultiTargetPNPResult parseFrom(final JsonSource input) throws
1420        IOException {
1421      return ProtoMessage.mergeFrom(new ProtobufMultiTargetPNPResult(), input).checkInitialized();
1422    }
1423
1424    /**
1425     * @return factory for creating ProtobufMultiTargetPNPResult messages
1426     */
1427    public static MessageFactory<ProtobufMultiTargetPNPResult> getFactory() {
1428      return ProtobufMultiTargetPNPResultFactory.INSTANCE;
1429    }
1430
1431    /**
1432     * @return this type's descriptor.
1433     */
1434    public static Descriptors.Descriptor getDescriptor() {
1435      return Photon.photonvision_proto_ProtobufMultiTargetPNPResult_descriptor;
1436    }
1437
1438    private enum ProtobufMultiTargetPNPResultFactory implements MessageFactory<ProtobufMultiTargetPNPResult> {
1439      INSTANCE;
1440
1441      @Override
1442      public ProtobufMultiTargetPNPResult create() {
1443        return ProtobufMultiTargetPNPResult.newInstance();
1444      }
1445    }
1446
1447    /**
1448     * Contains name constants used for serializing JSON
1449     */
1450    static class FieldNames {
1451      static final FieldName estimatedPose = FieldName.forField("estimatedPose", "estimated_pose");
1452
1453      static final FieldName fiducialIdsUsed = FieldName.forField("fiducialIdsUsed", "fiducial_ids_used");
1454    }
1455  }
1456
1457  /**
1458   * Protobuf type {@code ProtobufPhotonTrackedTarget}
1459   */
1460  public static final class ProtobufPhotonTrackedTarget extends ProtoMessage<ProtobufPhotonTrackedTarget> implements Cloneable {
1461    private static final long serialVersionUID = 0L;
1462
1463    /**
1464     * <code>optional double yaw = 1;</code>
1465     */
1466    private double yaw;
1467
1468    /**
1469     * <code>optional double pitch = 2;</code>
1470     */
1471    private double pitch;
1472
1473    /**
1474     * <code>optional double area = 3;</code>
1475     */
1476    private double area;
1477
1478    /**
1479     * <code>optional double skew = 4;</code>
1480     */
1481    private double skew;
1482
1483    /**
1484     * <code>optional double pose_ambiguity = 8;</code>
1485     */
1486    private double poseAmbiguity;
1487
1488    /**
1489     * <code>optional float obj_detection_conf = 12;</code>
1490     */
1491    private float objDetectionConf;
1492
1493    /**
1494     * <code>optional int32 fiducial_id = 5;</code>
1495     */
1496    private int fiducialId;
1497
1498    /**
1499     * <code>optional int32 obj_detection_id = 11;</code>
1500     */
1501    private int objDetectionId;
1502
1503    /**
1504     * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code>
1505     */
1506    private final Geometry3D.ProtobufTransform3d bestCameraToTarget = Geometry3D.ProtobufTransform3d.newInstance();
1507
1508    /**
1509     * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code>
1510     */
1511    private final Geometry3D.ProtobufTransform3d altCameraToTarget = Geometry3D.ProtobufTransform3d.newInstance();
1512
1513    /**
1514     * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code>
1515     */
1516    private final RepeatedMessage<ProtobufTargetCorner> minAreaRectCorners = RepeatedMessage.newEmptyInstance(ProtobufTargetCorner.getFactory());
1517
1518    /**
1519     * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code>
1520     */
1521    private final RepeatedMessage<ProtobufTargetCorner> detectedCorners = RepeatedMessage.newEmptyInstance(ProtobufTargetCorner.getFactory());
1522
1523    private ProtobufPhotonTrackedTarget() {
1524    }
1525
1526    /**
1527     * @return a new empty instance of {@code ProtobufPhotonTrackedTarget}
1528     */
1529    public static ProtobufPhotonTrackedTarget newInstance() {
1530      return new ProtobufPhotonTrackedTarget();
1531    }
1532
1533    /**
1534     * <code>optional double yaw = 1;</code>
1535     * @return whether the yaw field is set
1536     */
1537    public boolean hasYaw() {
1538      return (bitField0_ & 0x00000001) != 0;
1539    }
1540
1541    /**
1542     * <code>optional double yaw = 1;</code>
1543     * @return this
1544     */
1545    public ProtobufPhotonTrackedTarget clearYaw() {
1546      bitField0_ &= ~0x00000001;
1547      yaw = 0D;
1548      return this;
1549    }
1550
1551    /**
1552     * <code>optional double yaw = 1;</code>
1553     * @return the yaw
1554     */
1555    public double getYaw() {
1556      return yaw;
1557    }
1558
1559    /**
1560     * <code>optional double yaw = 1;</code>
1561     * @param value the yaw to set
1562     * @return this
1563     */
1564    public ProtobufPhotonTrackedTarget setYaw(final double value) {
1565      bitField0_ |= 0x00000001;
1566      yaw = value;
1567      return this;
1568    }
1569
1570    /**
1571     * <code>optional double pitch = 2;</code>
1572     * @return whether the pitch field is set
1573     */
1574    public boolean hasPitch() {
1575      return (bitField0_ & 0x00000002) != 0;
1576    }
1577
1578    /**
1579     * <code>optional double pitch = 2;</code>
1580     * @return this
1581     */
1582    public ProtobufPhotonTrackedTarget clearPitch() {
1583      bitField0_ &= ~0x00000002;
1584      pitch = 0D;
1585      return this;
1586    }
1587
1588    /**
1589     * <code>optional double pitch = 2;</code>
1590     * @return the pitch
1591     */
1592    public double getPitch() {
1593      return pitch;
1594    }
1595
1596    /**
1597     * <code>optional double pitch = 2;</code>
1598     * @param value the pitch to set
1599     * @return this
1600     */
1601    public ProtobufPhotonTrackedTarget setPitch(final double value) {
1602      bitField0_ |= 0x00000002;
1603      pitch = value;
1604      return this;
1605    }
1606
1607    /**
1608     * <code>optional double area = 3;</code>
1609     * @return whether the area field is set
1610     */
1611    public boolean hasArea() {
1612      return (bitField0_ & 0x00000004) != 0;
1613    }
1614
1615    /**
1616     * <code>optional double area = 3;</code>
1617     * @return this
1618     */
1619    public ProtobufPhotonTrackedTarget clearArea() {
1620      bitField0_ &= ~0x00000004;
1621      area = 0D;
1622      return this;
1623    }
1624
1625    /**
1626     * <code>optional double area = 3;</code>
1627     * @return the area
1628     */
1629    public double getArea() {
1630      return area;
1631    }
1632
1633    /**
1634     * <code>optional double area = 3;</code>
1635     * @param value the area to set
1636     * @return this
1637     */
1638    public ProtobufPhotonTrackedTarget setArea(final double value) {
1639      bitField0_ |= 0x00000004;
1640      area = value;
1641      return this;
1642    }
1643
1644    /**
1645     * <code>optional double skew = 4;</code>
1646     * @return whether the skew field is set
1647     */
1648    public boolean hasSkew() {
1649      return (bitField0_ & 0x00000008) != 0;
1650    }
1651
1652    /**
1653     * <code>optional double skew = 4;</code>
1654     * @return this
1655     */
1656    public ProtobufPhotonTrackedTarget clearSkew() {
1657      bitField0_ &= ~0x00000008;
1658      skew = 0D;
1659      return this;
1660    }
1661
1662    /**
1663     * <code>optional double skew = 4;</code>
1664     * @return the skew
1665     */
1666    public double getSkew() {
1667      return skew;
1668    }
1669
1670    /**
1671     * <code>optional double skew = 4;</code>
1672     * @param value the skew to set
1673     * @return this
1674     */
1675    public ProtobufPhotonTrackedTarget setSkew(final double value) {
1676      bitField0_ |= 0x00000008;
1677      skew = value;
1678      return this;
1679    }
1680
1681    /**
1682     * <code>optional double pose_ambiguity = 8;</code>
1683     * @return whether the poseAmbiguity field is set
1684     */
1685    public boolean hasPoseAmbiguity() {
1686      return (bitField0_ & 0x00000010) != 0;
1687    }
1688
1689    /**
1690     * <code>optional double pose_ambiguity = 8;</code>
1691     * @return this
1692     */
1693    public ProtobufPhotonTrackedTarget clearPoseAmbiguity() {
1694      bitField0_ &= ~0x00000010;
1695      poseAmbiguity = 0D;
1696      return this;
1697    }
1698
1699    /**
1700     * <code>optional double pose_ambiguity = 8;</code>
1701     * @return the poseAmbiguity
1702     */
1703    public double getPoseAmbiguity() {
1704      return poseAmbiguity;
1705    }
1706
1707    /**
1708     * <code>optional double pose_ambiguity = 8;</code>
1709     * @param value the poseAmbiguity to set
1710     * @return this
1711     */
1712    public ProtobufPhotonTrackedTarget setPoseAmbiguity(final double value) {
1713      bitField0_ |= 0x00000010;
1714      poseAmbiguity = value;
1715      return this;
1716    }
1717
1718    /**
1719     * <code>optional float obj_detection_conf = 12;</code>
1720     * @return whether the objDetectionConf field is set
1721     */
1722    public boolean hasObjDetectionConf() {
1723      return (bitField0_ & 0x00000020) != 0;
1724    }
1725
1726    /**
1727     * <code>optional float obj_detection_conf = 12;</code>
1728     * @return this
1729     */
1730    public ProtobufPhotonTrackedTarget clearObjDetectionConf() {
1731      bitField0_ &= ~0x00000020;
1732      objDetectionConf = 0F;
1733      return this;
1734    }
1735
1736    /**
1737     * <code>optional float obj_detection_conf = 12;</code>
1738     * @return the objDetectionConf
1739     */
1740    public float getObjDetectionConf() {
1741      return objDetectionConf;
1742    }
1743
1744    /**
1745     * <code>optional float obj_detection_conf = 12;</code>
1746     * @param value the objDetectionConf to set
1747     * @return this
1748     */
1749    public ProtobufPhotonTrackedTarget setObjDetectionConf(final float value) {
1750      bitField0_ |= 0x00000020;
1751      objDetectionConf = value;
1752      return this;
1753    }
1754
1755    /**
1756     * <code>optional int32 fiducial_id = 5;</code>
1757     * @return whether the fiducialId field is set
1758     */
1759    public boolean hasFiducialId() {
1760      return (bitField0_ & 0x00000040) != 0;
1761    }
1762
1763    /**
1764     * <code>optional int32 fiducial_id = 5;</code>
1765     * @return this
1766     */
1767    public ProtobufPhotonTrackedTarget clearFiducialId() {
1768      bitField0_ &= ~0x00000040;
1769      fiducialId = 0;
1770      return this;
1771    }
1772
1773    /**
1774     * <code>optional int32 fiducial_id = 5;</code>
1775     * @return the fiducialId
1776     */
1777    public int getFiducialId() {
1778      return fiducialId;
1779    }
1780
1781    /**
1782     * <code>optional int32 fiducial_id = 5;</code>
1783     * @param value the fiducialId to set
1784     * @return this
1785     */
1786    public ProtobufPhotonTrackedTarget setFiducialId(final int value) {
1787      bitField0_ |= 0x00000040;
1788      fiducialId = value;
1789      return this;
1790    }
1791
1792    /**
1793     * <code>optional int32 obj_detection_id = 11;</code>
1794     * @return whether the objDetectionId field is set
1795     */
1796    public boolean hasObjDetectionId() {
1797      return (bitField0_ & 0x00000080) != 0;
1798    }
1799
1800    /**
1801     * <code>optional int32 obj_detection_id = 11;</code>
1802     * @return this
1803     */
1804    public ProtobufPhotonTrackedTarget clearObjDetectionId() {
1805      bitField0_ &= ~0x00000080;
1806      objDetectionId = 0;
1807      return this;
1808    }
1809
1810    /**
1811     * <code>optional int32 obj_detection_id = 11;</code>
1812     * @return the objDetectionId
1813     */
1814    public int getObjDetectionId() {
1815      return objDetectionId;
1816    }
1817
1818    /**
1819     * <code>optional int32 obj_detection_id = 11;</code>
1820     * @param value the objDetectionId to set
1821     * @return this
1822     */
1823    public ProtobufPhotonTrackedTarget setObjDetectionId(final int value) {
1824      bitField0_ |= 0x00000080;
1825      objDetectionId = value;
1826      return this;
1827    }
1828
1829    /**
1830     * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code>
1831     * @return whether the bestCameraToTarget field is set
1832     */
1833    public boolean hasBestCameraToTarget() {
1834      return (bitField0_ & 0x00000100) != 0;
1835    }
1836
1837    /**
1838     * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code>
1839     * @return this
1840     */
1841    public ProtobufPhotonTrackedTarget clearBestCameraToTarget() {
1842      bitField0_ &= ~0x00000100;
1843      bestCameraToTarget.clear();
1844      return this;
1845    }
1846
1847    /**
1848     * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code>
1849     *
1850     * This method returns the internal storage object without modifying any has state.
1851     * The returned object should not be modified and be treated as read-only.
1852     *
1853     * Use {@link #getMutableBestCameraToTarget()} if you want to modify it.
1854     *
1855     * @return internal storage object for reading
1856     */
1857    public Geometry3D.ProtobufTransform3d getBestCameraToTarget() {
1858      return bestCameraToTarget;
1859    }
1860
1861    /**
1862     * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code>
1863     *
1864     * This method returns the internal storage object and sets the corresponding
1865     * has state. The returned object will become part of this message and its
1866     * contents may be modified as long as the has state is not cleared.
1867     *
1868     * @return internal storage object for modifications
1869     */
1870    public Geometry3D.ProtobufTransform3d getMutableBestCameraToTarget() {
1871      bitField0_ |= 0x00000100;
1872      return bestCameraToTarget;
1873    }
1874
1875    /**
1876     * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code>
1877     * @param value the bestCameraToTarget to set
1878     * @return this
1879     */
1880    public ProtobufPhotonTrackedTarget setBestCameraToTarget(
1881        final Geometry3D.ProtobufTransform3d value) {
1882      bitField0_ |= 0x00000100;
1883      bestCameraToTarget.copyFrom(value);
1884      return this;
1885    }
1886
1887    /**
1888     * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code>
1889     * @return whether the altCameraToTarget field is set
1890     */
1891    public boolean hasAltCameraToTarget() {
1892      return (bitField0_ & 0x00000200) != 0;
1893    }
1894
1895    /**
1896     * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code>
1897     * @return this
1898     */
1899    public ProtobufPhotonTrackedTarget clearAltCameraToTarget() {
1900      bitField0_ &= ~0x00000200;
1901      altCameraToTarget.clear();
1902      return this;
1903    }
1904
1905    /**
1906     * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code>
1907     *
1908     * This method returns the internal storage object without modifying any has state.
1909     * The returned object should not be modified and be treated as read-only.
1910     *
1911     * Use {@link #getMutableAltCameraToTarget()} if you want to modify it.
1912     *
1913     * @return internal storage object for reading
1914     */
1915    public Geometry3D.ProtobufTransform3d getAltCameraToTarget() {
1916      return altCameraToTarget;
1917    }
1918
1919    /**
1920     * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code>
1921     *
1922     * This method returns the internal storage object and sets the corresponding
1923     * has state. The returned object will become part of this message and its
1924     * contents may be modified as long as the has state is not cleared.
1925     *
1926     * @return internal storage object for modifications
1927     */
1928    public Geometry3D.ProtobufTransform3d getMutableAltCameraToTarget() {
1929      bitField0_ |= 0x00000200;
1930      return altCameraToTarget;
1931    }
1932
1933    /**
1934     * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code>
1935     * @param value the altCameraToTarget to set
1936     * @return this
1937     */
1938    public ProtobufPhotonTrackedTarget setAltCameraToTarget(
1939        final Geometry3D.ProtobufTransform3d value) {
1940      bitField0_ |= 0x00000200;
1941      altCameraToTarget.copyFrom(value);
1942      return this;
1943    }
1944
1945    /**
1946     * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code>
1947     * @return whether the minAreaRectCorners field is set
1948     */
1949    public boolean hasMinAreaRectCorners() {
1950      return (bitField0_ & 0x00000400) != 0;
1951    }
1952
1953    /**
1954     * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code>
1955     * @return this
1956     */
1957    public ProtobufPhotonTrackedTarget clearMinAreaRectCorners() {
1958      bitField0_ &= ~0x00000400;
1959      minAreaRectCorners.clear();
1960      return this;
1961    }
1962
1963    /**
1964     * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code>
1965     *
1966     * This method returns the internal storage object without modifying any has state.
1967     * The returned object should not be modified and be treated as read-only.
1968     *
1969     * Use {@link #getMutableMinAreaRectCorners()} if you want to modify it.
1970     *
1971     * @return internal storage object for reading
1972     */
1973    public RepeatedMessage<ProtobufTargetCorner> getMinAreaRectCorners() {
1974      return minAreaRectCorners;
1975    }
1976
1977    /**
1978     * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code>
1979     *
1980     * This method returns the internal storage object and sets the corresponding
1981     * has state. The returned object will become part of this message and its
1982     * contents may be modified as long as the has state is not cleared.
1983     *
1984     * @return internal storage object for modifications
1985     */
1986    public RepeatedMessage<ProtobufTargetCorner> getMutableMinAreaRectCorners() {
1987      bitField0_ |= 0x00000400;
1988      return minAreaRectCorners;
1989    }
1990
1991    /**
1992     * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code>
1993     * @param value the minAreaRectCorners to add
1994     * @return this
1995     */
1996    public ProtobufPhotonTrackedTarget addMinAreaRectCorners(final ProtobufTargetCorner value) {
1997      bitField0_ |= 0x00000400;
1998      minAreaRectCorners.add(value);
1999      return this;
2000    }
2001
2002    /**
2003     * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code>
2004     * @param values the minAreaRectCorners to add
2005     * @return this
2006     */
2007    public ProtobufPhotonTrackedTarget addAllMinAreaRectCorners(
2008        final ProtobufTargetCorner... values) {
2009      bitField0_ |= 0x00000400;
2010      minAreaRectCorners.addAll(values);
2011      return this;
2012    }
2013
2014    /**
2015     * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code>
2016     * @return whether the detectedCorners field is set
2017     */
2018    public boolean hasDetectedCorners() {
2019      return (bitField0_ & 0x00000800) != 0;
2020    }
2021
2022    /**
2023     * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code>
2024     * @return this
2025     */
2026    public ProtobufPhotonTrackedTarget clearDetectedCorners() {
2027      bitField0_ &= ~0x00000800;
2028      detectedCorners.clear();
2029      return this;
2030    }
2031
2032    /**
2033     * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code>
2034     *
2035     * This method returns the internal storage object without modifying any has state.
2036     * The returned object should not be modified and be treated as read-only.
2037     *
2038     * Use {@link #getMutableDetectedCorners()} if you want to modify it.
2039     *
2040     * @return internal storage object for reading
2041     */
2042    public RepeatedMessage<ProtobufTargetCorner> getDetectedCorners() {
2043      return detectedCorners;
2044    }
2045
2046    /**
2047     * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code>
2048     *
2049     * This method returns the internal storage object and sets the corresponding
2050     * has state. The returned object will become part of this message and its
2051     * contents may be modified as long as the has state is not cleared.
2052     *
2053     * @return internal storage object for modifications
2054     */
2055    public RepeatedMessage<ProtobufTargetCorner> getMutableDetectedCorners() {
2056      bitField0_ |= 0x00000800;
2057      return detectedCorners;
2058    }
2059
2060    /**
2061     * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code>
2062     * @param value the detectedCorners to add
2063     * @return this
2064     */
2065    public ProtobufPhotonTrackedTarget addDetectedCorners(final ProtobufTargetCorner value) {
2066      bitField0_ |= 0x00000800;
2067      detectedCorners.add(value);
2068      return this;
2069    }
2070
2071    /**
2072     * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code>
2073     * @param values the detectedCorners to add
2074     * @return this
2075     */
2076    public ProtobufPhotonTrackedTarget addAllDetectedCorners(final ProtobufTargetCorner... values) {
2077      bitField0_ |= 0x00000800;
2078      detectedCorners.addAll(values);
2079      return this;
2080    }
2081
2082    @Override
2083    public ProtobufPhotonTrackedTarget copyFrom(final ProtobufPhotonTrackedTarget other) {
2084      cachedSize = other.cachedSize;
2085      if ((bitField0_ | other.bitField0_) != 0) {
2086        bitField0_ = other.bitField0_;
2087        yaw = other.yaw;
2088        pitch = other.pitch;
2089        area = other.area;
2090        skew = other.skew;
2091        poseAmbiguity = other.poseAmbiguity;
2092        objDetectionConf = other.objDetectionConf;
2093        fiducialId = other.fiducialId;
2094        objDetectionId = other.objDetectionId;
2095        bestCameraToTarget.copyFrom(other.bestCameraToTarget);
2096        altCameraToTarget.copyFrom(other.altCameraToTarget);
2097        minAreaRectCorners.copyFrom(other.minAreaRectCorners);
2098        detectedCorners.copyFrom(other.detectedCorners);
2099      }
2100      return this;
2101    }
2102
2103    @Override
2104    public ProtobufPhotonTrackedTarget mergeFrom(final ProtobufPhotonTrackedTarget other) {
2105      if (other.isEmpty()) {
2106        return this;
2107      }
2108      cachedSize = -1;
2109      if (other.hasYaw()) {
2110        setYaw(other.yaw);
2111      }
2112      if (other.hasPitch()) {
2113        setPitch(other.pitch);
2114      }
2115      if (other.hasArea()) {
2116        setArea(other.area);
2117      }
2118      if (other.hasSkew()) {
2119        setSkew(other.skew);
2120      }
2121      if (other.hasPoseAmbiguity()) {
2122        setPoseAmbiguity(other.poseAmbiguity);
2123      }
2124      if (other.hasObjDetectionConf()) {
2125        setObjDetectionConf(other.objDetectionConf);
2126      }
2127      if (other.hasFiducialId()) {
2128        setFiducialId(other.fiducialId);
2129      }
2130      if (other.hasObjDetectionId()) {
2131        setObjDetectionId(other.objDetectionId);
2132      }
2133      if (other.hasBestCameraToTarget()) {
2134        getMutableBestCameraToTarget().mergeFrom(other.bestCameraToTarget);
2135      }
2136      if (other.hasAltCameraToTarget()) {
2137        getMutableAltCameraToTarget().mergeFrom(other.altCameraToTarget);
2138      }
2139      if (other.hasMinAreaRectCorners()) {
2140        getMutableMinAreaRectCorners().addAll(other.minAreaRectCorners);
2141      }
2142      if (other.hasDetectedCorners()) {
2143        getMutableDetectedCorners().addAll(other.detectedCorners);
2144      }
2145      return this;
2146    }
2147
2148    @Override
2149    public ProtobufPhotonTrackedTarget clear() {
2150      if (isEmpty()) {
2151        return this;
2152      }
2153      cachedSize = -1;
2154      bitField0_ = 0;
2155      yaw = 0D;
2156      pitch = 0D;
2157      area = 0D;
2158      skew = 0D;
2159      poseAmbiguity = 0D;
2160      objDetectionConf = 0F;
2161      fiducialId = 0;
2162      objDetectionId = 0;
2163      bestCameraToTarget.clear();
2164      altCameraToTarget.clear();
2165      minAreaRectCorners.clear();
2166      detectedCorners.clear();
2167      return this;
2168    }
2169
2170    @Override
2171    public ProtobufPhotonTrackedTarget clearQuick() {
2172      if (isEmpty()) {
2173        return this;
2174      }
2175      cachedSize = -1;
2176      bitField0_ = 0;
2177      bestCameraToTarget.clearQuick();
2178      altCameraToTarget.clearQuick();
2179      minAreaRectCorners.clearQuick();
2180      detectedCorners.clearQuick();
2181      return this;
2182    }
2183
2184    @Override
2185    public boolean equals(Object o) {
2186      if (o == this) {
2187        return true;
2188      }
2189      if (!(o instanceof ProtobufPhotonTrackedTarget)) {
2190        return false;
2191      }
2192      ProtobufPhotonTrackedTarget other = (ProtobufPhotonTrackedTarget) o;
2193      return bitField0_ == other.bitField0_
2194        && (!hasYaw() || ProtoUtil.isEqual(yaw, other.yaw))
2195        && (!hasPitch() || ProtoUtil.isEqual(pitch, other.pitch))
2196        && (!hasArea() || ProtoUtil.isEqual(area, other.area))
2197        && (!hasSkew() || ProtoUtil.isEqual(skew, other.skew))
2198        && (!hasPoseAmbiguity() || ProtoUtil.isEqual(poseAmbiguity, other.poseAmbiguity))
2199        && (!hasObjDetectionConf() || ProtoUtil.isEqual(objDetectionConf, other.objDetectionConf))
2200        && (!hasFiducialId() || fiducialId == other.fiducialId)
2201        && (!hasObjDetectionId() || objDetectionId == other.objDetectionId)
2202        && (!hasBestCameraToTarget() || bestCameraToTarget.equals(other.bestCameraToTarget))
2203        && (!hasAltCameraToTarget() || altCameraToTarget.equals(other.altCameraToTarget))
2204        && (!hasMinAreaRectCorners() || minAreaRectCorners.equals(other.minAreaRectCorners))
2205        && (!hasDetectedCorners() || detectedCorners.equals(other.detectedCorners));
2206    }
2207
2208    @Override
2209    public void writeTo(final ProtoSink output) throws IOException {
2210      if ((bitField0_ & 0x00000001) != 0) {
2211        output.writeRawByte((byte) 9);
2212        output.writeDoubleNoTag(yaw);
2213      }
2214      if ((bitField0_ & 0x00000002) != 0) {
2215        output.writeRawByte((byte) 17);
2216        output.writeDoubleNoTag(pitch);
2217      }
2218      if ((bitField0_ & 0x00000004) != 0) {
2219        output.writeRawByte((byte) 25);
2220        output.writeDoubleNoTag(area);
2221      }
2222      if ((bitField0_ & 0x00000008) != 0) {
2223        output.writeRawByte((byte) 33);
2224        output.writeDoubleNoTag(skew);
2225      }
2226      if ((bitField0_ & 0x00000010) != 0) {
2227        output.writeRawByte((byte) 65);
2228        output.writeDoubleNoTag(poseAmbiguity);
2229      }
2230      if ((bitField0_ & 0x00000020) != 0) {
2231        output.writeRawByte((byte) 101);
2232        output.writeFloatNoTag(objDetectionConf);
2233      }
2234      if ((bitField0_ & 0x00000040) != 0) {
2235        output.writeRawByte((byte) 40);
2236        output.writeInt32NoTag(fiducialId);
2237      }
2238      if ((bitField0_ & 0x00000080) != 0) {
2239        output.writeRawByte((byte) 88);
2240        output.writeInt32NoTag(objDetectionId);
2241      }
2242      if ((bitField0_ & 0x00000100) != 0) {
2243        output.writeRawByte((byte) 50);
2244        output.writeMessageNoTag(bestCameraToTarget);
2245      }
2246      if ((bitField0_ & 0x00000200) != 0) {
2247        output.writeRawByte((byte) 58);
2248        output.writeMessageNoTag(altCameraToTarget);
2249      }
2250      if ((bitField0_ & 0x00000400) != 0) {
2251        for (int i = 0; i < minAreaRectCorners.length(); i++) {
2252          output.writeRawByte((byte) 74);
2253          output.writeMessageNoTag(minAreaRectCorners.get(i));
2254        }
2255      }
2256      if ((bitField0_ & 0x00000800) != 0) {
2257        for (int i = 0; i < detectedCorners.length(); i++) {
2258          output.writeRawByte((byte) 82);
2259          output.writeMessageNoTag(detectedCorners.get(i));
2260        }
2261      }
2262    }
2263
2264    @Override
2265    protected int computeSerializedSize() {
2266      int size = 0;
2267      if ((bitField0_ & 0x00000001) != 0) {
2268        size += 9;
2269      }
2270      if ((bitField0_ & 0x00000002) != 0) {
2271        size += 9;
2272      }
2273      if ((bitField0_ & 0x00000004) != 0) {
2274        size += 9;
2275      }
2276      if ((bitField0_ & 0x00000008) != 0) {
2277        size += 9;
2278      }
2279      if ((bitField0_ & 0x00000010) != 0) {
2280        size += 9;
2281      }
2282      if ((bitField0_ & 0x00000020) != 0) {
2283        size += 5;
2284      }
2285      if ((bitField0_ & 0x00000040) != 0) {
2286        size += 1 + ProtoSink.computeInt32SizeNoTag(fiducialId);
2287      }
2288      if ((bitField0_ & 0x00000080) != 0) {
2289        size += 1 + ProtoSink.computeInt32SizeNoTag(objDetectionId);
2290      }
2291      if ((bitField0_ & 0x00000100) != 0) {
2292        size += 1 + ProtoSink.computeMessageSizeNoTag(bestCameraToTarget);
2293      }
2294      if ((bitField0_ & 0x00000200) != 0) {
2295        size += 1 + ProtoSink.computeMessageSizeNoTag(altCameraToTarget);
2296      }
2297      if ((bitField0_ & 0x00000400) != 0) {
2298        size += (1 * minAreaRectCorners.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(minAreaRectCorners);
2299      }
2300      if ((bitField0_ & 0x00000800) != 0) {
2301        size += (1 * detectedCorners.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(detectedCorners);
2302      }
2303      return size;
2304    }
2305
2306    @Override
2307    @SuppressWarnings("fallthrough")
2308    public ProtobufPhotonTrackedTarget mergeFrom(final ProtoSource input) throws IOException {
2309      // Enabled Fall-Through Optimization (QuickBuffers)
2310      int tag = input.readTag();
2311      while (true) {
2312        switch (tag) {
2313          case 9: {
2314            // yaw
2315            yaw = input.readDouble();
2316            bitField0_ |= 0x00000001;
2317            tag = input.readTag();
2318            if (tag != 17) {
2319              break;
2320            }
2321          }
2322          case 17: {
2323            // pitch
2324            pitch = input.readDouble();
2325            bitField0_ |= 0x00000002;
2326            tag = input.readTag();
2327            if (tag != 25) {
2328              break;
2329            }
2330          }
2331          case 25: {
2332            // area
2333            area = input.readDouble();
2334            bitField0_ |= 0x00000004;
2335            tag = input.readTag();
2336            if (tag != 33) {
2337              break;
2338            }
2339          }
2340          case 33: {
2341            // skew
2342            skew = input.readDouble();
2343            bitField0_ |= 0x00000008;
2344            tag = input.readTag();
2345            if (tag != 65) {
2346              break;
2347            }
2348          }
2349          case 65: {
2350            // poseAmbiguity
2351            poseAmbiguity = input.readDouble();
2352            bitField0_ |= 0x00000010;
2353            tag = input.readTag();
2354            if (tag != 101) {
2355              break;
2356            }
2357          }
2358          case 101: {
2359            // objDetectionConf
2360            objDetectionConf = input.readFloat();
2361            bitField0_ |= 0x00000020;
2362            tag = input.readTag();
2363            if (tag != 40) {
2364              break;
2365            }
2366          }
2367          case 40: {
2368            // fiducialId
2369            fiducialId = input.readInt32();
2370            bitField0_ |= 0x00000040;
2371            tag = input.readTag();
2372            if (tag != 88) {
2373              break;
2374            }
2375          }
2376          case 88: {
2377            // objDetectionId
2378            objDetectionId = input.readInt32();
2379            bitField0_ |= 0x00000080;
2380            tag = input.readTag();
2381            if (tag != 50) {
2382              break;
2383            }
2384          }
2385          case 50: {
2386            // bestCameraToTarget
2387            input.readMessage(bestCameraToTarget);
2388            bitField0_ |= 0x00000100;
2389            tag = input.readTag();
2390            if (tag != 58) {
2391              break;
2392            }
2393          }
2394          case 58: {
2395            // altCameraToTarget
2396            input.readMessage(altCameraToTarget);
2397            bitField0_ |= 0x00000200;
2398            tag = input.readTag();
2399            if (tag != 74) {
2400              break;
2401            }
2402          }
2403          case 74: {
2404            // minAreaRectCorners
2405            tag = input.readRepeatedMessage(minAreaRectCorners, tag);
2406            bitField0_ |= 0x00000400;
2407            if (tag != 82) {
2408              break;
2409            }
2410          }
2411          case 82: {
2412            // detectedCorners
2413            tag = input.readRepeatedMessage(detectedCorners, tag);
2414            bitField0_ |= 0x00000800;
2415            if (tag != 0) {
2416              break;
2417            }
2418          }
2419          case 0: {
2420            return this;
2421          }
2422          default: {
2423            if (!input.skipField(tag)) {
2424              return this;
2425            }
2426            tag = input.readTag();
2427            break;
2428          }
2429        }
2430      }
2431    }
2432
2433    @Override
2434    public void writeTo(final JsonSink output) throws IOException {
2435      output.beginObject();
2436      if ((bitField0_ & 0x00000001) != 0) {
2437        output.writeDouble(FieldNames.yaw, yaw);
2438      }
2439      if ((bitField0_ & 0x00000002) != 0) {
2440        output.writeDouble(FieldNames.pitch, pitch);
2441      }
2442      if ((bitField0_ & 0x00000004) != 0) {
2443        output.writeDouble(FieldNames.area, area);
2444      }
2445      if ((bitField0_ & 0x00000008) != 0) {
2446        output.writeDouble(FieldNames.skew, skew);
2447      }
2448      if ((bitField0_ & 0x00000010) != 0) {
2449        output.writeDouble(FieldNames.poseAmbiguity, poseAmbiguity);
2450      }
2451      if ((bitField0_ & 0x00000020) != 0) {
2452        output.writeFloat(FieldNames.objDetectionConf, objDetectionConf);
2453      }
2454      if ((bitField0_ & 0x00000040) != 0) {
2455        output.writeInt32(FieldNames.fiducialId, fiducialId);
2456      }
2457      if ((bitField0_ & 0x00000080) != 0) {
2458        output.writeInt32(FieldNames.objDetectionId, objDetectionId);
2459      }
2460      if ((bitField0_ & 0x00000100) != 0) {
2461        output.writeMessage(FieldNames.bestCameraToTarget, bestCameraToTarget);
2462      }
2463      if ((bitField0_ & 0x00000200) != 0) {
2464        output.writeMessage(FieldNames.altCameraToTarget, altCameraToTarget);
2465      }
2466      if ((bitField0_ & 0x00000400) != 0) {
2467        output.writeRepeatedMessage(FieldNames.minAreaRectCorners, minAreaRectCorners);
2468      }
2469      if ((bitField0_ & 0x00000800) != 0) {
2470        output.writeRepeatedMessage(FieldNames.detectedCorners, detectedCorners);
2471      }
2472      output.endObject();
2473    }
2474
2475    @Override
2476    public ProtobufPhotonTrackedTarget mergeFrom(final JsonSource input) throws IOException {
2477      if (!input.beginObject()) {
2478        return this;
2479      }
2480      while (!input.isAtEnd()) {
2481        switch (input.readFieldHash()) {
2482          case 119407: {
2483            if (input.isAtField(FieldNames.yaw)) {
2484              if (!input.trySkipNullValue()) {
2485                yaw = input.readDouble();
2486                bitField0_ |= 0x00000001;
2487              }
2488            } else {
2489              input.skipUnknownField();
2490            }
2491            break;
2492          }
2493          case 106677056: {
2494            if (input.isAtField(FieldNames.pitch)) {
2495              if (!input.trySkipNullValue()) {
2496                pitch = input.readDouble();
2497                bitField0_ |= 0x00000002;
2498              }
2499            } else {
2500              input.skipUnknownField();
2501            }
2502            break;
2503          }
2504          case 3002509: {
2505            if (input.isAtField(FieldNames.area)) {
2506              if (!input.trySkipNullValue()) {
2507                area = input.readDouble();
2508                bitField0_ |= 0x00000004;
2509              }
2510            } else {
2511              input.skipUnknownField();
2512            }
2513            break;
2514          }
2515          case 3532042: {
2516            if (input.isAtField(FieldNames.skew)) {
2517              if (!input.trySkipNullValue()) {
2518                skew = input.readDouble();
2519                bitField0_ |= 0x00000008;
2520              }
2521            } else {
2522              input.skipUnknownField();
2523            }
2524            break;
2525          }
2526          case -863925796:
2527          case 2015412543: {
2528            if (input.isAtField(FieldNames.poseAmbiguity)) {
2529              if (!input.trySkipNullValue()) {
2530                poseAmbiguity = input.readDouble();
2531                bitField0_ |= 0x00000010;
2532              }
2533            } else {
2534              input.skipUnknownField();
2535            }
2536            break;
2537          }
2538          case -719868014:
2539          case 1574878438: {
2540            if (input.isAtField(FieldNames.objDetectionConf)) {
2541              if (!input.trySkipNullValue()) {
2542                objDetectionConf = input.readFloat();
2543                bitField0_ |= 0x00000020;
2544              }
2545            } else {
2546              input.skipUnknownField();
2547            }
2548            break;
2549          }
2550          case -1788324448:
2551          case 396538357: {
2552            if (input.isAtField(FieldNames.fiducialId)) {
2553              if (!input.trySkipNullValue()) {
2554                fiducialId = input.readInt32();
2555                bitField0_ |= 0x00000040;
2556              }
2557            } else {
2558              input.skipUnknownField();
2559            }
2560            break;
2561          }
2562          case -966110967:
2563          case 175940445: {
2564            if (input.isAtField(FieldNames.objDetectionId)) {
2565              if (!input.trySkipNullValue()) {
2566                objDetectionId = input.readInt32();
2567                bitField0_ |= 0x00000080;
2568              }
2569            } else {
2570              input.skipUnknownField();
2571            }
2572            break;
2573          }
2574          case 832264501:
2575          case 1280922678: {
2576            if (input.isAtField(FieldNames.bestCameraToTarget)) {
2577              if (!input.trySkipNullValue()) {
2578                input.readMessage(bestCameraToTarget);
2579                bitField0_ |= 0x00000100;
2580              }
2581            } else {
2582              input.skipUnknownField();
2583            }
2584            break;
2585          }
2586          case -2078392262:
2587          case 1000035089: {
2588            if (input.isAtField(FieldNames.altCameraToTarget)) {
2589              if (!input.trySkipNullValue()) {
2590                input.readMessage(altCameraToTarget);
2591                bitField0_ |= 0x00000200;
2592              }
2593            } else {
2594              input.skipUnknownField();
2595            }
2596            break;
2597          }
2598          case 886128315:
2599          case -694043864: {
2600            if (input.isAtField(FieldNames.minAreaRectCorners)) {
2601              if (!input.trySkipNullValue()) {
2602                input.readRepeatedMessage(minAreaRectCorners);
2603                bitField0_ |= 0x00000400;
2604              }
2605            } else {
2606              input.skipUnknownField();
2607            }
2608            break;
2609          }
2610          case 1199465436:
2611          case -2059275263: {
2612            if (input.isAtField(FieldNames.detectedCorners)) {
2613              if (!input.trySkipNullValue()) {
2614                input.readRepeatedMessage(detectedCorners);
2615                bitField0_ |= 0x00000800;
2616              }
2617            } else {
2618              input.skipUnknownField();
2619            }
2620            break;
2621          }
2622          default: {
2623            input.skipUnknownField();
2624            break;
2625          }
2626        }
2627      }
2628      input.endObject();
2629      return this;
2630    }
2631
2632    @Override
2633    public ProtobufPhotonTrackedTarget clone() {
2634      return new ProtobufPhotonTrackedTarget().copyFrom(this);
2635    }
2636
2637    @Override
2638    public boolean isEmpty() {
2639      return ((bitField0_) == 0);
2640    }
2641
2642    public static ProtobufPhotonTrackedTarget parseFrom(final byte[] data) throws
2643        InvalidProtocolBufferException {
2644      return ProtoMessage.mergeFrom(new ProtobufPhotonTrackedTarget(), data).checkInitialized();
2645    }
2646
2647    public static ProtobufPhotonTrackedTarget parseFrom(final ProtoSource input) throws
2648        IOException {
2649      return ProtoMessage.mergeFrom(new ProtobufPhotonTrackedTarget(), input).checkInitialized();
2650    }
2651
2652    public static ProtobufPhotonTrackedTarget parseFrom(final JsonSource input) throws IOException {
2653      return ProtoMessage.mergeFrom(new ProtobufPhotonTrackedTarget(), input).checkInitialized();
2654    }
2655
2656    /**
2657     * @return factory for creating ProtobufPhotonTrackedTarget messages
2658     */
2659    public static MessageFactory<ProtobufPhotonTrackedTarget> getFactory() {
2660      return ProtobufPhotonTrackedTargetFactory.INSTANCE;
2661    }
2662
2663    /**
2664     * @return this type's descriptor.
2665     */
2666    public static Descriptors.Descriptor getDescriptor() {
2667      return Photon.photonvision_proto_ProtobufPhotonTrackedTarget_descriptor;
2668    }
2669
2670    private enum ProtobufPhotonTrackedTargetFactory implements MessageFactory<ProtobufPhotonTrackedTarget> {
2671      INSTANCE;
2672
2673      @Override
2674      public ProtobufPhotonTrackedTarget create() {
2675        return ProtobufPhotonTrackedTarget.newInstance();
2676      }
2677    }
2678
2679    /**
2680     * Contains name constants used for serializing JSON
2681     */
2682    static class FieldNames {
2683      static final FieldName yaw = FieldName.forField("yaw");
2684
2685      static final FieldName pitch = FieldName.forField("pitch");
2686
2687      static final FieldName area = FieldName.forField("area");
2688
2689      static final FieldName skew = FieldName.forField("skew");
2690
2691      static final FieldName poseAmbiguity = FieldName.forField("poseAmbiguity", "pose_ambiguity");
2692
2693      static final FieldName objDetectionConf = FieldName.forField("objDetectionConf", "obj_detection_conf");
2694
2695      static final FieldName fiducialId = FieldName.forField("fiducialId", "fiducial_id");
2696
2697      static final FieldName objDetectionId = FieldName.forField("objDetectionId", "obj_detection_id");
2698
2699      static final FieldName bestCameraToTarget = FieldName.forField("bestCameraToTarget", "best_camera_to_target");
2700
2701      static final FieldName altCameraToTarget = FieldName.forField("altCameraToTarget", "alt_camera_to_target");
2702
2703      static final FieldName minAreaRectCorners = FieldName.forField("minAreaRectCorners", "min_area_rect_corners");
2704
2705      static final FieldName detectedCorners = FieldName.forField("detectedCorners", "detected_corners");
2706    }
2707  }
2708
2709  /**
2710   * Protobuf type {@code ProtobufPhotonPipelineResult}
2711   */
2712  public static final class ProtobufPhotonPipelineResult extends ProtoMessage<ProtobufPhotonPipelineResult> implements Cloneable {
2713    private static final long serialVersionUID = 0L;
2714
2715    /**
2716     * <code>optional double latency_ms = 1;</code>
2717     */
2718    private double latencyMs;
2719
2720    /**
2721     * <code>optional int64 sequence_id = 4;</code>
2722     */
2723    private long sequenceId;
2724
2725    /**
2726     * <code>optional int64 capture_timestamp_micros = 5;</code>
2727     */
2728    private long captureTimestampMicros;
2729
2730    /**
2731     * <code>optional int64 nt_publish_timestamp_micros = 6;</code>
2732     */
2733    private long ntPublishTimestampMicros;
2734
2735    /**
2736     * <code>optional int64 time_since_last_pong_micros = 7;</code>
2737     */
2738    private long timeSinceLastPongMicros;
2739
2740    /**
2741     * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code>
2742     */
2743    private final ProtobufMultiTargetPNPResult multiTargetResult = ProtobufMultiTargetPNPResult.newInstance();
2744
2745    /**
2746     * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code>
2747     */
2748    private final RepeatedMessage<ProtobufPhotonTrackedTarget> targets = RepeatedMessage.newEmptyInstance(ProtobufPhotonTrackedTarget.getFactory());
2749
2750    private ProtobufPhotonPipelineResult() {
2751    }
2752
2753    /**
2754     * @return a new empty instance of {@code ProtobufPhotonPipelineResult}
2755     */
2756    public static ProtobufPhotonPipelineResult newInstance() {
2757      return new ProtobufPhotonPipelineResult();
2758    }
2759
2760    /**
2761     * <code>optional double latency_ms = 1;</code>
2762     * @return whether the latencyMs field is set
2763     */
2764    @Deprecated
2765    public boolean hasLatencyMs() {
2766      return (bitField0_ & 0x00000002) != 0;
2767    }
2768
2769    /**
2770     * <code>optional double latency_ms = 1;</code>
2771     * @return this
2772     */
2773    @Deprecated
2774    public ProtobufPhotonPipelineResult clearLatencyMs() {
2775      bitField0_ &= ~0x00000002;
2776      latencyMs = 0D;
2777      return this;
2778    }
2779
2780    /**
2781     * <code>optional double latency_ms = 1;</code>
2782     * @return the latencyMs
2783     */
2784    @Deprecated
2785    public double getLatencyMs() {
2786      return latencyMs;
2787    }
2788
2789    /**
2790     * <code>optional double latency_ms = 1;</code>
2791     * @param value the latencyMs to set
2792     * @return this
2793     */
2794    @Deprecated
2795    public ProtobufPhotonPipelineResult setLatencyMs(final double value) {
2796      bitField0_ |= 0x00000002;
2797      latencyMs = value;
2798      return this;
2799    }
2800
2801    /**
2802     * <code>optional int64 sequence_id = 4;</code>
2803     * @return whether the sequenceId field is set
2804     */
2805    public boolean hasSequenceId() {
2806      return (bitField0_ & 0x00000004) != 0;
2807    }
2808
2809    /**
2810     * <code>optional int64 sequence_id = 4;</code>
2811     * @return this
2812     */
2813    public ProtobufPhotonPipelineResult clearSequenceId() {
2814      bitField0_ &= ~0x00000004;
2815      sequenceId = 0L;
2816      return this;
2817    }
2818
2819    /**
2820     * <code>optional int64 sequence_id = 4;</code>
2821     * @return the sequenceId
2822     */
2823    public long getSequenceId() {
2824      return sequenceId;
2825    }
2826
2827    /**
2828     * <code>optional int64 sequence_id = 4;</code>
2829     * @param value the sequenceId to set
2830     * @return this
2831     */
2832    public ProtobufPhotonPipelineResult setSequenceId(final long value) {
2833      bitField0_ |= 0x00000004;
2834      sequenceId = value;
2835      return this;
2836    }
2837
2838    /**
2839     * <code>optional int64 capture_timestamp_micros = 5;</code>
2840     * @return whether the captureTimestampMicros field is set
2841     */
2842    public boolean hasCaptureTimestampMicros() {
2843      return (bitField0_ & 0x00000008) != 0;
2844    }
2845
2846    /**
2847     * <code>optional int64 capture_timestamp_micros = 5;</code>
2848     * @return this
2849     */
2850    public ProtobufPhotonPipelineResult clearCaptureTimestampMicros() {
2851      bitField0_ &= ~0x00000008;
2852      captureTimestampMicros = 0L;
2853      return this;
2854    }
2855
2856    /**
2857     * <code>optional int64 capture_timestamp_micros = 5;</code>
2858     * @return the captureTimestampMicros
2859     */
2860    public long getCaptureTimestampMicros() {
2861      return captureTimestampMicros;
2862    }
2863
2864    /**
2865     * <code>optional int64 capture_timestamp_micros = 5;</code>
2866     * @param value the captureTimestampMicros to set
2867     * @return this
2868     */
2869    public ProtobufPhotonPipelineResult setCaptureTimestampMicros(final long value) {
2870      bitField0_ |= 0x00000008;
2871      captureTimestampMicros = value;
2872      return this;
2873    }
2874
2875    /**
2876     * <code>optional int64 nt_publish_timestamp_micros = 6;</code>
2877     * @return whether the ntPublishTimestampMicros field is set
2878     */
2879    public boolean hasNtPublishTimestampMicros() {
2880      return (bitField0_ & 0x00000010) != 0;
2881    }
2882
2883    /**
2884     * <code>optional int64 nt_publish_timestamp_micros = 6;</code>
2885     * @return this
2886     */
2887    public ProtobufPhotonPipelineResult clearNtPublishTimestampMicros() {
2888      bitField0_ &= ~0x00000010;
2889      ntPublishTimestampMicros = 0L;
2890      return this;
2891    }
2892
2893    /**
2894     * <code>optional int64 nt_publish_timestamp_micros = 6;</code>
2895     * @return the ntPublishTimestampMicros
2896     */
2897    public long getNtPublishTimestampMicros() {
2898      return ntPublishTimestampMicros;
2899    }
2900
2901    /**
2902     * <code>optional int64 nt_publish_timestamp_micros = 6;</code>
2903     * @param value the ntPublishTimestampMicros to set
2904     * @return this
2905     */
2906    public ProtobufPhotonPipelineResult setNtPublishTimestampMicros(final long value) {
2907      bitField0_ |= 0x00000010;
2908      ntPublishTimestampMicros = value;
2909      return this;
2910    }
2911
2912    /**
2913     * <code>optional int64 time_since_last_pong_micros = 7;</code>
2914     * @return whether the timeSinceLastPongMicros field is set
2915     */
2916    public boolean hasTimeSinceLastPongMicros() {
2917      return (bitField0_ & 0x00000020) != 0;
2918    }
2919
2920    /**
2921     * <code>optional int64 time_since_last_pong_micros = 7;</code>
2922     * @return this
2923     */
2924    public ProtobufPhotonPipelineResult clearTimeSinceLastPongMicros() {
2925      bitField0_ &= ~0x00000020;
2926      timeSinceLastPongMicros = 0L;
2927      return this;
2928    }
2929
2930    /**
2931     * <code>optional int64 time_since_last_pong_micros = 7;</code>
2932     * @return the timeSinceLastPongMicros
2933     */
2934    public long getTimeSinceLastPongMicros() {
2935      return timeSinceLastPongMicros;
2936    }
2937
2938    /**
2939     * <code>optional int64 time_since_last_pong_micros = 7;</code>
2940     * @param value the timeSinceLastPongMicros to set
2941     * @return this
2942     */
2943    public ProtobufPhotonPipelineResult setTimeSinceLastPongMicros(final long value) {
2944      bitField0_ |= 0x00000020;
2945      timeSinceLastPongMicros = value;
2946      return this;
2947    }
2948
2949    /**
2950     * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code>
2951     * @return whether the multiTargetResult field is set
2952     */
2953    public boolean hasMultiTargetResult() {
2954      return (bitField0_ & 0x00000001) != 0;
2955    }
2956
2957    /**
2958     * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code>
2959     * @return this
2960     */
2961    public ProtobufPhotonPipelineResult clearMultiTargetResult() {
2962      bitField0_ &= ~0x00000001;
2963      multiTargetResult.clear();
2964      return this;
2965    }
2966
2967    /**
2968     * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code>
2969     *
2970     * This method returns the internal storage object without modifying any has state.
2971     * The returned object should not be modified and be treated as read-only.
2972     *
2973     * Use {@link #getMutableMultiTargetResult()} if you want to modify it.
2974     *
2975     * @return internal storage object for reading
2976     */
2977    public ProtobufMultiTargetPNPResult getMultiTargetResult() {
2978      return multiTargetResult;
2979    }
2980
2981    /**
2982     * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code>
2983     *
2984     * This method returns the internal storage object and sets the corresponding
2985     * has state. The returned object will become part of this message and its
2986     * contents may be modified as long as the has state is not cleared.
2987     *
2988     * @return internal storage object for modifications
2989     */
2990    public ProtobufMultiTargetPNPResult getMutableMultiTargetResult() {
2991      bitField0_ |= 0x00000001;
2992      return multiTargetResult;
2993    }
2994
2995    /**
2996     * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code>
2997     * @param value the multiTargetResult to set
2998     * @return this
2999     */
3000    public ProtobufPhotonPipelineResult setMultiTargetResult(
3001        final ProtobufMultiTargetPNPResult value) {
3002      bitField0_ |= 0x00000001;
3003      multiTargetResult.copyFrom(value);
3004      return this;
3005    }
3006
3007    /**
3008     * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code>
3009     * @return whether the targets field is set
3010     */
3011    public boolean hasTargets() {
3012      return (bitField0_ & 0x00000040) != 0;
3013    }
3014
3015    /**
3016     * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code>
3017     * @return this
3018     */
3019    public ProtobufPhotonPipelineResult clearTargets() {
3020      bitField0_ &= ~0x00000040;
3021      targets.clear();
3022      return this;
3023    }
3024
3025    /**
3026     * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code>
3027     *
3028     * This method returns the internal storage object without modifying any has state.
3029     * The returned object should not be modified and be treated as read-only.
3030     *
3031     * Use {@link #getMutableTargets()} if you want to modify it.
3032     *
3033     * @return internal storage object for reading
3034     */
3035    public RepeatedMessage<ProtobufPhotonTrackedTarget> getTargets() {
3036      return targets;
3037    }
3038
3039    /**
3040     * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code>
3041     *
3042     * This method returns the internal storage object and sets the corresponding
3043     * has state. The returned object will become part of this message and its
3044     * contents may be modified as long as the has state is not cleared.
3045     *
3046     * @return internal storage object for modifications
3047     */
3048    public RepeatedMessage<ProtobufPhotonTrackedTarget> getMutableTargets() {
3049      bitField0_ |= 0x00000040;
3050      return targets;
3051    }
3052
3053    /**
3054     * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code>
3055     * @param value the targets to add
3056     * @return this
3057     */
3058    public ProtobufPhotonPipelineResult addTargets(final ProtobufPhotonTrackedTarget value) {
3059      bitField0_ |= 0x00000040;
3060      targets.add(value);
3061      return this;
3062    }
3063
3064    /**
3065     * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code>
3066     * @param values the targets to add
3067     * @return this
3068     */
3069    public ProtobufPhotonPipelineResult addAllTargets(final ProtobufPhotonTrackedTarget... values) {
3070      bitField0_ |= 0x00000040;
3071      targets.addAll(values);
3072      return this;
3073    }
3074
3075    @Override
3076    public ProtobufPhotonPipelineResult copyFrom(final ProtobufPhotonPipelineResult other) {
3077      cachedSize = other.cachedSize;
3078      if ((bitField0_ | other.bitField0_) != 0) {
3079        bitField0_ = other.bitField0_;
3080        latencyMs = other.latencyMs;
3081        sequenceId = other.sequenceId;
3082        captureTimestampMicros = other.captureTimestampMicros;
3083        ntPublishTimestampMicros = other.ntPublishTimestampMicros;
3084        timeSinceLastPongMicros = other.timeSinceLastPongMicros;
3085        multiTargetResult.copyFrom(other.multiTargetResult);
3086        targets.copyFrom(other.targets);
3087      }
3088      return this;
3089    }
3090
3091    @Override
3092    public ProtobufPhotonPipelineResult mergeFrom(final ProtobufPhotonPipelineResult other) {
3093      if (other.isEmpty()) {
3094        return this;
3095      }
3096      cachedSize = -1;
3097      if (other.hasLatencyMs()) {
3098        setLatencyMs(other.latencyMs);
3099      }
3100      if (other.hasSequenceId()) {
3101        setSequenceId(other.sequenceId);
3102      }
3103      if (other.hasCaptureTimestampMicros()) {
3104        setCaptureTimestampMicros(other.captureTimestampMicros);
3105      }
3106      if (other.hasNtPublishTimestampMicros()) {
3107        setNtPublishTimestampMicros(other.ntPublishTimestampMicros);
3108      }
3109      if (other.hasTimeSinceLastPongMicros()) {
3110        setTimeSinceLastPongMicros(other.timeSinceLastPongMicros);
3111      }
3112      if (other.hasMultiTargetResult()) {
3113        getMutableMultiTargetResult().mergeFrom(other.multiTargetResult);
3114      }
3115      if (other.hasTargets()) {
3116        getMutableTargets().addAll(other.targets);
3117      }
3118      return this;
3119    }
3120
3121    @Override
3122    public ProtobufPhotonPipelineResult clear() {
3123      if (isEmpty()) {
3124        return this;
3125      }
3126      cachedSize = -1;
3127      bitField0_ = 0;
3128      latencyMs = 0D;
3129      sequenceId = 0L;
3130      captureTimestampMicros = 0L;
3131      ntPublishTimestampMicros = 0L;
3132      timeSinceLastPongMicros = 0L;
3133      multiTargetResult.clear();
3134      targets.clear();
3135      return this;
3136    }
3137
3138    @Override
3139    public ProtobufPhotonPipelineResult clearQuick() {
3140      if (isEmpty()) {
3141        return this;
3142      }
3143      cachedSize = -1;
3144      bitField0_ = 0;
3145      multiTargetResult.clearQuick();
3146      targets.clearQuick();
3147      return this;
3148    }
3149
3150    @Override
3151    public boolean equals(Object o) {
3152      if (o == this) {
3153        return true;
3154      }
3155      if (!(o instanceof ProtobufPhotonPipelineResult)) {
3156        return false;
3157      }
3158      ProtobufPhotonPipelineResult other = (ProtobufPhotonPipelineResult) o;
3159      return bitField0_ == other.bitField0_
3160        && (!hasLatencyMs() || ProtoUtil.isEqual(latencyMs, other.latencyMs))
3161        && (!hasSequenceId() || sequenceId == other.sequenceId)
3162        && (!hasCaptureTimestampMicros() || captureTimestampMicros == other.captureTimestampMicros)
3163        && (!hasNtPublishTimestampMicros() || ntPublishTimestampMicros == other.ntPublishTimestampMicros)
3164        && (!hasTimeSinceLastPongMicros() || timeSinceLastPongMicros == other.timeSinceLastPongMicros)
3165        && (!hasMultiTargetResult() || multiTargetResult.equals(other.multiTargetResult))
3166        && (!hasTargets() || targets.equals(other.targets));
3167    }
3168
3169    @Override
3170    public void writeTo(final ProtoSink output) throws IOException {
3171      if ((bitField0_ & 0x00000002) != 0) {
3172        output.writeRawByte((byte) 9);
3173        output.writeDoubleNoTag(latencyMs);
3174      }
3175      if ((bitField0_ & 0x00000004) != 0) {
3176        output.writeRawByte((byte) 32);
3177        output.writeInt64NoTag(sequenceId);
3178      }
3179      if ((bitField0_ & 0x00000008) != 0) {
3180        output.writeRawByte((byte) 40);
3181        output.writeInt64NoTag(captureTimestampMicros);
3182      }
3183      if ((bitField0_ & 0x00000010) != 0) {
3184        output.writeRawByte((byte) 48);
3185        output.writeInt64NoTag(ntPublishTimestampMicros);
3186      }
3187      if ((bitField0_ & 0x00000020) != 0) {
3188        output.writeRawByte((byte) 56);
3189        output.writeInt64NoTag(timeSinceLastPongMicros);
3190      }
3191      if ((bitField0_ & 0x00000001) != 0) {
3192        output.writeRawByte((byte) 26);
3193        output.writeMessageNoTag(multiTargetResult);
3194      }
3195      if ((bitField0_ & 0x00000040) != 0) {
3196        for (int i = 0; i < targets.length(); i++) {
3197          output.writeRawByte((byte) 18);
3198          output.writeMessageNoTag(targets.get(i));
3199        }
3200      }
3201    }
3202
3203    @Override
3204    protected int computeSerializedSize() {
3205      int size = 0;
3206      if ((bitField0_ & 0x00000002) != 0) {
3207        size += 9;
3208      }
3209      if ((bitField0_ & 0x00000004) != 0) {
3210        size += 1 + ProtoSink.computeInt64SizeNoTag(sequenceId);
3211      }
3212      if ((bitField0_ & 0x00000008) != 0) {
3213        size += 1 + ProtoSink.computeInt64SizeNoTag(captureTimestampMicros);
3214      }
3215      if ((bitField0_ & 0x00000010) != 0) {
3216        size += 1 + ProtoSink.computeInt64SizeNoTag(ntPublishTimestampMicros);
3217      }
3218      if ((bitField0_ & 0x00000020) != 0) {
3219        size += 1 + ProtoSink.computeInt64SizeNoTag(timeSinceLastPongMicros);
3220      }
3221      if ((bitField0_ & 0x00000001) != 0) {
3222        size += 1 + ProtoSink.computeMessageSizeNoTag(multiTargetResult);
3223      }
3224      if ((bitField0_ & 0x00000040) != 0) {
3225        size += (1 * targets.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(targets);
3226      }
3227      return size;
3228    }
3229
3230    @Override
3231    @SuppressWarnings("fallthrough")
3232    public ProtobufPhotonPipelineResult mergeFrom(final ProtoSource input) throws IOException {
3233      // Enabled Fall-Through Optimization (QuickBuffers)
3234      int tag = input.readTag();
3235      while (true) {
3236        switch (tag) {
3237          case 9: {
3238            // latencyMs
3239            latencyMs = input.readDouble();
3240            bitField0_ |= 0x00000002;
3241            tag = input.readTag();
3242            if (tag != 32) {
3243              break;
3244            }
3245          }
3246          case 32: {
3247            // sequenceId
3248            sequenceId = input.readInt64();
3249            bitField0_ |= 0x00000004;
3250            tag = input.readTag();
3251            if (tag != 40) {
3252              break;
3253            }
3254          }
3255          case 40: {
3256            // captureTimestampMicros
3257            captureTimestampMicros = input.readInt64();
3258            bitField0_ |= 0x00000008;
3259            tag = input.readTag();
3260            if (tag != 48) {
3261              break;
3262            }
3263          }
3264          case 48: {
3265            // ntPublishTimestampMicros
3266            ntPublishTimestampMicros = input.readInt64();
3267            bitField0_ |= 0x00000010;
3268            tag = input.readTag();
3269            if (tag != 56) {
3270              break;
3271            }
3272          }
3273          case 56: {
3274            // timeSinceLastPongMicros
3275            timeSinceLastPongMicros = input.readInt64();
3276            bitField0_ |= 0x00000020;
3277            tag = input.readTag();
3278            if (tag != 26) {
3279              break;
3280            }
3281          }
3282          case 26: {
3283            // multiTargetResult
3284            input.readMessage(multiTargetResult);
3285            bitField0_ |= 0x00000001;
3286            tag = input.readTag();
3287            if (tag != 18) {
3288              break;
3289            }
3290          }
3291          case 18: {
3292            // targets
3293            tag = input.readRepeatedMessage(targets, tag);
3294            bitField0_ |= 0x00000040;
3295            if (tag != 0) {
3296              break;
3297            }
3298          }
3299          case 0: {
3300            return this;
3301          }
3302          default: {
3303            if (!input.skipField(tag)) {
3304              return this;
3305            }
3306            tag = input.readTag();
3307            break;
3308          }
3309        }
3310      }
3311    }
3312
3313    @Override
3314    public void writeTo(final JsonSink output) throws IOException {
3315      output.beginObject();
3316      if ((bitField0_ & 0x00000002) != 0) {
3317        output.writeDouble(FieldNames.latencyMs, latencyMs);
3318      }
3319      if ((bitField0_ & 0x00000004) != 0) {
3320        output.writeInt64(FieldNames.sequenceId, sequenceId);
3321      }
3322      if ((bitField0_ & 0x00000008) != 0) {
3323        output.writeInt64(FieldNames.captureTimestampMicros, captureTimestampMicros);
3324      }
3325      if ((bitField0_ & 0x00000010) != 0) {
3326        output.writeInt64(FieldNames.ntPublishTimestampMicros, ntPublishTimestampMicros);
3327      }
3328      if ((bitField0_ & 0x00000020) != 0) {
3329        output.writeInt64(FieldNames.timeSinceLastPongMicros, timeSinceLastPongMicros);
3330      }
3331      if ((bitField0_ & 0x00000001) != 0) {
3332        output.writeMessage(FieldNames.multiTargetResult, multiTargetResult);
3333      }
3334      if ((bitField0_ & 0x00000040) != 0) {
3335        output.writeRepeatedMessage(FieldNames.targets, targets);
3336      }
3337      output.endObject();
3338    }
3339
3340    @Override
3341    public ProtobufPhotonPipelineResult mergeFrom(final JsonSource input) throws IOException {
3342      if (!input.beginObject()) {
3343        return this;
3344      }
3345      while (!input.isAtEnd()) {
3346        switch (input.readFieldHash()) {
3347          case -1810231484:
3348          case -282583929: {
3349            if (input.isAtField(FieldNames.latencyMs)) {
3350              if (!input.trySkipNullValue()) {
3351                latencyMs = input.readDouble();
3352                bitField0_ |= 0x00000002;
3353              }
3354            } else {
3355              input.skipUnknownField();
3356            }
3357            break;
3358          }
3359          case -164522820:
3360          case -805218727: {
3361            if (input.isAtField(FieldNames.sequenceId)) {
3362              if (!input.trySkipNullValue()) {
3363                sequenceId = input.readInt64();
3364                bitField0_ |= 0x00000004;
3365              }
3366            } else {
3367              input.skipUnknownField();
3368            }
3369            break;
3370          }
3371          case 1984545471:
3372          case -668239535: {
3373            if (input.isAtField(FieldNames.captureTimestampMicros)) {
3374              if (!input.trySkipNullValue()) {
3375                captureTimestampMicros = input.readInt64();
3376                bitField0_ |= 0x00000008;
3377              }
3378            } else {
3379              input.skipUnknownField();
3380            }
3381            break;
3382          }
3383          case 64029500:
3384          case 1963802369: {
3385            if (input.isAtField(FieldNames.ntPublishTimestampMicros)) {
3386              if (!input.trySkipNullValue()) {
3387                ntPublishTimestampMicros = input.readInt64();
3388                bitField0_ |= 0x00000010;
3389              }
3390            } else {
3391              input.skipUnknownField();
3392            }
3393            break;
3394          }
3395          case -1600036534:
3396          case -1422845884: {
3397            if (input.isAtField(FieldNames.timeSinceLastPongMicros)) {
3398              if (!input.trySkipNullValue()) {
3399                timeSinceLastPongMicros = input.readInt64();
3400                bitField0_ |= 0x00000020;
3401              }
3402            } else {
3403              input.skipUnknownField();
3404            }
3405            break;
3406          }
3407          case 1809256679:
3408          case -501273083: {
3409            if (input.isAtField(FieldNames.multiTargetResult)) {
3410              if (!input.trySkipNullValue()) {
3411                input.readMessage(multiTargetResult);
3412                bitField0_ |= 0x00000001;
3413              }
3414            } else {
3415              input.skipUnknownField();
3416            }
3417            break;
3418          }
3419          case -1538277118: {
3420            if (input.isAtField(FieldNames.targets)) {
3421              if (!input.trySkipNullValue()) {
3422                input.readRepeatedMessage(targets);
3423                bitField0_ |= 0x00000040;
3424              }
3425            } else {
3426              input.skipUnknownField();
3427            }
3428            break;
3429          }
3430          default: {
3431            input.skipUnknownField();
3432            break;
3433          }
3434        }
3435      }
3436      input.endObject();
3437      return this;
3438    }
3439
3440    @Override
3441    public ProtobufPhotonPipelineResult clone() {
3442      return new ProtobufPhotonPipelineResult().copyFrom(this);
3443    }
3444
3445    @Override
3446    public boolean isEmpty() {
3447      return ((bitField0_) == 0);
3448    }
3449
3450    public static ProtobufPhotonPipelineResult parseFrom(final byte[] data) throws
3451        InvalidProtocolBufferException {
3452      return ProtoMessage.mergeFrom(new ProtobufPhotonPipelineResult(), data).checkInitialized();
3453    }
3454
3455    public static ProtobufPhotonPipelineResult parseFrom(final ProtoSource input) throws
3456        IOException {
3457      return ProtoMessage.mergeFrom(new ProtobufPhotonPipelineResult(), input).checkInitialized();
3458    }
3459
3460    public static ProtobufPhotonPipelineResult parseFrom(final JsonSource input) throws
3461        IOException {
3462      return ProtoMessage.mergeFrom(new ProtobufPhotonPipelineResult(), input).checkInitialized();
3463    }
3464
3465    /**
3466     * @return factory for creating ProtobufPhotonPipelineResult messages
3467     */
3468    public static MessageFactory<ProtobufPhotonPipelineResult> getFactory() {
3469      return ProtobufPhotonPipelineResultFactory.INSTANCE;
3470    }
3471
3472    /**
3473     * @return this type's descriptor.
3474     */
3475    public static Descriptors.Descriptor getDescriptor() {
3476      return Photon.photonvision_proto_ProtobufPhotonPipelineResult_descriptor;
3477    }
3478
3479    private enum ProtobufPhotonPipelineResultFactory implements MessageFactory<ProtobufPhotonPipelineResult> {
3480      INSTANCE;
3481
3482      @Override
3483      public ProtobufPhotonPipelineResult create() {
3484        return ProtobufPhotonPipelineResult.newInstance();
3485      }
3486    }
3487
3488    /**
3489     * Contains name constants used for serializing JSON
3490     */
3491    static class FieldNames {
3492      static final FieldName latencyMs = FieldName.forField("latencyMs", "latency_ms");
3493
3494      static final FieldName sequenceId = FieldName.forField("sequenceId", "sequence_id");
3495
3496      static final FieldName captureTimestampMicros = FieldName.forField("captureTimestampMicros", "capture_timestamp_micros");
3497
3498      static final FieldName ntPublishTimestampMicros = FieldName.forField("ntPublishTimestampMicros", "nt_publish_timestamp_micros");
3499
3500      static final FieldName timeSinceLastPongMicros = FieldName.forField("timeSinceLastPongMicros", "time_since_last_pong_micros");
3501
3502      static final FieldName multiTargetResult = FieldName.forField("multiTargetResult", "multi_target_result");
3503
3504      static final FieldName targets = FieldName.forField("targets");
3505    }
3506  }
3507}