package com.google.android.gms.internal.ads;

import java.io.File;
import java.util.Collections;
import java.util.Objects;
import java.util.Set;
import org.json.JSONException;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes2.dex */
public final class g30 implements f30, zu1, hi0, bj0, iv {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f11477a;

    public g30() {
        this.f11477a = 2;
    }

    public static String a(File file, String str) {
        int i10 = pi1.f15420d;
        return new File(file, str).getPath();
    }

    public static final Set b(Object obj, a30 a30Var) {
        return ((Boolean) qp.f15837a.j()).booleanValue() ? Collections.singleton(new ak0(obj, a30Var)) : Collections.emptySet();
    }

    @Override // com.google.android.gms.internal.ads.f30
    /* JADX INFO: renamed from: zza */
    public final void mo5zza() {
    }

    @Override // com.google.android.gms.internal.ads.iv
    public final JSONObject zzb(Object obj) throws JSONException {
        cv0 cv0Var = (cv0) obj;
        JSONObject jSONObject = new JSONObject();
        JSONObject jSONObject2 = new JSONObject();
        JSONObject jSONObject3 = new JSONObject();
        if (((Boolean) n7.y.f31093e.f31096c.b(ao.f9171ya)).booleanValue()) {
            uz uzVar = cv0Var.f10092c;
            jSONObject2.put("ad_request_url", uzVar.f17451f);
            jSONObject2.put("ad_request_post_body", uzVar.f17448c);
        }
        uz uzVar2 = cv0Var.f10092c;
        jSONObject2.put("base_url", uzVar2.f17447b);
        jSONObject2.put("signals", cv0Var.f10091b);
        gv0 gv0Var = cv0Var.f10090a;
        jSONObject3.put("body", gv0Var.f11895c);
        jSONObject3.put("headers", n7.x.f31085g.f31086a.c(gv0Var.f11894b));
        jSONObject3.put("response_code", gv0Var.f11893a);
        jSONObject3.put("latency", gv0Var.f11896d);
        jSONObject.put("request", jSONObject2);
        jSONObject.put("response", jSONObject3);
        jSONObject.put("flags", uzVar2.f17453h);
        return jSONObject;
    }

    public /* synthetic */ g30(int i10) {
        this.f11477a = i10;
    }

    @Override // com.google.android.gms.internal.ads.hi0
    public final /* synthetic */ void zza(Object obj) {
        switch (this.f11477a) {
            case 11:
                break;
            default:
                ((nj0) obj).n("MalformedJson");
                break;
        }
    }

    public /* synthetic */ g30(int i10, int i11) {
        this.f11477a = i10;
    }

    public /* synthetic */ g30(Object obj) {
        this.f11477a = 11;
    }

    public g30(rc0 rc0Var) {
        this.f11477a = 6;
        Objects.requireNonNull(rc0Var);
    }

    @Override // com.google.android.gms.internal.ads.zu1
    public final void zza(Throwable th) {
        switch (this.f11477a) {
            case 6:
            case 13:
                break;
            default:
                p7.l0.g("Notification of cache hit failed.");
                break;
        }
    }

    public g30(kp0 kp0Var) {
        this.f11477a = 13;
    }

    public g30(d91 d91Var) {
        this.f11477a = 18;
        Objects.requireNonNull(d91Var);
    }

    @Override // com.google.android.gms.internal.ads.zu1
    /* JADX INFO: renamed from: zzb, reason: collision with other method in class */
    public final /* synthetic */ void mo3zzb(Object obj) {
        switch (this.f11477a) {
            case 6:
                ((mc0) obj).zzm();
                break;
            case 13:
                ((x50) obj).destroy();
                break;
            default:
                p7.l0.g("Notification of cache hit successful.");
                break;
        }
    }
}
