package retrofit2; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; import java.util.Map; import java.util.Objects; import okhttp3.Headers; import okhttp3.MultipartBody; import okhttp3.RequestBody; /* compiled from: ParameterHandler */ public abstract class n<T> { /* compiled from: ParameterHandler */ public class a extends n<Iterable<T>> { public a() { } /* renamed from: d */ public void a(p pVar, Iterable<T> iterable) throws IOException { if (iterable != null) { for (T t14 : iterable) { n.this.a(pVar, t14); } } } } /* compiled from: ParameterHandler */ public class b extends n<Object> { public b() { } /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: retrofit2.n */ /* JADX WARN: Multi-variable type inference failed */ @Override // retrofit2.n public void a(p pVar, Object obj) throws IOException { if (obj != null) { int length = Array.getLength(obj); for (int i10 = 0; i10 < length; i10++) { n.this.a(pVar, Array.get(obj, i10)); } } } } /* compiled from: ParameterHandler */ public static final class c<T> extends n<T> { /* renamed from: a reason: collision with root package name */ public final Method f125888a; /* renamed from: b reason: collision with root package name */ public final int f125889b; /* renamed from: c reason: collision with root package name */ public final f<T, RequestBody> f125890c; public c(Method method, int i10, f<T, RequestBody> fVar) { this.f125888a = method; this.f125889b = i10; this.f125890c = fVar; } @Override // retrofit2.n public void a(p pVar, T t14) { if (t14 != null) { try { pVar.l(this.f125890c.convert(t14)); } catch (IOException e14) { Method method = this.f125888a; int i10 = this.f125889b; throw w.p(method, e14, i10, "Unable to convert " + ((Object) t14) + " to RequestBody", new Object[0]); } } else { throw w.o(this.f125888a, this.f125889b, "Body parameter value must not be null.", new Object[0]); } } } /* compiled from: ParameterHandler */ public static final class d<T> extends n<T> { /* renamed from: a reason: collision with root package name */ public final String f125891a; /* renamed from: b reason: collision with root package name */ public final f<T, String> f125892b; /* renamed from: c reason: collision with root package name */ public final boolean f125893c; public d(String str, f<T, String> fVar, boolean z14) { Objects.requireNonNull(str, "name == null"); this.f125891a = str; this.f125892b = fVar; this.f125893c = z14; } @Override // retrofit2.n public void a(p pVar, T t14) throws IOException { String convert; if (t14 != null && (convert = this.f125892b.convert(t14)) != null) { pVar.a(this.f125891a, convert, this.f125893c); } } } /* compiled from: ParameterHandler */ public static final class e<T> extends n<Map<String, T>> { /* renamed from: a reason: collision with root package name */ public final Method f125894a; /* renamed from: b reason: collision with root package name */ public final int f125895b; /* renamed from: c reason: collision with root package name */ public final f<T, String> f125896c; /* renamed from: d reason: collision with root package name */ public final boolean f125897d; public e(Method method, int i10, f<T, String> fVar, boolean z14) { this.f125894a = method; this.f125895b = i10; this.f125896c = fVar; this.f125897d = z14; } /* renamed from: d */ public void a(p pVar, Map<String, T> map) throws IOException { if (map != null) { for (Map.Entry<String, T> entry : map.entrySet()) { String key = entry.getKey(); if (key != null) { T value = entry.getValue(); if (value != null) { String convert = this.f125896c.convert(value); if (convert != null) { pVar.a(key, convert, this.f125897d); } else { Method method = this.f125894a; int i10 = this.f125895b; throw w.o(method, i10, "Field map value '" + ((Object) value) + "' converted to null by " + this.f125896c.getClass().getName() + " for key '" + key + "'.", new Object[0]); } } else { Method method2 = this.f125894a; int i14 = this.f125895b; throw w.o(method2, i14, "Field map contained null value for key '" + key + "'.", new Object[0]); } } else { throw w.o(this.f125894a, this.f125895b, "Field map contained null key.", new Object[0]); } } return; } throw w.o(this.f125894a, this.f125895b, "Field map was null.", new Object[0]); } } /* compiled from: ParameterHandler */ public static final class f<T> extends n<T> { /* renamed from: a reason: collision with root package name */ public final String f125898a; /* renamed from: b reason: collision with root package name */ public final f<T, String> f125899b; public f(String str, f<T, String> fVar) { Objects.requireNonNull(str, "name == null"); this.f125898a = str; this.f125899b = fVar; } @Override // retrofit2.n public void a(p pVar, T t14) throws IOException { String convert; if (t14 != null && (convert = this.f125899b.convert(t14)) != null) { pVar.b(this.f125898a, convert); } } } /* compiled from: ParameterHandler */ public static final class g<T> extends n<Map<String, T>> { /* renamed from: a reason: collision with root package name */ public final Method f125900a; /* renamed from: b reason: collision with root package name */ public final int f125901b; /* renamed from: c reason: collision with root package name */ public final f<T, String> f125902c; public g(Method method, int i10, f<T, String> fVar) { this.f125900a = method; this.f125901b = i10; this.f125902c = fVar; } /* renamed from: d */ public void a(p pVar, Map<String, T> map) throws IOException { if (map != null) { for (Map.Entry<String, T> entry : map.entrySet()) { String key = entry.getKey(); if (key != null) { T value = entry.getValue(); if (value != null) { pVar.b(key, this.f125902c.convert(value)); } else { Method method = this.f125900a; int i10 = this.f125901b; throw w.o(method, i10, "Header map contained null value for key '" + key + "'.", new Object[0]); } } else { throw w.o(this.f125900a, this.f125901b, "Header map contained null key.", new Object[0]); } } return; } throw w.o(this.f125900a, this.f125901b, "Header map was null.", new Object[0]); } } /* compiled from: ParameterHandler */ public static final class h extends n<Headers> { /* renamed from: a reason: collision with root package name */ public final Method f125903a; /* renamed from: b reason: collision with root package name */ public final int f125904b; public h(Method method, int i10) { this.f125903a = method; this.f125904b = i10; } /* renamed from: d */ public void a(p pVar, Headers headers) { if (headers != null) { pVar.c(headers); return; } throw w.o(this.f125903a, this.f125904b, "Headers parameter must not be null.", new Object[0]); } } /* compiled from: ParameterHandler */ public static final class i<T> extends n<T> { /* renamed from: a reason: collision with root package name */ public final Method f125905a; /* renamed from: b reason: collision with root package name */ public final int f125906b; /* renamed from: c reason: collision with root package name */ public final Headers f125907c; /* renamed from: d reason: collision with root package name */ public final f<T, RequestBody> f125908d; public i(Method method, int i10, Headers headers, f<T, RequestBody> fVar) { this.f125905a = method; this.f125906b = i10; this.f125907c = headers; this.f125908d = fVar; } @Override // retrofit2.n public void a(p pVar, T t14) { if (t14 != null) { try { pVar.d(this.f125907c, this.f125908d.convert(t14)); } catch (IOException e14) { Method method = this.f125905a; int i10 = this.f125906b; throw w.o(method, i10, "Unable to convert " + ((Object) t14) + " to RequestBody", e14); } } } } /* compiled from: ParameterHandler */ public static final class j<T> extends n<Map<String, T>> { /* renamed from: a reason: collision with root package name */ public final Method f125909a; /* renamed from: b reason: collision with root package name */ public final int f125910b; /* renamed from: c reason: collision with root package name */ public final f<T, RequestBody> f125911c; /* renamed from: d reason: collision with root package name */ public final String f125912d; public j(Method method, int i10, f<T, RequestBody> fVar, String str) { this.f125909a = method; this.f125910b = i10; this.f125911c = fVar; this.f125912d = str; } /* renamed from: d */ public void a(p pVar, Map<String, T> map) throws IOException { if (map != null) { for (Map.Entry<String, T> entry : map.entrySet()) { String key = entry.getKey(); if (key != null) { T value = entry.getValue(); if (value != null) { pVar.d(Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"", "Content-Transfer-Encoding", this.f125912d), this.f125911c.convert(value)); } else { Method method = this.f125909a; int i10 = this.f125910b; throw w.o(method, i10, "Part map contained null value for key '" + key + "'.", new Object[0]); } } else { throw w.o(this.f125909a, this.f125910b, "Part map contained null key.", new Object[0]); } } return; } throw w.o(this.f125909a, this.f125910b, "Part map was null.", new Object[0]); } } /* compiled from: ParameterHandler */ public static final class k<T> extends n<T> { /* renamed from: a reason: collision with root package name */ public final Method f125913a; /* renamed from: b reason: collision with root package name */ public final int f125914b; /* renamed from: c reason: collision with root package name */ public final String f125915c; /* renamed from: d reason: collision with root package name */ public final f<T, String> f125916d; /* renamed from: e reason: collision with root package name */ public final boolean f125917e; public k(Method method, int i10, String str, f<T, String> fVar, boolean z14) { this.f125913a = method; this.f125914b = i10; Objects.requireNonNull(str, "name == null"); this.f125915c = str; this.f125916d = fVar; this.f125917e = z14; } @Override // retrofit2.n public void a(p pVar, T t14) throws IOException { if (t14 != null) { pVar.f(this.f125915c, this.f125916d.convert(t14), this.f125917e); return; } Method method = this.f125913a; int i10 = this.f125914b; throw w.o(method, i10, "Path parameter \"" + this.f125915c + "\" value must not be null.", new Object[0]); } } /* compiled from: ParameterHandler */ public static final class l<T> extends n<T> { /* renamed from: a reason: collision with root package name */ public final String f125918a; /* renamed from: b reason: collision with root package name */ public final f<T, String> f125919b; /* renamed from: c reason: collision with root package name */ public final boolean f125920c; public l(String str, f<T, String> fVar, boolean z14) { Objects.requireNonNull(str, "name == null"); this.f125918a = str; this.f125919b = fVar; this.f125920c = z14; } @Override // retrofit2.n public void a(p pVar, T t14) throws IOException { String convert; if (t14 != null && (convert = this.f125919b.convert(t14)) != null) { pVar.g(this.f125918a, convert, this.f125920c); } } } /* compiled from: ParameterHandler */ public static final class m<T> extends n<Map<String, T>> { /* renamed from: a reason: collision with root package name */ public final Method f125921a; /* renamed from: b reason: collision with root package name */ public final int f125922b; /* renamed from: c reason: collision with root package name */ public final f<T, String> f125923c; /* renamed from: d reason: collision with root package name */ public final boolean f125924d; public m(Method method, int i10, f<T, String> fVar, boolean z14) { this.f125921a = method; this.f125922b = i10; this.f125923c = fVar; this.f125924d = z14; } /* renamed from: d */ public void a(p pVar, Map<String, T> map) throws IOException { if (map != null) { for (Map.Entry<String, T> entry : map.entrySet()) { String key = entry.getKey(); if (key != null) { T value = entry.getValue(); if (value != null) { String convert = this.f125923c.convert(value); if (convert != null) { pVar.g(key, convert, this.f125924d); } else { Method method = this.f125921a; int i10 = this.f125922b; throw w.o(method, i10, "Query map value '" + ((Object) value) + "' converted to null by " + this.f125923c.getClass().getName() + " for key '" + key + "'.", new Object[0]); } } else { Method method2 = this.f125921a; int i14 = this.f125922b; throw w.o(method2, i14, "Query map contained null value for key '" + key + "'.", new Object[0]); } } else { throw w.o(this.f125921a, this.f125922b, "Query map contained null key.", new Object[0]); } } return; } throw w.o(this.f125921a, this.f125922b, "Query map was null", new Object[0]); } } /* renamed from: retrofit2.n$n reason: collision with other inner class name */ /* compiled from: ParameterHandler */ public static final class C1995n<T> extends n<T> { /* renamed from: a reason: collision with root package name */ public final f<T, String> f125925a; /* renamed from: b reason: collision with root package name */ public final boolean f125926b; public C1995n(f<T, String> fVar, boolean z14) { this.f125925a = fVar; this.f125926b = z14; } @Override // retrofit2.n public void a(p pVar, T t14) throws IOException { if (t14 != null) { pVar.g(this.f125925a.convert(t14), null, this.f125926b); } } } /* compiled from: ParameterHandler */ public static final class o extends n<MultipartBody.Part> { /* renamed from: a reason: collision with root package name */ public static final o f125927a = new o(); /* renamed from: d */ public void a(p pVar, MultipartBody.Part part) { if (part != null) { pVar.e(part); } } } /* compiled from: ParameterHandler */ public static final class p extends n<Object> { /* renamed from: a reason: collision with root package name */ public final Method f125928a; /* renamed from: b reason: collision with root package name */ public final int f125929b; public p(Method method, int i10) { this.f125928a = method; this.f125929b = i10; } @Override // retrofit2.n public void a(p pVar, Object obj) { if (obj != null) { pVar.m(obj); return; } throw w.o(this.f125928a, this.f125929b, "@Url parameter is null.", new Object[0]); } } /* compiled from: ParameterHandler */ public static final class q<T> extends n<T> { /* renamed from: a reason: collision with root package name */ public final Class<T> f125930a; public q(Class<T> cls) { this.f125930a = cls; } @Override // retrofit2.n public void a(p pVar, T t14) { pVar.h(this.f125930a, t14); } } public abstract void a(p pVar, T t14) throws IOException; public final n<Object> b() { return new b(); } public final n<Iterable<T>> c() { return new a(); } }