132 lines
4.5 KiB
Java
132 lines
4.5 KiB
Java
package com.discord.utilities.captcha;
|
|
|
|
import c.d.b.a.a;
|
|
import c.i.d.c;
|
|
import c.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 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.f1384c = c.LOWER_CASE_WITH_UNDERSCORES;
|
|
try {
|
|
return (CaptchaErrorBody) c.i.a.f.e.o.c.q0(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 CaptchaErrorBody(List<String> list, String str, CaptchaService captchaService) {
|
|
this.captchaKey = list;
|
|
this.captchaSitekey = str;
|
|
this.captchaService = captchaService;
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r0v0, 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, 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;
|
|
}
|
|
return captchaErrorBody.copy(list, str, captchaService);
|
|
}
|
|
|
|
public final List<String> component1() {
|
|
return this.captchaKey;
|
|
}
|
|
|
|
public final String component2() {
|
|
return this.captchaSitekey;
|
|
}
|
|
|
|
public final CaptchaService component3() {
|
|
return this.captchaService;
|
|
}
|
|
|
|
public final CaptchaErrorBody copy(List<String> list, String str, CaptchaService captchaService) {
|
|
return new CaptchaErrorBody(list, str, captchaService);
|
|
}
|
|
|
|
@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);
|
|
}
|
|
|
|
public final List<String> getCaptchaKey() {
|
|
return this.captchaKey;
|
|
}
|
|
|
|
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;
|
|
if (captchaService != null) {
|
|
i = captchaService.hashCode();
|
|
}
|
|
return hashCode2 + i;
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public String toString() {
|
|
StringBuilder L = a.L("CaptchaErrorBody(captchaKey=");
|
|
L.append(this.captchaKey);
|
|
L.append(", captchaSitekey=");
|
|
L.append(this.captchaSitekey);
|
|
L.append(", captchaService=");
|
|
L.append(this.captchaService);
|
|
L.append(")");
|
|
return L.toString();
|
|
}
|
|
}
|