package com.google.android.gms.internal.p002firebaseauthapi; import com.google.android.gms.common.Scopes; import com.google.android.gms.common.internal.Preconditions; import com.google.firebase.auth.d; import org.json.JSONObject; /* loaded from: classes.dex */ public final class zzadn implements zzabc { private final String zza; private String zzb; private String zzc; private String zzd; private d zze; private String zzf; private String zzg; public zzadn(int i10) { this.zza = i10 != 1 ? i10 != 4 ? i10 != 6 ? i10 != 7 ? "REQUEST_TYPE_UNSET_ENUM_VALUE" : "VERIFY_AND_CHANGE_EMAIL" : "EMAIL_SIGNIN" : "VERIFY_EMAIL" : "PASSWORD_RESET"; } public static zzadn zzc(d dVar, String str, String str2) { Preconditions.checkNotEmpty(str); Preconditions.checkNotEmpty(str2); Preconditions.checkNotNull(dVar); return new zzadn(7, dVar, null, str2, str, null, null); } /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */ @Override // com.google.android.gms.internal.p002firebaseauthapi.zzabc public final String zza() { char c10; JSONObject jSONObject = new JSONObject(); String str = this.zza; int i10 = 0; switch (str.hashCode()) { case -1452371317: if (str.equals("PASSWORD_RESET")) { c10 = 0; break; } c10 = 65535; break; case -1341836234: if (str.equals("VERIFY_EMAIL")) { c10 = 1; break; } c10 = 65535; break; case -1099157829: if (str.equals("VERIFY_AND_CHANGE_EMAIL")) { c10 = 3; break; } c10 = 65535; break; case 870738373: if (str.equals("EMAIL_SIGNIN")) { c10 = 2; break; } c10 = 65535; break; default: c10 = 65535; break; } if (c10 == 0) { i10 = 1; } else if (c10 == 1) { i10 = 4; } else if (c10 == 2) { i10 = 6; } else if (c10 == 3) { i10 = 7; } jSONObject.put("requestType", i10); String str2 = this.zzb; if (str2 != null) { jSONObject.put(Scopes.EMAIL, str2); } String str3 = this.zzc; if (str3 != null) { jSONObject.put("newEmail", str3); } String str4 = this.zzd; if (str4 != null) { jSONObject.put("idToken", str4); } d dVar = this.zze; if (dVar != null) { jSONObject.put("androidInstallApp", dVar.R()); jSONObject.put("canHandleCodeInApp", this.zze.P()); if (this.zze.d0() != null) { jSONObject.put("continueUrl", this.zze.d0()); } if (this.zze.a0() != null) { jSONObject.put("iosBundleId", this.zze.a0()); } if (this.zze.f0() != null) { jSONObject.put("iosAppStoreId", this.zze.f0()); } if (this.zze.Y() != null) { jSONObject.put("androidPackageName", this.zze.Y()); } if (this.zze.S() != null) { jSONObject.put("androidMinimumVersion", this.zze.S()); } if (this.zze.zzc() != null) { jSONObject.put("dynamicLinkDomain", this.zze.zzc()); } } String str5 = this.zzf; if (str5 != null) { jSONObject.put("tenantId", str5); } String str6 = this.zzg; if (str6 != null) { zzafg.zzd(jSONObject, "captchaResp", str6); } else { zzafg.zzc(jSONObject); } return jSONObject.toString(); } public final d zzb() { return this.zze; } public final zzadn zzd(d dVar) { this.zze = (d) Preconditions.checkNotNull(dVar); return this; } public final zzadn zze(String str) { this.zzg = str; return this; } public final zzadn zzf(String str) { this.zzb = Preconditions.checkNotEmpty(str); return this; } public final zzadn zzg(String str) { this.zzf = str; return this; } public final zzadn zzh(String str) { this.zzd = Preconditions.checkNotEmpty(str); return this; } private zzadn(int i10, d dVar, String str, String str2, String str3, String str4, String str5) { this.zza = "VERIFY_AND_CHANGE_EMAIL"; this.zze = (d) Preconditions.checkNotNull(dVar); this.zzb = null; this.zzc = str2; this.zzd = str3; this.zzf = null; this.zzg = null; } }