ref: ae0b98018aed0a925cda41beada1ec6bd1f27de5
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 20 21 22 23 |
// SPDX-FileCopyrightText: Adam Evyčędo // // SPDX-License-Identifier: GPL-3.0-or-later 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) } } } } |