Bimba.git

ref: 67f5b3aad52d3fcabf3f0abe99afeaf8a2ed7203

app/src/main/java/xyz/apiote/bimba/czwek/api/structs/QrLocation.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 QrLocationV1 {
	UNKNOWN, NONE, PATH, QUERY;

	companion object {
		fun of(type: UInt): QrLocationV1 {
			return when (type) {
				0u -> UNKNOWN
				1u -> NONE
				2u -> PATH
				3u -> QUERY
				else -> throw UnknownResourceVersionException("QrLocation/$type", 1u)
			}
		}
	}
}