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