/*
 * This file is generated by jOOQ.
 */
package com.nisemoe.generated.tables.records


import com.nisemoe.generated.tables.OsuApiKeys

import java.time.OffsetDateTime

import org.jooq.Record1
import org.jooq.impl.UpdatableRecordImpl


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class OsuApiKeysRecord private constructor() : UpdatableRecordImpl<OsuApiKeysRecord>(OsuApiKeys.OSU_API_KEYS) {

    open var id: Int?
        set(value): Unit = set(0, value)
        get(): Int? = get(0) as Int?

    open var apiKey: String
        set(value): Unit = set(1, value)
        get(): String = get(1) as String

    open var createdAt: OffsetDateTime?
        set(value): Unit = set(2, value)
        get(): OffsetDateTime? = get(2) as OffsetDateTime?

    @Suppress("INAPPLICABLE_JVM_NAME")
    @set:JvmName("setIsValid")
    open var isValid: Boolean?
        set(value): Unit = set(3, value)
        get(): Boolean? = get(3) as Boolean?

    @Suppress("INAPPLICABLE_JVM_NAME")
    @set:JvmName("setIsActive")
    open var isActive: Boolean?
        set(value): Unit = set(4, value)
        get(): Boolean? = get(4) as Boolean?

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    override fun key(): Record1<Int?> = super.key() as Record1<Int?>

    /**
     * Create a detached, initialised OsuApiKeysRecord
     */
    constructor(id: Int? = null, apiKey: String, createdAt: OffsetDateTime? = null, isValid: Boolean? = null, isActive: Boolean? = null): this() {
        this.id = id
        this.apiKey = apiKey
        this.createdAt = createdAt
        this.isValid = isValid
        this.isActive = isActive
        resetChangedOnNotNull()
    }
}
