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


import com.nisemoe.generated.tables.UserScoresSimilarity

import java.time.OffsetDateTime
import java.util.UUID

import org.jooq.Field
import org.jooq.Record1
import org.jooq.Record9
import org.jooq.Row9
import org.jooq.impl.UpdatableRecordImpl


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class UserScoresSimilarityRecord private constructor() : UpdatableRecordImpl<UserScoresSimilarityRecord>(UserScoresSimilarity.USER_SCORES_SIMILARITY), Record9<Int?, Int?, UUID?, Long?, Double?, Double?, OffsetDateTime?, Double?, Double?> {

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

    open var beatmapId: Int?
        set(value): Unit = set(1, value)
        get(): Int? = get(1) as Int?

    open var replayIdUser: UUID?
        set(value): Unit = set(2, value)
        get(): UUID? = get(2) as UUID?

    open var replayIdOsu: Long?
        set(value): Unit = set(3, value)
        get(): Long? = get(3) as Long?

    open var similarity: Double?
        set(value): Unit = set(4, value)
        get(): Double? = get(4) as Double?

    open var correlation: Double?
        set(value): Unit = set(5, value)
        get(): Double? = get(5) as Double?

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

    open var cgSimilarity: Double?
        set(value): Unit = set(7, value)
        get(): Double? = get(7) as Double?

    open var cgCorrelation: Double?
        set(value): Unit = set(8, value)
        get(): Double? = get(8) as Double?

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

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

    // -------------------------------------------------------------------------
    // Record9 type implementation
    // -------------------------------------------------------------------------

    override fun fieldsRow(): Row9<Int?, Int?, UUID?, Long?, Double?, Double?, OffsetDateTime?, Double?, Double?> = super.fieldsRow() as Row9<Int?, Int?, UUID?, Long?, Double?, Double?, OffsetDateTime?, Double?, Double?>
    override fun valuesRow(): Row9<Int?, Int?, UUID?, Long?, Double?, Double?, OffsetDateTime?, Double?, Double?> = super.valuesRow() as Row9<Int?, Int?, UUID?, Long?, Double?, Double?, OffsetDateTime?, Double?, Double?>
    override fun field1(): Field<Int?> = UserScoresSimilarity.USER_SCORES_SIMILARITY.ID
    override fun field2(): Field<Int?> = UserScoresSimilarity.USER_SCORES_SIMILARITY.BEATMAP_ID
    override fun field3(): Field<UUID?> = UserScoresSimilarity.USER_SCORES_SIMILARITY.REPLAY_ID_USER
    override fun field4(): Field<Long?> = UserScoresSimilarity.USER_SCORES_SIMILARITY.REPLAY_ID_OSU
    override fun field5(): Field<Double?> = UserScoresSimilarity.USER_SCORES_SIMILARITY.SIMILARITY
    override fun field6(): Field<Double?> = UserScoresSimilarity.USER_SCORES_SIMILARITY.CORRELATION
    override fun field7(): Field<OffsetDateTime?> = UserScoresSimilarity.USER_SCORES_SIMILARITY.CREATED_AT
    override fun field8(): Field<Double?> = UserScoresSimilarity.USER_SCORES_SIMILARITY.CG_SIMILARITY
    override fun field9(): Field<Double?> = UserScoresSimilarity.USER_SCORES_SIMILARITY.CG_CORRELATION
    override fun component1(): Int? = id
    override fun component2(): Int? = beatmapId
    override fun component3(): UUID? = replayIdUser
    override fun component4(): Long? = replayIdOsu
    override fun component5(): Double? = similarity
    override fun component6(): Double? = correlation
    override fun component7(): OffsetDateTime? = createdAt
    override fun component8(): Double? = cgSimilarity
    override fun component9(): Double? = cgCorrelation
    override fun value1(): Int? = id
    override fun value2(): Int? = beatmapId
    override fun value3(): UUID? = replayIdUser
    override fun value4(): Long? = replayIdOsu
    override fun value5(): Double? = similarity
    override fun value6(): Double? = correlation
    override fun value7(): OffsetDateTime? = createdAt
    override fun value8(): Double? = cgSimilarity
    override fun value9(): Double? = cgCorrelation

    override fun value1(value: Int?): UserScoresSimilarityRecord {
        set(0, value)
        return this
    }

    override fun value2(value: Int?): UserScoresSimilarityRecord {
        set(1, value)
        return this
    }

    override fun value3(value: UUID?): UserScoresSimilarityRecord {
        set(2, value)
        return this
    }

    override fun value4(value: Long?): UserScoresSimilarityRecord {
        set(3, value)
        return this
    }

    override fun value5(value: Double?): UserScoresSimilarityRecord {
        set(4, value)
        return this
    }

    override fun value6(value: Double?): UserScoresSimilarityRecord {
        set(5, value)
        return this
    }

    override fun value7(value: OffsetDateTime?): UserScoresSimilarityRecord {
        set(6, value)
        return this
    }

    override fun value8(value: Double?): UserScoresSimilarityRecord {
        set(7, value)
        return this
    }

    override fun value9(value: Double?): UserScoresSimilarityRecord {
        set(8, value)
        return this
    }

    override fun values(value1: Int?, value2: Int?, value3: UUID?, value4: Long?, value5: Double?, value6: Double?, value7: OffsetDateTime?, value8: Double?, value9: Double?): UserScoresSimilarityRecord {
        this.value1(value1)
        this.value2(value2)
        this.value3(value3)
        this.value4(value4)
        this.value5(value5)
        this.value6(value6)
        this.value7(value7)
        this.value8(value8)
        this.value9(value9)
        return this
    }

    /**
     * Create a detached, initialised UserScoresSimilarityRecord
     */
    constructor(id: Int? = null, beatmapId: Int? = null, replayIdUser: UUID? = null, replayIdOsu: Long? = null, similarity: Double? = null, correlation: Double? = null, createdAt: OffsetDateTime? = null, cgSimilarity: Double? = null, cgCorrelation: Double? = null): this() {
        this.id = id
        this.beatmapId = beatmapId
        this.replayIdUser = replayIdUser
        this.replayIdOsu = replayIdOsu
        this.similarity = similarity
        this.correlation = correlation
        this.createdAt = createdAt
        this.cgSimilarity = cgSimilarity
        this.cgCorrelation = cgCorrelation
        resetChangedOnNotNull()
    }
}
