aboutsummaryrefslogtreecommitdiff
path: root/gtfs/GTFS/Realtime/VehiclePosition/OccupancyStatus.hs
diff options
context:
space:
mode:
authorstuebinm2024-04-17 01:21:33 +0200
committerstuebinm2024-04-17 01:48:35 +0200
commit385e15fc22f48a1f8d40b8263a54155fdab499ea (patch)
tree19f3a8b3fcb017eebdba3f094ceb5ff80c6c0134 /gtfs/GTFS/Realtime/VehiclePosition/OccupancyStatus.hs
parenta995dabf07574a32c1ae62ad23b96ba7d8e076ee (diff)
replace protocol-buffers with proto-lens
I do not really like either option, but at least the second one seems more likely to be maintained (and a little less clunky to use, too, for what it's worth).
Diffstat (limited to 'gtfs/GTFS/Realtime/VehiclePosition/OccupancyStatus.hs')
-rw-r--r--gtfs/GTFS/Realtime/VehiclePosition/OccupancyStatus.hs109
1 files changed, 0 insertions, 109 deletions
diff --git a/gtfs/GTFS/Realtime/VehiclePosition/OccupancyStatus.hs b/gtfs/GTFS/Realtime/VehiclePosition/OccupancyStatus.hs
deleted file mode 100644
index 92d4064..0000000
--- a/gtfs/GTFS/Realtime/VehiclePosition/OccupancyStatus.hs
+++ /dev/null
@@ -1,109 +0,0 @@
-{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings
- #-}
-{-# OPTIONS_GHC -w #-}
-module GTFS.Realtime.VehiclePosition.OccupancyStatus (OccupancyStatus(..)) where
-import Prelude ((+), (/), (.))
-import qualified Prelude as Prelude'
-import qualified Data.List as Prelude'
-import qualified Data.Typeable as Prelude'
-import qualified GHC.Generics as Prelude'
-import qualified Data.Data as Prelude'
-import qualified Text.ProtocolBuffers.Header as P'
-
-data OccupancyStatus = EMPTY
- | MANY_SEATS_AVAILABLE
- | FEW_SEATS_AVAILABLE
- | STANDING_ROOM_ONLY
- | CRUSHED_STANDING_ROOM_ONLY
- | FULL
- | NOT_ACCEPTING_PASSENGERS
- | NO_DATA_AVAILABLE
- | NOT_BOARDABLE
- deriving (Prelude'.Read, Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data,
- Prelude'.Generic)
-
-instance P'.Mergeable OccupancyStatus
-
-instance Prelude'.Bounded OccupancyStatus where
- minBound = EMPTY
- maxBound = NOT_BOARDABLE
-
-instance P'.Default OccupancyStatus where
- defaultValue = EMPTY
-
-toMaybe'Enum :: Prelude'.Int -> P'.Maybe OccupancyStatus
-toMaybe'Enum 0 = Prelude'.Just EMPTY
-toMaybe'Enum 1 = Prelude'.Just MANY_SEATS_AVAILABLE
-toMaybe'Enum 2 = Prelude'.Just FEW_SEATS_AVAILABLE
-toMaybe'Enum 3 = Prelude'.Just STANDING_ROOM_ONLY
-toMaybe'Enum 4 = Prelude'.Just CRUSHED_STANDING_ROOM_ONLY
-toMaybe'Enum 5 = Prelude'.Just FULL
-toMaybe'Enum 6 = Prelude'.Just NOT_ACCEPTING_PASSENGERS
-toMaybe'Enum 7 = Prelude'.Just NO_DATA_AVAILABLE
-toMaybe'Enum 8 = Prelude'.Just NOT_BOARDABLE
-toMaybe'Enum _ = Prelude'.Nothing
-
-instance Prelude'.Enum OccupancyStatus where
- fromEnum EMPTY = 0
- fromEnum MANY_SEATS_AVAILABLE = 1
- fromEnum FEW_SEATS_AVAILABLE = 2
- fromEnum STANDING_ROOM_ONLY = 3
- fromEnum CRUSHED_STANDING_ROOM_ONLY = 4
- fromEnum FULL = 5
- fromEnum NOT_ACCEPTING_PASSENGERS = 6
- fromEnum NO_DATA_AVAILABLE = 7
- fromEnum NOT_BOARDABLE = 8
- toEnum
- = P'.fromMaybe (Prelude'.error "hprotoc generated code: toEnum failure for type GTFS.Realtime.VehiclePosition.OccupancyStatus") .
- toMaybe'Enum
- succ EMPTY = MANY_SEATS_AVAILABLE
- succ MANY_SEATS_AVAILABLE = FEW_SEATS_AVAILABLE
- succ FEW_SEATS_AVAILABLE = STANDING_ROOM_ONLY
- succ STANDING_ROOM_ONLY = CRUSHED_STANDING_ROOM_ONLY
- succ CRUSHED_STANDING_ROOM_ONLY = FULL
- succ FULL = NOT_ACCEPTING_PASSENGERS
- succ NOT_ACCEPTING_PASSENGERS = NO_DATA_AVAILABLE
- succ NO_DATA_AVAILABLE = NOT_BOARDABLE
- succ _ = Prelude'.error "hprotoc generated code: succ failure for type GTFS.Realtime.VehiclePosition.OccupancyStatus"
- pred MANY_SEATS_AVAILABLE = EMPTY
- pred FEW_SEATS_AVAILABLE = MANY_SEATS_AVAILABLE
- pred STANDING_ROOM_ONLY = FEW_SEATS_AVAILABLE
- pred CRUSHED_STANDING_ROOM_ONLY = STANDING_ROOM_ONLY
- pred FULL = CRUSHED_STANDING_ROOM_ONLY
- pred NOT_ACCEPTING_PASSENGERS = FULL
- pred NO_DATA_AVAILABLE = NOT_ACCEPTING_PASSENGERS
- pred NOT_BOARDABLE = NO_DATA_AVAILABLE
- pred _ = Prelude'.error "hprotoc generated code: pred failure for type GTFS.Realtime.VehiclePosition.OccupancyStatus"
-
-instance P'.Wire OccupancyStatus where
- wireSize ft' enum = P'.wireSize ft' (Prelude'.fromEnum enum)
- wirePut ft' enum = P'.wirePut ft' (Prelude'.fromEnum enum)
- wireGet 14 = P'.wireGetEnum toMaybe'Enum
- wireGet ft' = P'.wireGetErr ft'
- wireGetPacked 14 = P'.wireGetPackedEnum toMaybe'Enum
- wireGetPacked ft' = P'.wireGetErr ft'
-
-instance P'.GPB OccupancyStatus
-
-instance P'.MessageAPI msg' (msg' -> OccupancyStatus) OccupancyStatus where
- getVal m' f' = f' m'
-
-instance P'.ReflectEnum OccupancyStatus where
- reflectEnum
- = [(0, "EMPTY", EMPTY), (1, "MANY_SEATS_AVAILABLE", MANY_SEATS_AVAILABLE), (2, "FEW_SEATS_AVAILABLE", FEW_SEATS_AVAILABLE),
- (3, "STANDING_ROOM_ONLY", STANDING_ROOM_ONLY), (4, "CRUSHED_STANDING_ROOM_ONLY", CRUSHED_STANDING_ROOM_ONLY),
- (5, "FULL", FULL), (6, "NOT_ACCEPTING_PASSENGERS", NOT_ACCEPTING_PASSENGERS), (7, "NO_DATA_AVAILABLE", NO_DATA_AVAILABLE),
- (8, "NOT_BOARDABLE", NOT_BOARDABLE)]
- reflectEnumInfo _
- = P'.EnumInfo
- (P'.makePNF (P'.pack ".transit_realtime.VehiclePosition.OccupancyStatus") [] ["GTFS", "Realtime", "VehiclePosition"]
- "OccupancyStatus")
- ["GTFS", "Realtime", "VehiclePosition", "OccupancyStatus.hs"]
- [(0, "EMPTY"), (1, "MANY_SEATS_AVAILABLE"), (2, "FEW_SEATS_AVAILABLE"), (3, "STANDING_ROOM_ONLY"),
- (4, "CRUSHED_STANDING_ROOM_ONLY"), (5, "FULL"), (6, "NOT_ACCEPTING_PASSENGERS"), (7, "NO_DATA_AVAILABLE"),
- (8, "NOT_BOARDABLE")]
- Prelude'.False
-
-instance P'.TextType OccupancyStatus where
- tellT = P'.tellShow
- getT = P'.getRead \ No newline at end of file