structs_gen.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  1. package traffic
  2. // Code generated by go-bare/cmd/gen, DO NOT EDIT.
  3. import (
  4. "errors"
  5. "git.sr.ht/~sircmpwn/go-bare"
  6. )
  7. type Translation struct {
  8. Language string `bare:"language"`
  9. Value string `bare:"value"`
  10. }
  11. func (t *Translation) Decode(data []byte) error {
  12. return bare.Unmarshal(data, t)
  13. }
  14. func (t *Translation) Encode() ([]byte, error) {
  15. return bare.Marshal(t)
  16. }
  17. type Trip struct {
  18. Id string `bare:"id"`
  19. Headsign string `bare:"headsign"`
  20. TranslatedHeadsigns []Translation `bare:"translatedHeadsigns"`
  21. Direction Direction `bare:"direction"`
  22. LineID string `bare:"lineID"`
  23. ScheduleID string `bare:"scheduleID"`
  24. ShapeID string `bare:"shapeID"`
  25. Departures []Departure `bare:"departures"`
  26. Headways []Headway `bare:"headways"`
  27. }
  28. func (t *Trip) Decode(data []byte) error {
  29. return bare.Unmarshal(data, t)
  30. }
  31. func (t *Trip) Encode() ([]byte, error) {
  32. return bare.Marshal(t)
  33. }
  34. type Headway struct {
  35. Interval uint `bare:"interval"`
  36. StartTime uint `bare:"startTime"`
  37. EndTime uint `bare:"endTime"`
  38. Exact bool `bare:"exact"`
  39. }
  40. func (t *Headway) Decode(data []byte) error {
  41. return bare.Unmarshal(data, t)
  42. }
  43. func (t *Headway) Encode() ([]byte, error) {
  44. return bare.Marshal(t)
  45. }
  46. type Vehicle struct {
  47. Id string `bare:"id"`
  48. Capabilities uint16 `bare:"capabilities"`
  49. }
  50. func (t *Vehicle) Decode(data []byte) error {
  51. return bare.Unmarshal(data, t)
  52. }
  53. func (t *Vehicle) Encode() ([]byte, error) {
  54. return bare.Marshal(t)
  55. }
  56. type Departure struct {
  57. StopSequence int `bare:"stopSequence"`
  58. Time uint `bare:"time"`
  59. Pickup Boarding `bare:"pickup"`
  60. Dropoff Boarding `bare:"dropoff"`
  61. StopOffset uint `bare:"stopOffset"`
  62. Exact bool `bare:"exact"`
  63. Ordinality DepartureOrdinality `bare:"ordinality"`
  64. }
  65. func (t *Departure) Decode(data []byte) error {
  66. return bare.Unmarshal(data, t)
  67. }
  68. func (t *Departure) Encode() ([]byte, error) {
  69. return bare.Marshal(t)
  70. }
  71. type Stop struct {
  72. Id string `bare:"id"`
  73. Code string `bare:"code"`
  74. Name string `bare:"name"`
  75. TranslatedNames []Translation `bare:"translatedNames"`
  76. NodeName string `bare:"nodeName"`
  77. TranslatedNodeNames []Translation `bare:"translatedNodeNames"`
  78. ChangeOptions []ChangeOption `bare:"changeOptions"`
  79. Zone string `bare:"zone"`
  80. Position Position `bare:"position"`
  81. Order map[string]StopOrder `bare:"order"`
  82. Timezone string `bare:"timezone"`
  83. }
  84. func (t *Stop) Decode(data []byte) error {
  85. return bare.Unmarshal(data, t)
  86. }
  87. func (t *Stop) Encode() ([]byte, error) {
  88. return bare.Marshal(t)
  89. }
  90. type ChangeOption struct {
  91. LineName string `bare:"lineName"`
  92. LineId string `bare:"lineId"`
  93. Headsign string `bare:"headsign"`
  94. TranslatedHeadsigns []Translation `bare:"translatedHeadsigns"`
  95. }
  96. func (t *ChangeOption) Decode(data []byte) error {
  97. return bare.Unmarshal(data, t)
  98. }
  99. func (t *ChangeOption) Encode() ([]byte, error) {
  100. return bare.Marshal(t)
  101. }
  102. type Position struct {
  103. Lat float64 `bare:"lat"`
  104. Lon float64 `bare:"lon"`
  105. }
  106. func (t *Position) Decode(data []byte) error {
  107. return bare.Unmarshal(data, t)
  108. }
  109. func (t *Position) Encode() ([]byte, error) {
  110. return bare.Marshal(t)
  111. }
  112. type LineGraph struct {
  113. StopCodes []string `bare:"stopCodes"`
  114. NextNodes map[int][]int `bare:"nextNodes"`
  115. }
  116. func (t *LineGraph) Decode(data []byte) error {
  117. return bare.Unmarshal(data, t)
  118. }
  119. func (t *LineGraph) Encode() ([]byte, error) {
  120. return bare.Marshal(t)
  121. }
  122. type StopOrder struct {
  123. TripOffset uint `bare:"tripOffset"`
  124. Sequence int `bare:"sequence"`
  125. }
  126. func (t *StopOrder) Decode(data []byte) error {
  127. return bare.Unmarshal(data, t)
  128. }
  129. func (t *StopOrder) Encode() ([]byte, error) {
  130. return bare.Marshal(t)
  131. }
  132. type Colour struct {
  133. R uint8 `bare:"r"`
  134. G uint8 `bare:"g"`
  135. B uint8 `bare:"b"`
  136. A uint8 `bare:"a"`
  137. }
  138. func (t *Colour) Decode(data []byte) error {
  139. return bare.Unmarshal(data, t)
  140. }
  141. func (t *Colour) Encode() ([]byte, error) {
  142. return bare.Marshal(t)
  143. }
  144. type Line struct {
  145. Id string `bare:"id"`
  146. Name string `bare:"name"`
  147. Colour Colour `bare:"colour"`
  148. Kind LineType `bare:"kind"`
  149. AgencyID string `bare:"agencyID"`
  150. Headsigns [][]string `bare:"headsigns"`
  151. TranslatedHeadsigns [][][]Translation `bare:"translatedHeadsigns"`
  152. Graphs []LineGraph `bare:"graphs"`
  153. }
  154. func (t *Line) Decode(data []byte) error {
  155. return bare.Unmarshal(data, t)
  156. }
  157. func (t *Line) Encode() ([]byte, error) {
  158. return bare.Marshal(t)
  159. }
  160. type FeedInfo struct {
  161. Name string `bare:"name"`
  162. Website string `bare:"website"`
  163. Language string `bare:"language"`
  164. ValidSince string `bare:"validSince"`
  165. ValidTill string `bare:"validTill"`
  166. QrHost string `bare:"qrHost"`
  167. QrLocation QRLocation `bare:"qrLocation"`
  168. QrSelector string `bare:"qrSelector"`
  169. Attributions map[string]string `bare:"attributions"`
  170. Descriptions map[string]string `bare:"descriptions"`
  171. RealtimeFeeds map[RealtimeFeedType]string `bare:"realtimeFeeds"`
  172. Timezone string `bare:"timezone"`
  173. }
  174. func (t *FeedInfo) Decode(data []byte) error {
  175. return bare.Unmarshal(data, t)
  176. }
  177. func (t *FeedInfo) Encode() ([]byte, error) {
  178. return bare.Marshal(t)
  179. }
  180. type Agency struct {
  181. Id string `bare:"id"`
  182. Name string `bare:"name"`
  183. TranslatedNames []Translation `bare:"translatedNames"`
  184. Website string `bare:"website"`
  185. TranslatedWebsites []Translation `bare:"translatedWebsites"`
  186. Timezone string `bare:"timezone"`
  187. PhoneNumber string `bare:"phoneNumber"`
  188. TranslatedPhoneNumbers []Translation `bare:"translatedPhoneNumbers"`
  189. Language string `bare:"language"`
  190. Email string `bare:"email"`
  191. TranslatedEmails []Translation `bare:"translatedEmails"`
  192. FareWebsite string `bare:"fareWebsite"`
  193. TranslatedFareWebsites []Translation `bare:"translatedFareWebsites"`
  194. }
  195. func (t *Agency) Decode(data []byte) error {
  196. return bare.Unmarshal(data, t)
  197. }
  198. func (t *Agency) Encode() ([]byte, error) {
  199. return bare.Marshal(t)
  200. }
  201. type NameOffset struct {
  202. Name string `bare:"name"`
  203. Offsets []uint `bare:"offsets"`
  204. }
  205. func (t *NameOffset) Decode(data []byte) error {
  206. return bare.Unmarshal(data, t)
  207. }
  208. func (t *NameOffset) Encode() ([]byte, error) {
  209. return bare.Marshal(t)
  210. }
  211. type CodeIndex map[string]uint
  212. func (t *CodeIndex) Decode(data []byte) error {
  213. return bare.Unmarshal(data, t)
  214. }
  215. func (t *CodeIndex) Encode() ([]byte, error) {
  216. return bare.Marshal(t)
  217. }
  218. type Schedule struct {
  219. Id string `bare:"id"`
  220. DateRanges []DateRange `bare:"dateRanges"`
  221. }
  222. func (t *Schedule) Decode(data []byte) error {
  223. return bare.Unmarshal(data, t)
  224. }
  225. func (t *Schedule) Encode() ([]byte, error) {
  226. return bare.Marshal(t)
  227. }
  228. type DateRange struct {
  229. Start string `bare:"start"`
  230. End string `bare:"end"`
  231. Weekdays uint8 `bare:"weekdays"`
  232. }
  233. func (t *DateRange) Decode(data []byte) error {
  234. return bare.Unmarshal(data, t)
  235. }
  236. func (t *DateRange) Encode() ([]byte, error) {
  237. return bare.Marshal(t)
  238. }
  239. type TimeRange struct {
  240. StartDate string `bare:"startDate"`
  241. EndDate string `bare:"endDate"`
  242. }
  243. func (t *TimeRange) Decode(data []byte) error {
  244. return bare.Unmarshal(data, t)
  245. }
  246. func (t *TimeRange) Encode() ([]byte, error) {
  247. return bare.Marshal(t)
  248. }
  249. type AlertLua struct {
  250. TimeRanges []TimeRange `bare:"timeRanges"`
  251. Headers map[string]string `bare:"headers"`
  252. Descriptions map[string]string `bare:"descriptions"`
  253. Urls map[string]string `bare:"urls"`
  254. Cause int `bare:"cause"`
  255. Effect int `bare:"effect"`
  256. }
  257. func (t *AlertLua) Decode(data []byte) error {
  258. return bare.Unmarshal(data, t)
  259. }
  260. func (t *AlertLua) Encode() ([]byte, error) {
  261. return bare.Marshal(t)
  262. }
  263. type LuaUpdates struct {
  264. AreTripsInTimetable bool `bare:"areTripsInTimetable"`
  265. Updates map[string]Update `bare:"updates"`
  266. Alerts map[string][]AlertLua `bare:"alerts"`
  267. }
  268. func (t *LuaUpdates) Decode(data []byte) error {
  269. return bare.Unmarshal(data, t)
  270. }
  271. func (t *LuaUpdates) Encode() ([]byte, error) {
  272. return bare.Marshal(t)
  273. }
  274. type LuaError struct {
  275. HttpResponseCode int `bare:"httpResponseCode"`
  276. Message string `bare:"message"`
  277. WillNextRequestFail bool `bare:"willNextRequestFail"`
  278. }
  279. func (t *LuaError) Decode(data []byte) error {
  280. return bare.Unmarshal(data, t)
  281. }
  282. func (t *LuaError) Encode() ([]byte, error) {
  283. return bare.Marshal(t)
  284. }
  285. type Update struct {
  286. Time string `bare:"time"`
  287. TimeUTC string `bare:"timeUTC"`
  288. StopSequence uint32 `bare:"stopSequence"`
  289. StopID string `bare:"stopID"`
  290. Delay int32 `bare:"delay"`
  291. TimetableRelationship TimetableRelationship `bare:"timetableRelationship"`
  292. VehicleStatus VehicleStatus `bare:"vehicleStatus"`
  293. StartTime *uint `bare:"startTime"`
  294. }
  295. func (t *Update) Decode(data []byte) error {
  296. return bare.Unmarshal(data, t)
  297. }
  298. func (t *Update) Encode() ([]byte, error) {
  299. return bare.Marshal(t)
  300. }
  301. type VehicleStatus struct {
  302. Status DepartureStatus `bare:"status"`
  303. CongestionLevel CongestionLevel `bare:"congestionLevel"`
  304. OccupancyStatus OccupancyStatus `bare:"occupancyStatus"`
  305. VehicleID string `bare:"vehicleID"`
  306. Latitude float64 `bare:"latitude"`
  307. Longitude float64 `bare:"longitude"`
  308. Speed float32 `bare:"speed"`
  309. Bearing float64 `bare:"bearing"`
  310. LineID string `bare:"lineID"`
  311. LineName string `bare:"lineName"`
  312. Headsign string `bare:"headsign"`
  313. TripID string `bare:"tripID"`
  314. WheelchairAccessibility WheelchairAccessibility `bare:"wheelchairAccessibility"`
  315. }
  316. func (t *VehicleStatus) Decode(data []byte) error {
  317. return bare.Unmarshal(data, t)
  318. }
  319. func (t *VehicleStatus) Encode() ([]byte, error) {
  320. return bare.Marshal(t)
  321. }
  322. type Direction uint
  323. const (
  324. THERE Direction = 0
  325. BACK Direction = 1
  326. )
  327. func (t Direction) String() string {
  328. switch t {
  329. case THERE:
  330. return "THERE"
  331. case BACK:
  332. return "BACK"
  333. }
  334. panic(errors.New("Invalid Direction value"))
  335. }
  336. type VehicleCapabilities uint
  337. const (
  338. RAMP VehicleCapabilities = 1
  339. LOW_FLOOR VehicleCapabilities = 2
  340. AIR_CONDITIONING VehicleCapabilities = 4
  341. BICYCLE VehicleCapabilities = 8
  342. VOICE_ANNOUNCEMENTS VehicleCapabilities = 16
  343. TICKET_MACHINE VehicleCapabilities = 32
  344. TICKET_SOLD_DRIVER VehicleCapabilities = 64
  345. USB_CHARGING VehicleCapabilities = 128
  346. LOW_FLOOR_PARTIAL VehicleCapabilities = 256
  347. )
  348. func (t VehicleCapabilities) String() string {
  349. switch t {
  350. case RAMP:
  351. return "RAMP"
  352. case LOW_FLOOR:
  353. return "LOW_FLOOR"
  354. case AIR_CONDITIONING:
  355. return "AIR_CONDITIONING"
  356. case BICYCLE:
  357. return "BICYCLE"
  358. case VOICE_ANNOUNCEMENTS:
  359. return "VOICE_ANNOUNCEMENTS"
  360. case TICKET_MACHINE:
  361. return "TICKET_MACHINE"
  362. case TICKET_SOLD_DRIVER:
  363. return "TICKET_SOLD_DRIVER"
  364. case USB_CHARGING:
  365. return "USB_CHARGING"
  366. case LOW_FLOOR_PARTIAL:
  367. return "LOW_FLOOR_PARTIAL"
  368. }
  369. panic(errors.New("Invalid VehicleCapabilities value"))
  370. }
  371. type Boarding uint
  372. const (
  373. REGULAR Boarding = 0
  374. NONE Boarding = 1
  375. BY_PHONE Boarding = 2
  376. BY_DRIVER Boarding = 3
  377. )
  378. func (t Boarding) String() string {
  379. switch t {
  380. case REGULAR:
  381. return "REGULAR"
  382. case NONE:
  383. return "NONE"
  384. case BY_PHONE:
  385. return "BY_PHONE"
  386. case BY_DRIVER:
  387. return "BY_DRIVER"
  388. }
  389. panic(errors.New("Invalid Boarding value"))
  390. }
  391. type DepartureOrdinality uint
  392. const (
  393. MIDPOINT DepartureOrdinality = 0
  394. ORIGIN DepartureOrdinality = 1
  395. TERMINUS DepartureOrdinality = 2
  396. )
  397. func (t DepartureOrdinality) String() string {
  398. switch t {
  399. case MIDPOINT:
  400. return "MIDPOINT"
  401. case ORIGIN:
  402. return "ORIGIN"
  403. case TERMINUS:
  404. return "TERMINUS"
  405. }
  406. panic(errors.New("Invalid DepartureOrdinality value"))
  407. }
  408. type LineType uint
  409. const (
  410. TRAM LineType = 0
  411. METRO LineType = 1
  412. RAIL LineType = 2
  413. BUS LineType = 3
  414. FERRY LineType = 4
  415. CABLE_TRAM LineType = 5
  416. CABLE_CAR LineType = 6
  417. FUNICULAR LineType = 7
  418. TROLLEYBUS LineType = 11
  419. MONORAIL LineType = 12
  420. )
  421. func (t LineType) String() string {
  422. switch t {
  423. case TRAM:
  424. return "TRAM"
  425. case METRO:
  426. return "METRO"
  427. case RAIL:
  428. return "RAIL"
  429. case BUS:
  430. return "BUS"
  431. case FERRY:
  432. return "FERRY"
  433. case CABLE_TRAM:
  434. return "CABLE_TRAM"
  435. case CABLE_CAR:
  436. return "CABLE_CAR"
  437. case FUNICULAR:
  438. return "FUNICULAR"
  439. case TROLLEYBUS:
  440. return "TROLLEYBUS"
  441. case MONORAIL:
  442. return "MONORAIL"
  443. }
  444. panic(errors.New("Invalid LineType value"))
  445. }
  446. type RealtimeFeedType uint
  447. const (
  448. TRIP_UPDATES RealtimeFeedType = 0
  449. VEHICLE_POSITIONS RealtimeFeedType = 1
  450. ALERTS RealtimeFeedType = 2
  451. )
  452. func (t RealtimeFeedType) String() string {
  453. switch t {
  454. case TRIP_UPDATES:
  455. return "TRIP_UPDATES"
  456. case VEHICLE_POSITIONS:
  457. return "VEHICLE_POSITIONS"
  458. case ALERTS:
  459. return "ALERTS"
  460. }
  461. panic(errors.New("Invalid RealtimeFeedType value"))
  462. }
  463. type QRLocation uint
  464. const (
  465. QRLocationUnknown QRLocation = 0
  466. QRLocationNone QRLocation = 1
  467. QRLocationPath QRLocation = 2
  468. QRLocationQuery QRLocation = 3
  469. )
  470. func (t QRLocation) String() string {
  471. switch t {
  472. case QRLocationUnknown:
  473. return "QRLocationUnknown"
  474. case QRLocationNone:
  475. return "QRLocationNone"
  476. case QRLocationPath:
  477. return "QRLocationPath"
  478. case QRLocationQuery:
  479. return "QRLocationQuery"
  480. }
  481. panic(errors.New("Invalid QRLocation value"))
  482. }
  483. type TimetableRelationship uint
  484. const (
  485. NOT_REALTIME TimetableRelationship = 0
  486. TRIP_SCHEDULED TimetableRelationship = 1
  487. TRIP_CANCELED TimetableRelationship = 2
  488. TRIP_DELETED TimetableRelationship = 3
  489. TRIP_ADDED TimetableRelationship = 4
  490. STOP_SKIPPED TimetableRelationship = 5
  491. NO_TRIP_DATA TimetableRelationship = 6
  492. )
  493. func (t TimetableRelationship) String() string {
  494. switch t {
  495. case NOT_REALTIME:
  496. return "NOT_REALTIME"
  497. case TRIP_SCHEDULED:
  498. return "TRIP_SCHEDULED"
  499. case TRIP_CANCELED:
  500. return "TRIP_CANCELED"
  501. case TRIP_DELETED:
  502. return "TRIP_DELETED"
  503. case TRIP_ADDED:
  504. return "TRIP_ADDED"
  505. case STOP_SKIPPED:
  506. return "STOP_SKIPPED"
  507. case NO_TRIP_DATA:
  508. return "NO_TRIP_DATA"
  509. }
  510. panic(errors.New("Invalid TimetableRelationship value"))
  511. }
  512. type CongestionLevel uint
  513. const (
  514. CONGESTION_UNKNOWN CongestionLevel = 0
  515. CONGESTION_SMOOTH CongestionLevel = 1
  516. CONGESTION_STOP_AND_GO CongestionLevel = 2
  517. CONGESTION_SIGNIFICANT CongestionLevel = 3
  518. CONGESTION_SEVERE CongestionLevel = 4
  519. )
  520. func (t CongestionLevel) String() string {
  521. switch t {
  522. case CONGESTION_UNKNOWN:
  523. return "CONGESTION_UNKNOWN"
  524. case CONGESTION_SMOOTH:
  525. return "CONGESTION_SMOOTH"
  526. case CONGESTION_STOP_AND_GO:
  527. return "CONGESTION_STOP_AND_GO"
  528. case CONGESTION_SIGNIFICANT:
  529. return "CONGESTION_SIGNIFICANT"
  530. case CONGESTION_SEVERE:
  531. return "CONGESTION_SEVERE"
  532. }
  533. panic(errors.New("Invalid CongestionLevel value"))
  534. }
  535. type OccupancyStatus uint
  536. const (
  537. OCCUPANCY_UNKNOWN OccupancyStatus = 0
  538. OCCUPANCY_EMPTY OccupancyStatus = 1
  539. OCCUPANCY_MANY_AVAILABLE OccupancyStatus = 2
  540. OCCUPANCY_FEW_AVAILABLE OccupancyStatus = 3
  541. OCCUPANCY_STANDING_ONLY OccupancyStatus = 4
  542. OCCUPANCY_CRUSHED OccupancyStatus = 5
  543. OCCUPANCY_FULL OccupancyStatus = 6
  544. OCCUPANCY_NOT_ACCEPTING OccupancyStatus = 7
  545. )
  546. func (t OccupancyStatus) String() string {
  547. switch t {
  548. case OCCUPANCY_UNKNOWN:
  549. return "OCCUPANCY_UNKNOWN"
  550. case OCCUPANCY_EMPTY:
  551. return "OCCUPANCY_EMPTY"
  552. case OCCUPANCY_MANY_AVAILABLE:
  553. return "OCCUPANCY_MANY_AVAILABLE"
  554. case OCCUPANCY_FEW_AVAILABLE:
  555. return "OCCUPANCY_FEW_AVAILABLE"
  556. case OCCUPANCY_STANDING_ONLY:
  557. return "OCCUPANCY_STANDING_ONLY"
  558. case OCCUPANCY_CRUSHED:
  559. return "OCCUPANCY_CRUSHED"
  560. case OCCUPANCY_FULL:
  561. return "OCCUPANCY_FULL"
  562. case OCCUPANCY_NOT_ACCEPTING:
  563. return "OCCUPANCY_NOT_ACCEPTING"
  564. }
  565. panic(errors.New("Invalid OccupancyStatus value"))
  566. }
  567. type WheelchairAccessibility uint
  568. const (
  569. WHEELCHAIR_NO_DATA WheelchairAccessibility = 0
  570. WHEELCHAIR_UNKNOWN WheelchairAccessibility = 1
  571. WHHELCHAIR_ACCESSIBLE WheelchairAccessibility = 2
  572. WHEELCHAIR_INACCESSIBLE WheelchairAccessibility = 3
  573. )
  574. func (t WheelchairAccessibility) String() string {
  575. switch t {
  576. case WHEELCHAIR_NO_DATA:
  577. return "WHEELCHAIR_NO_DATA"
  578. case WHEELCHAIR_UNKNOWN:
  579. return "WHEELCHAIR_UNKNOWN"
  580. case WHHELCHAIR_ACCESSIBLE:
  581. return "WHHELCHAIR_ACCESSIBLE"
  582. case WHEELCHAIR_INACCESSIBLE:
  583. return "WHEELCHAIR_INACCESSIBLE"
  584. }
  585. panic(errors.New("Invalid WheelchairAccessibility value"))
  586. }
  587. type DepartureStatus uint
  588. const (
  589. IN_TRANSIT DepartureStatus = 0
  590. AT_STOP DepartureStatus = 1
  591. INCOMING DepartureStatus = 2
  592. )
  593. func (t DepartureStatus) String() string {
  594. switch t {
  595. case IN_TRANSIT:
  596. return "IN_TRANSIT"
  597. case AT_STOP:
  598. return "AT_STOP"
  599. case INCOMING:
  600. return "INCOMING"
  601. }
  602. panic(errors.New("Invalid DepartureStatus value"))
  603. }