package k7;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;

/* JADX INFO: loaded from: classes.dex */
public final class i {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public boolean f14080a = true;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public boolean f14081b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public Object f14082c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public Serializable f14083d;

    public j a() {
        return new j(this.f14080a, this.f14081b, (String[]) this.f14082c, (String[]) this.f14083d);
    }

    public void b(String... strArr) {
        P6.g.e(strArr, "cipherSuites");
        if (!this.f14080a) {
            throw new IllegalArgumentException("no cipher suites for cleartext connections");
        }
        if (strArr.length == 0) {
            throw new IllegalArgumentException("At least one cipher suite is required");
        }
        this.f14082c = (String[]) strArr.clone();
    }

    public void c(h... hVarArr) {
        P6.g.e(hVarArr, "cipherSuites");
        if (!this.f14080a) {
            throw new IllegalArgumentException("no cipher suites for cleartext connections");
        }
        ArrayList arrayList = new ArrayList(hVarArr.length);
        for (h hVar : hVarArr) {
            arrayList.add(hVar.f14079a);
        }
        String[] strArr = (String[]) arrayList.toArray(new String[0]);
        b((String[]) Arrays.copyOf(strArr, strArr.length));
    }

    /* JADX WARN: Type inference failed for: r2v4, types: [java.io.Serializable, java.lang.String[]] */
    public void d(String... strArr) {
        P6.g.e(strArr, "tlsVersions");
        if (!this.f14080a) {
            throw new IllegalArgumentException("no TLS versions for cleartext connections");
        }
        if (strArr.length == 0) {
            throw new IllegalArgumentException("At least one TLS version is required");
        }
        this.f14083d = (String[]) strArr.clone();
    }

    public void e(G... gArr) {
        if (!this.f14080a) {
            throw new IllegalArgumentException("no TLS versions for cleartext connections");
        }
        ArrayList arrayList = new ArrayList(gArr.length);
        for (G g8 : gArr) {
            arrayList.add(g8.f14033q);
        }
        String[] strArr = (String[]) arrayList.toArray(new String[0]);
        d((String[]) Arrays.copyOf(strArr, strArr.length));
    }
}
