package com.google.android.gms.identitycredentials;

import android.os.Parcel;
import android.os.Parcelable;
import androidx.media3.container.NalUnitUtil;
import androidx.media3.exoplayer.rtsp.SessionDescription;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import defpackage.cr4;
import defpackage.fi7;
import defpackage.kp6;
import defpackage.m15;
import defpackage.n89;
import defpackage.vo6;
import defpackage.vx8;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;

/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0012\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0012\b\u0007\u0018\u0000 !2\u00020\u0001:\u0001!BA\b\u0007\u0012\b\b\u0001\u0010\u0003\u001a\u00020\u0002\u0012\b\b\u0001\u0010\u0004\u001a\u00020\u0002\u0012\b\b\u0003\u0010\u0006\u001a\u00020\u0005\u0012\b\b\u0003\u0010\u0007\u001a\u00020\u0005\u0012\u000e\b\u0003\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00050\b¢\u0006\u0004\b\n\u0010\u000bJ\u001f\u0010\u0011\u001a\u00020\u00102\u0006\u0010\r\u001a\u00020\f2\u0006\u0010\u000f\u001a\u00020\u000eH\u0016¢\u0006\u0004\b\u0011\u0010\u0012R\u001a\u0010\u0003\u001a\u00020\u00028\u0006X\u0087\u0004¢\u0006\f\n\u0004\b\u0003\u0010\u0013\u001a\u0004\b\u0014\u0010\u0015R\u001a\u0010\u0004\u001a\u00020\u00028\u0006X\u0087\u0004¢\u0006\f\n\u0004\b\u0004\u0010\u0013\u001a\u0004\b\u0016\u0010\u0015R\u001a\u0010\u0006\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\f\n\u0004\b\u0006\u0010\u0017\u001a\u0004\b\u0018\u0010\u0019R \u0010\u0007\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\u0012\n\u0004\b\u0007\u0010\u0017\u0012\u0004\b\u001b\u0010\u001c\u001a\u0004\b\u001a\u0010\u0019R&\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00050\b8\u0006X\u0087\u0004¢\u0006\u0012\n\u0004\b\t\u0010\u001d\u0012\u0004\b \u0010\u001c\u001a\u0004\b\u001e\u0010\u001f¨\u0006\""}, d2 = {"Lcom/google/android/gms/identitycredentials/RegistrationRequest;", "Lcom/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable;", "", "credentials", "matcher", "", SessionDescription.ATTR_TYPE, "requestType", "", "protocolTypes", "<init>", "([B[BLjava/lang/String;Ljava/lang/String;Ljava/util/List;)V", "Landroid/os/Parcel;", "dest", "", "flags", "Le6a;", "writeToParcel", "(Landroid/os/Parcel;I)V", "[B", "getCredentials", "()[B", "getMatcher", "Ljava/lang/String;", "getType", "()Ljava/lang/String;", "getRequestType", "getRequestType$annotations", "()V", "Ljava/util/List;", "getProtocolTypes", "()Ljava/util/List;", "getProtocolTypes$annotations", "Companion", "java.com.google.android.gmscore.integ.client.identity_credentials_identity_credentials"}, k = 1, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
@SafeParcelable.Class(creator = "RegistrationRequestCreator")
@vx8
public final class RegistrationRequest extends AbstractSafeParcelable {

    @kp6
    public static final String TAG = "RegistrationRequest";

    @SafeParcelable.Field(getter = "getCredentials", id = 1)
    @kp6
    private final byte[] credentials;

    @SafeParcelable.Field(getter = "getMatcher", id = 2)
    @kp6
    private final byte[] matcher;

    @SafeParcelable.Field(defaultValueUnchecked = "java.util.Collections.emptyList()", getter = "getProtocolTypes", id = 5)
    @kp6
    private final List<String> protocolTypes;

    @SafeParcelable.Field(defaultValue = "", getter = "getRequestType", id = 4)
    @kp6
    private final String requestType;

    @SafeParcelable.Field(defaultValue = "", getter = "getType", id = 3)
    @kp6
    private final String type;

    @kp6
    @m15
    public static final Parcelable.Creator<RegistrationRequest> CREATOR = new RegistrationRequestCreator();

    /* JADX WARN: Removed duplicated region for block: B:10:0x0046  */
    @SafeParcelable.Constructor
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public RegistrationRequest(@vo6 @SafeParcelable.Param(id = 1) byte[] bArr, @vo6 @SafeParcelable.Param(id = 2) byte[] bArr2, @vo6 @SafeParcelable.Param(id = 3) String str, @vo6 @SafeParcelable.Param(id = 4) String str2, @vo6 @SafeParcelable.Param(id = 5) List<String> list) {
        boolean z;
        cr4.g(bArr, "credentials");
        cr4.g(bArr2, "matcher");
        cr4.g(str, SessionDescription.ATTR_TYPE);
        cr4.g(str2, "requestType");
        cr4.g(list, "protocolTypes");
        this.credentials = bArr;
        this.matcher = bArr2;
        this.type = str;
        this.requestType = str2;
        this.protocolTypes = list;
        if (n89.ab(str2) || list.isEmpty()) {
            z = false;
        } else {
            List<String> list2 = list;
            if (!(list2 instanceof Collection) || !list2.isEmpty()) {
                Iterator<T> it = list2.iterator();
                while (it.hasNext()) {
                    if (!n89.ab((String) it.next())) {
                        z = true;
                        break;
                    }
                }
                z = false;
            }
        }
        boolean z2 = !n89.ab(this.type) && this.requestType.length() == 0 && this.protocolTypes.isEmpty();
        if (z || z2) {
            return;
        }
        throw new IllegalArgumentException(fi7.i(fi7.m("Either type: ", this.type, ", or requestType: ", this.requestType, " and protocolTypes: "), this.protocolTypes, " must be specified, but all were blank, or for protocolTypes, empty or full of blank elements."));
    }

    @kp6
    public final byte[] getCredentials() {
        return this.credentials;
    }

    @kp6
    public final byte[] getMatcher() {
        return this.matcher;
    }

    @kp6
    public final List<String> getProtocolTypes() {
        return this.protocolTypes;
    }

    @kp6
    public final String getRequestType() {
        return this.requestType;
    }

    @kp6
    public final String getType() {
        return this.type;
    }

    @Override // android.os.Parcelable
    public void writeToParcel(@vo6 Parcel dest, int flags) {
        cr4.g(dest, "dest");
        RegistrationRequestCreator.writeToParcel(this, dest, flags);
    }
}
