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


import com.nisemoe.generated.tables.RedditPost

import org.jooq.Field
import org.jooq.Record1
import org.jooq.Record5
import org.jooq.Row5
import org.jooq.impl.UpdatableRecordImpl


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class RedditPostRecord private constructor() : UpdatableRecordImpl<RedditPostRecord>(RedditPost.REDDIT_POST), Record5<String?, String?, Double?, String?, Boolean?> {

    open var postId: String
        set(value): Unit = set(0, value)
        get(): String = get(0) as String

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

    open var createdUtc: Double?
        set(value): Unit = set(2, value)
        get(): Double? = get(2) as Double?

    open var url: String?
        set(value): Unit = set(3, value)
        get(): String? = get(3) as String?

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

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

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

    // -------------------------------------------------------------------------
    // Record5 type implementation
    // -------------------------------------------------------------------------

    override fun fieldsRow(): Row5<String?, String?, Double?, String?, Boolean?> = super.fieldsRow() as Row5<String?, String?, Double?, String?, Boolean?>
    override fun valuesRow(): Row5<String?, String?, Double?, String?, Boolean?> = super.valuesRow() as Row5<String?, String?, Double?, String?, Boolean?>
    override fun field1(): Field<String?> = RedditPost.REDDIT_POST.POST_ID
    override fun field2(): Field<String?> = RedditPost.REDDIT_POST.TITLE
    override fun field3(): Field<Double?> = RedditPost.REDDIT_POST.CREATED_UTC
    override fun field4(): Field<String?> = RedditPost.REDDIT_POST.URL
    override fun field5(): Field<Boolean?> = RedditPost.REDDIT_POST.IS_CHECKED
    override fun component1(): String = postId
    override fun component2(): String? = title
    override fun component3(): Double? = createdUtc
    override fun component4(): String? = url
    override fun component5(): Boolean? = isChecked
    override fun value1(): String = postId
    override fun value2(): String? = title
    override fun value3(): Double? = createdUtc
    override fun value4(): String? = url
    override fun value5(): Boolean? = isChecked

    override fun value1(value: String?): RedditPostRecord {
        set(0, value)
        return this
    }

    override fun value2(value: String?): RedditPostRecord {
        set(1, value)
        return this
    }

    override fun value3(value: Double?): RedditPostRecord {
        set(2, value)
        return this
    }

    override fun value4(value: String?): RedditPostRecord {
        set(3, value)
        return this
    }

    override fun value5(value: Boolean?): RedditPostRecord {
        set(4, value)
        return this
    }

    override fun values(value1: String?, value2: String?, value3: Double?, value4: String?, value5: Boolean?): RedditPostRecord {
        this.value1(value1)
        this.value2(value2)
        this.value3(value3)
        this.value4(value4)
        this.value5(value5)
        return this
    }

    /**
     * Create a detached, initialised RedditPostRecord
     */
    constructor(postId: String, title: String? = null, createdUtc: Double? = null, url: String? = null, isChecked: Boolean? = null): this() {
        this.postId = postId
        this.title = title
        this.createdUtc = createdUtc
        this.url = url
        this.isChecked = isChecked
        resetChangedOnNotNull()
    }
}
