package F7;

import java.lang.reflect.Method;
import java.util.Map;
import n4.u0;

/* JADX INFO: loaded from: classes.dex */
public final class F extends b0 {

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final Method f2603e;

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

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final boolean f2605g;

    public /* synthetic */ F(Method method, int i, boolean z8, int i5) {
        this.f2602d = i5;
        this.f2603e = method;
        this.f2604f = i;
        this.f2605g = z8;
    }

    @Override // F7.b0
    public final void a(P p3, Object obj) {
        switch (this.f2602d) {
            case u0.f15495q /* 0 */:
                Map map = (Map) obj;
                Method method = this.f2603e;
                int i = this.f2604f;
                if (map == null) {
                    throw b0.o(method, i, "Field map was null.", new Object[0]);
                }
                for (Map.Entry entry : map.entrySet()) {
                    String str = (String) entry.getKey();
                    if (str == null) {
                        throw b0.o(method, i, "Field map contained null key.", new Object[0]);
                    }
                    Object value = entry.getValue();
                    if (value == null) {
                        throw b0.o(method, i, I1.a.p("Field map contained null value for key '", str, "'."), new Object[0]);
                    }
                    String string = value.toString();
                    if (string == null) {
                        throw b0.o(method, i, "Field map value '" + value + "' converted to null by " + C0118b.class.getName() + " for key '" + str + "'.", new Object[0]);
                    }
                    p3.a(str, string, this.f2605g);
                }
                return;
            case 1:
                Map map2 = (Map) obj;
                Method method2 = this.f2603e;
                int i5 = this.f2604f;
                if (map2 == null) {
                    throw b0.o(method2, i5, "Header map was null.", new Object[0]);
                }
                for (Map.Entry entry2 : map2.entrySet()) {
                    String str2 = (String) entry2.getKey();
                    if (str2 == null) {
                        throw b0.o(method2, i5, "Header map contained null key.", new Object[0]);
                    }
                    Object value2 = entry2.getValue();
                    if (value2 == null) {
                        throw b0.o(method2, i5, I1.a.p("Header map contained null value for key '", str2, "'."), new Object[0]);
                    }
                    p3.b(str2, value2.toString(), this.f2605g);
                }
                return;
            default:
                Map map3 = (Map) obj;
                Method method3 = this.f2603e;
                int i8 = this.f2604f;
                if (map3 == null) {
                    throw b0.o(method3, i8, "Query map was null", new Object[0]);
                }
                for (Map.Entry entry3 : map3.entrySet()) {
                    String str3 = (String) entry3.getKey();
                    if (str3 == null) {
                        throw b0.o(method3, i8, "Query map contained null key.", new Object[0]);
                    }
                    Object value3 = entry3.getValue();
                    if (value3 == null) {
                        throw b0.o(method3, i8, I1.a.p("Query map contained null value for key '", str3, "'."), new Object[0]);
                    }
                    String string2 = value3.toString();
                    if (string2 == null) {
                        throw b0.o(method3, i8, "Query map value '" + value3 + "' converted to null by " + C0118b.class.getName() + " for key '" + str3 + "'.", new Object[0]);
                    }
                    p3.d(str3, string2, this.f2605g);
                }
                return;
        }
    }
}
