package l;

import javax.annotation.Nullable;
import okhttp3.Response;
import okhttp3.ResponseBody;

/* JADX INFO: compiled from: Response.java */
/* JADX INFO: loaded from: classes.dex */
public final class b0<T> {
    public final Response a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    @Nullable
    public final T f4997b;

    public b0(Response response, @Nullable T t, @Nullable ResponseBody responseBody) {
        this.a = response;
        this.f4997b = t;
    }

    public static <T> b0<T> b(@Nullable T t, Response response) {
        if (response.isSuccessful()) {
            return new b0<>(response, t, null);
        }
        throw new IllegalArgumentException("rawResponse must be successful response");
    }

    public boolean a() {
        return this.a.isSuccessful();
    }

    public String toString() {
        return this.a.toString();
    }
}
