diff options
author | stuebinm | 2022-07-02 00:16:02 +0200 |
---|---|---|
committer | stuebinm | 2022-07-02 00:35:34 +0200 |
commit | 6c25964c0165530e7db6650eea79cbac99031353 (patch) | |
tree | 2b821e5e07320c211a8af0e70974cbbe6defef9e /gtfs/GTFS/Realtime/Alert.hs | |
parent | 6b4e8ba88f35538d62bb78b9872bc298178cf96d (diff) |
gtfs realtime proof of concept
this adds a package for protobuf stuff, generated via hprotoc. Seems to
work kinda fine?
(the generated API is horrible though, will have to write some wrappers
for that)
Diffstat (limited to '')
-rw-r--r-- | gtfs/GTFS/Realtime/Alert.hs | 204 |
1 files changed, 204 insertions, 0 deletions
diff --git a/gtfs/GTFS/Realtime/Alert.hs b/gtfs/GTFS/Realtime/Alert.hs new file mode 100644 index 0000000..bca6530 --- /dev/null +++ b/gtfs/GTFS/Realtime/Alert.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings + #-} +{-# OPTIONS_GHC -w #-} +module GTFS.Realtime.Alert (Alert(..)) where +import Prelude ((+), (/), (++), (.), (==), (<=), (&&)) +import qualified Prelude as Prelude' +import qualified Data.List as Prelude' +import qualified Data.Typeable as Prelude' +import qualified GHC.Generics as Prelude' +import qualified Data.Data as Prelude' +import qualified Text.ProtocolBuffers.Header as P' +import qualified GTFS.Realtime.Alert.Cause as GTFS.Realtime.Alert +import qualified GTFS.Realtime.Alert.Effect as GTFS.Realtime.Alert +import qualified GTFS.Realtime.Alert.SeverityLevel as GTFS.Realtime.Alert +import qualified GTFS.Realtime.EntitySelector as GTFS.Realtime +import qualified GTFS.Realtime.TimeRange as GTFS.Realtime +import qualified GTFS.Realtime.TranslatedImage as GTFS.Realtime +import qualified GTFS.Realtime.TranslatedString as GTFS.Realtime + +data Alert = Alert{active_period :: !(P'.Seq GTFS.Realtime.TimeRange), informed_entity :: !(P'.Seq GTFS.Realtime.EntitySelector), + cause :: !(P'.Maybe GTFS.Realtime.Alert.Cause), effect :: !(P'.Maybe GTFS.Realtime.Alert.Effect), + url :: !(P'.Maybe GTFS.Realtime.TranslatedString), header_text :: !(P'.Maybe GTFS.Realtime.TranslatedString), + description_text :: !(P'.Maybe GTFS.Realtime.TranslatedString), + tts_header_text :: !(P'.Maybe GTFS.Realtime.TranslatedString), + tts_description_text :: !(P'.Maybe GTFS.Realtime.TranslatedString), + severity_level :: !(P'.Maybe GTFS.Realtime.Alert.SeverityLevel), + image :: !(P'.Maybe GTFS.Realtime.TranslatedImage), + image_alternative_text :: !(P'.Maybe GTFS.Realtime.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 x'9 x'10 x'11 x'12 x'13) + (Alert y'1 y'2 y'3 y'4 y'5 y'6 y'7 y'8 y'9 y'10 y'11 y'12 y'13) + = let !z'1 = P'.mergeAppend x'1 y'1 + !z'2 = P'.mergeAppend x'2 y'2 + !z'3 = P'.mergeAppend x'3 y'3 + !z'4 = P'.mergeAppend x'4 y'4 + !z'5 = P'.mergeAppend x'5 y'5 + !z'6 = P'.mergeAppend x'6 y'6 + !z'7 = P'.mergeAppend x'7 y'7 + !z'8 = P'.mergeAppend x'8 y'8 + !z'9 = P'.mergeAppend x'9 y'9 + !z'10 = P'.mergeAppend x'10 y'10 + !z'11 = P'.mergeAppend x'11 y'11 + !z'12 = P'.mergeAppend x'12 y'12 + !z'13 = P'.mergeAppend x'13 y'13 + in Alert z'1 z'2 z'3 z'4 z'5 z'6 z'7 z'8 z'9 z'10 z'11 z'12 z'13 + +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 + P'.defaultValue + (Prelude'.Just (Prelude'.read "UNKNOWN_SEVERITY")) + 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 x'9 x'10 x'11 x'12 x'13) + = 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'.wireSizeOpt 1 11 x'8 + + P'.wireSizeOpt 1 11 x'9 + + P'.wireSizeOpt 1 14 x'10 + + P'.wireSizeOpt 1 11 x'11 + + P'.wireSizeOpt 2 11 x'12 + + P'.wireSizeExtField x'13) + wirePutWithSize ft' self'@(Alert x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9 x'10 x'11 x'12 x'13) + = 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'.wirePutOptWithSize 98 11 x'8, P'.wirePutOptWithSize 106 11 x'9, + P'.wirePutOptWithSize 112 14 x'10, P'.wirePutOptWithSize 122 11 x'11, P'.wirePutOptWithSize 130 11 x'12, + P'.wirePutExtFieldWithSize x'13] + 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 (P'.catch'Unknown' P'.discardUnknown update'Self) + 11 -> P'.getMessageWith (P'.catch'Unknown' P'.discardUnknown 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) + 98 -> Prelude'.fmap + (\ !new'Field -> + old'Self{tts_header_text = P'.mergeAppend (tts_header_text old'Self) (Prelude'.Just new'Field)}) + (P'.wireGet 11) + 106 -> Prelude'.fmap + (\ !new'Field -> + old'Self{tts_description_text = P'.mergeAppend (tts_description_text old'Self) (Prelude'.Just new'Field)}) + (P'.wireGet 11) + 112 -> Prelude'.fmap (\ !new'Field -> old'Self{severity_level = Prelude'.Just new'Field}) (P'.wireGet 14) + 122 -> Prelude'.fmap (\ !new'Field -> old'Self{image = P'.mergeAppend (image old'Self) (Prelude'.Just new'Field)}) + (P'.wireGet 11) + 130 -> Prelude'.fmap + (\ !new'Field -> + old'Self{image_alternative_text = + P'.mergeAppend (image_alternative_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, 9000 <= field'Number && field'Number <= 9999] 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, 98, 106, 112, 122, 130]) + reflectDescriptorInfo _ + = Prelude'.read + "DescriptorInfo {descName = ProtoName {protobufName = FIName \".transit_realtime.Alert\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"Realtime\"], baseName = MName \"Alert\"}, descFilePath = [\"GTFS\",\"Realtime\",\"Alert.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.active_period\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",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\"], baseName = MName \"TimeRange\"}), hsRawDefault = Nothing, hsDefault = Nothing, isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.informed_entity\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",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\"], baseName = MName \"EntitySelector\"}), hsRawDefault = Nothing, hsDefault = Nothing, isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.cause\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",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 \"Alert\"], baseName = MName \"Cause\"}), hsRawDefault = Just \"UNKNOWN_CAUSE\", hsDefault = Just (HsDef'Enum \"UNKNOWN_CAUSE\"), isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.effect\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",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 \"Alert\"], baseName = MName \"Effect\"}), hsRawDefault = Just \"UNKNOWN_EFFECT\", hsDefault = Just (HsDef'Enum \"UNKNOWN_EFFECT\"), isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.url\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",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\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing, isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.header_text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",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\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing, isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.description_text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",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\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing, isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.tts_header_text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",MName \"Alert\"], baseName' = FName \"tts_header_text\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 12}, wireTag = WireTag {getWireTag = 98}, 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\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing, isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.tts_description_text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",MName \"Alert\"], baseName' = FName \"tts_description_text\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 13}, wireTag = WireTag {getWireTag = 106}, 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\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing, isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.severity_level\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",MName \"Alert\"], baseName' = FName \"severity_level\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 14}, wireTag = WireTag {getWireTag = 112}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.Alert.SeverityLevel\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"Realtime\",MName \"Alert\"], baseName = MName \"SeverityLevel\"}), hsRawDefault = Just \"UNKNOWN_SEVERITY\", hsDefault = Just (HsDef'Enum \"UNKNOWN_SEVERITY\"), isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.image\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",MName \"Alert\"], baseName' = FName \"image\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 15}, wireTag = WireTag {getWireTag = 122}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".transit_realtime.TranslatedImage\", haskellPrefix = [], parentModule = [MName \"GTFS\",MName \"Realtime\"], baseName = MName \"TranslatedImage\"}), hsRawDefault = Nothing, hsDefault = Nothing, isMapField = False, mapKeyVal = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".transit_realtime.Alert.image_alternative_text\", haskellPrefix' = [], parentModule' = [MName \"GTFS\",MName \"Realtime\",MName \"Alert\"], baseName' = FName \"image_alternative_text\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 16}, wireTag = WireTag {getWireTag = 130}, packedTag = Nothing, wireTagLength = 2, 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\"], baseName = MName \"TranslatedString\"}), hsRawDefault = Nothing, hsDefault = Nothing, isMapField = False, mapKeyVal = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [(FieldId {getFieldId = 1000},FieldId {getFieldId = 1999}),(FieldId {getFieldId = 9000},FieldId {getFieldId = 9999})], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False, jsonInstances = False, mapEntry = 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) + P'.tellT "tts_header_text" (tts_header_text msg) + P'.tellT "tts_description_text" (tts_description_text msg) + P'.tellT "severity_level" (severity_level msg) + P'.tellT "image" (image msg) + P'.tellT "image_alternative_text" (image_alternative_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, parse'tts_header_text, parse'tts_description_text, parse'severity_level, parse'image, + parse'image_alternative_text]) + P'.spaces + Prelude'.return (Prelude'.foldl' (\ v f -> f v) P'.defaultValue mods) + where + parse'active_period + = Prelude'.fmap (\ v o -> o{active_period = P'.append (active_period o) v}) (P'.try (P'.getT "active_period")) + parse'informed_entity + = Prelude'.fmap (\ v o -> o{informed_entity = P'.append (informed_entity o) v}) (P'.try (P'.getT "informed_entity")) + parse'cause = Prelude'.fmap (\ v o -> o{cause = v}) (P'.try (P'.getT "cause")) + parse'effect = Prelude'.fmap (\ v o -> o{effect = v}) (P'.try (P'.getT "effect")) + parse'url = Prelude'.fmap (\ v o -> o{url = v}) (P'.try (P'.getT "url")) + parse'header_text = Prelude'.fmap (\ v o -> o{header_text = v}) (P'.try (P'.getT "header_text")) + parse'description_text = Prelude'.fmap (\ v o -> o{description_text = v}) (P'.try (P'.getT "description_text")) + parse'tts_header_text = Prelude'.fmap (\ v o -> o{tts_header_text = v}) (P'.try (P'.getT "tts_header_text")) + parse'tts_description_text = Prelude'.fmap (\ v o -> o{tts_description_text = v}) (P'.try (P'.getT "tts_description_text")) + parse'severity_level = Prelude'.fmap (\ v o -> o{severity_level = v}) (P'.try (P'.getT "severity_level")) + parse'image = Prelude'.fmap (\ v o -> o{image = v}) (P'.try (P'.getT "image")) + parse'image_alternative_text + = Prelude'.fmap (\ v o -> o{image_alternative_text = v}) (P'.try (P'.getT "image_alternative_text"))
\ No newline at end of file |