65 lines
1.9 KiB
Java
65 lines
1.9 KiB
Java
package okhttp3;
|
|
|
|
import java.io.IOException;
|
|
import o.C14953gcr;
|
|
import o.C14957gcv;
|
|
|
|
/* loaded from: classes.dex */
|
|
public enum Protocol {
|
|
HTTP_1_0("http/1.0"),
|
|
HTTP_1_1("http/1.1"),
|
|
SPDY_3("spdy/3.1"),
|
|
HTTP_2("h2"),
|
|
H2_PRIOR_KNOWLEDGE("h2_prior_knowledge"),
|
|
QUIC("quic");
|
|
|
|
public static final Companion Companion = new Companion(null);
|
|
private final String protocol;
|
|
|
|
Protocol(String str) {
|
|
this.protocol = str;
|
|
}
|
|
|
|
/* loaded from: classes.dex */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public final Protocol get(String str) throws IOException {
|
|
C14957gcv.e(str, "");
|
|
if (C14957gcv.b((Object) str, (Object) Protocol.HTTP_1_0.protocol)) {
|
|
return Protocol.HTTP_1_0;
|
|
}
|
|
if (C14957gcv.b((Object) str, (Object) Protocol.HTTP_1_1.protocol)) {
|
|
return Protocol.HTTP_1_1;
|
|
}
|
|
if (C14957gcv.b((Object) str, (Object) Protocol.H2_PRIOR_KNOWLEDGE.protocol)) {
|
|
return Protocol.H2_PRIOR_KNOWLEDGE;
|
|
}
|
|
if (C14957gcv.b((Object) str, (Object) Protocol.HTTP_2.protocol)) {
|
|
return Protocol.HTTP_2;
|
|
}
|
|
if (C14957gcv.b((Object) str, (Object) Protocol.SPDY_3.protocol)) {
|
|
return Protocol.SPDY_3;
|
|
}
|
|
if (C14957gcv.b((Object) str, (Object) Protocol.QUIC.protocol)) {
|
|
return Protocol.QUIC;
|
|
}
|
|
throw new IOException(C14957gcv.c("Unexpected protocol: ", (Object) str));
|
|
}
|
|
|
|
public /* synthetic */ Companion(C14953gcr c14953gcr) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
@Override // java.lang.Enum
|
|
public final String toString() {
|
|
return this.protocol;
|
|
}
|
|
|
|
public static final Protocol get(String str) throws IOException {
|
|
return Companion.get(str);
|
|
}
|
|
}
|