package ch.threema.app.emojis

/**
 * This class contains metadata about an emoji.
 *
 * Generated by Threema emoji-tools.
 */
data class EmojiInfo(
    @JvmField val emojiSequence: String,
    @JvmField val diversityFlag: Byte,
    @JvmField val diversities: Array<String>?,
    @JvmField val displayFlag: Byte,
) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false
        other as EmojiInfo
        if (diversityFlag != other.diversityFlag) return false
        if (displayFlag != other.displayFlag) return false
        if (emojiSequence != other.emojiSequence) return false
        if (!diversities.contentEquals(other.diversities)) return false
        return true
    }

    override fun hashCode(): Int {
        var result = diversityFlag.toInt()
        result = 31 * result + displayFlag
        result = 31 * result + emojiSequence.hashCode()
        result = 31 * result + (diversities?.contentHashCode() ?: 0)
        return result
    }
}
