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