package XnFJ5_9;

import XnFJ5_9.SI64pbG_23;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.annotation.Nullable;
/* compiled from: Request.java */
/* loaded from: classes.dex */
public final class EANXC_30 {
    @Nullable
    public final DtqPmDY_31 KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final G83uNX_24 f1430KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final SI64pbG_23 f1431KQgRr5e_0;
    @Nullable

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public volatile Xgtqvk_8 f1432KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final String f1433KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Map<Class<?>, Object> f1434KQgRr5e_0;

    public EANXC_30(KQgRr5e_0 kQgRr5e_0) {
        this.f1430KQgRr5e_0 = kQgRr5e_0.f1435KQgRr5e_0;
        this.f1433KQgRr5e_0 = kQgRr5e_0.f1437KQgRr5e_0;
        this.f1431KQgRr5e_0 = kQgRr5e_0.f1436KQgRr5e_0.KQgRr5e_0();
        this.KQgRr5e_0 = kQgRr5e_0.KQgRr5e_0;
        this.f1434KQgRr5e_0 = XnFJ5_9.Ft6VRog_36.X6FRs_4.KQgRr5e_0(kQgRr5e_0.f1438KQgRr5e_0);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public G83uNX_24 m661KQgRr5e_0() {
        return this.f1430KQgRr5e_0;
    }

    public String toString() {
        return "Request{method=" + this.f1433KQgRr5e_0 + ", url=" + this.f1430KQgRr5e_0 + ", tags=" + this.f1434KQgRr5e_0 + '}';
    }

    /* compiled from: Request.java */
    /* loaded from: classes.dex */
    public static class KQgRr5e_0 {
        @Nullable
        public DtqPmDY_31 KQgRr5e_0;
        @Nullable

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public G83uNX_24 f1435KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public SI64pbG_23.KQgRr5e_0 f1436KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public String f1437KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public Map<Class<?>, Object> f1438KQgRr5e_0;

        public KQgRr5e_0() {
            this.f1438KQgRr5e_0 = Collections.emptyMap();
            this.f1437KQgRr5e_0 = "GET";
            this.f1436KQgRr5e_0 = new SI64pbG_23.KQgRr5e_0();
        }

        public KQgRr5e_0 KQgRr5e_0(G83uNX_24 g83uNX_24) {
            if (g83uNX_24 != null) {
                this.f1435KQgRr5e_0 = g83uNX_24;
                return this;
            }
            throw new NullPointerException("url == null");
        }

        public KQgRr5e_0 QxJ9d_1(String str) {
            if (str != 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);
                }
                KQgRr5e_0(G83uNX_24.QxJ9d_1(str));
                return this;
            }
            throw new NullPointerException("url == null");
        }

        public KQgRr5e_0 KQgRr5e_0(String str, String str2) {
            this.f1436KQgRr5e_0.KQgRr5e_0(str, str2);
            return this;
        }

        public KQgRr5e_0 KQgRr5e_0(String str) {
            this.f1436KQgRr5e_0.QxJ9d_1(str);
            return this;
        }

        public KQgRr5e_0(EANXC_30 eanxc_30) {
            Map<Class<?>, Object> linkedHashMap;
            this.f1438KQgRr5e_0 = Collections.emptyMap();
            this.f1435KQgRr5e_0 = eanxc_30.f1430KQgRr5e_0;
            this.f1437KQgRr5e_0 = eanxc_30.f1433KQgRr5e_0;
            this.KQgRr5e_0 = eanxc_30.KQgRr5e_0;
            if (eanxc_30.f1434KQgRr5e_0.isEmpty()) {
                linkedHashMap = Collections.emptyMap();
            } else {
                linkedHashMap = new LinkedHashMap<>(eanxc_30.f1434KQgRr5e_0);
            }
            this.f1438KQgRr5e_0 = linkedHashMap;
            this.f1436KQgRr5e_0 = eanxc_30.f1431KQgRr5e_0.m768KQgRr5e_0();
        }

        public KQgRr5e_0 KQgRr5e_0(SI64pbG_23 sI64pbG_23) {
            this.f1436KQgRr5e_0 = sI64pbG_23.m768KQgRr5e_0();
            return this;
        }

        public KQgRr5e_0 KQgRr5e_0(String str, @Nullable DtqPmDY_31 dtqPmDY_31) {
            if (str != null) {
                if (str.length() != 0) {
                    if (dtqPmDY_31 != null && !XnFJ5_9.Ft6VRog_36.Xgtqvk_8.IFxWkV_5.QxJ9d_1(str)) {
                        throw new IllegalArgumentException("method " + str + " must not have a request body.");
                    } else if (dtqPmDY_31 == null && XnFJ5_9.Ft6VRog_36.Xgtqvk_8.IFxWkV_5.X6FRs_4(str)) {
                        throw new IllegalArgumentException("method " + str + " must have a request body.");
                    } else {
                        this.f1437KQgRr5e_0 = str;
                        this.KQgRr5e_0 = dtqPmDY_31;
                        return this;
                    }
                }
                throw new IllegalArgumentException("method.length() == 0");
            }
            throw new NullPointerException("method == null");
        }

        public KQgRr5e_0 QxJ9d_1(String str, String str2) {
            this.f1436KQgRr5e_0.PGPF6hQ_2(str, str2);
            return this;
        }

        public EANXC_30 KQgRr5e_0() {
            if (this.f1435KQgRr5e_0 != null) {
                return new EANXC_30(this);
            }
            throw new IllegalStateException("url == null");
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public String m664KQgRr5e_0() {
        return this.f1433KQgRr5e_0;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public SI64pbG_23 m662KQgRr5e_0() {
        return this.f1431KQgRr5e_0;
    }

    @Nullable
    public String KQgRr5e_0(String str) {
        return this.f1431KQgRr5e_0.m769KQgRr5e_0(str);
    }

    @Nullable
    public DtqPmDY_31 KQgRr5e_0() {
        return this.KQgRr5e_0;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public KQgRr5e_0 m660KQgRr5e_0() {
        return new KQgRr5e_0(this);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public Xgtqvk_8 m663KQgRr5e_0() {
        Xgtqvk_8 xgtqvk_8 = this.f1432KQgRr5e_0;
        if (xgtqvk_8 != null) {
            return xgtqvk_8;
        }
        Xgtqvk_8 KQgRr5e_02 = Xgtqvk_8.KQgRr5e_0(this.f1431KQgRr5e_0);
        this.f1432KQgRr5e_0 = KQgRr5e_02;
        return KQgRr5e_02;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public boolean m665KQgRr5e_0() {
        return this.f1430KQgRr5e_0.m750KQgRr5e_0();
    }
}
