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 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.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 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 component1() { return this.captchaKey; } public final String component2() { return this.captchaSitekey; } public final CaptchaService component3() { return this.captchaService; } public final CaptchaErrorBody copy(List 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 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 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 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(")"); return R.toString(); } }