discord-jadx/app/src/main/java/com/discord/utilities/captcha/CaptchaErrorBody.java

178 lines
6.2 KiB
Java

package com.discord.utilities.captcha;
import b.d.b.a.a;
import b.i.a.f.e.o.f;
import b.i.d.c;
import b.i.d.e;
import com.discord.app.AppLog;
import com.discord.utilities.error.Error;
import com.discord.utilities.logging.Logger;
import d0.z.d.m;
import java.io.Serializable;
import java.util.List;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: CaptchaErrorBody.kt */
public final class CaptchaErrorBody implements Serializable {
public static final Companion Companion = new Companion(null);
private final List<String> captchaKey;
private final String captchaRqdata;
private final String captchaRqtoken;
private final CaptchaService captchaService;
private final String captchaSitekey;
/* compiled from: CaptchaErrorBody.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final CaptchaErrorBody createFromError(Error error) {
m.checkNotNullParameter(error, "error");
String bodyText = error.getBodyText();
if (bodyText == null) {
return null;
}
e eVar = new e();
eVar.c = c.LOWER_CASE_WITH_UNDERSCORES;
try {
return (CaptchaErrorBody) f.E1(CaptchaErrorBody.class).cast(eVar.a().g(bodyText, CaptchaErrorBody.class));
} catch (Exception e) {
Logger.e$default(AppLog.g, "failed to parse captcha error body", e, null, 4, null);
return null;
}
}
public final CaptchaErrorBody createFromString(String str) {
m.checkNotNullParameter(str, "errorString");
e eVar = new e();
eVar.c = c.LOWER_CASE_WITH_UNDERSCORES;
try {
return (CaptchaErrorBody) f.E1(CaptchaErrorBody.class).cast(eVar.a().g(str, CaptchaErrorBody.class));
} catch (Exception e) {
Logger.e$default(AppLog.g, "failed to parse captcha error body", e, null, 4, null);
return null;
}
}
}
public CaptchaErrorBody(List<String> list, String str, CaptchaService captchaService, String str2, String str3) {
this.captchaKey = list;
this.captchaSitekey = str;
this.captchaService = captchaService;
this.captchaRqdata = str2;
this.captchaRqtoken = str3;
}
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: com.discord.utilities.captcha.CaptchaErrorBody */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ CaptchaErrorBody copy$default(CaptchaErrorBody captchaErrorBody, List list, String str, CaptchaService captchaService, String str2, String str3, int i, Object obj) {
if ((i & 1) != 0) {
list = captchaErrorBody.captchaKey;
}
if ((i & 2) != 0) {
str = captchaErrorBody.captchaSitekey;
}
if ((i & 4) != 0) {
captchaService = captchaErrorBody.captchaService;
}
if ((i & 8) != 0) {
str2 = captchaErrorBody.captchaRqdata;
}
if ((i & 16) != 0) {
str3 = captchaErrorBody.captchaRqtoken;
}
return captchaErrorBody.copy(list, str, captchaService, str2, str3);
}
public final List<String> component1() {
return this.captchaKey;
}
public final String component2() {
return this.captchaSitekey;
}
public final CaptchaService component3() {
return this.captchaService;
}
public final String component4() {
return this.captchaRqdata;
}
public final String component5() {
return this.captchaRqtoken;
}
public final CaptchaErrorBody copy(List<String> list, String str, CaptchaService captchaService, String str2, String str3) {
return new CaptchaErrorBody(list, str, captchaService, str2, str3);
}
@Override // java.lang.Object
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof CaptchaErrorBody)) {
return false;
}
CaptchaErrorBody captchaErrorBody = (CaptchaErrorBody) obj;
return m.areEqual(this.captchaKey, captchaErrorBody.captchaKey) && m.areEqual(this.captchaSitekey, captchaErrorBody.captchaSitekey) && m.areEqual(this.captchaService, captchaErrorBody.captchaService) && m.areEqual(this.captchaRqdata, captchaErrorBody.captchaRqdata) && m.areEqual(this.captchaRqtoken, captchaErrorBody.captchaRqtoken);
}
public final List<String> getCaptchaKey() {
return this.captchaKey;
}
public final String getCaptchaRqdata() {
return this.captchaRqdata;
}
public final String getCaptchaRqtoken() {
return this.captchaRqtoken;
}
public final CaptchaService getCaptchaService() {
return this.captchaService;
}
public final String getCaptchaSitekey() {
return this.captchaSitekey;
}
@Override // java.lang.Object
public int hashCode() {
List<String> list = this.captchaKey;
int i = 0;
int hashCode = (list != null ? list.hashCode() : 0) * 31;
String str = this.captchaSitekey;
int hashCode2 = (hashCode + (str != null ? str.hashCode() : 0)) * 31;
CaptchaService captchaService = this.captchaService;
int hashCode3 = (hashCode2 + (captchaService != null ? captchaService.hashCode() : 0)) * 31;
String str2 = this.captchaRqdata;
int hashCode4 = (hashCode3 + (str2 != null ? str2.hashCode() : 0)) * 31;
String str3 = this.captchaRqtoken;
if (str3 != null) {
i = str3.hashCode();
}
return hashCode4 + i;
}
@Override // java.lang.Object
public String toString() {
StringBuilder R = a.R("CaptchaErrorBody(captchaKey=");
R.append(this.captchaKey);
R.append(", captchaSitekey=");
R.append(this.captchaSitekey);
R.append(", captchaService=");
R.append(this.captchaService);
R.append(", captchaRqdata=");
R.append(this.captchaRqdata);
R.append(", captchaRqtoken=");
return a.H(R, this.captchaRqtoken, ")");
}
}