package androidx.work.impl;

import androidx.room.p0;
import androidx.room.q0;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import xyz.stream.download.config.InnerConstant;

/* JADX INFO: loaded from: classes.dex */
public final class n extends p0 {

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

    public n(WorkDatabase_Impl workDatabase_Impl) {
        this.f4619b = workDatabase_Impl;
    }

    @Override // androidx.room.p0
    public final void a(m3.c cVar) {
        cVar.j("CREATE TABLE IF NOT EXISTS `Dependency` (`work_spec_id` TEXT NOT NULL, `prerequisite_id` TEXT NOT NULL, PRIMARY KEY(`work_spec_id`, `prerequisite_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`prerequisite_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        cVar.j("CREATE INDEX IF NOT EXISTS `index_Dependency_work_spec_id` ON `Dependency` (`work_spec_id`)");
        cVar.j("CREATE INDEX IF NOT EXISTS `index_Dependency_prerequisite_id` ON `Dependency` (`prerequisite_id`)");
        cVar.j("CREATE TABLE IF NOT EXISTS `WorkSpec` (`id` TEXT NOT NULL, `state` INTEGER NOT NULL, `worker_class_name` TEXT NOT NULL, `input_merger_class_name` TEXT, `input` BLOB NOT NULL, `output` BLOB NOT NULL, `initial_delay` INTEGER NOT NULL, `interval_duration` INTEGER NOT NULL, `flex_duration` INTEGER NOT NULL, `run_attempt_count` INTEGER NOT NULL, `backoff_policy` INTEGER NOT NULL, `backoff_delay_duration` INTEGER NOT NULL, `period_start_time` INTEGER NOT NULL, `minimum_retention_duration` INTEGER NOT NULL, `schedule_requested_at` INTEGER NOT NULL, `run_in_foreground` INTEGER NOT NULL, `out_of_quota_policy` INTEGER NOT NULL, `required_network_type` INTEGER, `requires_charging` INTEGER NOT NULL, `requires_device_idle` INTEGER NOT NULL, `requires_battery_not_low` INTEGER NOT NULL, `requires_storage_not_low` INTEGER NOT NULL, `trigger_content_update_delay` INTEGER NOT NULL, `trigger_max_content_delay` INTEGER NOT NULL, `content_uri_triggers` BLOB, PRIMARY KEY(`id`))");
        cVar.j("CREATE INDEX IF NOT EXISTS `index_WorkSpec_schedule_requested_at` ON `WorkSpec` (`schedule_requested_at`)");
        cVar.j("CREATE INDEX IF NOT EXISTS `index_WorkSpec_period_start_time` ON `WorkSpec` (`period_start_time`)");
        cVar.j("CREATE TABLE IF NOT EXISTS `WorkTag` (`tag` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`tag`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        cVar.j("CREATE INDEX IF NOT EXISTS `index_WorkTag_work_spec_id` ON `WorkTag` (`work_spec_id`)");
        cVar.j("CREATE TABLE IF NOT EXISTS `SystemIdInfo` (`work_spec_id` TEXT NOT NULL, `system_id` INTEGER NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        cVar.j("CREATE TABLE IF NOT EXISTS `WorkName` (`name` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`name`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        cVar.j("CREATE INDEX IF NOT EXISTS `index_WorkName_work_spec_id` ON `WorkName` (`work_spec_id`)");
        cVar.j("CREATE TABLE IF NOT EXISTS `WorkProgress` (`work_spec_id` TEXT NOT NULL, `progress` BLOB NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        cVar.j("CREATE TABLE IF NOT EXISTS `Preference` (`key` TEXT NOT NULL, `long_value` INTEGER, PRIMARY KEY(`key`))");
        cVar.j("CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)");
        cVar.j("INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c103703e120ae8cc73c9248622f3cd1e')");
    }

    @Override // androidx.room.p0
    public final q0 b(m3.c cVar) {
        HashMap map = new HashMap(2);
        map.put("work_spec_id", new androidx.room.util.h(1, "work_spec_id", "TEXT", null, true, 1));
        HashSet hashSetV = defpackage.e.v(map, "prerequisite_id", new androidx.room.util.h(2, "prerequisite_id", "TEXT", null, true, 1), 2);
        hashSetV.add(new androidx.room.util.i("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList(InnerConstant.Db.f36069id)));
        hashSetV.add(new androidx.room.util.i("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("prerequisite_id"), Arrays.asList(InnerConstant.Db.f36069id)));
        HashSet hashSet = new HashSet(2);
        hashSet.add(new androidx.room.util.j("index_Dependency_work_spec_id", Arrays.asList("work_spec_id")));
        hashSet.add(new androidx.room.util.j("index_Dependency_prerequisite_id", Arrays.asList("prerequisite_id")));
        androidx.room.util.k kVar = new androidx.room.util.k("Dependency", map, hashSetV, hashSet);
        androidx.room.util.k kVarB = androidx.room.util.k.b(cVar, "Dependency");
        if (!kVar.equals(kVarB)) {
            return new q0(false, defpackage.e.h("Dependency(androidx.work.impl.model.Dependency).\n Expected:\n", kVar, "\n Found:\n", kVarB));
        }
        HashMap map2 = new HashMap(25);
        map2.put(InnerConstant.Db.f36069id, new androidx.room.util.h(1, InnerConstant.Db.f36069id, "TEXT", null, true, 1));
        map2.put("state", new androidx.room.util.h(0, "state", "INTEGER", null, true, 1));
        map2.put("worker_class_name", new androidx.room.util.h(0, "worker_class_name", "TEXT", null, true, 1));
        map2.put("input_merger_class_name", new androidx.room.util.h(0, "input_merger_class_name", "TEXT", null, false, 1));
        map2.put("input", new androidx.room.util.h(0, "input", "BLOB", null, true, 1));
        map2.put("output", new androidx.room.util.h(0, "output", "BLOB", null, true, 1));
        map2.put("initial_delay", new androidx.room.util.h(0, "initial_delay", "INTEGER", null, true, 1));
        map2.put("interval_duration", new androidx.room.util.h(0, "interval_duration", "INTEGER", null, true, 1));
        map2.put("flex_duration", new androidx.room.util.h(0, "flex_duration", "INTEGER", null, true, 1));
        map2.put("run_attempt_count", new androidx.room.util.h(0, "run_attempt_count", "INTEGER", null, true, 1));
        map2.put("backoff_policy", new androidx.room.util.h(0, "backoff_policy", "INTEGER", null, true, 1));
        map2.put("backoff_delay_duration", new androidx.room.util.h(0, "backoff_delay_duration", "INTEGER", null, true, 1));
        map2.put("period_start_time", new androidx.room.util.h(0, "period_start_time", "INTEGER", null, true, 1));
        map2.put("minimum_retention_duration", new androidx.room.util.h(0, "minimum_retention_duration", "INTEGER", null, true, 1));
        map2.put("schedule_requested_at", new androidx.room.util.h(0, "schedule_requested_at", "INTEGER", null, true, 1));
        map2.put("run_in_foreground", new androidx.room.util.h(0, "run_in_foreground", "INTEGER", null, true, 1));
        map2.put("out_of_quota_policy", new androidx.room.util.h(0, "out_of_quota_policy", "INTEGER", null, true, 1));
        map2.put("required_network_type", new androidx.room.util.h(0, "required_network_type", "INTEGER", null, false, 1));
        map2.put("requires_charging", new androidx.room.util.h(0, "requires_charging", "INTEGER", null, true, 1));
        map2.put("requires_device_idle", new androidx.room.util.h(0, "requires_device_idle", "INTEGER", null, true, 1));
        map2.put("requires_battery_not_low", new androidx.room.util.h(0, "requires_battery_not_low", "INTEGER", null, true, 1));
        map2.put("requires_storage_not_low", new androidx.room.util.h(0, "requires_storage_not_low", "INTEGER", null, true, 1));
        map2.put("trigger_content_update_delay", new androidx.room.util.h(0, "trigger_content_update_delay", "INTEGER", null, true, 1));
        map2.put("trigger_max_content_delay", new androidx.room.util.h(0, "trigger_max_content_delay", "INTEGER", null, true, 1));
        HashSet hashSetV2 = defpackage.e.v(map2, "content_uri_triggers", new androidx.room.util.h(0, "content_uri_triggers", "BLOB", null, false, 1), 0);
        HashSet hashSet2 = new HashSet(2);
        hashSet2.add(new androidx.room.util.j("index_WorkSpec_schedule_requested_at", Arrays.asList("schedule_requested_at")));
        hashSet2.add(new androidx.room.util.j("index_WorkSpec_period_start_time", Arrays.asList("period_start_time")));
        androidx.room.util.k kVar2 = new androidx.room.util.k("WorkSpec", map2, hashSetV2, hashSet2);
        androidx.room.util.k kVarB2 = androidx.room.util.k.b(cVar, "WorkSpec");
        if (!kVar2.equals(kVarB2)) {
            return new q0(false, defpackage.e.h("WorkSpec(androidx.work.impl.model.WorkSpec).\n Expected:\n", kVar2, "\n Found:\n", kVarB2));
        }
        HashMap map3 = new HashMap(2);
        map3.put("tag", new androidx.room.util.h(1, "tag", "TEXT", null, true, 1));
        HashSet hashSetV3 = defpackage.e.v(map3, "work_spec_id", new androidx.room.util.h(2, "work_spec_id", "TEXT", null, true, 1), 1);
        hashSetV3.add(new androidx.room.util.i("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList(InnerConstant.Db.f36069id)));
        HashSet hashSet3 = new HashSet(1);
        hashSet3.add(new androidx.room.util.j("index_WorkTag_work_spec_id", Arrays.asList("work_spec_id")));
        androidx.room.util.k kVar3 = new androidx.room.util.k("WorkTag", map3, hashSetV3, hashSet3);
        androidx.room.util.k kVarB3 = androidx.room.util.k.b(cVar, "WorkTag");
        if (!kVar3.equals(kVarB3)) {
            return new q0(false, defpackage.e.h("WorkTag(androidx.work.impl.model.WorkTag).\n Expected:\n", kVar3, "\n Found:\n", kVarB3));
        }
        HashMap map4 = new HashMap(2);
        map4.put("work_spec_id", new androidx.room.util.h(1, "work_spec_id", "TEXT", null, true, 1));
        HashSet hashSetV4 = defpackage.e.v(map4, "system_id", new androidx.room.util.h(0, "system_id", "INTEGER", null, true, 1), 1);
        hashSetV4.add(new androidx.room.util.i("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList(InnerConstant.Db.f36069id)));
        androidx.room.util.k kVar4 = new androidx.room.util.k("SystemIdInfo", map4, hashSetV4, new HashSet(0));
        androidx.room.util.k kVarB4 = androidx.room.util.k.b(cVar, "SystemIdInfo");
        if (!kVar4.equals(kVarB4)) {
            return new q0(false, defpackage.e.h("SystemIdInfo(androidx.work.impl.model.SystemIdInfo).\n Expected:\n", kVar4, "\n Found:\n", kVarB4));
        }
        HashMap map5 = new HashMap(2);
        map5.put("name", new androidx.room.util.h(1, "name", "TEXT", null, true, 1));
        HashSet hashSetV5 = defpackage.e.v(map5, "work_spec_id", new androidx.room.util.h(2, "work_spec_id", "TEXT", null, true, 1), 1);
        hashSetV5.add(new androidx.room.util.i("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList(InnerConstant.Db.f36069id)));
        HashSet hashSet4 = new HashSet(1);
        hashSet4.add(new androidx.room.util.j("index_WorkName_work_spec_id", Arrays.asList("work_spec_id")));
        androidx.room.util.k kVar5 = new androidx.room.util.k("WorkName", map5, hashSetV5, hashSet4);
        androidx.room.util.k kVarB5 = androidx.room.util.k.b(cVar, "WorkName");
        if (!kVar5.equals(kVarB5)) {
            return new q0(false, defpackage.e.h("WorkName(androidx.work.impl.model.WorkName).\n Expected:\n", kVar5, "\n Found:\n", kVarB5));
        }
        HashMap map6 = new HashMap(2);
        map6.put("work_spec_id", new androidx.room.util.h(1, "work_spec_id", "TEXT", null, true, 1));
        HashSet hashSetV6 = defpackage.e.v(map6, "progress", new androidx.room.util.h(0, "progress", "BLOB", null, true, 1), 1);
        hashSetV6.add(new androidx.room.util.i("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList(InnerConstant.Db.f36069id)));
        androidx.room.util.k kVar6 = new androidx.room.util.k("WorkProgress", map6, hashSetV6, new HashSet(0));
        androidx.room.util.k kVarB6 = androidx.room.util.k.b(cVar, "WorkProgress");
        if (!kVar6.equals(kVarB6)) {
            return new q0(false, defpackage.e.h("WorkProgress(androidx.work.impl.model.WorkProgress).\n Expected:\n", kVar6, "\n Found:\n", kVarB6));
        }
        HashMap map7 = new HashMap(2);
        map7.put("key", new androidx.room.util.h(1, "key", "TEXT", null, true, 1));
        androidx.room.util.k kVar7 = new androidx.room.util.k("Preference", map7, defpackage.e.v(map7, "long_value", new androidx.room.util.h(0, "long_value", "INTEGER", null, false, 1), 0), new HashSet(0));
        androidx.room.util.k kVarB7 = androidx.room.util.k.b(cVar, "Preference");
        return !kVar7.equals(kVarB7) ? new q0(false, defpackage.e.h("Preference(androidx.work.impl.model.Preference).\n Expected:\n", kVar7, "\n Found:\n", kVarB7)) : new q0(true, null);
    }
}
