what-the-bank/sources/com/facetec/sdk/ke.java

180 lines
4.6 KiB
Java

package com.facetec.sdk;
import com.airbnb.deeplinkdispatch.UrlTreeKt;
import com.facetec.sdk.jv;
import io.grpc.internal.GrpcUtil;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
/* loaded from: classes.dex */
public final class ke {
final jv a;
final ki b;
final String c;
final kc d;
final Map<Class<?>, Object> e;
private volatile jl f;
ke(d dVar) {
this.d = dVar.e;
this.c = dVar.b;
this.a = dVar.a.e();
this.b = dVar.c;
this.e = km.e(dVar.d);
}
public final String c(String str) {
return this.a.e(str);
}
public final d d() {
return new d(this);
}
public final jl j() {
jl jlVar = this.f;
if (jlVar != null) {
return jlVar;
}
jl e = jl.e(this.a);
this.f = e;
return e;
}
public final boolean i() {
return this.d.a();
}
public final String toString() {
StringBuilder sb = new StringBuilder("Request{method=");
sb.append(this.c);
sb.append(", url=");
sb.append(this.d);
sb.append(", tags=");
sb.append(this.e);
sb.append(UrlTreeKt.componentParamSuffixChar);
return sb.toString();
}
/* loaded from: classes.dex */
public static final class d {
public jv.a a;
String b;
ki c;
Map<Class<?>, Object> d;
kc e;
public d() {
this.d = Collections.emptyMap();
this.b = "GET";
this.a = new jv.a();
}
d(ke keVar) {
Map<Class<?>, Object> linkedHashMap;
this.d = Collections.emptyMap();
this.e = keVar.d;
this.b = keVar.c;
this.c = keVar.b;
if (keVar.e.isEmpty()) {
linkedHashMap = Collections.emptyMap();
} else {
linkedHashMap = new LinkedHashMap<>(keVar.e);
}
this.d = linkedHashMap;
this.a = keVar.a.e();
}
public final d b(kc kcVar) {
if (kcVar == null) {
throw new NullPointerException("url == null");
}
this.e = kcVar;
return this;
}
public final d d(String str) {
if (str == null) {
throw new NullPointerException("url == null");
}
if (str.regionMatches(true, 0, "ws:", 0, 3)) {
StringBuilder sb = new StringBuilder("http:");
sb.append(str.substring(3));
str = sb.toString();
} else if (str.regionMatches(true, 0, "wss:", 0, 4)) {
StringBuilder sb2 = new StringBuilder("https:");
sb2.append(str.substring(4));
str = sb2.toString();
}
return b(kc.b(str));
}
public final d a(String str, String str2) {
this.a.a(str, str2);
return this;
}
public final d c(String str, String str2) {
this.a.b(str, str2);
return this;
}
public final d e(String str) {
this.a.b(str);
return this;
}
public final d d(ki kiVar) {
return b(GrpcUtil.HTTP_METHOD, kiVar);
}
public final d b(String str, ki kiVar) {
if (str == null) {
throw new NullPointerException("method == null");
}
if (str.length() == 0) {
throw new IllegalArgumentException("method.length() == 0");
}
if (kiVar != null && !lg.a(str)) {
StringBuilder sb = new StringBuilder("method ");
sb.append(str);
sb.append(" must not have a request body.");
throw new IllegalArgumentException(sb.toString());
}
if (kiVar != null || !lg.c(str)) {
this.b = str;
this.c = kiVar;
return this;
}
StringBuilder sb2 = new StringBuilder("method ");
sb2.append(str);
sb2.append(" must have a request body.");
throw new IllegalArgumentException(sb2.toString());
}
public final ke b() {
if (this.e == null) {
throw new IllegalStateException("url == null");
}
return new ke(this);
}
}
public final ki e() {
return this.b;
}
public final String c() {
return this.c;
}
public final jv b() {
return this.a;
}
public final kc a() {
return this.d;
}
}