package com.chartboost.sdk.impl;

import org.json.JSONObject;
/* loaded from: classes2.dex */
public class q {

    /* renamed from: a  reason: collision with root package name */
    public final f8 f1789a;
    public final f8 b;
    public final boolean c;
    public final q3 d;
    public final o6 e;

    public q(q3 q3Var, o6 o6Var, f8 f8Var, f8 f8Var2, boolean z) {
        this.d = q3Var;
        this.e = o6Var;
        this.f1789a = f8Var;
        if (f8Var2 == null) {
            this.b = f8.NONE;
        } else {
            this.b = f8Var2;
        }
        this.c = z;
    }

    public static q a(q3 q3Var, o6 o6Var, f8 f8Var, f8 f8Var2, boolean z) {
        nd.a(q3Var, "CreativeType is null");
        nd.a(o6Var, "ImpressionType is null");
        nd.a(f8Var, "Impression owner is null");
        nd.a(f8Var, q3Var, o6Var);
        return new q(q3Var, o6Var, f8Var, f8Var2, z);
    }

    public boolean b() {
        return f8.NATIVE == this.b;
    }

    public JSONObject c() {
        JSONObject jSONObject = new JSONObject();
        xc.a(jSONObject, "impressionOwner", this.f1789a);
        xc.a(jSONObject, "mediaEventsOwner", this.b);
        xc.a(jSONObject, "creativeType", this.d);
        xc.a(jSONObject, "impressionType", this.e);
        xc.a(jSONObject, "isolateVerificationScripts", Boolean.valueOf(this.c));
        return jSONObject;
    }

    public boolean a() {
        return f8.NATIVE == this.f1789a;
    }
}
