package world.respect.datalayer.db

import androidx.room.InvalidationTracker
import androidx.room.RoomOpenDelegate
import androidx.room.migration.AutoMigrationSpec
import androidx.room.migration.Migration
import androidx.room.util.TableInfo
import androidx.room.util.TableInfo.Companion.read
import androidx.room.util.dropFtsSyncTriggers
import androidx.sqlite.SQLiteConnection
import androidx.sqlite.execSQL
import javax.`annotation`.processing.Generated
import kotlin.Lazy
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.collections.MutableList
import kotlin.collections.MutableMap
import kotlin.collections.MutableSet
import kotlin.collections.Set
import kotlin.collections.mutableListOf
import kotlin.collections.mutableMapOf
import kotlin.collections.mutableSetOf
import kotlin.reflect.KClass
import world.respect.datalayer.db.networkvalidation.daos.NetworkValidationInfoEntityDao
import world.respect.datalayer.db.networkvalidation.daos.NetworkValidationInfoEntityDao_Impl
import world.respect.datalayer.db.schooldirectory.daos.SchoolConfigEntityDao
import world.respect.datalayer.db.schooldirectory.daos.SchoolConfigEntityDao_Impl
import world.respect.datalayer.db.schooldirectory.daos.SchoolDirectoryEntityDao
import world.respect.datalayer.db.schooldirectory.daos.SchoolDirectoryEntityDao_Impl
import world.respect.datalayer.db.schooldirectory.daos.SchoolDirectoryEntryEntityDao
import world.respect.datalayer.db.schooldirectory.daos.SchoolDirectoryEntryEntityDao_Impl
import world.respect.datalayer.db.schooldirectory.daos.SchoolDirectoryEntryLangMapEntityDao
import world.respect.datalayer.db.schooldirectory.daos.SchoolDirectoryEntryLangMapEntityDao_Impl

@Generated(value = ["androidx.room.RoomProcessor"])
@Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
public class RespectAppDatabase_Impl : RespectAppDatabase() {
  private val _schoolDirectoryEntryEntityDao: Lazy<SchoolDirectoryEntryEntityDao> = lazy {
    SchoolDirectoryEntryEntityDao_Impl(this)
  }

  private val _schoolDirectoryEntryLangMapEntityDao: Lazy<SchoolDirectoryEntryLangMapEntityDao> =
      lazy {
    SchoolDirectoryEntryLangMapEntityDao_Impl(this)
  }

  private val _schoolConfigEntityDao: Lazy<SchoolConfigEntityDao> = lazy {
    SchoolConfigEntityDao_Impl(this)
  }

  private val _schoolDirectoryEntityDao: Lazy<SchoolDirectoryEntityDao> = lazy {
    SchoolDirectoryEntityDao_Impl(this)
  }

  private val _networkValidationInfoEntityDao: Lazy<NetworkValidationInfoEntityDao> = lazy {
    NetworkValidationInfoEntityDao_Impl(this)
  }

  protected override fun createOpenDelegate(): RoomOpenDelegate {
    val _openDelegate: RoomOpenDelegate = object : RoomOpenDelegate(4, "5743446f4e471787e8b043ab3497bb84", "8b1ae2a7c42ad18feac3c29d4be228dc") {
      public override fun createAllTables(connection: SQLiteConnection) {
        connection.execSQL("CREATE TABLE IF NOT EXISTS `SchoolDirectoryEntity` (`rdUid` INTEGER NOT NULL, `rdUrl` TEXT NOT NULL, `rdInvitePrefix` TEXT NOT NULL, PRIMARY KEY(`rdUid`))")
        connection.execSQL("CREATE TABLE IF NOT EXISTS `SchoolDirectoryEntryEntity` (`reUid` INTEGER NOT NULL, `reSelf` TEXT NOT NULL, `reXapi` TEXT NOT NULL, `reOneRoster` TEXT NOT NULL, `reRespectExt` TEXT, `reRpId` TEXT, `reLastModified` INTEGER NOT NULL, `reStored` INTEGER NOT NULL, PRIMARY KEY(`reUid`))")
        connection.execSQL("CREATE TABLE IF NOT EXISTS `SchoolDirectoryEntryLangMapEntity` (`sdelUid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `sdelReUid` INTEGER NOT NULL, `sdelLang` TEXT NOT NULL, `sdelRegion` TEXT, `sdelValue` TEXT NOT NULL, `sdelPropId` INTEGER NOT NULL)")
        connection.execSQL("CREATE TABLE IF NOT EXISTS `SchoolConfigEntity` (`rcUid` INTEGER NOT NULL, `dbUrl` TEXT NOT NULL, PRIMARY KEY(`rcUid`))")
        connection.execSQL("CREATE TABLE IF NOT EXISTS `NetworkValidationInfoEntity` (`nviUrlHash` INTEGER NOT NULL, `nviKey` INTEGER NOT NULL, `nviVaryHeader` TEXT, `nviLastModified` INTEGER NOT NULL, `nviEtag` TEXT, `nviConsistentThrough` INTEGER, `nviLastChecked` INTEGER NOT NULL, PRIMARY KEY(`nviUrlHash`, `nviKey`))")
        connection.execSQL("CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)")
        connection.execSQL("INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5743446f4e471787e8b043ab3497bb84')")
      }

      public override fun dropAllTables(connection: SQLiteConnection) {
        connection.execSQL("DROP TABLE IF EXISTS `SchoolDirectoryEntity`")
        connection.execSQL("DROP TABLE IF EXISTS `SchoolDirectoryEntryEntity`")
        connection.execSQL("DROP TABLE IF EXISTS `SchoolDirectoryEntryLangMapEntity`")
        connection.execSQL("DROP TABLE IF EXISTS `SchoolConfigEntity`")
        connection.execSQL("DROP TABLE IF EXISTS `NetworkValidationInfoEntity`")
      }

      public override fun onCreate(connection: SQLiteConnection) {
      }

      public override fun onOpen(connection: SQLiteConnection) {
        internalInitInvalidationTracker(connection)
      }

      public override fun onPreMigrate(connection: SQLiteConnection) {
        dropFtsSyncTriggers(connection)
      }

      public override fun onPostMigrate(connection: SQLiteConnection) {
      }

      public override fun onValidateSchema(connection: SQLiteConnection): RoomOpenDelegate.ValidationResult {
        val _columnsSchoolDirectoryEntity: MutableMap<String, TableInfo.Column> = mutableMapOf()
        _columnsSchoolDirectoryEntity.put("rdUid", TableInfo.Column("rdUid", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntity.put("rdUrl", TableInfo.Column("rdUrl", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntity.put("rdInvitePrefix", TableInfo.Column("rdInvitePrefix", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        val _foreignKeysSchoolDirectoryEntity: MutableSet<TableInfo.ForeignKey> = mutableSetOf()
        val _indicesSchoolDirectoryEntity: MutableSet<TableInfo.Index> = mutableSetOf()
        val _infoSchoolDirectoryEntity: TableInfo = TableInfo("SchoolDirectoryEntity", _columnsSchoolDirectoryEntity, _foreignKeysSchoolDirectoryEntity, _indicesSchoolDirectoryEntity)
        val _existingSchoolDirectoryEntity: TableInfo = read(connection, "SchoolDirectoryEntity")
        if (!_infoSchoolDirectoryEntity.equals(_existingSchoolDirectoryEntity)) {
          return RoomOpenDelegate.ValidationResult(false, """
              |SchoolDirectoryEntity(world.respect.datalayer.db.schooldirectory.entities.SchoolDirectoryEntity).
              | Expected:
              |""".trimMargin() + _infoSchoolDirectoryEntity + """
              |
              | Found:
              |""".trimMargin() + _existingSchoolDirectoryEntity)
        }
        val _columnsSchoolDirectoryEntryEntity: MutableMap<String, TableInfo.Column> = mutableMapOf()
        _columnsSchoolDirectoryEntryEntity.put("reUid", TableInfo.Column("reUid", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryEntity.put("reSelf", TableInfo.Column("reSelf", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryEntity.put("reXapi", TableInfo.Column("reXapi", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryEntity.put("reOneRoster", TableInfo.Column("reOneRoster", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryEntity.put("reRespectExt", TableInfo.Column("reRespectExt", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryEntity.put("reRpId", TableInfo.Column("reRpId", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryEntity.put("reLastModified", TableInfo.Column("reLastModified", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryEntity.put("reStored", TableInfo.Column("reStored", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        val _foreignKeysSchoolDirectoryEntryEntity: MutableSet<TableInfo.ForeignKey> = mutableSetOf()
        val _indicesSchoolDirectoryEntryEntity: MutableSet<TableInfo.Index> = mutableSetOf()
        val _infoSchoolDirectoryEntryEntity: TableInfo = TableInfo("SchoolDirectoryEntryEntity", _columnsSchoolDirectoryEntryEntity, _foreignKeysSchoolDirectoryEntryEntity, _indicesSchoolDirectoryEntryEntity)
        val _existingSchoolDirectoryEntryEntity: TableInfo = read(connection, "SchoolDirectoryEntryEntity")
        if (!_infoSchoolDirectoryEntryEntity.equals(_existingSchoolDirectoryEntryEntity)) {
          return RoomOpenDelegate.ValidationResult(false, """
              |SchoolDirectoryEntryEntity(world.respect.datalayer.db.schooldirectory.entities.SchoolDirectoryEntryEntity).
              | Expected:
              |""".trimMargin() + _infoSchoolDirectoryEntryEntity + """
              |
              | Found:
              |""".trimMargin() + _existingSchoolDirectoryEntryEntity)
        }
        val _columnsSchoolDirectoryEntryLangMapEntity: MutableMap<String, TableInfo.Column> = mutableMapOf()
        _columnsSchoolDirectoryEntryLangMapEntity.put("sdelUid", TableInfo.Column("sdelUid", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryLangMapEntity.put("sdelReUid", TableInfo.Column("sdelReUid", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryLangMapEntity.put("sdelLang", TableInfo.Column("sdelLang", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryLangMapEntity.put("sdelRegion", TableInfo.Column("sdelRegion", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryLangMapEntity.put("sdelValue", TableInfo.Column("sdelValue", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolDirectoryEntryLangMapEntity.put("sdelPropId", TableInfo.Column("sdelPropId", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        val _foreignKeysSchoolDirectoryEntryLangMapEntity: MutableSet<TableInfo.ForeignKey> = mutableSetOf()
        val _indicesSchoolDirectoryEntryLangMapEntity: MutableSet<TableInfo.Index> = mutableSetOf()
        val _infoSchoolDirectoryEntryLangMapEntity: TableInfo = TableInfo("SchoolDirectoryEntryLangMapEntity", _columnsSchoolDirectoryEntryLangMapEntity, _foreignKeysSchoolDirectoryEntryLangMapEntity, _indicesSchoolDirectoryEntryLangMapEntity)
        val _existingSchoolDirectoryEntryLangMapEntity: TableInfo = read(connection, "SchoolDirectoryEntryLangMapEntity")
        if (!_infoSchoolDirectoryEntryLangMapEntity.equals(_existingSchoolDirectoryEntryLangMapEntity)) {
          return RoomOpenDelegate.ValidationResult(false, """
              |SchoolDirectoryEntryLangMapEntity(world.respect.datalayer.db.schooldirectory.entities.SchoolDirectoryEntryLangMapEntity).
              | Expected:
              |""".trimMargin() + _infoSchoolDirectoryEntryLangMapEntity + """
              |
              | Found:
              |""".trimMargin() + _existingSchoolDirectoryEntryLangMapEntity)
        }
        val _columnsSchoolConfigEntity: MutableMap<String, TableInfo.Column> = mutableMapOf()
        _columnsSchoolConfigEntity.put("rcUid", TableInfo.Column("rcUid", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsSchoolConfigEntity.put("dbUrl", TableInfo.Column("dbUrl", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        val _foreignKeysSchoolConfigEntity: MutableSet<TableInfo.ForeignKey> = mutableSetOf()
        val _indicesSchoolConfigEntity: MutableSet<TableInfo.Index> = mutableSetOf()
        val _infoSchoolConfigEntity: TableInfo = TableInfo("SchoolConfigEntity", _columnsSchoolConfigEntity, _foreignKeysSchoolConfigEntity, _indicesSchoolConfigEntity)
        val _existingSchoolConfigEntity: TableInfo = read(connection, "SchoolConfigEntity")
        if (!_infoSchoolConfigEntity.equals(_existingSchoolConfigEntity)) {
          return RoomOpenDelegate.ValidationResult(false, """
              |SchoolConfigEntity(world.respect.datalayer.db.schooldirectory.entities.SchoolConfigEntity).
              | Expected:
              |""".trimMargin() + _infoSchoolConfigEntity + """
              |
              | Found:
              |""".trimMargin() + _existingSchoolConfigEntity)
        }
        val _columnsNetworkValidationInfoEntity: MutableMap<String, TableInfo.Column> = mutableMapOf()
        _columnsNetworkValidationInfoEntity.put("nviUrlHash", TableInfo.Column("nviUrlHash", "INTEGER", true, 1, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsNetworkValidationInfoEntity.put("nviKey", TableInfo.Column("nviKey", "INTEGER", true, 2, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsNetworkValidationInfoEntity.put("nviVaryHeader", TableInfo.Column("nviVaryHeader", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsNetworkValidationInfoEntity.put("nviLastModified", TableInfo.Column("nviLastModified", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsNetworkValidationInfoEntity.put("nviEtag", TableInfo.Column("nviEtag", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsNetworkValidationInfoEntity.put("nviConsistentThrough", TableInfo.Column("nviConsistentThrough", "INTEGER", false, 0, null, TableInfo.CREATED_FROM_ENTITY))
        _columnsNetworkValidationInfoEntity.put("nviLastChecked", TableInfo.Column("nviLastChecked", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY))
        val _foreignKeysNetworkValidationInfoEntity: MutableSet<TableInfo.ForeignKey> = mutableSetOf()
        val _indicesNetworkValidationInfoEntity: MutableSet<TableInfo.Index> = mutableSetOf()
        val _infoNetworkValidationInfoEntity: TableInfo = TableInfo("NetworkValidationInfoEntity", _columnsNetworkValidationInfoEntity, _foreignKeysNetworkValidationInfoEntity, _indicesNetworkValidationInfoEntity)
        val _existingNetworkValidationInfoEntity: TableInfo = read(connection, "NetworkValidationInfoEntity")
        if (!_infoNetworkValidationInfoEntity.equals(_existingNetworkValidationInfoEntity)) {
          return RoomOpenDelegate.ValidationResult(false, """
              |NetworkValidationInfoEntity(world.respect.datalayer.db.networkvalidation.entities.NetworkValidationInfoEntity).
              | Expected:
              |""".trimMargin() + _infoNetworkValidationInfoEntity + """
              |
              | Found:
              |""".trimMargin() + _existingNetworkValidationInfoEntity)
        }
        return RoomOpenDelegate.ValidationResult(true, null)
      }
    }
    return _openDelegate
  }

  protected override fun createInvalidationTracker(): InvalidationTracker {
    val _shadowTablesMap: MutableMap<String, String> = mutableMapOf()
    val _viewTables: MutableMap<String, Set<String>> = mutableMapOf()
    return InvalidationTracker(this, _shadowTablesMap, _viewTables, "SchoolDirectoryEntity", "SchoolDirectoryEntryEntity", "SchoolDirectoryEntryLangMapEntity", "SchoolConfigEntity", "NetworkValidationInfoEntity")
  }

  protected override fun getRequiredTypeConverterClasses(): Map<KClass<*>, List<KClass<*>>> {
    val _typeConvertersMap: MutableMap<KClass<*>, List<KClass<*>>> = mutableMapOf()
    _typeConvertersMap.put(SchoolDirectoryEntryEntityDao::class, SchoolDirectoryEntryEntityDao_Impl.getRequiredConverters())
    _typeConvertersMap.put(SchoolDirectoryEntryLangMapEntityDao::class, SchoolDirectoryEntryLangMapEntityDao_Impl.getRequiredConverters())
    _typeConvertersMap.put(SchoolConfigEntityDao::class, SchoolConfigEntityDao_Impl.getRequiredConverters())
    _typeConvertersMap.put(SchoolDirectoryEntityDao::class, SchoolDirectoryEntityDao_Impl.getRequiredConverters())
    _typeConvertersMap.put(NetworkValidationInfoEntityDao::class, NetworkValidationInfoEntityDao_Impl.getRequiredConverters())
    return _typeConvertersMap
  }

  public override fun getRequiredAutoMigrationSpecClasses(): Set<KClass<out AutoMigrationSpec>> {
    val _autoMigrationSpecsSet: MutableSet<KClass<out AutoMigrationSpec>> = mutableSetOf()
    return _autoMigrationSpecsSet
  }

  public override fun createAutoMigrations(autoMigrationSpecs: Map<KClass<out AutoMigrationSpec>, AutoMigrationSpec>): List<Migration> {
    val _autoMigrations: MutableList<Migration> = mutableListOf()
    return _autoMigrations
  }

  public override fun getSchoolDirectoryEntryEntityDao(): SchoolDirectoryEntryEntityDao = _schoolDirectoryEntryEntityDao.value

  public override fun getSchoolDirectoryEntryLangMapEntityDao(): SchoolDirectoryEntryLangMapEntityDao = _schoolDirectoryEntryLangMapEntityDao.value

  public override fun getSchoolConfigEntityDao(): SchoolConfigEntityDao = _schoolConfigEntityDao.value

  public override fun getSchoolDirectoryEntityDao(): SchoolDirectoryEntityDao = _schoolDirectoryEntityDao.value

  public override fun getNetworkValidationInfoEntityDao(): NetworkValidationInfoEntityDao = _networkValidationInfoEntityDao.value
}
