package com.google.android.gms.auth.api.credentials; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.auth.api.credentials.CredentialPickerConfig; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.common.internal.ReflectedParcelable; import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter; /* loaded from: classes.dex */ public final class HintRequest extends AbstractSafeParcelable implements ReflectedParcelable { public static final Parcelable.Creator CREATOR = new zzj(); private final String[] zzab; private final boolean zzae; private final String zzaf; private final String zzag; private final CredentialPickerConfig zzai; private final boolean zzaj; private final boolean zzak; private final int zzv; /* JADX INFO: Access modifiers changed from: package-private */ public HintRequest(int i, CredentialPickerConfig credentialPickerConfig, boolean z, boolean z2, String[] strArr, boolean z3, String str, String str2) { this.zzv = i; this.zzai = (CredentialPickerConfig) Preconditions.checkNotNull(credentialPickerConfig); this.zzaj = z; this.zzak = z2; this.zzab = (String[]) Preconditions.checkNotNull(strArr); if (i < 2) { this.zzae = true; this.zzaf = null; this.zzag = null; } else { this.zzae = z3; this.zzaf = str; this.zzag = str2; } } /* loaded from: classes.dex */ public static final class Builder { private String[] zzab; private String zzaf; private String zzag; private boolean zzaj; private boolean zzak; private CredentialPickerConfig zzai = new CredentialPickerConfig.Builder().build(); private boolean zzae = false; public final Builder setHintPickerConfig(CredentialPickerConfig credentialPickerConfig) { this.zzai = (CredentialPickerConfig) Preconditions.checkNotNull(credentialPickerConfig); return this; } public final HintRequest build() { if (this.zzab == null) { this.zzab = new String[0]; } if (!this.zzaj && !this.zzak && this.zzab.length == 0) { throw new IllegalStateException("At least one authentication method must be specified"); } return new HintRequest(this); } public final Builder setServerClientId(String str) { this.zzaf = str; return this; } public final Builder setPhoneNumberIdentifierSupported(boolean z) { this.zzak = z; return this; } public final Builder setIdTokenRequested(boolean z) { this.zzae = z; return this; } public final Builder setIdTokenNonce(String str) { this.zzag = str; return this; } public final Builder setEmailAddressIdentifierSupported(boolean z) { this.zzaj = z; return this; } public final Builder setAccountTypes(String... strArr) { if (strArr == null) { strArr = new String[0]; } this.zzab = strArr; return this; } } private HintRequest(Builder builder) { this(2, builder.zzai, builder.zzaj, builder.zzak, builder.zzab, builder.zzae, builder.zzaf, builder.zzag); } @Override // android.os.Parcelable public final void writeToParcel(Parcel parcel, int i) { int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel); SafeParcelWriter.writeParcelable(parcel, 1, getHintPickerConfig(), i, false); SafeParcelWriter.writeBoolean(parcel, 2, isEmailAddressIdentifierSupported()); SafeParcelWriter.writeBoolean(parcel, 3, this.zzak); SafeParcelWriter.writeStringArray(parcel, 4, getAccountTypes(), false); SafeParcelWriter.writeBoolean(parcel, 5, isIdTokenRequested()); SafeParcelWriter.writeString(parcel, 6, getServerClientId(), false); SafeParcelWriter.writeString(parcel, 7, getIdTokenNonce(), false); SafeParcelWriter.writeInt(parcel, 1000, this.zzv); SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader); } public final boolean isIdTokenRequested() { return this.zzae; } public final boolean isEmailAddressIdentifierSupported() { return this.zzaj; } public final String getServerClientId() { return this.zzaf; } public final String getIdTokenNonce() { return this.zzag; } public final CredentialPickerConfig getHintPickerConfig() { return this.zzai; } public final String[] getAccountTypes() { return this.zzab; } }