Last active
April 29, 2024 16:45
-
-
Save Mercandj/b7dd3c61d01fa36a6ba3b6f1f78b2182 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Response { | |
private final int httpCode; | |
public int getHttpCode() { | |
return this.httpCode; | |
} | |
private Response(int httpCode) { | |
this.httpCode = httpCode; | |
} | |
// $FF: synthetic method | |
public Response(int httpCode, DefaultConstructorMarker $constructor_marker) { | |
this(httpCode); | |
} | |
} | |
public final class Success extends Response { | |
private final int httpCode; | |
@NotNull private final String data; | |
public int getHttpCode() { | |
return this.httpCode; | |
} | |
@NotNull public final String getData() { | |
return this.data; | |
} | |
public Success(int httpCode, @NotNull String data) { | |
Intrinsics.checkNotNullParameter(data, "data"); | |
super(httpCode, (DefaultConstructorMarker)null); | |
this.httpCode = httpCode; | |
this.data = data; | |
} | |
public final int component1() { | |
return this.getHttpCode(); | |
} | |
@NotNull public final String component2() { | |
return this.data; | |
} | |
@NotNull public final Success copy(int httpCode, @NotNull String data) { | |
Intrinsics.checkNotNullParameter(data, "data"); | |
return new Success(httpCode, data); | |
} | |
// $FF: synthetic method | |
public static Success copy$default(Success var0, int var1, String var2, int var3, Object var4) { | |
if ((var3 & 1) != 0) { | |
var1 = var0.getHttpCode(); | |
} | |
if ((var3 & 2) != 0) { | |
var2 = var0.data; | |
} | |
return var0.copy(var1, var2); | |
} | |
@NotNull public String toString() { | |
return "Success(httpCode=" + this.getHttpCode() + ", data=" + this.data + ")"; | |
} | |
public int hashCode() { | |
int var10000 = Integer.hashCode(this.getHttpCode()) * 31; | |
String var10001 = this.data; | |
return var10000 + (var10001 != null ? var10001.hashCode() : 0); | |
} | |
public boolean equals(@Nullable Object var1) { | |
if (this != var1) { | |
if (var1 instanceof Success) { | |
Success var2 = (Success)var1; | |
if (this.getHttpCode() == var2.getHttpCode() && Intrinsics.areEqual(this.data, var2.data)) { | |
return true; | |
} | |
} | |
return false; | |
} else { | |
return true; | |
} | |
} | |
} | |
public final class Fail extends Response { | |
private final int httpCode; | |
public int getHttpCode() { | |
return this.httpCode; | |
} | |
public Fail(int httpCode) { | |
super(httpCode, (DefaultConstructorMarker)null); | |
this.httpCode = httpCode; | |
} | |
public final int component1() { | |
return this.getHttpCode(); | |
} | |
@NotNull | |
public final Fail copy(int httpCode) { | |
return new Fail(httpCode); | |
} | |
// $FF: synthetic method | |
public static Fail copy$default(Fail var0, int var1, int var2, Object var3) { | |
if ((var2 & 1) != 0) { | |
var1 = var0.getHttpCode(); | |
} | |
return var0.copy(var1); | |
} | |
@NotNull public String toString() { | |
return "Fail(httpCode=" + this.getHttpCode() + ")"; | |
} | |
public int hashCode() { | |
return Integer.hashCode(this.getHttpCode()); | |
} | |
public boolean equals(@Nullable Object var1) { | |
if (this != var1) { | |
if (var1 instanceof Failed) { | |
Fail var2 = (Failed)var1; | |
if (this.getHttpCode() == var2.getHttpCode()) { | |
return true; | |
} | |
} | |
return false; | |
} else { | |
return true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment