{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} module Text.Google.Protobuf.Compiler.CodeGeneratorResponse.File (File(..)) where import Prelude ((+), (/)) import qualified Prelude as Prelude' import qualified Data.Typeable as Prelude' import qualified Text.ProtocolBuffers.Header as P' data File = File{File -> Maybe Utf8 name :: !(P'.Maybe P'.Utf8), File -> Maybe Utf8 insertion_point :: !(P'.Maybe P'.Utf8), File -> Maybe Utf8 content :: !(P'.Maybe P'.Utf8), File -> UnknownField unknown'field :: !P'.UnknownField} deriving (Int -> File -> ShowS [File] -> ShowS File -> String (Int -> File -> ShowS) -> (File -> String) -> ([File] -> ShowS) -> Show File forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [File] -> ShowS $cshowList :: [File] -> ShowS show :: File -> String $cshow :: File -> String showsPrec :: Int -> File -> ShowS $cshowsPrec :: Int -> File -> ShowS Prelude'.Show, File -> File -> Bool (File -> File -> Bool) -> (File -> File -> Bool) -> Eq File forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: File -> File -> Bool $c/= :: File -> File -> Bool == :: File -> File -> Bool $c== :: File -> File -> Bool Prelude'.Eq, Eq File Eq File -> (File -> File -> Ordering) -> (File -> File -> Bool) -> (File -> File -> Bool) -> (File -> File -> Bool) -> (File -> File -> Bool) -> (File -> File -> File) -> (File -> File -> File) -> Ord File File -> File -> Bool File -> File -> Ordering File -> File -> File forall a. Eq a -> (a -> a -> Ordering) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> a) -> (a -> a -> a) -> Ord a min :: File -> File -> File $cmin :: File -> File -> File max :: File -> File -> File $cmax :: File -> File -> File >= :: File -> File -> Bool $c>= :: File -> File -> Bool > :: File -> File -> Bool $c> :: File -> File -> Bool <= :: File -> File -> Bool $c<= :: File -> File -> Bool < :: File -> File -> Bool $c< :: File -> File -> Bool compare :: File -> File -> Ordering $ccompare :: File -> File -> Ordering $cp1Ord :: Eq File Prelude'.Ord, Prelude'.Typeable) instance P'.UnknownMessage File where getUnknownField :: File -> UnknownField getUnknownField = File -> UnknownField unknown'field putUnknownField :: UnknownField -> File -> File putUnknownField UnknownField u'f File msg = File msg{unknown'field :: UnknownField unknown'field = UnknownField u'f} instance P'.Mergeable File where mergeAppend :: File -> File -> File mergeAppend (File Maybe Utf8 x'1 Maybe Utf8 x'2 Maybe Utf8 x'3 UnknownField x'4) (File Maybe Utf8 y'1 Maybe Utf8 y'2 Maybe Utf8 y'3 UnknownField y'4) = Maybe Utf8 -> Maybe Utf8 -> Maybe Utf8 -> UnknownField -> File File (Maybe Utf8 -> Maybe Utf8 -> Maybe Utf8 forall a. Mergeable a => a -> a -> a P'.mergeAppend Maybe Utf8 x'1 Maybe Utf8 y'1) (Maybe Utf8 -> Maybe Utf8 -> Maybe Utf8 forall a. Mergeable a => a -> a -> a P'.mergeAppend Maybe Utf8 x'2 Maybe Utf8 y'2) (Maybe Utf8 -> Maybe Utf8 -> Maybe Utf8 forall a. Mergeable a => a -> a -> a P'.mergeAppend Maybe Utf8 x'3 Maybe Utf8 y'3) (UnknownField -> UnknownField -> UnknownField forall a. Mergeable a => a -> a -> a P'.mergeAppend UnknownField x'4 UnknownField y'4) instance P'.Default File where defaultValue :: File defaultValue = Maybe Utf8 -> Maybe Utf8 -> Maybe Utf8 -> UnknownField -> File File Maybe Utf8 forall a. Default a => a P'.defaultValue Maybe Utf8 forall a. Default a => a P'.defaultValue Maybe Utf8 forall a. Default a => a P'.defaultValue UnknownField forall a. Default a => a P'.defaultValue instance P'.Wire File where wireSize :: FieldType -> File -> WireSize wireSize FieldType ft' self' :: File self'@(File Maybe Utf8 x'1 Maybe Utf8 x'2 Maybe Utf8 x'3 UnknownField x'4) = case FieldType ft' of FieldType 10 -> WireSize calc'Size FieldType 11 -> WireSize -> WireSize P'.prependMessageSize WireSize calc'Size FieldType _ -> FieldType -> File -> WireSize forall a. Typeable a => FieldType -> a -> WireSize P'.wireSizeErr FieldType ft' File self' where calc'Size :: WireSize calc'Size = (WireSize -> FieldType -> Maybe Utf8 -> WireSize forall v. Wire v => WireSize -> FieldType -> Maybe v -> WireSize P'.wireSizeOpt WireSize 1 FieldType 9 Maybe Utf8 x'1 WireSize -> WireSize -> WireSize forall a. Num a => a -> a -> a + WireSize -> FieldType -> Maybe Utf8 -> WireSize forall v. Wire v => WireSize -> FieldType -> Maybe v -> WireSize P'.wireSizeOpt WireSize 1 FieldType 9 Maybe Utf8 x'2 WireSize -> WireSize -> WireSize forall a. Num a => a -> a -> a + WireSize -> FieldType -> Maybe Utf8 -> WireSize forall v. Wire v => WireSize -> FieldType -> Maybe v -> WireSize P'.wireSizeOpt WireSize 1 FieldType 9 Maybe Utf8 x'3 WireSize -> WireSize -> WireSize forall a. Num a => a -> a -> a + UnknownField -> WireSize P'.wireSizeUnknownField UnknownField x'4) wirePut :: FieldType -> File -> Put wirePut FieldType ft' self' :: File self'@(File Maybe Utf8 x'1 Maybe Utf8 x'2 Maybe Utf8 x'3 UnknownField x'4) = case FieldType ft' of FieldType 10 -> Put put'Fields FieldType 11 -> do WireSize -> Put P'.putSize (FieldType -> File -> WireSize forall b. Wire b => FieldType -> b -> WireSize P'.wireSize FieldType 10 File self') Put put'Fields FieldType _ -> FieldType -> File -> Put forall a b. Typeable a => FieldType -> a -> PutM b P'.wirePutErr FieldType ft' File self' where put'Fields :: Put put'Fields = do WireTag -> FieldType -> Maybe Utf8 -> Put forall v. Wire v => WireTag -> FieldType -> Maybe v -> Put P'.wirePutOpt WireTag 10 FieldType 9 Maybe Utf8 x'1 WireTag -> FieldType -> Maybe Utf8 -> Put forall v. Wire v => WireTag -> FieldType -> Maybe v -> Put P'.wirePutOpt WireTag 18 FieldType 9 Maybe Utf8 x'2 WireTag -> FieldType -> Maybe Utf8 -> Put forall v. Wire v => WireTag -> FieldType -> Maybe v -> Put P'.wirePutOpt WireTag 122 FieldType 9 Maybe Utf8 x'3 UnknownField -> Put P'.wirePutUnknownField UnknownField x'4 wireGet :: FieldType -> Get File wireGet FieldType ft' = case FieldType ft' of FieldType 10 -> (WireTag -> File -> Get File) -> Get File forall message. (Default message, ReflectDescriptor message) => (WireTag -> message -> Get message) -> Get message P'.getBareMessageWith ((WireTag -> File -> Get File) -> WireTag -> File -> Get File forall a. UnknownMessage a => (WireTag -> a -> Get a) -> WireTag -> a -> Get a P'.catch'Unknown WireTag -> File -> Get File update'Self) FieldType 11 -> (WireTag -> File -> Get File) -> Get File forall message. (Default message, ReflectDescriptor message) => (WireTag -> message -> Get message) -> Get message P'.getMessageWith ((WireTag -> File -> Get File) -> WireTag -> File -> Get File forall a. UnknownMessage a => (WireTag -> a -> Get a) -> WireTag -> a -> Get a P'.catch'Unknown WireTag -> File -> Get File update'Self) FieldType _ -> FieldType -> Get File forall a. Typeable a => FieldType -> Get a P'.wireGetErr FieldType ft' where update'Self :: WireTag -> File -> Get File update'Self WireTag wire'Tag File old'Self = case WireTag wire'Tag of WireTag 10 -> (Utf8 -> File) -> Get Utf8 -> Get File forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude'.fmap (\ !Utf8 new'Field -> File old'Self{name :: Maybe Utf8 name = Utf8 -> Maybe Utf8 forall a. a -> Maybe a Prelude'.Just Utf8 new'Field}) (FieldType -> Get Utf8 forall b. Wire b => FieldType -> Get b P'.wireGet FieldType 9) WireTag 18 -> (Utf8 -> File) -> Get Utf8 -> Get File forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude'.fmap (\ !Utf8 new'Field -> File old'Self{insertion_point :: Maybe Utf8 insertion_point = Utf8 -> Maybe Utf8 forall a. a -> Maybe a Prelude'.Just Utf8 new'Field}) (FieldType -> Get Utf8 forall b. Wire b => FieldType -> Get b P'.wireGet FieldType 9) WireTag 122 -> (Utf8 -> File) -> Get Utf8 -> Get File forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude'.fmap (\ !Utf8 new'Field -> File old'Self{content :: Maybe Utf8 content = Utf8 -> Maybe Utf8 forall a. a -> Maybe a Prelude'.Just Utf8 new'Field}) (FieldType -> Get Utf8 forall b. Wire b => FieldType -> Get b P'.wireGet FieldType 9) WireTag _ -> let (FieldId field'Number, WireType wire'Type) = WireTag -> (FieldId, WireType) P'.splitWireTag WireTag wire'Tag in FieldId -> WireType -> File -> Get File forall a. (Typeable a, ReflectDescriptor a) => FieldId -> WireType -> a -> Get a P'.unknown FieldId field'Number WireType wire'Type File old'Self instance P'.MessageAPI msg' (msg' -> File) File where getVal :: msg' -> (msg' -> File) -> File getVal msg' m' msg' -> File f' = msg' -> File f' msg' m' instance P'.GPB File instance P'.ReflectDescriptor File where getMessageInfo :: File -> GetMessageInfo getMessageInfo File _ = Set WireTag -> Set WireTag -> GetMessageInfo P'.GetMessageInfo ([WireTag] -> Set WireTag forall a. [a] -> Set a P'.fromDistinctAscList []) ([WireTag] -> Set WireTag forall a. [a] -> Set a P'.fromDistinctAscList [WireTag 10, WireTag 18, WireTag 122]) reflectDescriptorInfo :: File -> DescriptorInfo reflectDescriptorInfo File _ = String -> DescriptorInfo forall a. Read a => String -> a Prelude'.read String "DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.compiler.CodeGeneratorResponse.File\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"Google\",MName \"Protobuf\",MName \"Compiler\",MName \"CodeGeneratorResponse\"], baseName = MName \"File\"}, descFilePath = [\"Text\",\"Google\",\"Protobuf\",\"Compiler\",\"CodeGeneratorResponse\",\"File.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.compiler.CodeGeneratorResponse.File.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"Google\",MName \"Protobuf\",MName \"Compiler\",MName \"CodeGeneratorResponse\",MName \"File\"], baseName' = FName \"name\"}, 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 \".google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"Google\",MName \"Protobuf\",MName \"Compiler\",MName \"CodeGeneratorResponse\",MName \"File\"], baseName' = FName \"insertion_point\"}, 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 \".google.protobuf.compiler.CodeGeneratorResponse.File.content\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"Google\",MName \"Protobuf\",MName \"Compiler\",MName \"CodeGeneratorResponse\",MName \"File\"], baseName' = FName \"content\"}, fieldNumber = FieldId {getFieldId = 15}, wireTag = WireTag {getWireTag = 122}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True, lazyFields = False}"