package n9; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; import n9.x; /* loaded from: classes2.dex */ public final class e0 { /* renamed from: a, reason: collision with root package name */ final y f12322a; /* renamed from: b, reason: collision with root package name */ final String f12323b; /* renamed from: c, reason: collision with root package name */ final x f12324c; /* renamed from: d, reason: collision with root package name */ final f0 f12325d; /* renamed from: e, reason: collision with root package name */ final Map f12326e; /* renamed from: f, reason: collision with root package name */ private volatile f f12327f; e0(a aVar) { this.f12322a = aVar.f12328a; this.f12323b = aVar.f12329b; this.f12324c = aVar.f12330c.d(); this.f12325d = aVar.f12331d; this.f12326e = o9.e.v(aVar.f12332e); } public f0 a() { return this.f12325d; } public f b() { f fVar = this.f12327f; if (fVar != null) { return fVar; } f k10 = f.k(this.f12324c); this.f12327f = k10; return k10; } public String c(String str) { return this.f12324c.c(str); } public x d() { return this.f12324c; } public boolean e() { return this.f12322a.m(); } public String f() { return this.f12323b; } public a g() { return new a(this); } public y h() { return this.f12322a; } public String toString() { return "Request{method=" + this.f12323b + ", url=" + this.f12322a + ", tags=" + this.f12326e + '}'; } public static class a { /* renamed from: a, reason: collision with root package name */ y f12328a; /* renamed from: b, reason: collision with root package name */ String f12329b; /* renamed from: c, reason: collision with root package name */ x.a f12330c; /* renamed from: d, reason: collision with root package name */ f0 f12331d; /* renamed from: e, reason: collision with root package name */ Map f12332e; public a() { this.f12332e = Collections.emptyMap(); this.f12329b = "GET"; this.f12330c = new x.a(); } public a a(String str, String str2) { this.f12330c.a(str, str2); return this; } public e0 b() { if (this.f12328a != null) { return new e0(this); } throw new IllegalStateException("url == null"); } public a c() { return f("GET", null); } public a d(String str, String str2) { this.f12330c.f(str, str2); return this; } public a e(x xVar) { this.f12330c = xVar.f(); return this; } public a f(String str, f0 f0Var) { if (str == null) { throw new NullPointerException("method == null"); } if (str.length() == 0) { throw new IllegalArgumentException("method.length() == 0"); } if (f0Var != null && !r9.f.a(str)) { throw new IllegalArgumentException("method " + str + " must not have a request body."); } if (f0Var != null || !r9.f.d(str)) { this.f12329b = str; this.f12331d = f0Var; return this; } throw new IllegalArgumentException("method " + str + " must have a request body."); } public a g(f0 f0Var) { return f("POST", f0Var); } public a h(String str) { this.f12330c.e(str); return this; } public a i(String str) { if (str == null) { throw new NullPointerException("url == null"); } if (str.regionMatches(true, 0, "ws:", 0, 3)) { str = "http:" + str.substring(3); } else if (str.regionMatches(true, 0, "wss:", 0, 4)) { str = "https:" + str.substring(4); } return j(y.k(str)); } public a j(y yVar) { if (yVar == null) { throw new NullPointerException("url == null"); } this.f12328a = yVar; return this; } a(e0 e0Var) { Map linkedHashMap; this.f12332e = Collections.emptyMap(); this.f12328a = e0Var.f12322a; this.f12329b = e0Var.f12323b; this.f12331d = e0Var.f12325d; if (e0Var.f12326e.isEmpty()) { linkedHashMap = Collections.emptyMap(); } else { linkedHashMap = new LinkedHashMap(e0Var.f12326e); } this.f12332e = linkedHashMap; this.f12330c = e0Var.f12324c.f(); } } }