package com.google.android.gms.internal.ads;

import android.text.TextUtils;
import java.util.Arrays;
import java.util.List;
import org.json.JSONObject;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;

/* JADX INFO: loaded from: classes2.dex */
public final class uz {

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

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

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

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

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

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

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

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final JSONObject f17453h;

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

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final long f17455j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final long f17456k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public final boolean f17457l;

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

    public uz(JSONObject jSONObject) {
        this.f17451f = jSONObject.optString(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL);
        this.f17447b = jSONObject.optString("base_uri");
        this.f17448c = jSONObject.optString("post_parameters");
        this.f17449d = a(jSONObject.optString("drt_include"));
        this.f17458m = jSONObject.optString("content_type");
        this.f17457l = a(jSONObject.optString("use_compression"));
        this.f17450e = a(jSONObject.optString("cookies_include", "true"));
        jSONObject.optString("request_id");
        jSONObject.optString("type");
        String strOptString = jSONObject.optString("errors");
        this.f17446a = strOptString == null ? null : Arrays.asList(strOptString.split(","));
        this.f17452g = jSONObject.optInt("valid", 0) == 1 ? -2 : 1;
        jSONObject.optString("fetched_ad");
        jSONObject.optBoolean("render_test_ad_label");
        JSONObject jSONObjectOptJSONObject = jSONObject.optJSONObject("preprocessor_flags");
        this.f17453h = jSONObjectOptJSONObject == null ? new JSONObject() : jSONObjectOptJSONObject;
        jSONObject.optString("analytics_query_ad_event_id");
        jSONObject.optBoolean("is_analytics_logging_enabled");
        this.f17454i = jSONObject.optString("pool_key");
        String strOptString2 = jSONObject.optString("start_time");
        Long lValueOf = -1L;
        if (!TextUtils.isEmpty(strOptString2)) {
            try {
                lValueOf = Long.valueOf(strOptString2);
            } catch (NumberFormatException unused) {
            }
        }
        this.f17455j = lValueOf.longValue();
        String strOptString3 = jSONObject.optString("end_time");
        Long lValueOf2 = -1L;
        if (!TextUtils.isEmpty(strOptString3)) {
            try {
                lValueOf2 = Long.valueOf(strOptString3);
            } catch (NumberFormatException unused2) {
            }
        }
        this.f17456k = lValueOf2.longValue();
    }

    public static boolean a(String str) {
        if (str != null) {
            return str.equals("1") || str.equals("true");
        }
        return false;
    }
}
