123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257 |
- package api
- // Code generated by go-bare/cmd/gen, DO NOT EDIT.
- import (
- "errors"
- "git.sr.ht/~sircmpwn/go-bare"
- )
- type LineResponseDev struct {
- Line LineV3 `bare:"line"`
- }
- func (t *LineResponseDev) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineResponseDev) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineResponseV3 struct {
- Line LineV3 `bare:"line"`
- }
- func (t *LineResponseV3) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineResponseV3) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineResponseV2 struct {
- Line LineV2 `bare:"line"`
- }
- func (t *LineResponseV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineResponseV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineResponseV1 struct {
- Line LineV1 `bare:"line"`
- }
- func (t *LineResponseV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineResponseV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type FeedsResponseDev struct {
- Feeds []FeedInfoV2 `bare:"feeds"`
- }
- func (t *FeedsResponseDev) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *FeedsResponseDev) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type FeedsResponseV2 struct {
- Feeds []FeedInfoV2 `bare:"feeds"`
- }
- func (t *FeedsResponseV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *FeedsResponseV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type FeedsResponseV1 struct {
- Feeds []FeedInfoV1 `bare:"feeds"`
- }
- func (t *FeedsResponseV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *FeedsResponseV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type FeedInfoV1 struct {
- Name string `bare:"name"`
- Id string `bare:"id"`
- Attribution string `bare:"attribution"`
- Description string `bare:"description"`
- LastUpdate string `bare:"lastUpdate"`
- }
- func (t *FeedInfoV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *FeedInfoV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type FeedInfoV2 struct {
- Name string `bare:"name"`
- Id string `bare:"id"`
- Attribution string `bare:"attribution"`
- Description string `bare:"description"`
- LastUpdate string `bare:"lastUpdate"`
- QrHost string `bare:"qrHost"`
- QrIn QRLocationV1 `bare:"qrIn"`
- QrSelector string `bare:"qrSelector"`
- ValidSince string `bare:"validSince"`
- ValidTill string `bare:"validTill"`
- }
- func (t *FeedInfoV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *FeedInfoV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type QueryablesResponseDev struct {
- Queryables []QueryableV5 `bare:"queryables"`
- }
- func (t *QueryablesResponseDev) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *QueryablesResponseDev) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type QueryablesResponseV4 struct {
- Queryables []QueryableV4 `bare:"queryables"`
- }
- func (t *QueryablesResponseV4) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *QueryablesResponseV4) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type QueryablesResponseV3 struct {
- Queryables []QueryableV3 `bare:"queryables"`
- }
- func (t *QueryablesResponseV3) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *QueryablesResponseV3) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type QueryablesResponseV2 struct {
- Queryables []QueryableV2 `bare:"queryables"`
- }
- func (t *QueryablesResponseV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *QueryablesResponseV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type QueryablesResponseV1 struct {
- Queryables []QueryableV1 `bare:"queryables"`
- }
- func (t *QueryablesResponseV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *QueryablesResponseV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type StopV1 struct {
- Code string `bare:"code"`
- Name string `bare:"name"`
- Zone string `bare:"zone"`
- Position PositionV1 `bare:"position"`
- ChangeOptions []ChangeOptionV1 `bare:"changeOptions"`
- }
- func (t *StopV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *StopV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type StopV2 struct {
- Code string `bare:"code"`
- Name string `bare:"name"`
- NodeName string `bare:"nodeName"`
- Zone string `bare:"zone"`
- FeedID string `bare:"feedID"`
- Position PositionV1 `bare:"position"`
- ChangeOptions []ChangeOptionV1 `bare:"changeOptions"`
- }
- func (t *StopV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *StopV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type StopV3 struct {
- Code string `bare:"code"`
- Name string `bare:"name"`
- NodeName string `bare:"nodeName"`
- Zone string `bare:"zone"`
- FeedID string `bare:"feedID"`
- Position PositionV1 `bare:"position"`
- ChangeOptions []ChangeOptionV2 `bare:"changeOptions"`
- }
- func (t *StopV3) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *StopV3) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineV1 struct {
- Name string `bare:"name"`
- Colour ColourV1 `bare:"colour"`
- Kind LineTypeV2 `bare:"kind"`
- FeedID string `bare:"feedID"`
- Headsigns [][]string `bare:"headsigns"`
- Graphs []LineGraphV1 `bare:"graphs"`
- }
- func (t *LineV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineV2 struct {
- Name string `bare:"name"`
- Colour ColourV1 `bare:"colour"`
- Kind LineTypeV3 `bare:"kind"`
- FeedID string `bare:"feedID"`
- Headsigns [][]string `bare:"headsigns"`
- Graphs []LineGraphV1 `bare:"graphs"`
- }
- func (t *LineV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineV3 struct {
- Id string `bare:"id"`
- Name string `bare:"name"`
- Colour ColourV1 `bare:"colour"`
- Kind LineTypeV3 `bare:"kind"`
- FeedID string `bare:"feedID"`
- Headsigns [][]string `bare:"headsigns"`
- Graphs []LineGraphV1 `bare:"graphs"`
- }
- func (t *LineV3) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineV3) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineGraphV1 struct {
- Stops []StopStubV1 `bare:"stops"`
- NextNodes map[int][]int `bare:"nextNodes"`
- }
- func (t *LineGraphV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineGraphV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type StopStubV1 struct {
- Code string `bare:"code"`
- Name string `bare:"name"`
- NodeName string `bare:"nodeName"`
- Zone string `bare:"zone"`
- OnDemand bool `bare:"onDemand"`
- }
- func (t *StopStubV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *StopStubV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type PositionV1 struct {
- Lat float64 `bare:"lat"`
- Lon float64 `bare:"lon"`
- }
- func (t *PositionV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *PositionV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type ChangeOptionV1 struct {
- LineName string `bare:"lineName"`
- Headsign string `bare:"headsign"`
- }
- func (t *ChangeOptionV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *ChangeOptionV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type ChangeOptionV2 struct {
- Line LineStubV1 `bare:"line"`
- Headsigns []string `bare:"headsigns"`
- }
- func (t *ChangeOptionV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *ChangeOptionV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LocatablesResponseDev struct {
- Locatables []LocatableV4 `bare:"locatables"`
- }
- func (t *LocatablesResponseDev) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LocatablesResponseDev) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LocatablesResponseV3 struct {
- Locatables []LocatableV3 `bare:"locatables"`
- }
- func (t *LocatablesResponseV3) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LocatablesResponseV3) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LocatablesResponseV2 struct {
- Locatables []LocatableV2 `bare:"locatables"`
- }
- func (t *LocatablesResponseV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LocatablesResponseV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LocatablesResponseV1 struct {
- Locatables []LocatableV1 `bare:"locatables"`
- }
- func (t *LocatablesResponseV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LocatablesResponseV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type VehicleV1 struct {
- Id string `bare:"id"`
- Position PositionV1 `bare:"position"`
- Capabilities uint16 `bare:"capabilities"`
- Speed float32 `bare:"speed"`
- Line LineStubV1 `bare:"line"`
- Headsign string `bare:"headsign"`
- CongestionLevel CongestionLevelV1 `bare:"congestionLevel"`
- OccupancyStatus OccupancyStatusV1 `bare:"occupancyStatus"`
- }
- func (t *VehicleV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *VehicleV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type VehicleV2 struct {
- Id string `bare:"id"`
- Position PositionV1 `bare:"position"`
- Capabilities uint16 `bare:"capabilities"`
- Speed float32 `bare:"speed"`
- Line LineStubV2 `bare:"line"`
- Headsign string `bare:"headsign"`
- CongestionLevel CongestionLevelV1 `bare:"congestionLevel"`
- OccupancyStatus OccupancyStatusV1 `bare:"occupancyStatus"`
- }
- func (t *VehicleV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *VehicleV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type VehicleV3 struct {
- Id string `bare:"id"`
- Position PositionV1 `bare:"position"`
- Capabilities uint16 `bare:"capabilities"`
- Speed float32 `bare:"speed"`
- Line LineStubV3 `bare:"line"`
- Headsign string `bare:"headsign"`
- CongestionLevel CongestionLevelV1 `bare:"congestionLevel"`
- OccupancyStatus OccupancyStatusV1 `bare:"occupancyStatus"`
- }
- func (t *VehicleV3) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *VehicleV3) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineStubV1 struct {
- Name string `bare:"name"`
- Kind LineTypeV1 `bare:"kind"`
- Colour ColourV1 `bare:"colour"`
- }
- func (t *LineStubV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineStubV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineStubV2 struct {
- Name string `bare:"name"`
- Kind LineTypeV2 `bare:"kind"`
- Colour ColourV1 `bare:"colour"`
- }
- func (t *LineStubV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineStubV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type LineStubV3 struct {
- Name string `bare:"name"`
- Kind LineTypeV3 `bare:"kind"`
- Colour ColourV1 `bare:"colour"`
- }
- func (t *LineStubV3) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *LineStubV3) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type ColourV1 struct {
- R uint8 `bare:"r"`
- G uint8 `bare:"g"`
- B uint8 `bare:"b"`
- }
- func (t *ColourV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *ColourV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DeparturesResponseDev struct {
- Alerts []AlertV1 `bare:"alerts"`
- Departures []DepartureV5 `bare:"departures"`
- Stop StopV3 `bare:"stop"`
- }
- func (t *DeparturesResponseDev) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DeparturesResponseDev) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DeparturesResponseV4 struct {
- Alerts []AlertV1 `bare:"alerts"`
- Departures []DepartureV4 `bare:"departures"`
- Stop StopV2 `bare:"stop"`
- }
- func (t *DeparturesResponseV4) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DeparturesResponseV4) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DeparturesResponseV3 struct {
- Alerts []AlertV1 `bare:"alerts"`
- Departures []DepartureV3 `bare:"departures"`
- Stop StopV2 `bare:"stop"`
- }
- func (t *DeparturesResponseV3) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DeparturesResponseV3) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DeparturesResponseV2 struct {
- Alerts []AlertV1 `bare:"alerts"`
- Departures []DepartureV2 `bare:"departures"`
- Stop StopV2 `bare:"stop"`
- }
- func (t *DeparturesResponseV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DeparturesResponseV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DeparturesResponseV1 struct {
- Alerts []AlertV1 `bare:"alerts"`
- Departures []DepartureV1 `bare:"departures"`
- Stop StopV1 `bare:"stop"`
- }
- func (t *DeparturesResponseV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DeparturesResponseV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type AlertV1 struct {
- Header string `bare:"header"`
- Description string `bare:"description"`
- Url string `bare:"url"`
- Cause AlertCauseV1 `bare:"cause"`
- Effect AlertEffectV1 `bare:"effect"`
- }
- func (t *AlertV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *AlertV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DepartureV1 struct {
- Id string `bare:"id"`
- Time TimeV1 `bare:"time"`
- Status VehicleStatusV1 `bare:"status"`
- IsRealtime bool `bare:"isRealtime"`
- Vehicle VehicleV1 `bare:"vehicle"`
- Boarding uint8 `bare:"boarding"`
- }
- func (t *DepartureV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DepartureV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DepartureV2 struct {
- Id string `bare:"id"`
- Time TimeV1 `bare:"time"`
- Status VehicleStatusV1 `bare:"status"`
- IsRealtime bool `bare:"isRealtime"`
- Vehicle VehicleV2 `bare:"vehicle"`
- Boarding uint8 `bare:"boarding"`
- }
- func (t *DepartureV2) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DepartureV2) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DepartureV3 struct {
- Id string `bare:"id"`
- Time TimeV1 `bare:"time"`
- Status VehicleStatusV1 `bare:"status"`
- IsRealtime bool `bare:"isRealtime"`
- Vehicle VehicleV3 `bare:"vehicle"`
- Boarding uint8 `bare:"boarding"`
- }
- func (t *DepartureV3) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DepartureV3) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DepartureV4 struct {
- Id string `bare:"id"`
- Time TimeV1 `bare:"time"`
- Status VehicleStatusV1 `bare:"status"`
- IsRealtime bool `bare:"isRealtime"`
- Vehicle VehicleV3 `bare:"vehicle"`
- Boarding uint8 `bare:"boarding"`
- Alerts []AlertV1 `bare:"alerts"`
- }
- func (t *DepartureV4) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DepartureV4) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type DepartureV5 struct {
- Id string `bare:"id"`
- Time TimeV1 `bare:"time"`
- Status VehicleStatusV1 `bare:"status"`
- IsRealtime bool `bare:"isRealtime"`
- Vehicle VehicleV3 `bare:"vehicle"`
- Boarding uint8 `bare:"boarding"`
- Alerts []AlertV1 `bare:"alerts"`
- Exact bool `bare:"exact"`
- Ordinality DepartureOrdinalityV1 `bare:"ordinality"`
- }
- func (t *DepartureV5) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *DepartureV5) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type TimeV1 struct {
- Hour uint8 `bare:"hour"`
- Minute uint8 `bare:"minute"`
- Second uint8 `bare:"second"`
- DayOffset int8 `bare:"dayOffset"`
- Zone string `bare:"zone"`
- }
- func (t *TimeV1) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *TimeV1) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type ErrorResponse struct {
- Field string `bare:"field"`
- Message string `bare:"message"`
- }
- func (t *ErrorResponse) Decode(data []byte) error {
- return bare.Unmarshal(data, t)
- }
- func (t *ErrorResponse) Encode() ([]byte, error) {
- return bare.Marshal(t)
- }
- type QRLocationV1 uint
- const (
- UNKNOWN QRLocationV1 = 0
- NONE QRLocationV1 = 1
- PATH QRLocationV1 = 2
- QUERY QRLocationV1 = 3
- )
- func (t QRLocationV1) String() string {
- switch t {
- case UNKNOWN:
- return "UNKNOWN"
- case NONE:
- return "NONE"
- case PATH:
- return "PATH"
- case QUERY:
- return "QUERY"
- }
- panic(errors.New("Invalid QRLocationV1 value"))
- }
- type CongestionLevelV1 uint
- const (
- CONGESTION_UNKNOWN CongestionLevelV1 = 0
- CONGESTION_SMOOTH CongestionLevelV1 = 1
- CONGESTION_STOP_AND_GO CongestionLevelV1 = 2
- CONGESTION_SIGNIFICANT CongestionLevelV1 = 3
- CONGESTION_SEVERE CongestionLevelV1 = 4
- )
- func (t CongestionLevelV1) String() string {
- switch t {
- case CONGESTION_UNKNOWN:
- return "CONGESTION_UNKNOWN"
- case CONGESTION_SMOOTH:
- return "CONGESTION_SMOOTH"
- case CONGESTION_STOP_AND_GO:
- return "CONGESTION_STOP_AND_GO"
- case CONGESTION_SIGNIFICANT:
- return "CONGESTION_SIGNIFICANT"
- case CONGESTION_SEVERE:
- return "CONGESTION_SEVERE"
- }
- panic(errors.New("Invalid CongestionLevelV1 value"))
- }
- type OccupancyStatusV1 uint
- const (
- OCCUPANCY_UNKNOWN OccupancyStatusV1 = 0
- OCCUPANCY_EMPTY OccupancyStatusV1 = 1
- OCCUPANCY_MANY_AVAILABLE OccupancyStatusV1 = 2
- OCCUPANCY_FEW_AVAILABLE OccupancyStatusV1 = 3
- OCCUPANCY_STANDING_ONLY OccupancyStatusV1 = 4
- OCCUPANCY_CRUSHED OccupancyStatusV1 = 5
- OCCUPANCY_FULL OccupancyStatusV1 = 6
- OCCUPANCY_NOT_ACCEPTING OccupancyStatusV1 = 7
- )
- func (t OccupancyStatusV1) String() string {
- switch t {
- case OCCUPANCY_UNKNOWN:
- return "OCCUPANCY_UNKNOWN"
- case OCCUPANCY_EMPTY:
- return "OCCUPANCY_EMPTY"
- case OCCUPANCY_MANY_AVAILABLE:
- return "OCCUPANCY_MANY_AVAILABLE"
- case OCCUPANCY_FEW_AVAILABLE:
- return "OCCUPANCY_FEW_AVAILABLE"
- case OCCUPANCY_STANDING_ONLY:
- return "OCCUPANCY_STANDING_ONLY"
- case OCCUPANCY_CRUSHED:
- return "OCCUPANCY_CRUSHED"
- case OCCUPANCY_FULL:
- return "OCCUPANCY_FULL"
- case OCCUPANCY_NOT_ACCEPTING:
- return "OCCUPANCY_NOT_ACCEPTING"
- }
- panic(errors.New("Invalid OccupancyStatusV1 value"))
- }
- type LineTypeV1 uint
- const (
- LINE_UNKNOWN LineTypeV1 = 0
- TRAM LineTypeV1 = 1
- BUS LineTypeV1 = 2
- )
- func (t LineTypeV1) String() string {
- switch t {
- case LINE_UNKNOWN:
- return "LINE_UNKNOWN"
- case TRAM:
- return "TRAM"
- case BUS:
- return "BUS"
- }
- panic(errors.New("Invalid LineTypeV1 value"))
- }
- type LineTypeV2 uint
- const (
- LINE_V2_UNKNOWN LineTypeV2 = 0
- LINE_V2_TRAM LineTypeV2 = 1
- LINE_V2_BUS LineTypeV2 = 2
- LINE_V2_TROLLEYBUS LineTypeV2 = 3
- )
- func (t LineTypeV2) String() string {
- switch t {
- case LINE_V2_UNKNOWN:
- return "LINE_V2_UNKNOWN"
- case LINE_V2_TRAM:
- return "LINE_V2_TRAM"
- case LINE_V2_BUS:
- return "LINE_V2_BUS"
- case LINE_V2_TROLLEYBUS:
- return "LINE_V2_TROLLEYBUS"
- }
- panic(errors.New("Invalid LineTypeV2 value"))
- }
- type LineTypeV3 uint
- const (
- LINE_V3_UNKNOWN LineTypeV3 = 0
- LINE_V3_TRAM LineTypeV3 = 1
- LINE_V3_BUS LineTypeV3 = 2
- LINE_V3_TROLLEYBUS LineTypeV3 = 3
- LINE_V3_METRO LineTypeV3 = 4
- LINE_V3_RAIL LineTypeV3 = 5
- LINE_V3_FERRY LineTypeV3 = 6
- LINE_V3_CABLE_TRAM LineTypeV3 = 7
- LINE_V3_CABLE_CAR LineTypeV3 = 8
- LINE_V3_FUNICULAR LineTypeV3 = 9
- LINE_V3_MONORAIL LineTypeV3 = 10
- )
- func (t LineTypeV3) String() string {
- switch t {
- case LINE_V3_UNKNOWN:
- return "LINE_V3_UNKNOWN"
- case LINE_V3_TRAM:
- return "LINE_V3_TRAM"
- case LINE_V3_BUS:
- return "LINE_V3_BUS"
- case LINE_V3_TROLLEYBUS:
- return "LINE_V3_TROLLEYBUS"
- case LINE_V3_METRO:
- return "LINE_V3_METRO"
- case LINE_V3_RAIL:
- return "LINE_V3_RAIL"
- case LINE_V3_FERRY:
- return "LINE_V3_FERRY"
- case LINE_V3_CABLE_TRAM:
- return "LINE_V3_CABLE_TRAM"
- case LINE_V3_CABLE_CAR:
- return "LINE_V3_CABLE_CAR"
- case LINE_V3_FUNICULAR:
- return "LINE_V3_FUNICULAR"
- case LINE_V3_MONORAIL:
- return "LINE_V3_MONORAIL"
- }
- panic(errors.New("Invalid LineTypeV3 value"))
- }
- type AlertCauseV1 uint
- const (
- CAUSE_UNKNOWN AlertCauseV1 = 0
- CAUSE_OTHER AlertCauseV1 = 1
- CAUSE_TECHNICAL_PROBLEM AlertCauseV1 = 2
- CAUSE_STRIKE AlertCauseV1 = 3
- CAUSE_DEMONSTRATION AlertCauseV1 = 4
- CAUSE_ACCIDENT AlertCauseV1 = 5
- CAUSE_HOLIDAY AlertCauseV1 = 6
- CAUSE_WEATHER AlertCauseV1 = 7
- CAUSE_MAINTENANCE AlertCauseV1 = 8
- CAUSE_CONSTRUCTION AlertCauseV1 = 9
- CAUSE_POLICE_ACTIVITY AlertCauseV1 = 10
- CAUSE_MEDICAL_EMERGENCY AlertCauseV1 = 11
- )
- func (t AlertCauseV1) String() string {
- switch t {
- case CAUSE_UNKNOWN:
- return "CAUSE_UNKNOWN"
- case CAUSE_OTHER:
- return "CAUSE_OTHER"
- case CAUSE_TECHNICAL_PROBLEM:
- return "CAUSE_TECHNICAL_PROBLEM"
- case CAUSE_STRIKE:
- return "CAUSE_STRIKE"
- case CAUSE_DEMONSTRATION:
- return "CAUSE_DEMONSTRATION"
- case CAUSE_ACCIDENT:
- return "CAUSE_ACCIDENT"
- case CAUSE_HOLIDAY:
- return "CAUSE_HOLIDAY"
- case CAUSE_WEATHER:
- return "CAUSE_WEATHER"
- case CAUSE_MAINTENANCE:
- return "CAUSE_MAINTENANCE"
- case CAUSE_CONSTRUCTION:
- return "CAUSE_CONSTRUCTION"
- case CAUSE_POLICE_ACTIVITY:
- return "CAUSE_POLICE_ACTIVITY"
- case CAUSE_MEDICAL_EMERGENCY:
- return "CAUSE_MEDICAL_EMERGENCY"
- }
- panic(errors.New("Invalid AlertCauseV1 value"))
- }
- type AlertEffectV1 uint
- const (
- EFFECT_UNKNOWN AlertEffectV1 = 0
- EFFECT_OTHER AlertEffectV1 = 1
- EFFECT_NO_SERVICE AlertEffectV1 = 2
- EFFECT_REDUCED_SERVICE AlertEffectV1 = 3
- EFFECT_SIGNIFICANT_DELAYS AlertEffectV1 = 4
- EFFECT_DETOUR AlertEffectV1 = 5
- EFFECT_ADDITIONAL_SERVICE AlertEffectV1 = 6
- EFFECT_MODIFIED_SERVICE AlertEffectV1 = 7
- EFFECT_STOP_MOVED AlertEffectV1 = 8
- EFFECT_NONE AlertEffectV1 = 9
- EFFECT_ACCESSIBILITY_ISSUE AlertEffectV1 = 10
- )
- func (t AlertEffectV1) String() string {
- switch t {
- case EFFECT_UNKNOWN:
- return "EFFECT_UNKNOWN"
- case EFFECT_OTHER:
- return "EFFECT_OTHER"
- case EFFECT_NO_SERVICE:
- return "EFFECT_NO_SERVICE"
- case EFFECT_REDUCED_SERVICE:
- return "EFFECT_REDUCED_SERVICE"
- case EFFECT_SIGNIFICANT_DELAYS:
- return "EFFECT_SIGNIFICANT_DELAYS"
- case EFFECT_DETOUR:
- return "EFFECT_DETOUR"
- case EFFECT_ADDITIONAL_SERVICE:
- return "EFFECT_ADDITIONAL_SERVICE"
- case EFFECT_MODIFIED_SERVICE:
- return "EFFECT_MODIFIED_SERVICE"
- case EFFECT_STOP_MOVED:
- return "EFFECT_STOP_MOVED"
- case EFFECT_NONE:
- return "EFFECT_NONE"
- case EFFECT_ACCESSIBILITY_ISSUE:
- return "EFFECT_ACCESSIBILITY_ISSUE"
- }
- panic(errors.New("Invalid AlertEffectV1 value"))
- }
- type DepartureOrdinalityV1 uint
- const (
- MIDPOINT DepartureOrdinalityV1 = 0
- ORIGIN DepartureOrdinalityV1 = 1
- TERMINUS DepartureOrdinalityV1 = 2
- )
- func (t DepartureOrdinalityV1) String() string {
- switch t {
- case MIDPOINT:
- return "MIDPOINT"
- case ORIGIN:
- return "ORIGIN"
- case TERMINUS:
- return "TERMINUS"
- }
- panic(errors.New("Invalid DepartureOrdinalityV1 value"))
- }
- type VehicleStatusV1 uint
- const (
- STATUS_IN_TRANSIT VehicleStatusV1 = 0
- STATUS_INCOMING VehicleStatusV1 = 1
- STATUS_AT_STOP VehicleStatusV1 = 2
- STATUS_DEPARTED VehicleStatusV1 = 3
- )
- func (t VehicleStatusV1) String() string {
- switch t {
- case STATUS_IN_TRANSIT:
- return "STATUS_IN_TRANSIT"
- case STATUS_INCOMING:
- return "STATUS_INCOMING"
- case STATUS_AT_STOP:
- return "STATUS_AT_STOP"
- case STATUS_DEPARTED:
- return "STATUS_DEPARTED"
- }
- panic(errors.New("Invalid VehicleStatusV1 value"))
- }
- type BoardingV1 uint
- const (
- BOARDING_NONE BoardingV1 = 0
- ONBOARDING_REGULAR BoardingV1 = 1
- ONBOARDING_PHONE BoardingV1 = 2
- ONBOARDING_DRIVER BoardingV1 = 3
- OFFBOARDING_REGULAR BoardingV1 = 16
- OFFBOARDING_PHONE BoardingV1 = 32
- OFFBOARDING_DRIVER BoardingV1 = 48
- )
- func (t BoardingV1) String() string {
- switch t {
- case BOARDING_NONE:
- return "BOARDING_NONE"
- case ONBOARDING_REGULAR:
- return "ONBOARDING_REGULAR"
- case ONBOARDING_PHONE:
- return "ONBOARDING_PHONE"
- case ONBOARDING_DRIVER:
- return "ONBOARDING_DRIVER"
- case OFFBOARDING_REGULAR:
- return "OFFBOARDING_REGULAR"
- case OFFBOARDING_PHONE:
- return "OFFBOARDING_PHONE"
- case OFFBOARDING_DRIVER:
- return "OFFBOARDING_DRIVER"
- }
- panic(errors.New("Invalid BoardingV1 value"))
- }
- type LineResponse interface {
- bare.Union
- }
- func (_ LineResponseDev) IsUnion() {}
- func (_ LineResponseV1) IsUnion() {}
- func (_ LineResponseV2) IsUnion() {}
- func (_ LineResponseV3) IsUnion() {}
- type FeedsResponse interface {
- bare.Union
- }
- func (_ FeedsResponseDev) IsUnion() {}
- func (_ FeedsResponseV1) IsUnion() {}
- func (_ FeedsResponseV2) IsUnion() {}
- type QueryablesResponse interface {
- bare.Union
- }
- func (_ QueryablesResponseDev) IsUnion() {}
- func (_ QueryablesResponseV1) IsUnion() {}
- func (_ QueryablesResponseV2) IsUnion() {}
- func (_ QueryablesResponseV3) IsUnion() {}
- func (_ QueryablesResponseV4) IsUnion() {}
- type QueryableV1 interface {
- bare.Union
- }
- func (_ StopV1) IsUnion() {}
- type QueryableV2 interface {
- bare.Union
- }
- func (_ StopV2) IsUnion() {}
- func (_ LineV1) IsUnion() {}
- type QueryableV3 interface {
- bare.Union
- }
- func (_ LineV2) IsUnion() {}
- type QueryableV4 interface {
- bare.Union
- }
- func (_ LineV3) IsUnion() {}
- type QueryableV5 interface {
- bare.Union
- }
- func (_ StopV3) IsUnion() {}
- type LocatablesResponse interface {
- bare.Union
- }
- func (_ LocatablesResponseDev) IsUnion() {}
- func (_ LocatablesResponseV1) IsUnion() {}
- func (_ LocatablesResponseV2) IsUnion() {}
- func (_ LocatablesResponseV3) IsUnion() {}
- type LocatableV1 interface {
- bare.Union
- }
- func (_ VehicleV1) IsUnion() {}
- type LocatableV2 interface {
- bare.Union
- }
- func (_ VehicleV2) IsUnion() {}
- type LocatableV3 interface {
- bare.Union
- }
- func (_ VehicleV3) IsUnion() {}
- type LocatableV4 interface {
- bare.Union
- }
- type DeparturesResponse interface {
- bare.Union
- }
- func (_ DeparturesResponseDev) IsUnion() {}
- func (_ DeparturesResponseV1) IsUnion() {}
- func (_ DeparturesResponseV2) IsUnion() {}
- func (_ DeparturesResponseV3) IsUnion() {}
- func (_ DeparturesResponseV4) IsUnion() {}
- func init() {
- bare.RegisterUnion((*LineResponse)(nil)).
- Member(*new(LineResponseDev), 0).
- Member(*new(LineResponseV1), 1).
- Member(*new(LineResponseV2), 2).
- Member(*new(LineResponseV3), 3)
- bare.RegisterUnion((*FeedsResponse)(nil)).
- Member(*new(FeedsResponseDev), 0).
- Member(*new(FeedsResponseV1), 1).
- Member(*new(FeedsResponseV2), 2)
- bare.RegisterUnion((*QueryablesResponse)(nil)).
- Member(*new(QueryablesResponseDev), 0).
- Member(*new(QueryablesResponseV1), 1).
- Member(*new(QueryablesResponseV2), 2).
- Member(*new(QueryablesResponseV3), 3).
- Member(*new(QueryablesResponseV4), 4)
- bare.RegisterUnion((*QueryableV1)(nil)).
- Member(*new(StopV1), 0)
- bare.RegisterUnion((*QueryableV2)(nil)).
- Member(*new(StopV2), 0).
- Member(*new(LineV1), 1)
- bare.RegisterUnion((*QueryableV3)(nil)).
- Member(*new(StopV2), 0).
- Member(*new(LineV2), 1)
- bare.RegisterUnion((*QueryableV4)(nil)).
- Member(*new(StopV2), 0).
- Member(*new(LineV3), 1)
- bare.RegisterUnion((*QueryableV5)(nil)).
- Member(*new(StopV3), 0).
- Member(*new(LineV3), 1)
- bare.RegisterUnion((*LocatablesResponse)(nil)).
- Member(*new(LocatablesResponseDev), 0).
- Member(*new(LocatablesResponseV1), 1).
- Member(*new(LocatablesResponseV2), 2).
- Member(*new(LocatablesResponseV3), 3)
- bare.RegisterUnion((*LocatableV1)(nil)).
- Member(*new(StopV1), 0).
- Member(*new(VehicleV1), 1)
- bare.RegisterUnion((*LocatableV2)(nil)).
- Member(*new(StopV2), 0).
- Member(*new(VehicleV2), 1)
- bare.RegisterUnion((*LocatableV3)(nil)).
- Member(*new(StopV2), 0).
- Member(*new(VehicleV3), 1)
- bare.RegisterUnion((*LocatableV4)(nil)).
- Member(*new(StopV3), 0).
- Member(*new(VehicleV3), 1)
- bare.RegisterUnion((*DeparturesResponse)(nil)).
- Member(*new(DeparturesResponseDev), 0).
- Member(*new(DeparturesResponseV1), 1).
- Member(*new(DeparturesResponseV2), 2).
- Member(*new(DeparturesResponseV3), 3).
- Member(*new(DeparturesResponseV4), 4)
- }
|