Bimba.git

ref: f40911ae839b4894fb46ccaee689428a2ce79443

app/src/release/java/xyz/apiote/bimba/czwek/api/responses/DevResponses.kt


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// SPDX-FileCopyrightText: Adam Evyčędo
//
// SPDX-License-Identifier: GPL-3.0-or-later

package xyz.apiote.bimba.czwek.api.responses

import xyz.apiote.bimba.czwek.api.AlertV1
import xyz.apiote.bimba.czwek.api.DepartureV4
import xyz.apiote.bimba.czwek.api.LineV3
import xyz.apiote.bimba.czwek.api.ColourV1
import xyz.apiote.bimba.czwek.api.LineTypeV3
import xyz.apiote.bimba.czwek.api.LocatableV3
import xyz.apiote.bimba.czwek.api.QueryableV4
import xyz.apiote.bimba.czwek.api.StopV2
import xyz.apiote.bimba.czwek.api.PositionV1
import xyz.apiote.bimba.czwek.api.UnknownResourceVersionException
import xyz.apiote.bimba.czwek.api.VehicleV3
import xyz.apiote.bimba.czwek.api.structs.FeedInfoV2
import xyz.apiote.fruchtfleisch.Reader
import java.io.InputStream

data class DeparturesResponseDev(
	val alerts: List<AlertV1>,
	val departures: List<DepartureV4>,
	val stop: StopV2
) : DeparturesResponse {
	companion object {
		private fun unmarshal(stream: InputStream): DeparturesResponseDev {
			return DeparturesResponseDev(listOf(), listOf(), StopV2("","","","","", PositionV1(0.0, 0.0), listOf()))
		}
	}
}

data class FeedsResponseDev(
	val feeds: List<FeedInfoV2>
) : FeedsResponse {
	companion object {
		private fun unmarshal(stream: InputStream): FeedsResponseDev {
			return FeedsResponseDev(listOf())
		}
	}
}

data class LineResponseDev(
	val line: LineV3
) : LineResponse {
	companion object {
		private fun unmarshal(stream: InputStream): LineResponseDev {
			return LineResponseDev(LineV3("","",ColourV1(0u,0u,0u),LineTypeV3.UNKNOWN,"",listOf(),listOf()))
		}
	}
}

data class LocatablesResponseDev(val locatables: List<LocatableV3>) : LocatablesResponse {
	companion object {
		private fun unmarshal(stream: InputStream): LocatablesResponseDev {
			return LocatablesResponseDev(listOf())
		}
	}
}


data class QueryablesResponseDev(val queryables: List<QueryableV4>) : QueryablesResponse {
	companion object {
		private fun unmarshal(stream: InputStream): QueryablesResponseDev {
			return QueryablesResponseDev(listOf())
		}
	}
}