discord-jadx/app/src/main/java/retrofit2/Response.java

33 lines
840 B
Java
Raw Normal View History

2021-08-04 22:02:59 +00:00
package retrofit2;
import okhttp3.ResponseBody;
2022-03-02 20:59:20 +00:00
/* loaded from: classes3.dex */
2021-08-04 22:02:59 +00:00
public final class Response<T> {
public final okhttp3.Response a;
2021-12-21 23:37:30 +00:00
/* renamed from: b reason: collision with root package name */
2022-03-30 16:43:10 +00:00
public final T f3806b;
2021-12-21 23:37:30 +00:00
public final ResponseBody c;
2021-08-04 22:02:59 +00:00
public Response(okhttp3.Response response, T t, ResponseBody responseBody) {
this.a = response;
2022-03-30 16:43:10 +00:00
this.f3806b = t;
2021-12-21 23:37:30 +00:00
this.c = responseBody;
2021-08-04 22:02:59 +00:00
}
public static <T> Response<T> b(T t, okhttp3.Response response) {
if (response.b()) {
return new Response<>(response, t, null);
}
throw new IllegalArgumentException("rawResponse must be successful response");
}
public boolean a() {
return this.a.b();
}
public String toString() {
return this.a.toString();
}
}