/*
 * This file is generated by jOOQ.
 */
package jooq.main.tables.pojos


import java.io.Serializable
import java.time.OffsetDateTime


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
data class LibraryVersion(
    var id: Long? = null,
    var libraryId: Long? = null,
    var groupId: String? = null,
    var artifactId: String? = null,
    var version: String? = null,
    var created: OffsetDateTime? = null,
    var updated: OffsetDateTime? = null
): Serializable {


    override fun equals(other: Any?): Boolean {
        if (this === other)
            return true
        if (other == null)
            return false
        if (this::class != other::class)
            return false
        val o: LibraryVersion = other as LibraryVersion
        if (this.id == null) {
            if (o.id != null)
                return false
        }
        else if (this.id != o.id)
            return false
        if (this.libraryId == null) {
            if (o.libraryId != null)
                return false
        }
        else if (this.libraryId != o.libraryId)
            return false
        if (this.groupId == null) {
            if (o.groupId != null)
                return false
        }
        else if (this.groupId != o.groupId)
            return false
        if (this.artifactId == null) {
            if (o.artifactId != null)
                return false
        }
        else if (this.artifactId != o.artifactId)
            return false
        if (this.version == null) {
            if (o.version != null)
                return false
        }
        else if (this.version != o.version)
            return false
        if (this.created == null) {
            if (o.created != null)
                return false
        }
        else if (this.created != o.created)
            return false
        if (this.updated == null) {
            if (o.updated != null)
                return false
        }
        else if (this.updated != o.updated)
            return false
        return true
    }

    override fun hashCode(): Int {
        val prime = 31
        var result = 1
        result = prime * result + (if (this.id == null) 0 else this.id.hashCode())
        result = prime * result + (if (this.libraryId == null) 0 else this.libraryId.hashCode())
        result = prime * result + (if (this.groupId == null) 0 else this.groupId.hashCode())
        result = prime * result + (if (this.artifactId == null) 0 else this.artifactId.hashCode())
        result = prime * result + (if (this.version == null) 0 else this.version.hashCode())
        result = prime * result + (if (this.created == null) 0 else this.created.hashCode())
        result = prime * result + (if (this.updated == null) 0 else this.updated.hashCode())
        return result
    }

    override fun toString(): String {
        val sb = StringBuilder("LibraryVersion (")

        sb.append(id)
        sb.append(", ").append(libraryId)
        sb.append(", ").append(groupId)
        sb.append(", ").append(artifactId)
        sb.append(", ").append(version)
        sb.append(", ").append(created)
        sb.append(", ").append(updated)

        sb.append(")")
        return sb.toString()
    }
}
