package database


data class Soundbank(
    var index: UInt,
    var Description: String,
    var TAG : String,
    var Category: String,
    var Language: String,
    var VoiceType: String,
    var Path: String,
    ){

    /**
     * Check if all fields are not empty
     */
    fun isNotEmpty(): Boolean{
        return Description.isNotEmpty() && TAG.isNotEmpty() && Category.isNotEmpty() && Language.isNotEmpty() && VoiceType.isNotEmpty() && Path.isNotEmpty()
    }

    /**
     * Check if Category is valid
     */
    fun ValidCategory() : Boolean{
        return content.Category.entries.any{ it.name == this.Category}
    }

    /**
     * Check if VoiceType is valid
     */
    fun ValidVoiceType() : Boolean{
        return content.VoiceType.entries.any{ it.name == this.VoiceType}
    }
    /**
     * Check if Language is valid
     */
    fun ValidLanguage() : Boolean{
        return content.Language.entries.any{ it.name == this.Language}
    }
}
