ref: 002fee30a2996c72ac92e19d52b40bd32b587d35
app/src/main/java/xyz/apiote/bimba/czwek/api/structs/VehicleStatus.kt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
package xyz.apiote.bimba.czwek.api.structs import xyz.apiote.bimba.czwek.api.UnknownResourceVersionException enum class VehicleStatusV1 { IN_TRANSIT, INCOMING, AT_STOP, DEPARTED; companion object { fun of(type: UInt): VehicleStatusV1 { return when (type) { 0u -> IN_TRANSIT 1u -> INCOMING 2u -> AT_STOP 3u -> DEPARTED else -> throw UnknownResourceVersionException("VehicleStatus/$type", 1u) } } } } |