package xyz.stream.utils;

import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Request;
import okhttp3.Response;

/* JADX INFO: loaded from: classes3.dex */
public final class x implements Callback {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ Request f36191a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ y f36192b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ z f36193c;

    public x(z zVar, Request request, xyz.netfly.api.b bVar) {
        this.f36193c = zVar;
        this.f36191a = request;
        this.f36192b = bVar;
    }

    @Override // okhttp3.Callback
    public final void onFailure(Call call, IOException iOException) {
        this.f36193c.getClass();
        z.b(this.f36191a, iOException, this.f36192b);
    }

    @Override // okhttp3.Callback
    public final void onResponse(Call call, Response response) {
        boolean zIsSuccessful = response.isSuccessful();
        y yVar = this.f36192b;
        z zVar = this.f36193c;
        if (zIsSuccessful) {
            z.a(zVar, response.body() != null ? response.body().string() : null, yVar);
            return;
        }
        Exception exc = new Exception(response.message());
        zVar.getClass();
        z.b(this.f36191a, exc, yVar);
    }
}
