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