All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.api.bloxy.model.dto.DangerLevel.kt Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package io.api.bloxy.model.dto


/**
 * Possible warning level (check model notes/annotation for more info)
 *
 * @author GoodforGod
 * @since 17.11.2018
 */
enum class DangerLevel {
    SUCCESS,
    WARNING,
    DANGER,
    UNKNOWN;

    companion object {
        fun parse(value:String) : DangerLevel {
            return when(value) {
                "success" -> SUCCESS
                "warning" -> WARNING
                "danger" -> DANGER
                else -> UNKNOWN
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy