package I2;

import android.text.TextUtils;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes.dex */
public final class D {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final String f2491a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final String f2492b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final String f2493c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f2494d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final String f2495e;

    public D(String str) {
        this.f2491a = str;
        JSONObject jSONObject = new JSONObject(str);
        this.f2492b = jSONObject.optString("productId");
        String strOptString = jSONObject.optString("type");
        this.f2493c = strOptString;
        this.f2494d = jSONObject.has("statusCode") ? jSONObject.optInt("statusCode") : 0;
        if (TextUtils.isEmpty(strOptString)) {
            throw new IllegalArgumentException("Product type cannot be empty.");
        }
        this.f2495e = jSONObject.optString("serializedDocid");
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof D) {
            return TextUtils.equals(this.f2491a, ((D) obj).f2491a);
        }
        return false;
    }

    public final int hashCode() {
        return this.f2491a.hashCode();
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("UnfetchedProduct{productId='");
        sb.append(this.f2492b);
        sb.append("', productType='");
        sb.append(this.f2493c);
        sb.append("', statusCode=");
        return Z0.o.q(sb, this.f2494d, "}");
    }
}
