package k7;

import java.io.Closeable;

/* JADX INFO: loaded from: classes.dex */
public final class C implements Closeable, AutoCloseable {

    /* JADX INFO: renamed from: A, reason: collision with root package name */
    public final long f14007A;

    /* JADX INFO: renamed from: B, reason: collision with root package name */
    public final long f14008B;

    /* JADX INFO: renamed from: C, reason: collision with root package name */
    public final o7.d f14009C;
    public C1111c D;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final y f14010q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final x f14011r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final String f14012s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final int f14013t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public final n f14014u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final o f14015v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final E f14016w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public final C f14017x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public final C f14018y;

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public final C f14019z;

    public C(y yVar, x xVar, String str, int i, n nVar, o oVar, E e8, C c3, C c8, C c9, long j8, long j9, o7.d dVar) {
        P6.g.e(yVar, "request");
        P6.g.e(xVar, "protocol");
        P6.g.e(str, "message");
        this.f14010q = yVar;
        this.f14011r = xVar;
        this.f14012s = str;
        this.f14013t = i;
        this.f14014u = nVar;
        this.f14015v = oVar;
        this.f14016w = e8;
        this.f14017x = c3;
        this.f14018y = c8;
        this.f14019z = c9;
        this.f14007A = j8;
        this.f14008B = j9;
        this.f14009C = dVar;
    }

    public static String a(String str, C c3) {
        c3.getClass();
        String strA = c3.f14015v.a(str);
        if (strA == null) {
            return null;
        }
        return strA;
    }

    public final boolean b() {
        int i = this.f14013t;
        return 200 <= i && i < 300;
    }

    @Override // java.io.Closeable, java.lang.AutoCloseable
    public final void close() {
        E e8 = this.f14016w;
        if (e8 == null) {
            throw new IllegalStateException("response is not eligible for a body and must not be closed");
        }
        e8.close();
    }

    public final B g() {
        B b8 = new B();
        b8.f13995a = this.f14010q;
        b8.f13996b = this.f14011r;
        b8.f13997c = this.f14013t;
        b8.f13998d = this.f14012s;
        b8.f13999e = this.f14014u;
        b8.f14000f = this.f14015v.f();
        b8.f14001g = this.f14016w;
        b8.f14002h = this.f14017x;
        b8.i = this.f14018y;
        b8.f14003j = this.f14019z;
        b8.f14004k = this.f14007A;
        b8.f14005l = this.f14008B;
        b8.f14006m = this.f14009C;
        return b8;
    }

    public final String toString() {
        return "Response{protocol=" + this.f14011r + ", code=" + this.f14013t + ", message=" + this.f14012s + ", url=" + this.f14010q.f14202a + '}';
    }
}
