package com.android.org.conscrypt.metrics;

/* JADX INFO: loaded from: classes.dex */
public enum Protocol {
    UNKNOWN_PROTO(0),
    SSLv3(1),
    TLSv1(2),
    TLSv1_1(3),
    TLSv1_2(4),
    TLSv1_3(5);

    final byte id;

    Protocol(int i3) {
        this.id = (byte) i3;
    }

    public static Protocol forName(String str) {
        str.hashCode();
        switch (str) {
            case "TLSv1.1":
                return TLSv1_1;
            case "TLSv1.2":
                return TLSv1_2;
            case "TLSv1.3":
                return TLSv1_3;
            case "SSLv3":
                return SSLv3;
            case "TLSv1":
                return TLSv1;
            default:
                return UNKNOWN_PROTO;
        }
    }

    public int getId() {
        return this.id;
    }
}
