summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCthulhuDen <>2018-12-05 22:45:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-12-05 22:45:00 (GMT)
commit2d5e860ee8f4a5161ec355b8691915410f5b51f3 (patch)
treeb39956ee601cf27a01575484327e34eb2fd582a3
version 0.1.0.00.1.0.0
-rw-r--r--LICENSE30
-rw-r--r--README.md43
-rw-r--r--Setup.hs2
-rw-r--r--gtfs-realtime.cabal64
-rw-r--r--src/GTFS/RealTime/Protobuf.hs23
-rw-r--r--src/GTFS/RealTime/Protobuf/Alert.hs173
-rw-r--r--src/GTFS/RealTime/Protobuf/Alert/Cause.hs117
-rw-r--r--src/GTFS/RealTime/Protobuf/Alert/Effect.hs101
-rw-r--r--src/GTFS/RealTime/Protobuf/EntitySelector.hs129
-rw-r--r--src/GTFS/RealTime/Protobuf/FeedEntity.hs136
-rw-r--r--src/GTFS/RealTime/Protobuf/FeedHeader.hs109
-rw-r--r--src/GTFS/RealTime/Protobuf/FeedHeader/Incrementality.hs66
-rw-r--r--src/GTFS/RealTime/Protobuf/FeedMessage.hs100
-rw-r--r--src/GTFS/RealTime/Protobuf/Position.hs126
-rw-r--r--src/GTFS/RealTime/Protobuf/TimeRange.hs97
-rw-r--r--src/GTFS/RealTime/Protobuf/TranslatedString.hs92
-rw-r--r--src/GTFS/RealTime/Protobuf/TranslatedString/Translation.hs97
-rw-r--r--src/GTFS/RealTime/Protobuf/TripDescriptor.hs147
-rw-r--r--src/GTFS/RealTime/Protobuf/TripDescriptor/ScheduleRelationship.hs77
-rw-r--r--src/GTFS/RealTime/Protobuf/TripUpdate.hs133
-rw-r--r--src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeEvent.hs107
-rw-r--r--src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeUpdate.hs140
-rw-r--r--src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeUpdate/ScheduleRelationship.hs77
-rw-r--r--src/GTFS/RealTime/Protobuf/VehicleDescriptor.hs107
-rw-r--r--src/GTFS/RealTime/Protobuf/VehiclePosition.hs191
-rw-r--r--src/GTFS/RealTime/Protobuf/VehiclePosition/CongestionLevel.hs84
-rw-r--r--src/GTFS/RealTime/Protobuf/VehiclePosition/OccupancyStatus.hs96
-rw-r--r--src/GTFS/RealTime/Protobuf/VehiclePosition/VehicleStopStatus.hs72
28 files changed, 2736 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..80fa7ee
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,30 @@
+Copyright Cthulhu (c) 2018
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * Neither the name of Cthulhu nor the names of other
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a725d40
--- /dev/null
+++ b/README.md
@@ -0,0 +1,43 @@
+# GTFS RealTime
+
+Haskell protobuf definitions for [GTFS RealTime][1] feed data.
+Autogenerated by and supposed to be used with [protocol-buffers][2].
+
+### Usage example
+
+```haskell
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+
+module Main where
+
+import qualified Data.ByteString.Lazy as LBS
+import Data.Function
+import GTFS.RealTime.Protobuf.FeedMessage
+import Network.HTTP.Simple (Request, setRequestQueryString, httpLBS, getResponseBody)
+import qualified Text.ProtocolBuffers as Protobuf
+
+main :: IO ()
+main = do
+ resp <- httpLBS $ "http://transport.orgp.spb.ru/Portal/transport/internalapi/gtfs/realtime/vehicle"
+ & setRequestQueryString [("routeIDs", Just "1843")]
+
+ msg <- case Protobuf.messageGet $ getResponseBody resp of
+ Left err -> fail err
+ Right (msg :: FeedMessage, "") -> pure msg
+ _ -> fail "parse incomplete"
+
+ -- | You now have FeedMessage parsed
+ print msg
+
+```
+
+### Source proto file
+
+This [transport.proto][3] file was used to generate the modules,
+it is the same as provided [here][4], only with modified package name.
+
+[1]: https://developers.google.com/transit/gtfs-realtime/reference/
+[2]: http://hackage.haskell.org/package/protocol-buffers
+[3]: https://github.com/CthulhuDen/gtfs-realtime/blob/master/transport.proto
+[4]: https://developers.google.com/transit/gtfs-realtime/gtfs-realtime-proto
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
index 0000000..9a994af
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/gtfs-realtime.cabal b/gtfs-realtime.cabal
new file mode 100644
index 0000000..1b41546
--- /dev/null
+++ b/gtfs-realtime.cabal
@@ -0,0 +1,64 @@
+cabal-version: 1.12
+
+-- This file has been generated from package.yaml by hpack version 0.30.0.
+--
+-- see: https://github.com/sol/hpack
+--
+-- hash: 3cb08b34c641e4f439aac45252f7985223f1d489b15209a486c5dfd43a01dd86
+
+name: gtfs-realtime
+version: 0.1.0.0
+synopsis: GTFS RealTime protobafs library (autogenerated from .proto file)
+description: Please see the README on GitHub at <https://github.com/CthulhuDen/gtfs-realtime#readme> or <https://hackage.haskell.org/package/gtfs-realtime>
+category: Data
+homepage: https://github.com/CthulhuDen/gtfs-realtime#readme
+bug-reports: https://github.com/CthulhuDen/gtfs-realtime/issues
+author: Cthulhu
+maintainer: cthulhu.den@gmail.com
+copyright: Cthulhu (c) 2018
+license: BSD3
+license-file: LICENSE
+build-type: Simple
+extra-source-files:
+ README.md
+
+source-repository head
+ type: git
+ location: https://github.com/CthulhuDen/gtfs-realtime
+
+library
+ exposed-modules:
+ GTFS.RealTime.Protobuf
+ GTFS.RealTime.Protobuf.Alert
+ GTFS.RealTime.Protobuf.Alert.Cause
+ GTFS.RealTime.Protobuf.Alert.Effect
+ GTFS.RealTime.Protobuf.EntitySelector
+ GTFS.RealTime.Protobuf.FeedEntity
+ GTFS.RealTime.Protobuf.FeedHeader
+ GTFS.RealTime.Protobuf.FeedHeader.Incrementality
+ GTFS.RealTime.Protobuf.FeedMessage
+ GTFS.RealTime.Protobuf.Position
+ GTFS.RealTime.Protobuf.TimeRange
+ GTFS.RealTime.Protobuf.TranslatedString
+ GTFS.RealTime.Protobuf.TranslatedString.Translation
+ GTFS.RealTime.Protobuf.TripDescriptor
+ GTFS.RealTime.Protobuf.TripDescriptor.ScheduleRelationship
+ GTFS.RealTime.Protobuf.TripUpdate
+ GTFS.RealTime.Protobuf.TripUpdate.StopTimeEvent
+ GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate
+ GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate.ScheduleRelationship
+ GTFS.RealTime.Protobuf.VehicleDescriptor
+ GTFS.RealTime.Protobuf.VehiclePosition
+ GTFS.RealTime.Protobuf.VehiclePosition.CongestionLevel
+ GTFS.RealTime.Protobuf.VehiclePosition.OccupancyStatus
+ GTFS.RealTime.Protobuf.VehiclePosition.VehicleStopStatus
+ other-modules:
+ Paths_gtfs_realtime
+ hs-source-dirs:
+ src
+ ghc-options: -Wall
+ build-depends:
+ base >=4.7 && <5
+ , protocol-buffers >=2.4.11 && <3
+ , protocol-buffers-descriptor >=2.4.11 && <3
+ default-language: Haskell2010
diff --git a/src/GTFS/RealTime/Protobuf.hs b/src/GTFS/RealTime/Protobuf.hs
new file mode 100644
index 0000000..7a94c0c
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf (protoInfo, fileDescriptorProto) where
+import Prelude ((+), (/))
+import qualified Prelude 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'
+import Text.DescriptorProtos.FileDescriptorProto (FileDescriptorProto)
+import Text.ProtocolBuffers.Reflections (ProtoInfo)
+import qualified Text.ProtocolBuffers.WireMessage as P' (wireGet,getFromBS)
+
+protoInfo :: ProtoInfo
+protoInfo
+ = Prelude'.read
+ "ProtoInfo {protoMod = ProtoName {protobufName = FIName \".transit_realtime\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\"], baseName = MName \"Protobuf\"}, protoFilePath = [\"GTFS\",\"RealTime\",\"Protobuf.hs\"], protoSource = \"transport.proto\", extensionKeys = fromList [], messages = [DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.FeedMessage\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedMessage\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"FeedMessage.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedMessage.header\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedMessage\"], baseName' = FName \"header\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.FeedHeader\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedHeader\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedMessage.entity\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedMessage\"], baseName' = FName \"entity\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.FeedEntity\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedEntity\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.FeedHeader\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedHeader\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"FeedHeader.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedHeader.gtfs_realtime_version\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedHeader\"], baseName' = FName \"gtfs_realtime_version\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedHeader.incrementality\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedHeader\"], baseName' = FName \"incrementality\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.FeedHeader.Incrementality\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedHeader\"], baseName = MName \"Incrementality\"}), hsRawDefault = Just \"FULL_DATASET\", hsDefault = Just (HsDef'Enum \"FULL_DATASET\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedHeader.timestamp\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedHeader\"], baseName' = FName \"timestamp\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.FeedEntity\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedEntity\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"FeedEntity.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.is_deleted\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"is_deleted\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just \"false\", hsDefault = Just (HsDef'Bool False)},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.trip_update\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"trip_update\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripUpdate\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.vehicle\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"vehicle\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehiclePosition\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.alert\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"alert\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.Alert\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"Alert\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TripUpdate\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripUpdate\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripUpdate.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.trip\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"trip\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.vehicle\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"vehicle\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehicleDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehicleDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.stop_time_update\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"stop_time_update\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeUpdate\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeUpdate\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.timestamp\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"timestamp\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.delay\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"delay\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeEvent\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeEvent\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripUpdate\",\"StopTimeEvent.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeEvent.delay\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeEvent\"], baseName' = FName \"delay\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeEvent.time\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeEvent\"], baseName' = FName \"time\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 3}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeEvent.uncertainty\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeEvent\"], baseName' = FName \"uncertainty\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeUpdate\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeUpdate\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripUpdate\",\"StopTimeUpdate.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.stop_sequence\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"stop_sequence\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.stop_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"stop_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.arrival\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"arrival\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeEvent\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeEvent\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.departure\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"departure\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeEvent\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeEvent\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.schedule_relationship\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"schedule_relationship\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName = MName \"ScheduleRelationship\"}), hsRawDefault = Just \"SCHEDULED\", hsDefault = Just (HsDef'Enum \"SCHEDULED\")}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehiclePosition\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"VehiclePosition.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.trip\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"trip\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.vehicle\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"vehicle\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehicleDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehicleDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.position\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"position\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.Position\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"Position\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.current_stop_sequence\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"current_stop_sequence\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.stop_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"stop_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.current_status\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"current_status\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition.VehicleStopStatus\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName = MName \"VehicleStopStatus\"}), hsRawDefault = Just \"IN_TRANSIT_TO\", hsDefault = Just (HsDef'Enum \"IN_TRANSIT_TO\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.timestamp\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"timestamp\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.congestion_level\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"congestion_level\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 48}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition.CongestionLevel\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName = MName \"CongestionLevel\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.occupancy_status\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"occupancy_status\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 72}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition.OccupancyStatus\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName = MName \"OccupancyStatus\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.Alert\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"Alert\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"Alert.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.active_period\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"active_period\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TimeRange\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TimeRange\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.informed_entity\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"informed_entity\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.EntitySelector\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"EntitySelector\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.cause\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"cause\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 48}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.Alert.Cause\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName = MName \"Cause\"}), hsRawDefault = Just \"UNKNOWN_CAUSE\", hsDefault = Just (HsDef'Enum \"UNKNOWN_CAUSE\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.effect\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"effect\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 56}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.Alert.Effect\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName = MName \"Effect\"}), hsRawDefault = Just \"UNKNOWN_EFFECT\", hsDefault = Just (HsDef'Enum \"UNKNOWN_EFFECT\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.url\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"url\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TranslatedString\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.header_text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"header_text\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 10}, wireTag = WireTag {getWireTag = 82}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TranslatedString\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.description_text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"description_text\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 11}, wireTag = WireTag {getWireTag = 90}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TranslatedString\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TimeRange\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TimeRange\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TimeRange.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TimeRange.start\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TimeRange\"], baseName' = FName \"start\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TimeRange.end\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TimeRange\"], baseName' = FName \"end\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.Position\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"Position\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"Position.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.latitude\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"latitude\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 13}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 2}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.longitude\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"longitude\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 21}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 2}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.bearing\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"bearing\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 29}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 2}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.odometer\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"odometer\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 33}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 1}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.speed\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"speed\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 45}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 2}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripDescriptor\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripDescriptor.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.trip_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"trip_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.route_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"route_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.direction_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"direction_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 48}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.start_time\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"start_time\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.start_date\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"start_date\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.schedule_relationship\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"schedule_relationship\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor.ScheduleRelationship\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName = MName \"ScheduleRelationship\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.VehicleDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehicleDescriptor\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"VehicleDescriptor.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehicleDescriptor.id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehicleDescriptor\"], baseName' = FName \"id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehicleDescriptor.label\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehicleDescriptor\"], baseName' = FName \"label\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehicleDescriptor.license_plate\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehicleDescriptor\"], baseName' = FName \"license_plate\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.EntitySelector\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"EntitySelector\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"EntitySelector.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.agency_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"agency_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.route_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"route_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.route_type\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"route_type\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.trip\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"trip\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.stop_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"stop_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TranslatedString\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TranslatedString\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TranslatedString.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TranslatedString.translation\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\"], baseName' = FName \"translation\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TranslatedString.Translation\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\"], baseName = MName \"Translation\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TranslatedString.Translation\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\"], baseName = MName \"Translation\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TranslatedString\",\"Translation.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TranslatedString.Translation.text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\",MName \"Translation\"], baseName' = FName \"text\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TranslatedString.Translation.language\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\",MName \"Translation\"], baseName' = FName \"language\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}], enums = [EnumInfo {enumName = ProtoName {protobufName = FIName \".transit_realtime.FeedHeader.Incrementality\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedHeader\"], baseName = MName \"Incrementality\"}, enumFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"FeedHeader\",\"Incrementality.hs\"], enumValues = [(EnumCode {getEnumCode = 0},\"FULL_DATASET\"),(EnumCode {getEnumCode = 1},\"DIFFERENTIAL\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName = MName \"ScheduleRelationship\"}, enumFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripUpdate\",\"StopTimeUpdate\",\"ScheduleRelationship.hs\"], enumValues = [(EnumCode {getEnumCode = 0},\"SCHEDULED\"),(EnumCode {getEnumCode = 1},\"SKIPPED\"),(EnumCode {getEnumCode = 2},\"NO_DATA\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition.VehicleStopStatus\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName = MName \"VehicleStopStatus\"}, enumFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"VehiclePosition\",\"VehicleStopStatus.hs\"], enumValues = [(EnumCode {getEnumCode = 0},\"INCOMING_AT\"),(EnumCode {getEnumCode = 1},\"STOPPED_AT\"),(EnumCode {getEnumCode = 2},\"IN_TRANSIT_TO\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition.CongestionLevel\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName = MName \"CongestionLevel\"}, enumFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"VehiclePosition\",\"CongestionLevel.hs\"], enumValues = [(EnumCode {getEnumCode = 0},\"UNKNOWN_CONGESTION_LEVEL\"),(EnumCode {getEnumCode = 1},\"RUNNING_SMOOTHLY\"),(EnumCode {getEnumCode = 2},\"STOP_AND_GO\"),(EnumCode {getEnumCode = 3},\"CONGESTION\"),(EnumCode {getEnumCode = 4},\"SEVERE_CONGESTION\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition.OccupancyStatus\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName = MName \"OccupancyStatus\"}, enumFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"VehiclePosition\",\"OccupancyStatus.hs\"], enumValues = [(EnumCode {getEnumCode = 0},\"EMPTY\"),(EnumCode {getEnumCode = 1},\"MANY_SEATS_AVAILABLE\"),(EnumCode {getEnumCode = 2},\"FEW_SEATS_AVAILABLE\"),(EnumCode {getEnumCode = 3},\"STANDING_ROOM_ONLY\"),(EnumCode {getEnumCode = 4},\"CRUSHED_STANDING_ROOM_ONLY\"),(EnumCode {getEnumCode = 5},\"FULL\"),(EnumCode {getEnumCode = 6},\"NOT_ACCEPTING_PASSENGERS\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".transit_realtime.Alert.Cause\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName = MName \"Cause\"}, enumFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"Alert\",\"Cause.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"UNKNOWN_CAUSE\"),(EnumCode {getEnumCode = 2},\"OTHER_CAUSE\"),(EnumCode {getEnumCode = 3},\"TECHNICAL_PROBLEM\"),(EnumCode {getEnumCode = 4},\"STRIKE\"),(EnumCode {getEnumCode = 5},\"DEMONSTRATION\"),(EnumCode {getEnumCode = 6},\"ACCIDENT\"),(EnumCode {getEnumCode = 7},\"HOLIDAY\"),(EnumCode {getEnumCode = 8},\"WEATHER\"),(EnumCode {getEnumCode = 9},\"MAINTENANCE\"),(EnumCode {getEnumCode = 10},\"CONSTRUCTION\"),(EnumCode {getEnumCode = 11},\"POLICE_ACTIVITY\"),(EnumCode {getEnumCode = 12},\"MEDICAL_EMERGENCY\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".transit_realtime.Alert.Effect\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName = MName \"Effect\"}, enumFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"Alert\",\"Effect.hs\"], enumValues = [(EnumCode {getEnumCode = 1},\"NO_SERVICE\"),(EnumCode {getEnumCode = 2},\"REDUCED_SERVICE\"),(EnumCode {getEnumCode = 3},\"SIGNIFICANT_DELAYS\"),(EnumCode {getEnumCode = 4},\"DETOUR\"),(EnumCode {getEnumCode = 5},\"ADDITIONAL_SERVICE\"),(EnumCode {getEnumCode = 6},\"MODIFIED_SERVICE\"),(EnumCode {getEnumCode = 7},\"OTHER_EFFECT\"),(EnumCode {getEnumCode = 8},\"UNKNOWN_EFFECT\"),(EnumCode {getEnumCode = 9},\"STOP_MOVED\")]},EnumInfo {enumName = ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor.ScheduleRelationship\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName = MName \"ScheduleRelationship\"}, enumFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripDescriptor\",\"ScheduleRelationship.hs\"], enumValues = [(EnumCode {getEnumCode = 0},\"SCHEDULED\"),(EnumCode {getEnumCode = 1},\"ADDED\"),(EnumCode {getEnumCode = 2},\"UNSCHEDULED\"),(EnumCode {getEnumCode = 3},\"CANCELED\")]}], oneofs = [], knownKeyMap = fromList []}"
+
+fileDescriptorProto :: FileDescriptorProto
+fileDescriptorProto
+ = P'.getFromBS (P'.wireGet 11)
+ (P'.pack
+ "\229\GS\n\SItransport.proto\DC2\DLEtransit_realtime\"q\n\vFeedMessage\DC2,\n\ACKheader\CAN\SOH \STX(\v2\FS.transit_realtime.FeedHeader\DC2,\n\ACKentity\CAN\STX \ETX(\v2\FS.transit_realtime.FeedEntity*\ACK\b\232\a\DLE\208\SI\"\207\SOH\n\nFeedHeader\DC2\GS\n\NAKgtfs_realtime_version\CAN\SOH \STX(\t\DC2Q\n\SOincrementality\CAN\STX \SOH(\SO2+.transit_realtime.FeedHeader.Incrementality:\fFULL_DATASET\DC2\DC1\n\ttimestamp\CAN\ETX \SOH(\EOT\"4\n\SOIncrementality\DC2\DLE\n\fFULL_DATASET\DLE\NUL\DC2\DLE\n\fDIFFERENTIAL\DLE\SOH*\ACK\b\232\a\DLE\208\SI\"\202\SOH\n\nFeedEntity\DC2\n\n\STXid\CAN\SOH \STX(\t\DC2\EM\n\nis_deleted\CAN\STX \SOH(\b:\ENQfalse\DC21\n\vtrip_update\CAN\ETX \SOH(\v2\FS.transit_realtime.TripUpdate\DC22\n\avehicle\CAN\EOT \SOH(\v2!.transit_realtime.VehiclePosition\DC2&\n\ENQalert\CAN\ENQ \SOH(\v2\ETB.transit_realtime.Alert*\ACK\b\232\a\DLE\208\SI\"\154\ENQ\n\nTripUpdate\DC2.\n\EOTtrip\CAN\SOH \STX(\v2 .transit_realtime.TripDescriptor\DC24\n\avehicle\CAN\ETX \SOH(\v2#.transit_realtime.VehicleDescriptor\DC2E\n\DLEstop_time_update\CAN\STX \ETX(\v2+.transit_realtime.TripUpdate.StopTimeUpdate\DC2\DC1\n\ttimestamp\CAN\EOT \SOH(\EOT\DC2\r\n\ENQdelay\CAN\ENQ \SOH(\ENQ\SUBI\n\rStopTimeEvent\DC2\r\n\ENQdelay\CAN\SOH \SOH(\ENQ\DC2\f\n\EOTtime\CAN\STX \SOH(\ETX\DC2\DC3\n\vuncertainty\CAN\ETX \SOH(\ENQ*\ACK\b\232\a\DLE\208\SI\SUB\233\STX\n\SOStopTimeUpdate\DC2\NAK\n\rstop_sequence\CAN\SOH \SOH(\r\DC2\SI\n\astop_id\CAN\EOT \SOH(\t\DC2;\n\aarrival\CAN\STX \SOH(\v2*.transit_realtime.TripUpdate.StopTimeEvent\DC2=\n\tdeparture\CAN\ETX \SOH(\v2*.transit_realtime.TripUpdate.StopTimeEvent\DC2j\n\NAKschedule_relationship\CAN\ENQ \SOH(\SO2@.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship:\tSCHEDULED\"?\n\DC4ScheduleRelationship\DC2\r\n\tSCHEDULED\DLE\NUL\DC2\v\n\aSKIPPED\DLE\SOH\DC2\v\n\aNO_DATA\DLE\STX*\ACK\b\232\a\DLE\208\SI*\ACK\b\232\a\DLE\208\SI\"\224\ACK\n\SIVehiclePosition\DC2.\n\EOTtrip\CAN\SOH \SOH(\v2 .transit_realtime.TripDescriptor\DC24\n\avehicle\CAN\b \SOH(\v2#.transit_realtime.VehicleDescriptor\DC2,\n\bposition\CAN\STX \SOH(\v2\SUB.transit_realtime.Position\DC2\GS\n\NAKcurrent_stop_sequence\CAN\ETX \SOH(\r\DC2\SI\n\astop_id\CAN\a \SOH(\t\DC2Z\n\SOcurrent_status\CAN\EOT \SOH(\SO23.transit_realtime.VehiclePosition.VehicleStopStatus:\rIN_TRANSIT_TO\DC2\DC1\n\ttimestamp\CAN\ENQ \SOH(\EOT\DC2K\n\DLEcongestion_level\CAN\ACK \SOH(\SO21.transit_realtime.VehiclePosition.CongestionLevel\DC2K\n\DLEoccupancy_status\CAN\t \SOH(\SO21.transit_realtime.VehiclePosition.OccupancyStatus\"G\n\DC1VehicleStopStatus\DC2\SI\n\vINCOMING_AT\DLE\NUL\DC2\SO\n\nSTOPPED_AT\DLE\SOH\DC2\DC1\n\rIN_TRANSIT_TO\DLE\STX\"}\n\SICongestionLevel\DC2\FS\n\CANUNKNOWN_CONGESTION_LEVEL\DLE\NUL\DC2\DC4\n\DLERUNNING_SMOOTHLY\DLE\SOH\DC2\SI\n\vSTOP_AND_GO\DLE\STX\DC2\SO\n\nCONGESTION\DLE\ETX\DC2\NAK\n\DC1SEVERE_CONGESTION\DLE\EOT\"\175\SOH\n\SIOccupancyStatus\DC2\t\n\ENQEMPTY\DLE\NUL\DC2\CAN\n\DC4MANY_SEATS_AVAILABLE\DLE\SOH\DC2\ETB\n\DC3FEW_SEATS_AVAILABLE\DLE\STX\DC2\SYN\n\DC2STANDING_ROOM_ONLY\DLE\ETX\DC2\RS\n\SUBCRUSHED_STANDING_ROOM_ONLY\DLE\EOT\DC2\b\n\EOTFULL\DLE\ENQ\DC2\FS\n\CANNOT_ACCEPTING_PASSENGERS\DLE\ACK*\ACK\b\232\a\DLE\208\SI\"\182\ACK\n\ENQAlert\DC22\n\ractive_period\CAN\SOH \ETX(\v2\ESC.transit_realtime.TimeRange\DC29\n\SIinformed_entity\CAN\ENQ \ETX(\v2 .transit_realtime.EntitySelector\DC2;\n\ENQcause\CAN\ACK \SOH(\SO2\GS.transit_realtime.Alert.Cause:\rUNKNOWN_CAUSE\DC2>\n\ACKeffect\CAN\a \SOH(\SO2\RS.transit_realtime.Alert.Effect:\SOUNKNOWN_EFFECT\DC2/\n\ETXurl\CAN\b \SOH(\v2\".transit_realtime.TranslatedString\DC27\n\vheader_text\CAN\n \SOH(\v2\".transit_realtime.TranslatedString\DC2<\n\DLEdescription_text\CAN\v \SOH(\v2\".transit_realtime.TranslatedString\"\216\SOH\n\ENQCause\DC2\DC1\n\rUNKNOWN_CAUSE\DLE\SOH\DC2\SI\n\vOTHER_CAUSE\DLE\STX\DC2\NAK\n\DC1TECHNICAL_PROBLEM\DLE\ETX\DC2\n\n\ACKSTRIKE\DLE\EOT\DC2\DC1\n\rDEMONSTRATION\DLE\ENQ\DC2\f\n\bACCIDENT\DLE\ACK\DC2\v\n\aHOLIDAY\DLE\a\DC2\v\n\aWEATHER\DLE\b\DC2\SI\n\vMAINTENANCE\DLE\t\DC2\DLE\n\fCONSTRUCTION\DLE\n\DC2\DC3\n\SIPOLICE_ACTIVITY\DLE\v\DC2\NAK\n\DC1MEDICAL_EMERGENCY\DLE\f\"\181\SOH\n\ACKEffect\DC2\SO\n\nNO_SERVICE\DLE\SOH\DC2\DC3\n\SIREDUCED_SERVICE\DLE\STX\DC2\SYN\n\DC2SIGNIFICANT_DELAYS\DLE\ETX\DC2\n\n\ACKDETOUR\DLE\EOT\DC2\SYN\n\DC2ADDITIONAL_SERVICE\DLE\ENQ\DC2\DC4\n\DLEMODIFIED_SERVICE\DLE\ACK\DC2\DLE\n\fOTHER_EFFECT\DLE\a\DC2\DC2\n\SOUNKNOWN_EFFECT\DLE\b\DC2\SO\n\nSTOP_MOVED\DLE\t*\ACK\b\232\a\DLE\208\SI\"/\n\tTimeRange\DC2\r\n\ENQstart\CAN\SOH \SOH(\EOT\DC2\v\n\ETXend\CAN\STX \SOH(\EOT*\ACK\b\232\a\DLE\208\SI\"i\n\bPosition\DC2\DLE\n\blatitude\CAN\SOH \STX(\STX\DC2\DC1\n\tlongitude\CAN\STX \STX(\STX\DC2\SI\n\abearing\CAN\ETX \SOH(\STX\DC2\DLE\n\bodometer\CAN\EOT \SOH(\SOH\DC2\r\n\ENQspeed\CAN\ENQ \SOH(\STX*\ACK\b\232\a\DLE\208\SI\"\160\STX\n\SOTripDescriptor\DC2\SI\n\atrip_id\CAN\SOH \SOH(\t\DC2\DLE\n\broute_id\CAN\ENQ \SOH(\t\DC2\DC4\n\fdirection_id\CAN\ACK \SOH(\r\DC2\DC2\n\nstart_time\CAN\STX \SOH(\t\DC2\DC2\n\nstart_date\CAN\ETX \SOH(\t\DC2T\n\NAKschedule_relationship\CAN\EOT \SOH(\SO25.transit_realtime.TripDescriptor.ScheduleRelationship\"O\n\DC4ScheduleRelationship\DC2\r\n\tSCHEDULED\DLE\NUL\DC2\t\n\ENQADDED\DLE\SOH\DC2\SI\n\vUNSCHEDULED\DLE\STX\DC2\f\n\bCANCELED\DLE\ETX*\ACK\b\232\a\DLE\208\SI\"M\n\DC1VehicleDescriptor\DC2\n\n\STXid\CAN\SOH \SOH(\t\DC2\r\n\ENQlabel\CAN\STX \SOH(\t\DC2\NAK\n\rlicense_plate\CAN\ETX \SOH(\t*\ACK\b\232\a\DLE\208\SI\"\146\SOH\n\SOEntitySelector\DC2\DC1\n\tagency_id\CAN\SOH \SOH(\t\DC2\DLE\n\broute_id\CAN\STX \SOH(\t\DC2\DC2\n\nroute_type\CAN\ETX \SOH(\ENQ\DC2.\n\EOTtrip\CAN\EOT \SOH(\v2 .transit_realtime.TripDescriptor\DC2\SI\n\astop_id\CAN\ENQ \SOH(\t*\ACK\b\232\a\DLE\208\SI\"\150\SOH\n\DLETranslatedString\DC2C\n\vtranslation\CAN\SOH \ETX(\v2..transit_realtime.TranslatedString.Translation\SUB5\n\vTranslation\DC2\f\n\EOTtext\CAN\SOH \STX(\t\DC2\DLE\n\blanguage\CAN\STX \SOH(\t*\ACK\b\232\a\DLE\208\SI*\ACK\b\232\a\DLE\208\SIB1\n\SYNGTFS.RealTime.ProtobufH\SOHP\NUL\128\SOH\NUL\136\SOH\NUL\144\SOH\NUL\160\SOH\NUL\184\SOH\NUL\216\SOH\NUL\248\SOH\NULb\ACKproto2") \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/Alert.hs b/src/GTFS/RealTime/Protobuf/Alert.hs
new file mode 100644
index 0000000..82ccf3b
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/Alert.hs
@@ -0,0 +1,173 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.Alert (Alert(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.Alert.Cause as GTFS.RealTime.Protobuf.Alert (Cause)
+import qualified GTFS.RealTime.Protobuf.Alert.Effect as GTFS.RealTime.Protobuf.Alert (Effect)
+import qualified GTFS.RealTime.Protobuf.EntitySelector as GTFS.RealTime.Protobuf (EntitySelector)
+import qualified GTFS.RealTime.Protobuf.TimeRange as GTFS.RealTime.Protobuf (TimeRange)
+import qualified GTFS.RealTime.Protobuf.TranslatedString as GTFS.RealTime.Protobuf (TranslatedString)
+
+data Alert = Alert{active_period :: !(P'.Seq GTFS.RealTime.Protobuf.TimeRange),
+ informed_entity :: !(P'.Seq GTFS.RealTime.Protobuf.EntitySelector),
+ cause :: !(P'.Maybe GTFS.RealTime.Protobuf.Alert.Cause),
+ effect :: !(P'.Maybe GTFS.RealTime.Protobuf.Alert.Effect),
+ url :: !(P'.Maybe GTFS.RealTime.Protobuf.TranslatedString),
+ header_text :: !(P'.Maybe GTFS.RealTime.Protobuf.TranslatedString),
+ description_text :: !(P'.Maybe GTFS.RealTime.Protobuf.TranslatedString), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage Alert where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable Alert where
+ mergeAppend (Alert x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8) (Alert y'1 y'2 y'3 y'4 y'5 y'6 y'7 y'8)
+ = Alert (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+ (P'.mergeAppend x'5 y'5)
+ (P'.mergeAppend x'6 y'6)
+ (P'.mergeAppend x'7 y'7)
+ (P'.mergeAppend x'8 y'8)
+
+instance P'.Default Alert where
+ defaultValue
+ = Alert P'.defaultValue P'.defaultValue (Prelude'.Just (Prelude'.read "UNKNOWN_CAUSE"))
+ (Prelude'.Just (Prelude'.read "UNKNOWN_EFFECT"))
+ P'.defaultValue
+ P'.defaultValue
+ P'.defaultValue
+ P'.defaultValue
+
+instance P'.Wire Alert where
+ wireSize ft' self'@(Alert x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size
+ = (P'.wireSizeRep 1 11 x'1 + P'.wireSizeRep 1 11 x'2 + P'.wireSizeOpt 1 14 x'3 + P'.wireSizeOpt 1 14 x'4 +
+ P'.wireSizeOpt 1 11 x'5
+ + P'.wireSizeOpt 1 11 x'6
+ + P'.wireSizeOpt 1 11 x'7
+ + P'.wireSizeExtField x'8)
+ wirePutWithSize ft' self'@(Alert x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutRepWithSize 10 11 x'1, P'.wirePutRepWithSize 42 11 x'2, P'.wirePutOptWithSize 48 14 x'3,
+ P'.wirePutOptWithSize 56 14 x'4, P'.wirePutOptWithSize 66 11 x'5, P'.wirePutOptWithSize 82 11 x'6,
+ P'.wirePutOptWithSize 90 11 x'7, P'.wirePutExtFieldWithSize x'8]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{active_period = P'.append (active_period old'Self) new'Field})
+ (P'.wireGet 11)
+ 42 -> Prelude'.fmap (\ !new'Field -> old'Self{informed_entity = P'.append (informed_entity old'Self) new'Field})
+ (P'.wireGet 11)
+ 48 -> Prelude'.fmap (\ !new'Field -> old'Self{cause = Prelude'.Just new'Field}) (P'.wireGet 14)
+ 56 -> Prelude'.fmap (\ !new'Field -> old'Self{effect = Prelude'.Just new'Field}) (P'.wireGet 14)
+ 66 -> Prelude'.fmap (\ !new'Field -> old'Self{url = P'.mergeAppend (url old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 82 -> Prelude'.fmap
+ (\ !new'Field -> old'Self{header_text = P'.mergeAppend (header_text old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 90 -> Prelude'.fmap
+ (\ !new'Field ->
+ old'Self{description_text = P'.mergeAppend (description_text old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> Alert) Alert where
+ getVal m' f' = f' m'
+
+instance P'.GPB Alert
+
+instance P'.ReflectDescriptor Alert where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 42, 48, 56, 66, 82, 90])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.Alert\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"Alert\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"Alert.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.active_period\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"active_period\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TimeRange\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TimeRange\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.informed_entity\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"informed_entity\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.EntitySelector\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"EntitySelector\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.cause\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"cause\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 48}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.Alert.Cause\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName = MName \"Cause\"}), hsRawDefault = Just \"UNKNOWN_CAUSE\", hsDefault = Just (HsDef'Enum \"UNKNOWN_CAUSE\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.effect\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"effect\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 56}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.Alert.Effect\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName = MName \"Effect\"}), hsRawDefault = Just \"UNKNOWN_EFFECT\", hsDefault = Just (HsDef'Enum \"UNKNOWN_EFFECT\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.url\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"url\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TranslatedString\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.header_text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"header_text\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 10}, wireTag = WireTag {getWireTag = 82}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TranslatedString\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.description_text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Alert\"], baseName' = FName \"description_text\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 11}, wireTag = WireTag {getWireTag = 90}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TranslatedString\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType Alert where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg Alert where
+ textPut msg
+ = do
+ P'.tellT "active_period" (active_period msg)
+ P'.tellT "informed_entity" (informed_entity msg)
+ P'.tellT "cause" (cause msg)
+ P'.tellT "effect" (effect msg)
+ P'.tellT "url" (url msg)
+ P'.tellT "header_text" (header_text msg)
+ P'.tellT "description_text" (description_text msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy
+ (P'.choice
+ [parse'active_period, parse'informed_entity, parse'cause, parse'effect, parse'url, parse'header_text,
+ parse'description_text])
+ P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'active_period
+ = P'.try
+ (do
+ v <- P'.getT "active_period"
+ Prelude'.return (\ o -> o{active_period = P'.append (active_period o) v}))
+ parse'informed_entity
+ = P'.try
+ (do
+ v <- P'.getT "informed_entity"
+ Prelude'.return (\ o -> o{informed_entity = P'.append (informed_entity o) v}))
+ parse'cause
+ = P'.try
+ (do
+ v <- P'.getT "cause"
+ Prelude'.return (\ o -> o{cause = v}))
+ parse'effect
+ = P'.try
+ (do
+ v <- P'.getT "effect"
+ Prelude'.return (\ o -> o{effect = v}))
+ parse'url
+ = P'.try
+ (do
+ v <- P'.getT "url"
+ Prelude'.return (\ o -> o{url = v}))
+ parse'header_text
+ = P'.try
+ (do
+ v <- P'.getT "header_text"
+ Prelude'.return (\ o -> o{header_text = v}))
+ parse'description_text
+ = P'.try
+ (do
+ v <- P'.getT "description_text"
+ Prelude'.return (\ o -> o{description_text = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/Alert/Cause.hs b/src/GTFS/RealTime/Protobuf/Alert/Cause.hs
new file mode 100644
index 0000000..4b5fdb6
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/Alert/Cause.hs
@@ -0,0 +1,117 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.Alert.Cause (Cause(..)) where
+import Prelude ((+), (/), (.))
+import qualified Prelude 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 Cause = UNKNOWN_CAUSE
+ | OTHER_CAUSE
+ | TECHNICAL_PROBLEM
+ | STRIKE
+ | DEMONSTRATION
+ | ACCIDENT
+ | HOLIDAY
+ | WEATHER
+ | MAINTENANCE
+ | CONSTRUCTION
+ | POLICE_ACTIVITY
+ | MEDICAL_EMERGENCY
+ deriving (Prelude'.Read, Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.Mergeable Cause
+
+instance Prelude'.Bounded Cause where
+ minBound = UNKNOWN_CAUSE
+ maxBound = MEDICAL_EMERGENCY
+
+instance P'.Default Cause where
+ defaultValue = UNKNOWN_CAUSE
+
+toMaybe'Enum :: Prelude'.Int -> P'.Maybe Cause
+toMaybe'Enum 1 = Prelude'.Just UNKNOWN_CAUSE
+toMaybe'Enum 2 = Prelude'.Just OTHER_CAUSE
+toMaybe'Enum 3 = Prelude'.Just TECHNICAL_PROBLEM
+toMaybe'Enum 4 = Prelude'.Just STRIKE
+toMaybe'Enum 5 = Prelude'.Just DEMONSTRATION
+toMaybe'Enum 6 = Prelude'.Just ACCIDENT
+toMaybe'Enum 7 = Prelude'.Just HOLIDAY
+toMaybe'Enum 8 = Prelude'.Just WEATHER
+toMaybe'Enum 9 = Prelude'.Just MAINTENANCE
+toMaybe'Enum 10 = Prelude'.Just CONSTRUCTION
+toMaybe'Enum 11 = Prelude'.Just POLICE_ACTIVITY
+toMaybe'Enum 12 = Prelude'.Just MEDICAL_EMERGENCY
+toMaybe'Enum _ = Prelude'.Nothing
+
+instance Prelude'.Enum Cause where
+ fromEnum UNKNOWN_CAUSE = 1
+ fromEnum OTHER_CAUSE = 2
+ fromEnum TECHNICAL_PROBLEM = 3
+ fromEnum STRIKE = 4
+ fromEnum DEMONSTRATION = 5
+ fromEnum ACCIDENT = 6
+ fromEnum HOLIDAY = 7
+ fromEnum WEATHER = 8
+ fromEnum MAINTENANCE = 9
+ fromEnum CONSTRUCTION = 10
+ fromEnum POLICE_ACTIVITY = 11
+ fromEnum MEDICAL_EMERGENCY = 12
+ toEnum
+ = P'.fromMaybe (Prelude'.error "hprotoc generated code: toEnum failure for type GTFS.RealTime.Protobuf.Alert.Cause") .
+ toMaybe'Enum
+ succ UNKNOWN_CAUSE = OTHER_CAUSE
+ succ OTHER_CAUSE = TECHNICAL_PROBLEM
+ succ TECHNICAL_PROBLEM = STRIKE
+ succ STRIKE = DEMONSTRATION
+ succ DEMONSTRATION = ACCIDENT
+ succ ACCIDENT = HOLIDAY
+ succ HOLIDAY = WEATHER
+ succ WEATHER = MAINTENANCE
+ succ MAINTENANCE = CONSTRUCTION
+ succ CONSTRUCTION = POLICE_ACTIVITY
+ succ POLICE_ACTIVITY = MEDICAL_EMERGENCY
+ succ _ = Prelude'.error "hprotoc generated code: succ failure for type GTFS.RealTime.Protobuf.Alert.Cause"
+ pred OTHER_CAUSE = UNKNOWN_CAUSE
+ pred TECHNICAL_PROBLEM = OTHER_CAUSE
+ pred STRIKE = TECHNICAL_PROBLEM
+ pred DEMONSTRATION = STRIKE
+ pred ACCIDENT = DEMONSTRATION
+ pred HOLIDAY = ACCIDENT
+ pred WEATHER = HOLIDAY
+ pred MAINTENANCE = WEATHER
+ pred CONSTRUCTION = MAINTENANCE
+ pred POLICE_ACTIVITY = CONSTRUCTION
+ pred MEDICAL_EMERGENCY = POLICE_ACTIVITY
+ pred _ = Prelude'.error "hprotoc generated code: pred failure for type GTFS.RealTime.Protobuf.Alert.Cause"
+
+instance P'.Wire Cause 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 Cause
+
+instance P'.MessageAPI msg' (msg' -> Cause) Cause where
+ getVal m' f' = f' m'
+
+instance P'.ReflectEnum Cause where
+ reflectEnum
+ = [(1, "UNKNOWN_CAUSE", UNKNOWN_CAUSE), (2, "OTHER_CAUSE", OTHER_CAUSE), (3, "TECHNICAL_PROBLEM", TECHNICAL_PROBLEM),
+ (4, "STRIKE", STRIKE), (5, "DEMONSTRATION", DEMONSTRATION), (6, "ACCIDENT", ACCIDENT), (7, "HOLIDAY", HOLIDAY),
+ (8, "WEATHER", WEATHER), (9, "MAINTENANCE", MAINTENANCE), (10, "CONSTRUCTION", CONSTRUCTION),
+ (11, "POLICE_ACTIVITY", POLICE_ACTIVITY), (12, "MEDICAL_EMERGENCY", MEDICAL_EMERGENCY)]
+ reflectEnumInfo _
+ = P'.EnumInfo (P'.makePNF (P'.pack ".transit_realtime.Alert.Cause") [] ["GTFS", "RealTime", "Protobuf", "Alert"] "Cause")
+ ["GTFS", "RealTime", "Protobuf", "Alert", "Cause.hs"]
+ [(1, "UNKNOWN_CAUSE"), (2, "OTHER_CAUSE"), (3, "TECHNICAL_PROBLEM"), (4, "STRIKE"), (5, "DEMONSTRATION"), (6, "ACCIDENT"),
+ (7, "HOLIDAY"), (8, "WEATHER"), (9, "MAINTENANCE"), (10, "CONSTRUCTION"), (11, "POLICE_ACTIVITY"), (12, "MEDICAL_EMERGENCY")]
+
+instance P'.TextType Cause where
+ tellT = P'.tellShow
+ getT = P'.getRead \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/Alert/Effect.hs b/src/GTFS/RealTime/Protobuf/Alert/Effect.hs
new file mode 100644
index 0000000..6d0abea
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/Alert/Effect.hs
@@ -0,0 +1,101 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.Alert.Effect (Effect(..)) where
+import Prelude ((+), (/), (.))
+import qualified Prelude 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 Effect = NO_SERVICE
+ | REDUCED_SERVICE
+ | SIGNIFICANT_DELAYS
+ | DETOUR
+ | ADDITIONAL_SERVICE
+ | MODIFIED_SERVICE
+ | OTHER_EFFECT
+ | UNKNOWN_EFFECT
+ | STOP_MOVED
+ deriving (Prelude'.Read, Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.Mergeable Effect
+
+instance Prelude'.Bounded Effect where
+ minBound = NO_SERVICE
+ maxBound = STOP_MOVED
+
+instance P'.Default Effect where
+ defaultValue = NO_SERVICE
+
+toMaybe'Enum :: Prelude'.Int -> P'.Maybe Effect
+toMaybe'Enum 1 = Prelude'.Just NO_SERVICE
+toMaybe'Enum 2 = Prelude'.Just REDUCED_SERVICE
+toMaybe'Enum 3 = Prelude'.Just SIGNIFICANT_DELAYS
+toMaybe'Enum 4 = Prelude'.Just DETOUR
+toMaybe'Enum 5 = Prelude'.Just ADDITIONAL_SERVICE
+toMaybe'Enum 6 = Prelude'.Just MODIFIED_SERVICE
+toMaybe'Enum 7 = Prelude'.Just OTHER_EFFECT
+toMaybe'Enum 8 = Prelude'.Just UNKNOWN_EFFECT
+toMaybe'Enum 9 = Prelude'.Just STOP_MOVED
+toMaybe'Enum _ = Prelude'.Nothing
+
+instance Prelude'.Enum Effect where
+ fromEnum NO_SERVICE = 1
+ fromEnum REDUCED_SERVICE = 2
+ fromEnum SIGNIFICANT_DELAYS = 3
+ fromEnum DETOUR = 4
+ fromEnum ADDITIONAL_SERVICE = 5
+ fromEnum MODIFIED_SERVICE = 6
+ fromEnum OTHER_EFFECT = 7
+ fromEnum UNKNOWN_EFFECT = 8
+ fromEnum STOP_MOVED = 9
+ toEnum
+ = P'.fromMaybe (Prelude'.error "hprotoc generated code: toEnum failure for type GTFS.RealTime.Protobuf.Alert.Effect") .
+ toMaybe'Enum
+ succ NO_SERVICE = REDUCED_SERVICE
+ succ REDUCED_SERVICE = SIGNIFICANT_DELAYS
+ succ SIGNIFICANT_DELAYS = DETOUR
+ succ DETOUR = ADDITIONAL_SERVICE
+ succ ADDITIONAL_SERVICE = MODIFIED_SERVICE
+ succ MODIFIED_SERVICE = OTHER_EFFECT
+ succ OTHER_EFFECT = UNKNOWN_EFFECT
+ succ UNKNOWN_EFFECT = STOP_MOVED
+ succ _ = Prelude'.error "hprotoc generated code: succ failure for type GTFS.RealTime.Protobuf.Alert.Effect"
+ pred REDUCED_SERVICE = NO_SERVICE
+ pred SIGNIFICANT_DELAYS = REDUCED_SERVICE
+ pred DETOUR = SIGNIFICANT_DELAYS
+ pred ADDITIONAL_SERVICE = DETOUR
+ pred MODIFIED_SERVICE = ADDITIONAL_SERVICE
+ pred OTHER_EFFECT = MODIFIED_SERVICE
+ pred UNKNOWN_EFFECT = OTHER_EFFECT
+ pred STOP_MOVED = UNKNOWN_EFFECT
+ pred _ = Prelude'.error "hprotoc generated code: pred failure for type GTFS.RealTime.Protobuf.Alert.Effect"
+
+instance P'.Wire Effect 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 Effect
+
+instance P'.MessageAPI msg' (msg' -> Effect) Effect where
+ getVal m' f' = f' m'
+
+instance P'.ReflectEnum Effect where
+ reflectEnum
+ = [(1, "NO_SERVICE", NO_SERVICE), (2, "REDUCED_SERVICE", REDUCED_SERVICE), (3, "SIGNIFICANT_DELAYS", SIGNIFICANT_DELAYS),
+ (4, "DETOUR", DETOUR), (5, "ADDITIONAL_SERVICE", ADDITIONAL_SERVICE), (6, "MODIFIED_SERVICE", MODIFIED_SERVICE),
+ (7, "OTHER_EFFECT", OTHER_EFFECT), (8, "UNKNOWN_EFFECT", UNKNOWN_EFFECT), (9, "STOP_MOVED", STOP_MOVED)]
+ reflectEnumInfo _
+ = P'.EnumInfo (P'.makePNF (P'.pack ".transit_realtime.Alert.Effect") [] ["GTFS", "RealTime", "Protobuf", "Alert"] "Effect")
+ ["GTFS", "RealTime", "Protobuf", "Alert", "Effect.hs"]
+ [(1, "NO_SERVICE"), (2, "REDUCED_SERVICE"), (3, "SIGNIFICANT_DELAYS"), (4, "DETOUR"), (5, "ADDITIONAL_SERVICE"),
+ (6, "MODIFIED_SERVICE"), (7, "OTHER_EFFECT"), (8, "UNKNOWN_EFFECT"), (9, "STOP_MOVED")]
+
+instance P'.TextType Effect where
+ tellT = P'.tellShow
+ getT = P'.getRead \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/EntitySelector.hs b/src/GTFS/RealTime/Protobuf/EntitySelector.hs
new file mode 100644
index 0000000..5f2ea8b
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/EntitySelector.hs
@@ -0,0 +1,129 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.EntitySelector (EntitySelector(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.TripDescriptor as GTFS.RealTime.Protobuf (TripDescriptor)
+
+data EntitySelector = EntitySelector{agency_id :: !(P'.Maybe P'.Utf8), route_id :: !(P'.Maybe P'.Utf8),
+ route_type :: !(P'.Maybe P'.Int32), trip :: !(P'.Maybe GTFS.RealTime.Protobuf.TripDescriptor),
+ stop_id :: !(P'.Maybe P'.Utf8), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage EntitySelector where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable EntitySelector where
+ mergeAppend (EntitySelector x'1 x'2 x'3 x'4 x'5 x'6) (EntitySelector y'1 y'2 y'3 y'4 y'5 y'6)
+ = EntitySelector (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+ (P'.mergeAppend x'5 y'5)
+ (P'.mergeAppend x'6 y'6)
+
+instance P'.Default EntitySelector where
+ defaultValue = EntitySelector P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire EntitySelector where
+ wireSize ft' self'@(EntitySelector x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size
+ = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeOpt 1 5 x'3 + P'.wireSizeOpt 1 11 x'4 +
+ P'.wireSizeOpt 1 9 x'5
+ + P'.wireSizeExtField x'6)
+ wirePutWithSize ft' self'@(EntitySelector x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutOptWithSize 10 9 x'1, P'.wirePutOptWithSize 18 9 x'2, P'.wirePutOptWithSize 24 5 x'3,
+ P'.wirePutOptWithSize 34 11 x'4, P'.wirePutOptWithSize 42 9 x'5, P'.wirePutExtFieldWithSize x'6]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{agency_id = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 18 -> Prelude'.fmap (\ !new'Field -> old'Self{route_id = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 24 -> Prelude'.fmap (\ !new'Field -> old'Self{route_type = Prelude'.Just new'Field}) (P'.wireGet 5)
+ 34 -> Prelude'.fmap (\ !new'Field -> old'Self{trip = P'.mergeAppend (trip old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 42 -> Prelude'.fmap (\ !new'Field -> old'Self{stop_id = Prelude'.Just new'Field}) (P'.wireGet 9)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> EntitySelector) EntitySelector where
+ getVal m' f' = f' m'
+
+instance P'.GPB EntitySelector
+
+instance P'.ReflectDescriptor EntitySelector where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 18, 24, 34, 42])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.EntitySelector\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"EntitySelector\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"EntitySelector.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.agency_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"agency_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.route_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"route_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.route_type\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"route_type\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.trip\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"trip\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.EntitySelector.stop_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"EntitySelector\"], baseName' = FName \"stop_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType EntitySelector where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg EntitySelector where
+ textPut msg
+ = do
+ P'.tellT "agency_id" (agency_id msg)
+ P'.tellT "route_id" (route_id msg)
+ P'.tellT "route_type" (route_type msg)
+ P'.tellT "trip" (trip msg)
+ P'.tellT "stop_id" (stop_id msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'agency_id, parse'route_id, parse'route_type, parse'trip, parse'stop_id]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'agency_id
+ = P'.try
+ (do
+ v <- P'.getT "agency_id"
+ Prelude'.return (\ o -> o{agency_id = v}))
+ parse'route_id
+ = P'.try
+ (do
+ v <- P'.getT "route_id"
+ Prelude'.return (\ o -> o{route_id = v}))
+ parse'route_type
+ = P'.try
+ (do
+ v <- P'.getT "route_type"
+ Prelude'.return (\ o -> o{route_type = v}))
+ parse'trip
+ = P'.try
+ (do
+ v <- P'.getT "trip"
+ Prelude'.return (\ o -> o{trip = v}))
+ parse'stop_id
+ = P'.try
+ (do
+ v <- P'.getT "stop_id"
+ Prelude'.return (\ o -> o{stop_id = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/FeedEntity.hs b/src/GTFS/RealTime/Protobuf/FeedEntity.hs
new file mode 100644
index 0000000..466d97f
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/FeedEntity.hs
@@ -0,0 +1,136 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.FeedEntity (FeedEntity(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.Alert as GTFS.RealTime.Protobuf (Alert)
+import qualified GTFS.RealTime.Protobuf.TripUpdate as GTFS.RealTime.Protobuf (TripUpdate)
+import qualified GTFS.RealTime.Protobuf.VehiclePosition as GTFS.RealTime.Protobuf (VehiclePosition)
+
+data FeedEntity = FeedEntity{id :: !(P'.Utf8), is_deleted :: !(P'.Maybe P'.Bool),
+ trip_update :: !(P'.Maybe GTFS.RealTime.Protobuf.TripUpdate),
+ vehicle :: !(P'.Maybe GTFS.RealTime.Protobuf.VehiclePosition),
+ alert :: !(P'.Maybe GTFS.RealTime.Protobuf.Alert), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage FeedEntity where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable FeedEntity where
+ mergeAppend (FeedEntity x'1 x'2 x'3 x'4 x'5 x'6) (FeedEntity y'1 y'2 y'3 y'4 y'5 y'6)
+ = FeedEntity (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+ (P'.mergeAppend x'5 y'5)
+ (P'.mergeAppend x'6 y'6)
+
+instance P'.Default FeedEntity where
+ defaultValue
+ = FeedEntity P'.defaultValue (Prelude'.Just Prelude'.False) P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire FeedEntity where
+ wireSize ft' self'@(FeedEntity x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size
+ = (P'.wireSizeReq 1 9 x'1 + P'.wireSizeOpt 1 8 x'2 + P'.wireSizeOpt 1 11 x'3 + P'.wireSizeOpt 1 11 x'4 +
+ P'.wireSizeOpt 1 11 x'5
+ + P'.wireSizeExtField x'6)
+ wirePutWithSize ft' self'@(FeedEntity x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutReqWithSize 10 9 x'1, P'.wirePutOptWithSize 16 8 x'2, P'.wirePutOptWithSize 26 11 x'3,
+ P'.wirePutOptWithSize 34 11 x'4, P'.wirePutOptWithSize 42 11 x'5, P'.wirePutExtFieldWithSize x'6]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{id = new'Field}) (P'.wireGet 9)
+ 16 -> Prelude'.fmap (\ !new'Field -> old'Self{is_deleted = Prelude'.Just new'Field}) (P'.wireGet 8)
+ 26 -> Prelude'.fmap
+ (\ !new'Field -> old'Self{trip_update = P'.mergeAppend (trip_update old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 34 -> Prelude'.fmap (\ !new'Field -> old'Self{vehicle = P'.mergeAppend (vehicle old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 42 -> Prelude'.fmap (\ !new'Field -> old'Self{alert = P'.mergeAppend (alert old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> FeedEntity) FeedEntity where
+ getVal m' f' = f' m'
+
+instance P'.GPB FeedEntity
+
+instance P'.ReflectDescriptor FeedEntity where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10, 16, 26, 34, 42])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.FeedEntity\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedEntity\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"FeedEntity.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.is_deleted\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"is_deleted\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Just \"false\", hsDefault = Just (HsDef'Bool False)},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.trip_update\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"trip_update\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripUpdate\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.vehicle\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"vehicle\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehiclePosition\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedEntity.alert\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedEntity\"], baseName' = FName \"alert\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.Alert\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"Alert\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType FeedEntity where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg FeedEntity where
+ textPut msg
+ = do
+ P'.tellT "id" (id msg)
+ P'.tellT "is_deleted" (is_deleted msg)
+ P'.tellT "trip_update" (trip_update msg)
+ P'.tellT "vehicle" (vehicle msg)
+ P'.tellT "alert" (alert msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'id, parse'is_deleted, parse'trip_update, parse'vehicle, parse'alert]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'id
+ = P'.try
+ (do
+ v <- P'.getT "id"
+ Prelude'.return (\ o -> o{id = v}))
+ parse'is_deleted
+ = P'.try
+ (do
+ v <- P'.getT "is_deleted"
+ Prelude'.return (\ o -> o{is_deleted = v}))
+ parse'trip_update
+ = P'.try
+ (do
+ v <- P'.getT "trip_update"
+ Prelude'.return (\ o -> o{trip_update = v}))
+ parse'vehicle
+ = P'.try
+ (do
+ v <- P'.getT "vehicle"
+ Prelude'.return (\ o -> o{vehicle = v}))
+ parse'alert
+ = P'.try
+ (do
+ v <- P'.getT "alert"
+ Prelude'.return (\ o -> o{alert = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/FeedHeader.hs b/src/GTFS/RealTime/Protobuf/FeedHeader.hs
new file mode 100644
index 0000000..43adae2
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/FeedHeader.hs
@@ -0,0 +1,109 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.FeedHeader (FeedHeader(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.FeedHeader.Incrementality as GTFS.RealTime.Protobuf.FeedHeader (Incrementality)
+
+data FeedHeader = FeedHeader{gtfs_realtime_version :: !(P'.Utf8),
+ incrementality :: !(P'.Maybe GTFS.RealTime.Protobuf.FeedHeader.Incrementality),
+ timestamp :: !(P'.Maybe P'.Word64), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage FeedHeader where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable FeedHeader where
+ mergeAppend (FeedHeader x'1 x'2 x'3 x'4) (FeedHeader y'1 y'2 y'3 y'4)
+ = FeedHeader (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+
+instance P'.Default FeedHeader where
+ defaultValue = FeedHeader P'.defaultValue (Prelude'.Just (Prelude'.read "FULL_DATASET")) P'.defaultValue P'.defaultValue
+
+instance P'.Wire FeedHeader where
+ wireSize ft' self'@(FeedHeader x'1 x'2 x'3 x'4)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size = (P'.wireSizeReq 1 9 x'1 + P'.wireSizeOpt 1 14 x'2 + P'.wireSizeOpt 1 4 x'3 + P'.wireSizeExtField x'4)
+ wirePutWithSize ft' self'@(FeedHeader x'1 x'2 x'3 x'4)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutReqWithSize 10 9 x'1, P'.wirePutOptWithSize 16 14 x'2, P'.wirePutOptWithSize 24 4 x'3,
+ P'.wirePutExtFieldWithSize x'4]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{gtfs_realtime_version = new'Field}) (P'.wireGet 9)
+ 16 -> Prelude'.fmap (\ !new'Field -> old'Self{incrementality = Prelude'.Just new'Field}) (P'.wireGet 14)
+ 24 -> Prelude'.fmap (\ !new'Field -> old'Self{timestamp = Prelude'.Just new'Field}) (P'.wireGet 4)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> FeedHeader) FeedHeader where
+ getVal m' f' = f' m'
+
+instance P'.GPB FeedHeader
+
+instance P'.ReflectDescriptor FeedHeader where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10, 16, 24])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.FeedHeader\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedHeader\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"FeedHeader.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedHeader.gtfs_realtime_version\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedHeader\"], baseName' = FName \"gtfs_realtime_version\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedHeader.incrementality\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedHeader\"], baseName' = FName \"incrementality\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.FeedHeader.Incrementality\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedHeader\"], baseName = MName \"Incrementality\"}), hsRawDefault = Just \"FULL_DATASET\", hsDefault = Just (HsDef'Enum \"FULL_DATASET\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedHeader.timestamp\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedHeader\"], baseName' = FName \"timestamp\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType FeedHeader where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg FeedHeader where
+ textPut msg
+ = do
+ P'.tellT "gtfs_realtime_version" (gtfs_realtime_version msg)
+ P'.tellT "incrementality" (incrementality msg)
+ P'.tellT "timestamp" (timestamp msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'gtfs_realtime_version, parse'incrementality, parse'timestamp]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'gtfs_realtime_version
+ = P'.try
+ (do
+ v <- P'.getT "gtfs_realtime_version"
+ Prelude'.return (\ o -> o{gtfs_realtime_version = v}))
+ parse'incrementality
+ = P'.try
+ (do
+ v <- P'.getT "incrementality"
+ Prelude'.return (\ o -> o{incrementality = v}))
+ parse'timestamp
+ = P'.try
+ (do
+ v <- P'.getT "timestamp"
+ Prelude'.return (\ o -> o{timestamp = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/FeedHeader/Incrementality.hs b/src/GTFS/RealTime/Protobuf/FeedHeader/Incrementality.hs
new file mode 100644
index 0000000..b7240b7
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/FeedHeader/Incrementality.hs
@@ -0,0 +1,66 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.FeedHeader.Incrementality (Incrementality(..)) where
+import Prelude ((+), (/), (.))
+import qualified Prelude 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 Incrementality = FULL_DATASET
+ | DIFFERENTIAL
+ deriving (Prelude'.Read, Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data,
+ Prelude'.Generic)
+
+instance P'.Mergeable Incrementality
+
+instance Prelude'.Bounded Incrementality where
+ minBound = FULL_DATASET
+ maxBound = DIFFERENTIAL
+
+instance P'.Default Incrementality where
+ defaultValue = FULL_DATASET
+
+toMaybe'Enum :: Prelude'.Int -> P'.Maybe Incrementality
+toMaybe'Enum 0 = Prelude'.Just FULL_DATASET
+toMaybe'Enum 1 = Prelude'.Just DIFFERENTIAL
+toMaybe'Enum _ = Prelude'.Nothing
+
+instance Prelude'.Enum Incrementality where
+ fromEnum FULL_DATASET = 0
+ fromEnum DIFFERENTIAL = 1
+ toEnum
+ = P'.fromMaybe
+ (Prelude'.error "hprotoc generated code: toEnum failure for type GTFS.RealTime.Protobuf.FeedHeader.Incrementality")
+ . toMaybe'Enum
+ succ FULL_DATASET = DIFFERENTIAL
+ succ _ = Prelude'.error "hprotoc generated code: succ failure for type GTFS.RealTime.Protobuf.FeedHeader.Incrementality"
+ pred DIFFERENTIAL = FULL_DATASET
+ pred _ = Prelude'.error "hprotoc generated code: pred failure for type GTFS.RealTime.Protobuf.FeedHeader.Incrementality"
+
+instance P'.Wire Incrementality 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 Incrementality
+
+instance P'.MessageAPI msg' (msg' -> Incrementality) Incrementality where
+ getVal m' f' = f' m'
+
+instance P'.ReflectEnum Incrementality where
+ reflectEnum = [(0, "FULL_DATASET", FULL_DATASET), (1, "DIFFERENTIAL", DIFFERENTIAL)]
+ reflectEnumInfo _
+ = P'.EnumInfo
+ (P'.makePNF (P'.pack ".transit_realtime.FeedHeader.Incrementality") [] ["GTFS", "RealTime", "Protobuf", "FeedHeader"]
+ "Incrementality")
+ ["GTFS", "RealTime", "Protobuf", "FeedHeader", "Incrementality.hs"]
+ [(0, "FULL_DATASET"), (1, "DIFFERENTIAL")]
+
+instance P'.TextType Incrementality where
+ tellT = P'.tellShow
+ getT = P'.getRead \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/FeedMessage.hs b/src/GTFS/RealTime/Protobuf/FeedMessage.hs
new file mode 100644
index 0000000..037b2fa
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/FeedMessage.hs
@@ -0,0 +1,100 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.FeedMessage (FeedMessage(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.FeedEntity as GTFS.RealTime.Protobuf (FeedEntity)
+import qualified GTFS.RealTime.Protobuf.FeedHeader as GTFS.RealTime.Protobuf (FeedHeader)
+
+data FeedMessage = FeedMessage{header :: !(GTFS.RealTime.Protobuf.FeedHeader),
+ entity :: !(P'.Seq GTFS.RealTime.Protobuf.FeedEntity), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage FeedMessage where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable FeedMessage where
+ mergeAppend (FeedMessage x'1 x'2 x'3) (FeedMessage y'1 y'2 y'3)
+ = FeedMessage (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)
+
+instance P'.Default FeedMessage where
+ defaultValue = FeedMessage P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire FeedMessage where
+ wireSize ft' self'@(FeedMessage x'1 x'2 x'3)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size = (P'.wireSizeReq 1 11 x'1 + P'.wireSizeRep 1 11 x'2 + P'.wireSizeExtField x'3)
+ wirePutWithSize ft' self'@(FeedMessage x'1 x'2 x'3)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize [P'.wirePutReqWithSize 10 11 x'1, P'.wirePutRepWithSize 18 11 x'2, P'.wirePutExtFieldWithSize x'3]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{header = P'.mergeAppend (header old'Self) (new'Field)}) (P'.wireGet 11)
+ 18 -> Prelude'.fmap (\ !new'Field -> old'Self{entity = P'.append (entity old'Self) new'Field}) (P'.wireGet 11)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> FeedMessage) FeedMessage where
+ getVal m' f' = f' m'
+
+instance P'.GPB FeedMessage
+
+instance P'.ReflectDescriptor FeedMessage where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10, 18])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.FeedMessage\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedMessage\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"FeedMessage.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedMessage.header\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedMessage\"], baseName' = FName \"header\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.FeedHeader\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedHeader\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.FeedMessage.entity\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"FeedMessage\"], baseName' = FName \"entity\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.FeedEntity\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"FeedEntity\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType FeedMessage where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg FeedMessage where
+ textPut msg
+ = do
+ P'.tellT "header" (header msg)
+ P'.tellT "entity" (entity msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'header, parse'entity]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'header
+ = P'.try
+ (do
+ v <- P'.getT "header"
+ Prelude'.return (\ o -> o{header = v}))
+ parse'entity
+ = P'.try
+ (do
+ v <- P'.getT "entity"
+ Prelude'.return (\ o -> o{entity = P'.append (entity o) v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/Position.hs b/src/GTFS/RealTime/Protobuf/Position.hs
new file mode 100644
index 0000000..74f67bb
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/Position.hs
@@ -0,0 +1,126 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.Position (Position(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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 Position = Position{latitude :: !(P'.Float), longitude :: !(P'.Float), bearing :: !(P'.Maybe P'.Float),
+ odometer :: !(P'.Maybe P'.Double), speed :: !(P'.Maybe P'.Float), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage Position where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable Position where
+ mergeAppend (Position x'1 x'2 x'3 x'4 x'5 x'6) (Position y'1 y'2 y'3 y'4 y'5 y'6)
+ = Position (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+ (P'.mergeAppend x'5 y'5)
+ (P'.mergeAppend x'6 y'6)
+
+instance P'.Default Position where
+ defaultValue = Position P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire Position where
+ wireSize ft' self'@(Position x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size
+ = (P'.wireSizeReq 1 2 x'1 + P'.wireSizeReq 1 2 x'2 + P'.wireSizeOpt 1 2 x'3 + P'.wireSizeOpt 1 1 x'4 +
+ P'.wireSizeOpt 1 2 x'5
+ + P'.wireSizeExtField x'6)
+ wirePutWithSize ft' self'@(Position x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutReqWithSize 13 2 x'1, P'.wirePutReqWithSize 21 2 x'2, P'.wirePutOptWithSize 29 2 x'3,
+ P'.wirePutOptWithSize 33 1 x'4, P'.wirePutOptWithSize 45 2 x'5, P'.wirePutExtFieldWithSize x'6]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 13 -> Prelude'.fmap (\ !new'Field -> old'Self{latitude = new'Field}) (P'.wireGet 2)
+ 21 -> Prelude'.fmap (\ !new'Field -> old'Self{longitude = new'Field}) (P'.wireGet 2)
+ 29 -> Prelude'.fmap (\ !new'Field -> old'Self{bearing = Prelude'.Just new'Field}) (P'.wireGet 2)
+ 33 -> Prelude'.fmap (\ !new'Field -> old'Self{odometer = Prelude'.Just new'Field}) (P'.wireGet 1)
+ 45 -> Prelude'.fmap (\ !new'Field -> old'Self{speed = Prelude'.Just new'Field}) (P'.wireGet 2)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> Position) Position where
+ getVal m' f' = f' m'
+
+instance P'.GPB Position
+
+instance P'.ReflectDescriptor Position where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [13, 21]) (P'.fromDistinctAscList [13, 21, 29, 33, 45])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.Position\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"Position\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"Position.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.latitude\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"latitude\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 13}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 2}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.longitude\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"longitude\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 21}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 2}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.bearing\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"bearing\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 29}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 2}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.odometer\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"odometer\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 33}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 1}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Position.speed\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"Position\"], baseName' = FName \"speed\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 45}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 2}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType Position where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg Position where
+ textPut msg
+ = do
+ P'.tellT "latitude" (latitude msg)
+ P'.tellT "longitude" (longitude msg)
+ P'.tellT "bearing" (bearing msg)
+ P'.tellT "odometer" (odometer msg)
+ P'.tellT "speed" (speed msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'latitude, parse'longitude, parse'bearing, parse'odometer, parse'speed]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'latitude
+ = P'.try
+ (do
+ v <- P'.getT "latitude"
+ Prelude'.return (\ o -> o{latitude = v}))
+ parse'longitude
+ = P'.try
+ (do
+ v <- P'.getT "longitude"
+ Prelude'.return (\ o -> o{longitude = v}))
+ parse'bearing
+ = P'.try
+ (do
+ v <- P'.getT "bearing"
+ Prelude'.return (\ o -> o{bearing = v}))
+ parse'odometer
+ = P'.try
+ (do
+ v <- P'.getT "odometer"
+ Prelude'.return (\ o -> o{odometer = v}))
+ parse'speed
+ = P'.try
+ (do
+ v <- P'.getT "speed"
+ Prelude'.return (\ o -> o{speed = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/TimeRange.hs b/src/GTFS/RealTime/Protobuf/TimeRange.hs
new file mode 100644
index 0000000..36eefb0
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/TimeRange.hs
@@ -0,0 +1,97 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.TimeRange (TimeRange(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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 TimeRange = TimeRange{start :: !(P'.Maybe P'.Word64), end :: !(P'.Maybe P'.Word64), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage TimeRange where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable TimeRange where
+ mergeAppend (TimeRange x'1 x'2 x'3) (TimeRange y'1 y'2 y'3)
+ = TimeRange (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)
+
+instance P'.Default TimeRange where
+ defaultValue = TimeRange P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire TimeRange where
+ wireSize ft' self'@(TimeRange x'1 x'2 x'3)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size = (P'.wireSizeOpt 1 4 x'1 + P'.wireSizeOpt 1 4 x'2 + P'.wireSizeExtField x'3)
+ wirePutWithSize ft' self'@(TimeRange x'1 x'2 x'3)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize [P'.wirePutOptWithSize 8 4 x'1, P'.wirePutOptWithSize 16 4 x'2, P'.wirePutExtFieldWithSize x'3]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 8 -> Prelude'.fmap (\ !new'Field -> old'Self{start = Prelude'.Just new'Field}) (P'.wireGet 4)
+ 16 -> Prelude'.fmap (\ !new'Field -> old'Self{end = Prelude'.Just new'Field}) (P'.wireGet 4)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> TimeRange) TimeRange where
+ getVal m' f' = f' m'
+
+instance P'.GPB TimeRange
+
+instance P'.ReflectDescriptor TimeRange where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [8, 16])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TimeRange\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TimeRange\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TimeRange.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TimeRange.start\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TimeRange\"], baseName' = FName \"start\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TimeRange.end\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TimeRange\"], baseName' = FName \"end\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType TimeRange where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg TimeRange where
+ textPut msg
+ = do
+ P'.tellT "start" (start msg)
+ P'.tellT "end" (end msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'start, parse'end]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'start
+ = P'.try
+ (do
+ v <- P'.getT "start"
+ Prelude'.return (\ o -> o{start = v}))
+ parse'end
+ = P'.try
+ (do
+ v <- P'.getT "end"
+ Prelude'.return (\ o -> o{end = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/TranslatedString.hs b/src/GTFS/RealTime/Protobuf/TranslatedString.hs
new file mode 100644
index 0000000..4132e66
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/TranslatedString.hs
@@ -0,0 +1,92 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.TranslatedString (TranslatedString(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.TranslatedString.Translation as GTFS.RealTime.Protobuf.TranslatedString (Translation)
+
+data TranslatedString = TranslatedString{translation :: !(P'.Seq GTFS.RealTime.Protobuf.TranslatedString.Translation),
+ ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage TranslatedString where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable TranslatedString where
+ mergeAppend (TranslatedString x'1 x'2) (TranslatedString y'1 y'2)
+ = TranslatedString (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)
+
+instance P'.Default TranslatedString where
+ defaultValue = TranslatedString P'.defaultValue P'.defaultValue
+
+instance P'.Wire TranslatedString where
+ wireSize ft' self'@(TranslatedString x'1 x'2)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size = (P'.wireSizeRep 1 11 x'1 + P'.wireSizeExtField x'2)
+ wirePutWithSize ft' self'@(TranslatedString x'1 x'2)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields = P'.sequencePutWithSize [P'.wirePutRepWithSize 10 11 x'1, P'.wirePutExtFieldWithSize x'2]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{translation = P'.append (translation old'Self) new'Field})
+ (P'.wireGet 11)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> TranslatedString) TranslatedString where
+ getVal m' f' = f' m'
+
+instance P'.GPB TranslatedString
+
+instance P'.ReflectDescriptor TranslatedString where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TranslatedString\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TranslatedString\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TranslatedString.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TranslatedString.translation\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\"], baseName' = FName \"translation\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TranslatedString.Translation\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\"], baseName = MName \"Translation\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType TranslatedString where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg TranslatedString where
+ textPut msg
+ = do
+ P'.tellT "translation" (translation msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'translation]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'translation
+ = P'.try
+ (do
+ v <- P'.getT "translation"
+ Prelude'.return (\ o -> o{translation = P'.append (translation o) v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/TranslatedString/Translation.hs b/src/GTFS/RealTime/Protobuf/TranslatedString/Translation.hs
new file mode 100644
index 0000000..0c30014
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/TranslatedString/Translation.hs
@@ -0,0 +1,97 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.TranslatedString.Translation (Translation(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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 Translation = Translation{text :: !(P'.Utf8), language :: !(P'.Maybe P'.Utf8), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage Translation where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable Translation where
+ mergeAppend (Translation x'1 x'2 x'3) (Translation y'1 y'2 y'3)
+ = Translation (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)
+
+instance P'.Default Translation where
+ defaultValue = Translation P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire Translation where
+ wireSize ft' self'@(Translation x'1 x'2 x'3)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size = (P'.wireSizeReq 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeExtField x'3)
+ wirePutWithSize ft' self'@(Translation x'1 x'2 x'3)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize [P'.wirePutReqWithSize 10 9 x'1, P'.wirePutOptWithSize 18 9 x'2, P'.wirePutExtFieldWithSize x'3]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{text = new'Field}) (P'.wireGet 9)
+ 18 -> Prelude'.fmap (\ !new'Field -> old'Self{language = Prelude'.Just new'Field}) (P'.wireGet 9)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> Translation) Translation where
+ getVal m' f' = f' m'
+
+instance P'.GPB Translation
+
+instance P'.ReflectDescriptor Translation where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10, 18])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TranslatedString.Translation\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\"], baseName = MName \"Translation\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TranslatedString\",\"Translation.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TranslatedString.Translation.text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\",MName \"Translation\"], baseName' = FName \"text\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TranslatedString.Translation.language\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TranslatedString\",MName \"Translation\"], baseName' = FName \"language\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType Translation where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg Translation where
+ textPut msg
+ = do
+ P'.tellT "text" (text msg)
+ P'.tellT "language" (language msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'text, parse'language]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'text
+ = P'.try
+ (do
+ v <- P'.getT "text"
+ Prelude'.return (\ o -> o{text = v}))
+ parse'language
+ = P'.try
+ (do
+ v <- P'.getT "language"
+ Prelude'.return (\ o -> o{language = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/TripDescriptor.hs b/src/GTFS/RealTime/Protobuf/TripDescriptor.hs
new file mode 100644
index 0000000..5825405
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/TripDescriptor.hs
@@ -0,0 +1,147 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.TripDescriptor (TripDescriptor(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.TripDescriptor.ScheduleRelationship as GTFS.RealTime.Protobuf.TripDescriptor
+ (ScheduleRelationship)
+
+data TripDescriptor = TripDescriptor{trip_id :: !(P'.Maybe P'.Utf8), route_id :: !(P'.Maybe P'.Utf8),
+ direction_id :: !(P'.Maybe P'.Word32), start_time :: !(P'.Maybe P'.Utf8),
+ start_date :: !(P'.Maybe P'.Utf8),
+ schedule_relationship ::
+ !(P'.Maybe GTFS.RealTime.Protobuf.TripDescriptor.ScheduleRelationship),
+ ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage TripDescriptor where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable TripDescriptor where
+ mergeAppend (TripDescriptor x'1 x'2 x'3 x'4 x'5 x'6 x'7) (TripDescriptor y'1 y'2 y'3 y'4 y'5 y'6 y'7)
+ = TripDescriptor (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+ (P'.mergeAppend x'5 y'5)
+ (P'.mergeAppend x'6 y'6)
+ (P'.mergeAppend x'7 y'7)
+
+instance P'.Default TripDescriptor where
+ defaultValue
+ = TripDescriptor P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire TripDescriptor where
+ wireSize ft' self'@(TripDescriptor x'1 x'2 x'3 x'4 x'5 x'6 x'7)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size
+ = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeOpt 1 13 x'3 + P'.wireSizeOpt 1 9 x'4 +
+ P'.wireSizeOpt 1 9 x'5
+ + P'.wireSizeOpt 1 14 x'6
+ + P'.wireSizeExtField x'7)
+ wirePutWithSize ft' self'@(TripDescriptor x'1 x'2 x'3 x'4 x'5 x'6 x'7)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutOptWithSize 10 9 x'1, P'.wirePutOptWithSize 18 9 x'4, P'.wirePutOptWithSize 26 9 x'5,
+ P'.wirePutOptWithSize 32 14 x'6, P'.wirePutOptWithSize 42 9 x'2, P'.wirePutOptWithSize 48 13 x'3,
+ P'.wirePutExtFieldWithSize x'7]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{trip_id = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 42 -> Prelude'.fmap (\ !new'Field -> old'Self{route_id = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 48 -> Prelude'.fmap (\ !new'Field -> old'Self{direction_id = Prelude'.Just new'Field}) (P'.wireGet 13)
+ 18 -> Prelude'.fmap (\ !new'Field -> old'Self{start_time = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 26 -> Prelude'.fmap (\ !new'Field -> old'Self{start_date = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 32 -> Prelude'.fmap (\ !new'Field -> old'Self{schedule_relationship = Prelude'.Just new'Field}) (P'.wireGet 14)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> TripDescriptor) TripDescriptor where
+ getVal m' f' = f' m'
+
+instance P'.GPB TripDescriptor
+
+instance P'.ReflectDescriptor TripDescriptor where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 18, 26, 32, 42, 48])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripDescriptor\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripDescriptor.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.trip_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"trip_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.route_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"route_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.direction_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"direction_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 48}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.start_time\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"start_time\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.start_date\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"start_date\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripDescriptor.schedule_relationship\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName' = FName \"schedule_relationship\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor.ScheduleRelationship\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripDescriptor\"], baseName = MName \"ScheduleRelationship\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType TripDescriptor where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg TripDescriptor where
+ textPut msg
+ = do
+ P'.tellT "trip_id" (trip_id msg)
+ P'.tellT "route_id" (route_id msg)
+ P'.tellT "direction_id" (direction_id msg)
+ P'.tellT "start_time" (start_time msg)
+ P'.tellT "start_date" (start_date msg)
+ P'.tellT "schedule_relationship" (schedule_relationship msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy
+ (P'.choice
+ [parse'trip_id, parse'route_id, parse'direction_id, parse'start_time, parse'start_date,
+ parse'schedule_relationship])
+ P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'trip_id
+ = P'.try
+ (do
+ v <- P'.getT "trip_id"
+ Prelude'.return (\ o -> o{trip_id = v}))
+ parse'route_id
+ = P'.try
+ (do
+ v <- P'.getT "route_id"
+ Prelude'.return (\ o -> o{route_id = v}))
+ parse'direction_id
+ = P'.try
+ (do
+ v <- P'.getT "direction_id"
+ Prelude'.return (\ o -> o{direction_id = v}))
+ parse'start_time
+ = P'.try
+ (do
+ v <- P'.getT "start_time"
+ Prelude'.return (\ o -> o{start_time = v}))
+ parse'start_date
+ = P'.try
+ (do
+ v <- P'.getT "start_date"
+ Prelude'.return (\ o -> o{start_date = v}))
+ parse'schedule_relationship
+ = P'.try
+ (do
+ v <- P'.getT "schedule_relationship"
+ Prelude'.return (\ o -> o{schedule_relationship = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/TripDescriptor/ScheduleRelationship.hs b/src/GTFS/RealTime/Protobuf/TripDescriptor/ScheduleRelationship.hs
new file mode 100644
index 0000000..8aba834
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/TripDescriptor/ScheduleRelationship.hs
@@ -0,0 +1,77 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.TripDescriptor.ScheduleRelationship (ScheduleRelationship(..)) where
+import Prelude ((+), (/), (.))
+import qualified Prelude 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 ScheduleRelationship = SCHEDULED
+ | ADDED
+ | UNSCHEDULED
+ | CANCELED
+ deriving (Prelude'.Read, Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data,
+ Prelude'.Generic)
+
+instance P'.Mergeable ScheduleRelationship
+
+instance Prelude'.Bounded ScheduleRelationship where
+ minBound = SCHEDULED
+ maxBound = CANCELED
+
+instance P'.Default ScheduleRelationship where
+ defaultValue = SCHEDULED
+
+toMaybe'Enum :: Prelude'.Int -> P'.Maybe ScheduleRelationship
+toMaybe'Enum 0 = Prelude'.Just SCHEDULED
+toMaybe'Enum 1 = Prelude'.Just ADDED
+toMaybe'Enum 2 = Prelude'.Just UNSCHEDULED
+toMaybe'Enum 3 = Prelude'.Just CANCELED
+toMaybe'Enum _ = Prelude'.Nothing
+
+instance Prelude'.Enum ScheduleRelationship where
+ fromEnum SCHEDULED = 0
+ fromEnum ADDED = 1
+ fromEnum UNSCHEDULED = 2
+ fromEnum CANCELED = 3
+ toEnum
+ = P'.fromMaybe
+ (Prelude'.error "hprotoc generated code: toEnum failure for type GTFS.RealTime.Protobuf.TripDescriptor.ScheduleRelationship")
+ . toMaybe'Enum
+ succ SCHEDULED = ADDED
+ succ ADDED = UNSCHEDULED
+ succ UNSCHEDULED = CANCELED
+ succ _ = Prelude'.error "hprotoc generated code: succ failure for type GTFS.RealTime.Protobuf.TripDescriptor.ScheduleRelationship"
+ pred ADDED = SCHEDULED
+ pred UNSCHEDULED = ADDED
+ pred CANCELED = UNSCHEDULED
+ pred _ = Prelude'.error "hprotoc generated code: pred failure for type GTFS.RealTime.Protobuf.TripDescriptor.ScheduleRelationship"
+
+instance P'.Wire ScheduleRelationship 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 ScheduleRelationship
+
+instance P'.MessageAPI msg' (msg' -> ScheduleRelationship) ScheduleRelationship where
+ getVal m' f' = f' m'
+
+instance P'.ReflectEnum ScheduleRelationship where
+ reflectEnum = [(0, "SCHEDULED", SCHEDULED), (1, "ADDED", ADDED), (2, "UNSCHEDULED", UNSCHEDULED), (3, "CANCELED", CANCELED)]
+ reflectEnumInfo _
+ = P'.EnumInfo
+ (P'.makePNF (P'.pack ".transit_realtime.TripDescriptor.ScheduleRelationship") []
+ ["GTFS", "RealTime", "Protobuf", "TripDescriptor"]
+ "ScheduleRelationship")
+ ["GTFS", "RealTime", "Protobuf", "TripDescriptor", "ScheduleRelationship.hs"]
+ [(0, "SCHEDULED"), (1, "ADDED"), (2, "UNSCHEDULED"), (3, "CANCELED")]
+
+instance P'.TextType ScheduleRelationship where
+ tellT = P'.tellShow
+ getT = P'.getRead \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/TripUpdate.hs b/src/GTFS/RealTime/Protobuf/TripUpdate.hs
new file mode 100644
index 0000000..315e59b
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/TripUpdate.hs
@@ -0,0 +1,133 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.TripUpdate (TripUpdate(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.TripDescriptor as GTFS.RealTime.Protobuf (TripDescriptor)
+import qualified GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate as GTFS.RealTime.Protobuf.TripUpdate (StopTimeUpdate)
+import qualified GTFS.RealTime.Protobuf.VehicleDescriptor as GTFS.RealTime.Protobuf (VehicleDescriptor)
+
+data TripUpdate = TripUpdate{trip :: !(GTFS.RealTime.Protobuf.TripDescriptor),
+ vehicle :: !(P'.Maybe GTFS.RealTime.Protobuf.VehicleDescriptor),
+ stop_time_update :: !(P'.Seq GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate),
+ timestamp :: !(P'.Maybe P'.Word64), delay :: !(P'.Maybe P'.Int32), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage TripUpdate where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable TripUpdate where
+ mergeAppend (TripUpdate x'1 x'2 x'3 x'4 x'5 x'6) (TripUpdate y'1 y'2 y'3 y'4 y'5 y'6)
+ = TripUpdate (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+ (P'.mergeAppend x'5 y'5)
+ (P'.mergeAppend x'6 y'6)
+
+instance P'.Default TripUpdate where
+ defaultValue = TripUpdate P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire TripUpdate where
+ wireSize ft' self'@(TripUpdate x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size
+ = (P'.wireSizeReq 1 11 x'1 + P'.wireSizeOpt 1 11 x'2 + P'.wireSizeRep 1 11 x'3 + P'.wireSizeOpt 1 4 x'4 +
+ P'.wireSizeOpt 1 5 x'5
+ + P'.wireSizeExtField x'6)
+ wirePutWithSize ft' self'@(TripUpdate x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutReqWithSize 10 11 x'1, P'.wirePutRepWithSize 18 11 x'3, P'.wirePutOptWithSize 26 11 x'2,
+ P'.wirePutOptWithSize 32 4 x'4, P'.wirePutOptWithSize 40 5 x'5, P'.wirePutExtFieldWithSize x'6]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{trip = P'.mergeAppend (trip old'Self) (new'Field)}) (P'.wireGet 11)
+ 26 -> Prelude'.fmap (\ !new'Field -> old'Self{vehicle = P'.mergeAppend (vehicle old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 18 -> Prelude'.fmap (\ !new'Field -> old'Self{stop_time_update = P'.append (stop_time_update old'Self) new'Field})
+ (P'.wireGet 11)
+ 32 -> Prelude'.fmap (\ !new'Field -> old'Self{timestamp = Prelude'.Just new'Field}) (P'.wireGet 4)
+ 40 -> Prelude'.fmap (\ !new'Field -> old'Self{delay = Prelude'.Just new'Field}) (P'.wireGet 5)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> TripUpdate) TripUpdate where
+ getVal m' f' = f' m'
+
+instance P'.GPB TripUpdate
+
+instance P'.ReflectDescriptor TripUpdate where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10, 18, 26, 32, 40])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TripUpdate\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripUpdate\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripUpdate.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.trip\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"trip\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.vehicle\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"vehicle\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehicleDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehicleDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.stop_time_update\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"stop_time_update\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeUpdate\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeUpdate\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.timestamp\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"timestamp\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.delay\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName' = FName \"delay\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType TripUpdate where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg TripUpdate where
+ textPut msg
+ = do
+ P'.tellT "trip" (trip msg)
+ P'.tellT "vehicle" (vehicle msg)
+ P'.tellT "stop_time_update" (stop_time_update msg)
+ P'.tellT "timestamp" (timestamp msg)
+ P'.tellT "delay" (delay msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'trip, parse'vehicle, parse'stop_time_update, parse'timestamp, parse'delay]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'trip
+ = P'.try
+ (do
+ v <- P'.getT "trip"
+ Prelude'.return (\ o -> o{trip = v}))
+ parse'vehicle
+ = P'.try
+ (do
+ v <- P'.getT "vehicle"
+ Prelude'.return (\ o -> o{vehicle = v}))
+ parse'stop_time_update
+ = P'.try
+ (do
+ v <- P'.getT "stop_time_update"
+ Prelude'.return (\ o -> o{stop_time_update = P'.append (stop_time_update o) v}))
+ parse'timestamp
+ = P'.try
+ (do
+ v <- P'.getT "timestamp"
+ Prelude'.return (\ o -> o{timestamp = v}))
+ parse'delay
+ = P'.try
+ (do
+ v <- P'.getT "delay"
+ Prelude'.return (\ o -> o{delay = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeEvent.hs b/src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeEvent.hs
new file mode 100644
index 0000000..a940095
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeEvent.hs
@@ -0,0 +1,107 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.TripUpdate.StopTimeEvent (StopTimeEvent(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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 StopTimeEvent = StopTimeEvent{delay :: !(P'.Maybe P'.Int32), time :: !(P'.Maybe P'.Int64), uncertainty :: !(P'.Maybe P'.Int32),
+ ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage StopTimeEvent where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable StopTimeEvent where
+ mergeAppend (StopTimeEvent x'1 x'2 x'3 x'4) (StopTimeEvent y'1 y'2 y'3 y'4)
+ = StopTimeEvent (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+
+instance P'.Default StopTimeEvent where
+ defaultValue = StopTimeEvent P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire StopTimeEvent where
+ wireSize ft' self'@(StopTimeEvent x'1 x'2 x'3 x'4)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size = (P'.wireSizeOpt 1 5 x'1 + P'.wireSizeOpt 1 3 x'2 + P'.wireSizeOpt 1 5 x'3 + P'.wireSizeExtField x'4)
+ wirePutWithSize ft' self'@(StopTimeEvent x'1 x'2 x'3 x'4)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutOptWithSize 8 5 x'1, P'.wirePutOptWithSize 16 3 x'2, P'.wirePutOptWithSize 24 5 x'3,
+ P'.wirePutExtFieldWithSize x'4]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 8 -> Prelude'.fmap (\ !new'Field -> old'Self{delay = Prelude'.Just new'Field}) (P'.wireGet 5)
+ 16 -> Prelude'.fmap (\ !new'Field -> old'Self{time = Prelude'.Just new'Field}) (P'.wireGet 3)
+ 24 -> Prelude'.fmap (\ !new'Field -> old'Self{uncertainty = Prelude'.Just new'Field}) (P'.wireGet 5)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> StopTimeEvent) StopTimeEvent where
+ getVal m' f' = f' m'
+
+instance P'.GPB StopTimeEvent
+
+instance P'.ReflectDescriptor StopTimeEvent where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [8, 16, 24])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeEvent\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeEvent\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripUpdate\",\"StopTimeEvent.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeEvent.delay\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeEvent\"], baseName' = FName \"delay\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeEvent.time\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeEvent\"], baseName' = FName \"time\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 3}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeEvent.uncertainty\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeEvent\"], baseName' = FName \"uncertainty\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 5}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType StopTimeEvent where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg StopTimeEvent where
+ textPut msg
+ = do
+ P'.tellT "delay" (delay msg)
+ P'.tellT "time" (time msg)
+ P'.tellT "uncertainty" (uncertainty msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'delay, parse'time, parse'uncertainty]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'delay
+ = P'.try
+ (do
+ v <- P'.getT "delay"
+ Prelude'.return (\ o -> o{delay = v}))
+ parse'time
+ = P'.try
+ (do
+ v <- P'.getT "time"
+ Prelude'.return (\ o -> o{time = v}))
+ parse'uncertainty
+ = P'.try
+ (do
+ v <- P'.getT "uncertainty"
+ Prelude'.return (\ o -> o{uncertainty = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeUpdate.hs b/src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeUpdate.hs
new file mode 100644
index 0000000..d697683
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeUpdate.hs
@@ -0,0 +1,140 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate (StopTimeUpdate(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.TripUpdate.StopTimeEvent as GTFS.RealTime.Protobuf.TripUpdate (StopTimeEvent)
+import qualified GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate.ScheduleRelationship
+ as GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate (ScheduleRelationship)
+
+data StopTimeUpdate = StopTimeUpdate{stop_sequence :: !(P'.Maybe P'.Word32), stop_id :: !(P'.Maybe P'.Utf8),
+ arrival :: !(P'.Maybe GTFS.RealTime.Protobuf.TripUpdate.StopTimeEvent),
+ departure :: !(P'.Maybe GTFS.RealTime.Protobuf.TripUpdate.StopTimeEvent),
+ schedule_relationship ::
+ !(P'.Maybe GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate.ScheduleRelationship),
+ ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage StopTimeUpdate where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable StopTimeUpdate where
+ mergeAppend (StopTimeUpdate x'1 x'2 x'3 x'4 x'5 x'6) (StopTimeUpdate y'1 y'2 y'3 y'4 y'5 y'6)
+ = StopTimeUpdate (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+ (P'.mergeAppend x'5 y'5)
+ (P'.mergeAppend x'6 y'6)
+
+instance P'.Default StopTimeUpdate where
+ defaultValue
+ = StopTimeUpdate P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue (Prelude'.Just (Prelude'.read "SCHEDULED"))
+ P'.defaultValue
+
+instance P'.Wire StopTimeUpdate where
+ wireSize ft' self'@(StopTimeUpdate x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size
+ = (P'.wireSizeOpt 1 13 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeOpt 1 11 x'3 + P'.wireSizeOpt 1 11 x'4 +
+ P'.wireSizeOpt 1 14 x'5
+ + P'.wireSizeExtField x'6)
+ wirePutWithSize ft' self'@(StopTimeUpdate x'1 x'2 x'3 x'4 x'5 x'6)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutOptWithSize 8 13 x'1, P'.wirePutOptWithSize 18 11 x'3, P'.wirePutOptWithSize 26 11 x'4,
+ P'.wirePutOptWithSize 34 9 x'2, P'.wirePutOptWithSize 40 14 x'5, P'.wirePutExtFieldWithSize x'6]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 8 -> Prelude'.fmap (\ !new'Field -> old'Self{stop_sequence = Prelude'.Just new'Field}) (P'.wireGet 13)
+ 34 -> Prelude'.fmap (\ !new'Field -> old'Self{stop_id = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 18 -> Prelude'.fmap (\ !new'Field -> old'Self{arrival = P'.mergeAppend (arrival old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 26 -> Prelude'.fmap
+ (\ !new'Field -> old'Self{departure = P'.mergeAppend (departure old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 40 -> Prelude'.fmap (\ !new'Field -> old'Self{schedule_relationship = Prelude'.Just new'Field}) (P'.wireGet 14)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> StopTimeUpdate) StopTimeUpdate where
+ getVal m' f' = f' m'
+
+instance P'.GPB StopTimeUpdate
+
+instance P'.ReflectDescriptor StopTimeUpdate where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [8, 18, 26, 34, 40])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeUpdate\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeUpdate\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"TripUpdate\",\"StopTimeUpdate.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.stop_sequence\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"stop_sequence\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.stop_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"stop_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.arrival\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"arrival\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeEvent\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeEvent\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.departure\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"departure\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeEvent\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\"], baseName = MName \"StopTimeEvent\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.schedule_relationship\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName' = FName \"schedule_relationship\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"TripUpdate\",MName \"StopTimeUpdate\"], baseName = MName \"ScheduleRelationship\"}), hsRawDefault = Just \"SCHEDULED\", hsDefault = Just (HsDef'Enum \"SCHEDULED\")}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType StopTimeUpdate where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg StopTimeUpdate where
+ textPut msg
+ = do
+ P'.tellT "stop_sequence" (stop_sequence msg)
+ P'.tellT "stop_id" (stop_id msg)
+ P'.tellT "arrival" (arrival msg)
+ P'.tellT "departure" (departure msg)
+ P'.tellT "schedule_relationship" (schedule_relationship msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy
+ (P'.choice [parse'stop_sequence, parse'stop_id, parse'arrival, parse'departure, parse'schedule_relationship])
+ P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'stop_sequence
+ = P'.try
+ (do
+ v <- P'.getT "stop_sequence"
+ Prelude'.return (\ o -> o{stop_sequence = v}))
+ parse'stop_id
+ = P'.try
+ (do
+ v <- P'.getT "stop_id"
+ Prelude'.return (\ o -> o{stop_id = v}))
+ parse'arrival
+ = P'.try
+ (do
+ v <- P'.getT "arrival"
+ Prelude'.return (\ o -> o{arrival = v}))
+ parse'departure
+ = P'.try
+ (do
+ v <- P'.getT "departure"
+ Prelude'.return (\ o -> o{departure = v}))
+ parse'schedule_relationship
+ = P'.try
+ (do
+ v <- P'.getT "schedule_relationship"
+ Prelude'.return (\ o -> o{schedule_relationship = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeUpdate/ScheduleRelationship.hs b/src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeUpdate/ScheduleRelationship.hs
new file mode 100644
index 0000000..61a3ff0
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/TripUpdate/StopTimeUpdate/ScheduleRelationship.hs
@@ -0,0 +1,77 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate.ScheduleRelationship (ScheduleRelationship(..)) where
+import Prelude ((+), (/), (.))
+import qualified Prelude 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 ScheduleRelationship = SCHEDULED
+ | SKIPPED
+ | NO_DATA
+ deriving (Prelude'.Read, Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data,
+ Prelude'.Generic)
+
+instance P'.Mergeable ScheduleRelationship
+
+instance Prelude'.Bounded ScheduleRelationship where
+ minBound = SCHEDULED
+ maxBound = NO_DATA
+
+instance P'.Default ScheduleRelationship where
+ defaultValue = SCHEDULED
+
+toMaybe'Enum :: Prelude'.Int -> P'.Maybe ScheduleRelationship
+toMaybe'Enum 0 = Prelude'.Just SCHEDULED
+toMaybe'Enum 1 = Prelude'.Just SKIPPED
+toMaybe'Enum 2 = Prelude'.Just NO_DATA
+toMaybe'Enum _ = Prelude'.Nothing
+
+instance Prelude'.Enum ScheduleRelationship where
+ fromEnum SCHEDULED = 0
+ fromEnum SKIPPED = 1
+ fromEnum NO_DATA = 2
+ toEnum
+ = P'.fromMaybe
+ (Prelude'.error
+ "hprotoc generated code: toEnum failure for type GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate.ScheduleRelationship")
+ . toMaybe'Enum
+ succ SCHEDULED = SKIPPED
+ succ SKIPPED = NO_DATA
+ succ _
+ = Prelude'.error
+ "hprotoc generated code: succ failure for type GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate.ScheduleRelationship"
+ pred SKIPPED = SCHEDULED
+ pred NO_DATA = SKIPPED
+ pred _
+ = Prelude'.error
+ "hprotoc generated code: pred failure for type GTFS.RealTime.Protobuf.TripUpdate.StopTimeUpdate.ScheduleRelationship"
+
+instance P'.Wire ScheduleRelationship 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 ScheduleRelationship
+
+instance P'.MessageAPI msg' (msg' -> ScheduleRelationship) ScheduleRelationship where
+ getVal m' f' = f' m'
+
+instance P'.ReflectEnum ScheduleRelationship where
+ reflectEnum = [(0, "SCHEDULED", SCHEDULED), (1, "SKIPPED", SKIPPED), (2, "NO_DATA", NO_DATA)]
+ reflectEnumInfo _
+ = P'.EnumInfo
+ (P'.makePNF (P'.pack ".transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship") []
+ ["GTFS", "RealTime", "Protobuf", "TripUpdate", "StopTimeUpdate"]
+ "ScheduleRelationship")
+ ["GTFS", "RealTime", "Protobuf", "TripUpdate", "StopTimeUpdate", "ScheduleRelationship.hs"]
+ [(0, "SCHEDULED"), (1, "SKIPPED"), (2, "NO_DATA")]
+
+instance P'.TextType ScheduleRelationship where
+ tellT = P'.tellShow
+ getT = P'.getRead \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/VehicleDescriptor.hs b/src/GTFS/RealTime/Protobuf/VehicleDescriptor.hs
new file mode 100644
index 0000000..bd8d1e9
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/VehicleDescriptor.hs
@@ -0,0 +1,107 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.VehicleDescriptor (VehicleDescriptor(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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 VehicleDescriptor = VehicleDescriptor{id :: !(P'.Maybe P'.Utf8), label :: !(P'.Maybe P'.Utf8),
+ license_plate :: !(P'.Maybe P'.Utf8), ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage VehicleDescriptor where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable VehicleDescriptor where
+ mergeAppend (VehicleDescriptor x'1 x'2 x'3 x'4) (VehicleDescriptor y'1 y'2 y'3 y'4)
+ = VehicleDescriptor (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+
+instance P'.Default VehicleDescriptor where
+ defaultValue = VehicleDescriptor P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+
+instance P'.Wire VehicleDescriptor where
+ wireSize ft' self'@(VehicleDescriptor x'1 x'2 x'3 x'4)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size = (P'.wireSizeOpt 1 9 x'1 + P'.wireSizeOpt 1 9 x'2 + P'.wireSizeOpt 1 9 x'3 + P'.wireSizeExtField x'4)
+ wirePutWithSize ft' self'@(VehicleDescriptor x'1 x'2 x'3 x'4)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutOptWithSize 10 9 x'1, P'.wirePutOptWithSize 18 9 x'2, P'.wirePutOptWithSize 26 9 x'3,
+ P'.wirePutExtFieldWithSize x'4]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{id = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 18 -> Prelude'.fmap (\ !new'Field -> old'Self{label = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 26 -> Prelude'.fmap (\ !new'Field -> old'Self{license_plate = Prelude'.Just new'Field}) (P'.wireGet 9)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> VehicleDescriptor) VehicleDescriptor where
+ getVal m' f' = f' m'
+
+instance P'.GPB VehicleDescriptor
+
+instance P'.ReflectDescriptor VehicleDescriptor where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 18, 26])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.VehicleDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehicleDescriptor\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"VehicleDescriptor.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehicleDescriptor.id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehicleDescriptor\"], baseName' = FName \"id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehicleDescriptor.label\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehicleDescriptor\"], baseName' = FName \"label\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehicleDescriptor.license_plate\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehicleDescriptor\"], baseName' = FName \"license_plate\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType VehicleDescriptor where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg VehicleDescriptor where
+ textPut msg
+ = do
+ P'.tellT "id" (id msg)
+ P'.tellT "label" (label msg)
+ P'.tellT "license_plate" (license_plate msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy (P'.choice [parse'id, parse'label, parse'license_plate]) P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'id
+ = P'.try
+ (do
+ v <- P'.getT "id"
+ Prelude'.return (\ o -> o{id = v}))
+ parse'label
+ = P'.try
+ (do
+ v <- P'.getT "label"
+ Prelude'.return (\ o -> o{label = v}))
+ parse'license_plate
+ = P'.try
+ (do
+ v <- P'.getT "license_plate"
+ Prelude'.return (\ o -> o{license_plate = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/VehiclePosition.hs b/src/GTFS/RealTime/Protobuf/VehiclePosition.hs
new file mode 100644
index 0000000..8d17b54
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/VehiclePosition.hs
@@ -0,0 +1,191 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.VehiclePosition (VehiclePosition(..)) where
+import Prelude ((+), (/), (==), (<=), (&&))
+import qualified Prelude 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'
+import qualified GTFS.RealTime.Protobuf.Position as GTFS.RealTime.Protobuf (Position)
+import qualified GTFS.RealTime.Protobuf.TripDescriptor as GTFS.RealTime.Protobuf (TripDescriptor)
+import qualified GTFS.RealTime.Protobuf.VehicleDescriptor as GTFS.RealTime.Protobuf (VehicleDescriptor)
+import qualified GTFS.RealTime.Protobuf.VehiclePosition.CongestionLevel as GTFS.RealTime.Protobuf.VehiclePosition (CongestionLevel)
+import qualified GTFS.RealTime.Protobuf.VehiclePosition.OccupancyStatus as GTFS.RealTime.Protobuf.VehiclePosition (OccupancyStatus)
+import qualified GTFS.RealTime.Protobuf.VehiclePosition.VehicleStopStatus as GTFS.RealTime.Protobuf.VehiclePosition
+ (VehicleStopStatus)
+
+data VehiclePosition = VehiclePosition{trip :: !(P'.Maybe GTFS.RealTime.Protobuf.TripDescriptor),
+ vehicle :: !(P'.Maybe GTFS.RealTime.Protobuf.VehicleDescriptor),
+ position :: !(P'.Maybe GTFS.RealTime.Protobuf.Position),
+ current_stop_sequence :: !(P'.Maybe P'.Word32), stop_id :: !(P'.Maybe P'.Utf8),
+ current_status :: !(P'.Maybe GTFS.RealTime.Protobuf.VehiclePosition.VehicleStopStatus),
+ timestamp :: !(P'.Maybe P'.Word64),
+ congestion_level :: !(P'.Maybe GTFS.RealTime.Protobuf.VehiclePosition.CongestionLevel),
+ occupancy_status :: !(P'.Maybe GTFS.RealTime.Protobuf.VehiclePosition.OccupancyStatus),
+ ext'field :: !(P'.ExtField)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data, Prelude'.Generic)
+
+instance P'.ExtendMessage VehiclePosition where
+ getExtField = ext'field
+ putExtField e'f msg = msg{ext'field = e'f}
+ validExtRanges msg = P'.extRanges (P'.reflectDescriptorInfo msg)
+
+instance P'.Mergeable VehiclePosition where
+ mergeAppend (VehiclePosition x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9 x'10) (VehiclePosition y'1 y'2 y'3 y'4 y'5 y'6 y'7 y'8 y'9 y'10)
+ = VehiclePosition (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+ (P'.mergeAppend x'5 y'5)
+ (P'.mergeAppend x'6 y'6)
+ (P'.mergeAppend x'7 y'7)
+ (P'.mergeAppend x'8 y'8)
+ (P'.mergeAppend x'9 y'9)
+ (P'.mergeAppend x'10 y'10)
+
+instance P'.Default VehiclePosition where
+ defaultValue
+ = VehiclePosition P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+ (Prelude'.Just (Prelude'.read "IN_TRANSIT_TO"))
+ P'.defaultValue
+ P'.defaultValue
+ P'.defaultValue
+ P'.defaultValue
+
+instance P'.Wire VehiclePosition where
+ wireSize ft' self'@(VehiclePosition x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9 x'10)
+ = case ft' of
+ 10 -> calc'Size
+ 11 -> P'.prependMessageSize calc'Size
+ _ -> P'.wireSizeErr ft' self'
+ where
+ calc'Size
+ = (P'.wireSizeOpt 1 11 x'1 + P'.wireSizeOpt 1 11 x'2 + P'.wireSizeOpt 1 11 x'3 + P'.wireSizeOpt 1 13 x'4 +
+ P'.wireSizeOpt 1 9 x'5
+ + P'.wireSizeOpt 1 14 x'6
+ + P'.wireSizeOpt 1 4 x'7
+ + P'.wireSizeOpt 1 14 x'8
+ + P'.wireSizeOpt 1 14 x'9
+ + P'.wireSizeExtField x'10)
+ wirePutWithSize ft' self'@(VehiclePosition x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9 x'10)
+ = case ft' of
+ 10 -> put'Fields
+ 11 -> put'FieldsSized
+ _ -> P'.wirePutErr ft' self'
+ where
+ put'Fields
+ = P'.sequencePutWithSize
+ [P'.wirePutOptWithSize 10 11 x'1, P'.wirePutOptWithSize 18 11 x'3, P'.wirePutOptWithSize 24 13 x'4,
+ P'.wirePutOptWithSize 32 14 x'6, P'.wirePutOptWithSize 40 4 x'7, P'.wirePutOptWithSize 48 14 x'8,
+ P'.wirePutOptWithSize 58 9 x'5, P'.wirePutOptWithSize 66 11 x'2, P'.wirePutOptWithSize 72 14 x'9,
+ P'.wirePutExtFieldWithSize x'10]
+ put'FieldsSized
+ = let size' = Prelude'.fst (P'.runPutM put'Fields)
+ put'Size
+ = do
+ P'.putSize size'
+ Prelude'.return (P'.size'WireSize size')
+ in P'.sequencePutWithSize [put'Size, put'Fields]
+ wireGet ft'
+ = case ft' of
+ 10 -> P'.getBareMessageWith update'Self
+ 11 -> P'.getMessageWith update'Self
+ _ -> P'.wireGetErr ft'
+ where
+ update'Self wire'Tag old'Self
+ = case wire'Tag of
+ 10 -> Prelude'.fmap (\ !new'Field -> old'Self{trip = P'.mergeAppend (trip old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 66 -> Prelude'.fmap (\ !new'Field -> old'Self{vehicle = P'.mergeAppend (vehicle old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 18 -> Prelude'.fmap (\ !new'Field -> old'Self{position = P'.mergeAppend (position old'Self) (Prelude'.Just new'Field)})
+ (P'.wireGet 11)
+ 24 -> Prelude'.fmap (\ !new'Field -> old'Self{current_stop_sequence = Prelude'.Just new'Field}) (P'.wireGet 13)
+ 58 -> Prelude'.fmap (\ !new'Field -> old'Self{stop_id = Prelude'.Just new'Field}) (P'.wireGet 9)
+ 32 -> Prelude'.fmap (\ !new'Field -> old'Self{current_status = Prelude'.Just new'Field}) (P'.wireGet 14)
+ 40 -> Prelude'.fmap (\ !new'Field -> old'Self{timestamp = Prelude'.Just new'Field}) (P'.wireGet 4)
+ 48 -> Prelude'.fmap (\ !new'Field -> old'Self{congestion_level = Prelude'.Just new'Field}) (P'.wireGet 14)
+ 72 -> Prelude'.fmap (\ !new'Field -> old'Self{occupancy_status = Prelude'.Just new'Field}) (P'.wireGet 14)
+ _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in
+ if Prelude'.or [1000 <= field'Number && field'Number <= 1999] then
+ P'.loadExtension field'Number wire'Type old'Self else P'.unknown field'Number wire'Type old'Self
+
+instance P'.MessageAPI msg' (msg' -> VehiclePosition) VehiclePosition where
+ getVal m' f' = f' m'
+
+instance P'.GPB VehiclePosition
+
+instance P'.ReflectDescriptor VehiclePosition where
+ getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 18, 24, 32, 40, 48, 58, 66, 72])
+ reflectDescriptorInfo _
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehiclePosition\"}, descFilePath = [\"GTFS\",\"RealTime\",\"Protobuf\",\"VehiclePosition.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.trip\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"trip\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TripDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"TripDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.vehicle\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"vehicle\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 66}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehicleDescriptor\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"VehicleDescriptor\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.position\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"position\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.Position\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\"], baseName = MName \"Position\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.current_stop_sequence\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"current_stop_sequence\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.stop_id\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"stop_id\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 58}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.current_status\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"current_status\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition.VehicleStopStatus\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName = MName \"VehicleStopStatus\"}), hsRawDefault = Just \"IN_TRANSIT_TO\", hsDefault = Just (HsDef'Enum \"IN_TRANSIT_TO\")},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.timestamp\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"timestamp\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 4}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.congestion_level\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"congestion_level\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 48}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition.CongestionLevel\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName = MName \"CongestionLevel\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.VehiclePosition.occupancy_status\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName' = FName \"occupancy_status\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 72}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.VehiclePosition.OccupancyStatus\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"RealTime\",MName \"Protobuf\",MName \"VehiclePosition\"], baseName = MName \"OccupancyStatus\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"
+
+instance P'.TextType VehiclePosition where
+ tellT = P'.tellSubMessage
+ getT = P'.getSubMessage
+
+instance P'.TextMsg VehiclePosition where
+ textPut msg
+ = do
+ P'.tellT "trip" (trip msg)
+ P'.tellT "vehicle" (vehicle msg)
+ P'.tellT "position" (position msg)
+ P'.tellT "current_stop_sequence" (current_stop_sequence msg)
+ P'.tellT "stop_id" (stop_id msg)
+ P'.tellT "current_status" (current_status msg)
+ P'.tellT "timestamp" (timestamp msg)
+ P'.tellT "congestion_level" (congestion_level msg)
+ P'.tellT "occupancy_status" (occupancy_status msg)
+ textGet
+ = do
+ mods <- P'.sepEndBy
+ (P'.choice
+ [parse'trip, parse'vehicle, parse'position, parse'current_stop_sequence, parse'stop_id, parse'current_status,
+ parse'timestamp, parse'congestion_level, parse'occupancy_status])
+ P'.spaces
+ Prelude'.return (Prelude'.foldl (\ v f -> f v) P'.defaultValue mods)
+ where
+ parse'trip
+ = P'.try
+ (do
+ v <- P'.getT "trip"
+ Prelude'.return (\ o -> o{trip = v}))
+ parse'vehicle
+ = P'.try
+ (do
+ v <- P'.getT "vehicle"
+ Prelude'.return (\ o -> o{vehicle = v}))
+ parse'position
+ = P'.try
+ (do
+ v <- P'.getT "position"
+ Prelude'.return (\ o -> o{position = v}))
+ parse'current_stop_sequence
+ = P'.try
+ (do
+ v <- P'.getT "current_stop_sequence"
+ Prelude'.return (\ o -> o{current_stop_sequence = v}))
+ parse'stop_id
+ = P'.try
+ (do
+ v <- P'.getT "stop_id"
+ Prelude'.return (\ o -> o{stop_id = v}))
+ parse'current_status
+ = P'.try
+ (do
+ v <- P'.getT "current_status"
+ Prelude'.return (\ o -> o{current_status = v}))
+ parse'timestamp
+ = P'.try
+ (do
+ v <- P'.getT "timestamp"
+ Prelude'.return (\ o -> o{timestamp = v}))
+ parse'congestion_level
+ = P'.try
+ (do
+ v <- P'.getT "congestion_level"
+ Prelude'.return (\ o -> o{congestion_level = v}))
+ parse'occupancy_status
+ = P'.try
+ (do
+ v <- P'.getT "occupancy_status"
+ Prelude'.return (\ o -> o{occupancy_status = v})) \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/VehiclePosition/CongestionLevel.hs b/src/GTFS/RealTime/Protobuf/VehiclePosition/CongestionLevel.hs
new file mode 100644
index 0000000..16b6cb4
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/VehiclePosition/CongestionLevel.hs
@@ -0,0 +1,84 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.VehiclePosition.CongestionLevel (CongestionLevel(..)) where
+import Prelude ((+), (/), (.))
+import qualified Prelude 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 CongestionLevel = UNKNOWN_CONGESTION_LEVEL
+ | RUNNING_SMOOTHLY
+ | STOP_AND_GO
+ | CONGESTION
+ | SEVERE_CONGESTION
+ deriving (Prelude'.Read, Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data,
+ Prelude'.Generic)
+
+instance P'.Mergeable CongestionLevel
+
+instance Prelude'.Bounded CongestionLevel where
+ minBound = UNKNOWN_CONGESTION_LEVEL
+ maxBound = SEVERE_CONGESTION
+
+instance P'.Default CongestionLevel where
+ defaultValue = UNKNOWN_CONGESTION_LEVEL
+
+toMaybe'Enum :: Prelude'.Int -> P'.Maybe CongestionLevel
+toMaybe'Enum 0 = Prelude'.Just UNKNOWN_CONGESTION_LEVEL
+toMaybe'Enum 1 = Prelude'.Just RUNNING_SMOOTHLY
+toMaybe'Enum 2 = Prelude'.Just STOP_AND_GO
+toMaybe'Enum 3 = Prelude'.Just CONGESTION
+toMaybe'Enum 4 = Prelude'.Just SEVERE_CONGESTION
+toMaybe'Enum _ = Prelude'.Nothing
+
+instance Prelude'.Enum CongestionLevel where
+ fromEnum UNKNOWN_CONGESTION_LEVEL = 0
+ fromEnum RUNNING_SMOOTHLY = 1
+ fromEnum STOP_AND_GO = 2
+ fromEnum CONGESTION = 3
+ fromEnum SEVERE_CONGESTION = 4
+ toEnum
+ = P'.fromMaybe
+ (Prelude'.error "hprotoc generated code: toEnum failure for type GTFS.RealTime.Protobuf.VehiclePosition.CongestionLevel")
+ . toMaybe'Enum
+ succ UNKNOWN_CONGESTION_LEVEL = RUNNING_SMOOTHLY
+ succ RUNNING_SMOOTHLY = STOP_AND_GO
+ succ STOP_AND_GO = CONGESTION
+ succ CONGESTION = SEVERE_CONGESTION
+ succ _ = Prelude'.error "hprotoc generated code: succ failure for type GTFS.RealTime.Protobuf.VehiclePosition.CongestionLevel"
+ pred RUNNING_SMOOTHLY = UNKNOWN_CONGESTION_LEVEL
+ pred STOP_AND_GO = RUNNING_SMOOTHLY
+ pred CONGESTION = STOP_AND_GO
+ pred SEVERE_CONGESTION = CONGESTION
+ pred _ = Prelude'.error "hprotoc generated code: pred failure for type GTFS.RealTime.Protobuf.VehiclePosition.CongestionLevel"
+
+instance P'.Wire CongestionLevel 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 CongestionLevel
+
+instance P'.MessageAPI msg' (msg' -> CongestionLevel) CongestionLevel where
+ getVal m' f' = f' m'
+
+instance P'.ReflectEnum CongestionLevel where
+ reflectEnum
+ = [(0, "UNKNOWN_CONGESTION_LEVEL", UNKNOWN_CONGESTION_LEVEL), (1, "RUNNING_SMOOTHLY", RUNNING_SMOOTHLY),
+ (2, "STOP_AND_GO", STOP_AND_GO), (3, "CONGESTION", CONGESTION), (4, "SEVERE_CONGESTION", SEVERE_CONGESTION)]
+ reflectEnumInfo _
+ = P'.EnumInfo
+ (P'.makePNF (P'.pack ".transit_realtime.VehiclePosition.CongestionLevel") []
+ ["GTFS", "RealTime", "Protobuf", "VehiclePosition"]
+ "CongestionLevel")
+ ["GTFS", "RealTime", "Protobuf", "VehiclePosition", "CongestionLevel.hs"]
+ [(0, "UNKNOWN_CONGESTION_LEVEL"), (1, "RUNNING_SMOOTHLY"), (2, "STOP_AND_GO"), (3, "CONGESTION"), (4, "SEVERE_CONGESTION")]
+
+instance P'.TextType CongestionLevel where
+ tellT = P'.tellShow
+ getT = P'.getRead \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/VehiclePosition/OccupancyStatus.hs b/src/GTFS/RealTime/Protobuf/VehiclePosition/OccupancyStatus.hs
new file mode 100644
index 0000000..13ab359
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/VehiclePosition/OccupancyStatus.hs
@@ -0,0 +1,96 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.VehiclePosition.OccupancyStatus (OccupancyStatus(..)) where
+import Prelude ((+), (/), (.))
+import qualified Prelude 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
+ 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_ACCEPTING_PASSENGERS
+
+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 _ = 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
+ toEnum
+ = P'.fromMaybe
+ (Prelude'.error "hprotoc generated code: toEnum failure for type GTFS.RealTime.Protobuf.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 _ = Prelude'.error "hprotoc generated code: succ failure for type GTFS.RealTime.Protobuf.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 _ = Prelude'.error "hprotoc generated code: pred failure for type GTFS.RealTime.Protobuf.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)]
+ reflectEnumInfo _
+ = P'.EnumInfo
+ (P'.makePNF (P'.pack ".transit_realtime.VehiclePosition.OccupancyStatus") []
+ ["GTFS", "RealTime", "Protobuf", "VehiclePosition"]
+ "OccupancyStatus")
+ ["GTFS", "RealTime", "Protobuf", "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")]
+
+instance P'.TextType OccupancyStatus where
+ tellT = P'.tellShow
+ getT = P'.getRead \ No newline at end of file
diff --git a/src/GTFS/RealTime/Protobuf/VehiclePosition/VehicleStopStatus.hs b/src/GTFS/RealTime/Protobuf/VehiclePosition/VehicleStopStatus.hs
new file mode 100644
index 0000000..dc8e24b
--- /dev/null
+++ b/src/GTFS/RealTime/Protobuf/VehiclePosition/VehicleStopStatus.hs
@@ -0,0 +1,72 @@
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+module GTFS.RealTime.Protobuf.VehiclePosition.VehicleStopStatus (VehicleStopStatus(..)) where
+import Prelude ((+), (/), (.))
+import qualified Prelude 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 VehicleStopStatus = INCOMING_AT
+ | STOPPED_AT
+ | IN_TRANSIT_TO
+ deriving (Prelude'.Read, Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data,
+ Prelude'.Generic)
+
+instance P'.Mergeable VehicleStopStatus
+
+instance Prelude'.Bounded VehicleStopStatus where
+ minBound = INCOMING_AT
+ maxBound = IN_TRANSIT_TO
+
+instance P'.Default VehicleStopStatus where
+ defaultValue = INCOMING_AT
+
+toMaybe'Enum :: Prelude'.Int -> P'.Maybe VehicleStopStatus
+toMaybe'Enum 0 = Prelude'.Just INCOMING_AT
+toMaybe'Enum 1 = Prelude'.Just STOPPED_AT
+toMaybe'Enum 2 = Prelude'.Just IN_TRANSIT_TO
+toMaybe'Enum _ = Prelude'.Nothing
+
+instance Prelude'.Enum VehicleStopStatus where
+ fromEnum INCOMING_AT = 0
+ fromEnum STOPPED_AT = 1
+ fromEnum IN_TRANSIT_TO = 2
+ toEnum
+ = P'.fromMaybe
+ (Prelude'.error "hprotoc generated code: toEnum failure for type GTFS.RealTime.Protobuf.VehiclePosition.VehicleStopStatus")
+ . toMaybe'Enum
+ succ INCOMING_AT = STOPPED_AT
+ succ STOPPED_AT = IN_TRANSIT_TO
+ succ _ = Prelude'.error "hprotoc generated code: succ failure for type GTFS.RealTime.Protobuf.VehiclePosition.VehicleStopStatus"
+ pred STOPPED_AT = INCOMING_AT
+ pred IN_TRANSIT_TO = STOPPED_AT
+ pred _ = Prelude'.error "hprotoc generated code: pred failure for type GTFS.RealTime.Protobuf.VehiclePosition.VehicleStopStatus"
+
+instance P'.Wire VehicleStopStatus 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 VehicleStopStatus
+
+instance P'.MessageAPI msg' (msg' -> VehicleStopStatus) VehicleStopStatus where
+ getVal m' f' = f' m'
+
+instance P'.ReflectEnum VehicleStopStatus where
+ reflectEnum = [(0, "INCOMING_AT", INCOMING_AT), (1, "STOPPED_AT", STOPPED_AT), (2, "IN_TRANSIT_TO", IN_TRANSIT_TO)]
+ reflectEnumInfo _
+ = P'.EnumInfo
+ (P'.makePNF (P'.pack ".transit_realtime.VehiclePosition.VehicleStopStatus") []
+ ["GTFS", "RealTime", "Protobuf", "VehiclePosition"]
+ "VehicleStopStatus")
+ ["GTFS", "RealTime", "Protobuf", "VehiclePosition", "VehicleStopStatus.hs"]
+ [(0, "INCOMING_AT"), (1, "STOPPED_AT"), (2, "IN_TRANSIT_TO")]
+
+instance P'.TextType VehicleStopStatus where
+ tellT = P'.tellShow
+ getT = P'.getRead \ No newline at end of file