31 lines
808 B
Java
31 lines
808 B
Java
package retrofit2;
|
|
|
|
import okhttp3.ResponseBody;
|
|
public final class Response<T> {
|
|
public final okhttp3.Response a;
|
|
public final T b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final ResponseBody f2916c;
|
|
|
|
public Response(okhttp3.Response response, T t, ResponseBody responseBody) {
|
|
this.a = response;
|
|
this.b = t;
|
|
this.f2916c = responseBody;
|
|
}
|
|
|
|
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();
|
|
}
|
|
}
|