what-the-bank/sources/com/google/android/gms/internal/p002firebaseauthapi/zzzv.java

144 lines
4.9 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.p002firebaseauthapi;
import com.google.android.gms.common.internal.Preconditions;
import com.google.firebase.auth.ActionCodeSettings;
import com.huawei.hms.support.feature.result.CommonConstant;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class zzzv implements zzxm {
private final String zza;
private String zzb;
private String zzc;
private String zzd;
private ActionCodeSettings zze;
private String zzf;
private zzzv(int i, ActionCodeSettings actionCodeSettings, String str, String str2, String str3, String str4) {
this.zza = "VERIFY_AND_CHANGE_EMAIL";
this.zze = (ActionCodeSettings) Preconditions.checkNotNull(actionCodeSettings);
this.zzb = null;
this.zzc = str2;
this.zzd = str3;
this.zzf = null;
}
public static zzzv zzc(ActionCodeSettings actionCodeSettings, String str, String str2) {
Preconditions.checkNotEmpty(str);
Preconditions.checkNotEmpty(str2);
Preconditions.checkNotNull(actionCodeSettings);
return new zzzv(7, actionCodeSettings, null, str2, str, null);
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzxm
public final String zza() throws JSONException {
char c;
JSONObject jSONObject = new JSONObject();
String str = this.zza;
switch (str.hashCode()) {
case -1452371317:
if (str.equals("PASSWORD_RESET")) {
c = 0;
break;
}
c = 65535;
break;
case -1341836234:
if (str.equals("VERIFY_EMAIL")) {
c = 1;
break;
}
c = 65535;
break;
case -1099157829:
if (str.equals("VERIFY_AND_CHANGE_EMAIL")) {
c = 3;
break;
}
c = 65535;
break;
case 870738373:
if (str.equals("EMAIL_SIGNIN")) {
c = 2;
break;
}
c = 65535;
break;
default:
c = 65535;
break;
}
jSONObject.put("requestType", c != 0 ? c != 1 ? c != 2 ? c != 3 ? 0 : 7 : 6 : 4 : 1);
String str2 = this.zzb;
if (str2 != null) {
jSONObject.put("email", str2);
}
String str3 = this.zzc;
if (str3 != null) {
jSONObject.put("newEmail", str3);
}
String str4 = this.zzd;
if (str4 != null) {
jSONObject.put(CommonConstant.KEY_ID_TOKEN, str4);
}
ActionCodeSettings actionCodeSettings = this.zze;
if (actionCodeSettings != null) {
jSONObject.put("androidInstallApp", actionCodeSettings.getAndroidInstallApp());
jSONObject.put("canHandleCodeInApp", this.zze.canHandleCodeInApp());
if (this.zze.getUrl() != null) {
jSONObject.put("continueUrl", this.zze.getUrl());
}
if (this.zze.getIOSBundle() != null) {
jSONObject.put("iosBundleId", this.zze.getIOSBundle());
}
if (this.zze.zzd() != null) {
jSONObject.put("iosAppStoreId", this.zze.zzd());
}
if (this.zze.getAndroidPackageName() != null) {
jSONObject.put("androidPackageName", this.zze.getAndroidPackageName());
}
if (this.zze.getAndroidMinimumVersion() != null) {
jSONObject.put("androidMinimumVersion", this.zze.getAndroidMinimumVersion());
}
if (this.zze.zzc() != null) {
jSONObject.put("dynamicLinkDomain", this.zze.zzc());
}
}
String str5 = this.zzf;
if (str5 != null) {
jSONObject.put("tenantId", str5);
}
return jSONObject.toString();
}
public final zzzv zzd(ActionCodeSettings actionCodeSettings) {
this.zze = (ActionCodeSettings) Preconditions.checkNotNull(actionCodeSettings);
return this;
}
public final zzzv zze(String str) {
this.zzb = Preconditions.checkNotEmpty(str);
return this;
}
public final zzzv zzg(String str) {
this.zzd = Preconditions.checkNotEmpty(str);
return this;
}
public final zzzv zzf(String str) {
this.zzf = str;
return this;
}
public final ActionCodeSettings zzb() {
return this.zze;
}
public zzzv(int i) {
this.zza = i != 1 ? i != 4 ? i != 6 ? i != 7 ? "REQUEST_TYPE_UNSET_ENUM_VALUE" : "VERIFY_AND_CHANGE_EMAIL" : "EMAIL_SIGNIN" : "VERIFY_EMAIL" : "PASSWORD_RESET";
}
}