package okhttp3;

import g.a.a.a.a;
import io.netty.handler.codec.rtsp.RtspHeaders;
import java.net.Proxy;
import java.net.ProxySelector;
import java.util.List;
import java.util.Objects;
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSocketFactory;
import kotlin.Metadata;
import kotlin.jvm.internal.o;
import kotlin.reflect.w.internal.y0.n.c2.c;
import kotlin.text.j;
import kotlinx.serialization.json.internal.AbstractJsonLexerKt;
import okhttp3.HttpUrl;

/* JADX INFO: renamed from: y.a, reason: from Kotlin metadata */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000h\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u000f\u0018\u00002\u00020\u0001By\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\u0006\u0010\b\u001a\u00020\t\u0012\b\u0010\n\u001a\u0004\u0018\u00010\u000b\u0012\b\u0010\f\u001a\u0004\u0018\u00010\r\u0012\b\u0010\u000e\u001a\u0004\u0018\u00010\u000f\u0012\u0006\u0010\u0010\u001a\u00020\u0011\u0012\b\u0010\u0012\u001a\u0004\u0018\u00010\u0013\u0012\f\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u00160\u0015\u0012\f\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\u00180\u0015\u0012\u0006\u0010\u0019\u001a\u00020\u001a¢\u0006\u0002\u0010\u001bJ\u000f\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0007¢\u0006\u0002\b(J\u0013\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\u00180\u0015H\u0007¢\u0006\u0002\b)J\r\u0010\u0006\u001a\u00020\u0007H\u0007¢\u0006\u0002\b*J\u0013\u0010+\u001a\u00020,2\b\u0010-\u001a\u0004\u0018\u00010\u0001H\u0096\u0002J\u0015\u0010.\u001a\u00020,2\u0006\u0010/\u001a\u00020\u0000H\u0000¢\u0006\u0002\b0J\b\u00101\u001a\u00020\u0005H\u0016J\u000f\u0010\f\u001a\u0004\u0018\u00010\rH\u0007¢\u0006\u0002\b2J\u0013\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u00160\u0015H\u0007¢\u0006\u0002\b3J\u000f\u0010\u0012\u001a\u0004\u0018\u00010\u0013H\u0007¢\u0006\u0002\b4J\r\u0010\u0010\u001a\u00020\u0011H\u0007¢\u0006\u0002\b5J\r\u0010\u0019\u001a\u00020\u001aH\u0007¢\u0006\u0002\b6J\r\u0010\b\u001a\u00020\tH\u0007¢\u0006\u0002\b7J\u000f\u0010\n\u001a\u0004\u0018\u00010\u000bH\u0007¢\u0006\u0002\b8J\b\u00109\u001a\u00020\u0003H\u0016J\r\u0010%\u001a\u00020&H\u0007¢\u0006\u0002\b:R\u0015\u0010\u000e\u001a\u0004\u0018\u00010\u000f8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u001cR\u0019\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\u00180\u00158G¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u001dR\u0013\u0010\u0006\u001a\u00020\u00078\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u001eR\u0015\u0010\f\u001a\u0004\u0018\u00010\r8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\u001fR\u0019\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u00160\u00158G¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u001dR\u0015\u0010\u0012\u001a\u0004\u0018\u00010\u00138\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010 R\u0013\u0010\u0010\u001a\u00020\u00118\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010!R\u0013\u0010\u0019\u001a\u00020\u001a8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0019\u0010\"R\u0013\u0010\b\u001a\u00020\t8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010#R\u0015\u0010\n\u001a\u0004\u0018\u00010\u000b8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010$R\u0013\u0010%\u001a\u00020&8G¢\u0006\b\n\u0000\u001a\u0004\b%\u0010'¨\u0006;"}, d2 = {"Lokhttp3/Address;", "", "uriHost", "", "uriPort", "", "dns", "Lokhttp3/Dns;", "socketFactory", "Ljavax/net/SocketFactory;", "sslSocketFactory", "Ljavax/net/ssl/SSLSocketFactory;", "hostnameVerifier", "Ljavax/net/ssl/HostnameVerifier;", "certificatePinner", "Lokhttp3/CertificatePinner;", "proxyAuthenticator", "Lokhttp3/Authenticator;", "proxy", "Ljava/net/Proxy;", "protocols", "", "Lokhttp3/Protocol;", "connectionSpecs", "Lokhttp3/ConnectionSpec;", "proxySelector", "Ljava/net/ProxySelector;", "(Ljava/lang/String;ILokhttp3/Dns;Ljavax/net/SocketFactory;Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/HostnameVerifier;Lokhttp3/CertificatePinner;Lokhttp3/Authenticator;Ljava/net/Proxy;Ljava/util/List;Ljava/util/List;Ljava/net/ProxySelector;)V", "()Lokhttp3/CertificatePinner;", "()Ljava/util/List;", "()Lokhttp3/Dns;", "()Ljavax/net/ssl/HostnameVerifier;", "()Ljava/net/Proxy;", "()Lokhttp3/Authenticator;", "()Ljava/net/ProxySelector;", "()Ljavax/net/SocketFactory;", "()Ljavax/net/ssl/SSLSocketFactory;", RtspHeaders.Values.URL, "Lokhttp3/HttpUrl;", "()Lokhttp3/HttpUrl;", "-deprecated_certificatePinner", "-deprecated_connectionSpecs", "-deprecated_dns", "equals", "", "other", "equalsNonHost", "that", "equalsNonHost$okhttp", "hashCode", "-deprecated_hostnameVerifier", "-deprecated_protocols", "-deprecated_proxy", "-deprecated_proxyAuthenticator", "-deprecated_proxySelector", "-deprecated_socketFactory", "-deprecated_sslSocketFactory", "toString", "-deprecated_url", "okhttp"}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class Address {
    public final Dns a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final SocketFactory f9534b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final SSLSocketFactory f9535c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final HostnameVerifier f9536d;

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

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

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

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final ProxySelector f9540h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final HttpUrl f9541i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final List<Protocol> f9542j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final List<ConnectionSpec> f9543k;

    public Address(String str, int i2, Dns dns, SocketFactory socketFactory, SSLSocketFactory sSLSocketFactory, HostnameVerifier hostnameVerifier, CertificatePinner certificatePinner, Authenticator authenticator, Proxy proxy, List<? extends Protocol> list, List<ConnectionSpec> list2, ProxySelector proxySelector) {
        o.f(str, "uriHost");
        o.f(dns, "dns");
        o.f(socketFactory, "socketFactory");
        o.f(authenticator, "proxyAuthenticator");
        o.f(list, "protocols");
        o.f(list2, "connectionSpecs");
        o.f(proxySelector, "proxySelector");
        this.a = dns;
        this.f9534b = socketFactory;
        this.f9535c = sSLSocketFactory;
        this.f9536d = hostnameVerifier;
        this.f9537e = certificatePinner;
        this.f9538f = authenticator;
        this.f9539g = null;
        this.f9540h = proxySelector;
        HttpUrl.a aVar = new HttpUrl.a();
        String str2 = "https";
        String str3 = sSLSocketFactory != null ? "https" : "http";
        o.f(str3, "scheme");
        if (j.g(str3, "http", true)) {
            str2 = "http";
        } else if (!j.g(str3, "https", true)) {
            throw new IllegalArgumentException(o.l("unexpected scheme: ", str3));
        }
        aVar.f10098b = str2;
        o.f(str, "host");
        String strL0 = c.L0(HttpUrl.b.d(HttpUrl.a, str, 0, 0, false, 7));
        if (strL0 == null) {
            throw new IllegalArgumentException(o.l("unexpected host: ", str));
        }
        aVar.f10101e = strL0;
        if (!(1 <= i2 && i2 < 65536)) {
            throw new IllegalArgumentException(o.l("unexpected port: ", Integer.valueOf(i2)).toString());
        }
        aVar.f10102f = i2;
        this.f9541i = aVar.a();
        this.f9542j = okhttp3.n0.c.z(list);
        this.f9543k = okhttp3.n0.c.z(list2);
    }

    public final boolean a(Address address) {
        o.f(address, "that");
        return o.a(this.a, address.a) && o.a(this.f9538f, address.f9538f) && o.a(this.f9542j, address.f9542j) && o.a(this.f9543k, address.f9543k) && o.a(this.f9540h, address.f9540h) && o.a(this.f9539g, address.f9539g) && o.a(this.f9535c, address.f9535c) && o.a(this.f9536d, address.f9536d) && o.a(this.f9537e, address.f9537e) && this.f9541i.f10092g == address.f9541i.f10092g;
    }

    public boolean equals(Object other) {
        if (other instanceof Address) {
            Address address = (Address) other;
            if (o.a(this.f9541i, address.f9541i) && a(address)) {
                return true;
            }
        }
        return false;
    }

    public int hashCode() {
        return Objects.hashCode(this.f9537e) + ((Objects.hashCode(this.f9536d) + ((Objects.hashCode(this.f9535c) + ((Objects.hashCode(this.f9539g) + ((this.f9540h.hashCode() + ((this.f9543k.hashCode() + ((this.f9542j.hashCode() + ((this.f9538f.hashCode() + ((this.a.hashCode() + ((this.f9541i.hashCode() + 527) * 31)) * 31)) * 31)) * 31)) * 31)) * 31)) * 31)) * 31)) * 31);
    }

    public String toString() {
        String str;
        StringBuilder sbF = a.F("Address{");
        sbF.append(this.f9541i.f10091f);
        sbF.append(AbstractJsonLexerKt.COLON);
        sbF.append(this.f9541i.f10092g);
        sbF.append(", ");
        Object obj = this.f9539g;
        if (obj != null) {
            str = "proxy=";
        } else {
            obj = this.f9540h;
            str = "proxySelector=";
        }
        sbF.append(o.l(str, obj));
        sbF.append(AbstractJsonLexerKt.END_OBJ);
        return sbF.toString();
    }
}
