packages feed

signable (empty) → 0.1

raw patch · 25 files changed

+7434/−0 lines, 25 filesdep +QuickCheckdep +aesondep +asn1-encodingsetup-changed

Dependencies added: QuickCheck, aeson, asn1-encoding, asn1-types, base, base64-bytestring, binary, bytestring, casing, cryptonite, directory, generic-arbitrary, hspec, memory, microlens, pem, proto-lens, proto-lens-arbitrary, proto-lens-runtime, quickcheck-instances, secp256k1-haskell, signable, text, universum, unordered-containers

Files

+ ChangeLog.md view
@@ -0,0 +1,3 @@+# Version 0.1++- Initial version.
+ LICENSE view
@@ -0,0 +1,30 @@+Coingaming (c) 2020++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 Author name here 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.
+ README.md view
@@ -0,0 +1,3 @@+# signable++Deterministic serialisation and signatures with proto-lens support. You can find documentation at [hackage](https://hackage.haskell.org/package/signable/docs/Data-Signable.html).
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ signable.cabal view
@@ -0,0 +1,110 @@+cabal-version: 1.12++-- This file has been generated from package.yaml by hpack version 0.34.2.+--+-- see: https://github.com/sol/hpack+--+-- hash: 311dca41f71b08d906b034cedb1f0ad7e69aeaf71f0848717e5ca917085dcc1b++name:           signable+version:        0.1+synopsis:       Deterministic serialisation and signatures with proto-lens support+description:    You can find documentation at <http://hackage.haskell.org/package/signable/docs/Data-Signable.html hackage>+category:       Data, Cryptography+homepage:       https://github.com/coingaming/signable#readme+bug-reports:    https://github.com/coingaming/signable/issues+author:         Ilja Tkachuk <tkachuk.labs@gmail.com>+maintainer:     Ilja Tkachuk <tkachuk.labs@gmail.com>+copyright:      2020 Coingaming <hello@coingaming.io>+license:        BSD3+license-file:   LICENSE+build-type:     Simple+extra-source-files:+    README.md+    ChangeLog.md++source-repository head+  type: git+  location: https://github.com/coingaming/signable++library+  exposed-modules:+      Data.Signable+      Data.Signable.Class+      Data.Signable.Import+      Data.Signable.Util+  other-modules:+      Paths_signable+  hs-source-dirs:+      src+  default-extensions: NoImplicitPrelude MultiParamTypeClasses LambdaCase OverloadedStrings ScopedTypeVariables+  ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-missing-local-signatures -Wno-monomorphism-restriction+  build-depends:+      asn1-encoding >=0.9.6 && <0.10+    , asn1-types >=0.3 && <0.4+    , base >=4.7 && <5+    , binary >=0.8.6 && <0.9+    , bytestring >=0.10.8 && <0.11+    , casing >=0.1.4 && <0.2+    , cryptonite >=0.25 && <0.27+    , memory >=0.14 && <0.16+    , microlens >=0.4.10 && <0.5+    , pem >=0.2.4 && <0.3+    , proto-lens >=0.7.0 && <0.8+    , proto-lens-runtime >=0.7.0 && <0.8+    , secp256k1-haskell >=0.4 && <0.5+    , text >=1.2.3 && <1.3+    , universum >=1.5.0 && <1.6+  default-language: Haskell2010++test-suite signable-test+  type: exitcode-stdio-1.0+  main-is: Spec.hs+  other-modules:+      Proto.Basic+      Proto.Basic_Fields+      Proto.Coins+      Proto.Coins_Fields+      Proto.EmbeddedSchema+      Proto.EmbeddedSchema_Fields+      Proto.GoogleProtobuf+      Proto.GoogleProtobuf_Fields+      Proto.Number+      Proto.Number_Fields+      Proto.SignableOrphan+      Proto.Text+      Proto.Text_Fields+      SignableSpec+      TestCaseSpec+      Paths_signable+  hs-source-dirs:+      test+  default-extensions: NoImplicitPrelude MultiParamTypeClasses LambdaCase OverloadedStrings ScopedTypeVariables+  ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-missing-export-lists -threaded -rtsopts -with-rtsopts=-N+  build-depends:+      QuickCheck >=2.13.2 && <2.14+    , aeson >=1.4 && <1.5+    , asn1-encoding >=0.9.6 && <0.10+    , asn1-types >=0.3 && <0.4+    , base >=4.7 && <5+    , base64-bytestring >=1.0 && <1.1+    , binary >=0.8.6 && <0.9+    , bytestring >=0.10.8 && <0.11+    , casing >=0.1.4 && <0.2+    , cryptonite >=0.25 && <0.27+    , directory >=1.3 && <1.4+    , generic-arbitrary >=0.1.0 && <0.2+    , hspec >=2.7.1 && <2.8+    , memory >=0.14 && <0.16+    , microlens >=0.4.10 && <0.5+    , pem >=0.2.4 && <0.3+    , proto-lens >=0.7.0 && <0.8+    , proto-lens-arbitrary >=0.1.2 && <0.2+    , proto-lens-runtime >=0.7.0 && <0.8+    , quickcheck-instances >=0.3.22 && <0.4+    , secp256k1-haskell >=0.4 && <0.5+    , signable+    , text >=1.2.3 && <1.3+    , universum >=1.5.0 && <1.6+    , unordered-containers >=0.2 && <0.3+  default-language: Haskell2010
+ src/Data/Signable.hs view
@@ -0,0 +1,17 @@+-- | Digital signature is common security-related practice.+-- One of the main difficulties of digital signature usage+-- is necessity of determenistic data serialization agreement.+-- This library provides `Signable` class which represents+-- the idea of such agreement.+--+-- Also worth mentioning generic <https://hackage.haskell.org/package/proto-lens proto-lens> compatible implementation+-- of serialization/signing algorithm described <https://github.com/coingaming/signable/blob/master/README.md here>.+-- It's implemented as separate protoc plugin <https://hackage.haskell.org/package/signable-haskell-protoc signable-haskell-protoc>+-- which generates `Signable` class instances for given proto-lens messages and enums.+module Data.Signable+  ( module X,+  )+where++import Data.Signable.Class as X+import Data.Signable.Util as X (safeFromIntegral)
+ src/Data/Signable/Class.hs view
@@ -0,0 +1,197 @@+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE UndecidableInstances #-}++module Data.Signable.Class+  ( -- * Key+    PubKey,+    PrvKey,+    importPubKeyRaw,+    importPubKeyPem,+    derivePubKey,+    importPrvKeyRaw,+    importPrvKeyPem,+    newRandomPrvKey,++    -- * Sha256+    Sha256 (..),++    -- * Signature+    Sig,+    importSigDer,+    exportSigDer,++    -- * Class+    Signable (..),++    -- * Misc+    Alg (..),+    SE (..),+  )+where++import qualified Crypto.Secp256k1 as C+import Data.ASN1.BinaryEncoding+import Data.ASN1.BitArray+import Data.ASN1.Encoding+import Data.ASN1.Prim+import qualified Data.Binary as B+import qualified Data.ByteArray as BA+import qualified Data.ByteString as BS+import qualified Data.ByteString.Lazy as BL+import Data.Foldable (foldr)+import Data.PEM+import Data.Signable.Import hiding (foldr, show)+import qualified Data.Text.Encoding as T+import Prelude (show)++data Alg = AlgSecp256k1+  deriving (Show)++data SE+  = InvalidPem+  | TooFewPemChunks+  | TooManyPemChunks+  | InvalidAsn1+  | TooFewAsn1Chunks+  | TooManyAsn1Chunks+  | InvalidPubKeyRaw+  | InvalidPrvKeyRaw+  deriving (Show)++newtype PubKey = PubKeySecp256k1 C.PubKey++newtype PrvKey = PrvKeySecp256k1 C.SecKey++newtype Sha256 = Sha256 ByteString++newtype Sig+  = SigSecp256k1 C.Sig+  deriving newtype (Eq)++instance Show Sig where+  show = const "SECRET"++--+-- TODO : add KeyKind argument later+-- when we will have more algorithms+--+importPubKeyRaw :: Alg -> ByteString -> Maybe PubKey+importPubKeyRaw AlgSecp256k1 = (PubKeySecp256k1 <$>) . C.importPubKey++importPubKeyPem :: Alg -> ByteString -> Either SE PubKey+importPubKeyPem AlgSecp256k1 x0 =+  case parsePEM x0+    >>= parseASN1 (\case BitString (BitArray _ x) -> [x]; _ -> []) of+    Left e -> Left e+    Right x ->+      case importPubKeyRaw AlgSecp256k1 x of+        Nothing -> Left InvalidPubKeyRaw+        Just k -> Right k++derivePubKey :: PrvKey -> PubKey+derivePubKey (PrvKeySecp256k1 x) = PubKeySecp256k1 $ C.derivePubKey x++importPrvKeyRaw :: Alg -> ByteString -> Maybe PrvKey+importPrvKeyRaw AlgSecp256k1 = (PrvKeySecp256k1 <$>) . C.secKey++importPrvKeyPem :: Alg -> ByteString -> Either SE PrvKey+importPrvKeyPem AlgSecp256k1 x0 =+  case parsePEM x0+    >>= parseASN1 (\case OctetString x -> [x]; _ -> []) of+    Left e -> Left e+    Right x ->+      case importPrvKeyRaw AlgSecp256k1 x of+        Nothing -> Left InvalidPrvKeyRaw+        Just k -> Right k++newRandomPrvKey :: (MonadIO m, MonadFail m) => Alg -> m PrvKey+newRandomPrvKey AlgSecp256k1 = do+  r <- liftIO $ getRandomBytes 32+  case importPrvKeyRaw AlgSecp256k1 r of+    -- it's bad practice to fail+    -- in IO but in this case it+    -- should never happen in reality+    Nothing -> fail "BAD_PRV_KEY"+    Just x -> return x++importSigDer :: Alg -> ByteString -> Maybe Sig+importSigDer AlgSecp256k1 =+  (SigSecp256k1 . (\x -> fromMaybe x $ C.normalizeSig x) <$>) . C.importSig++exportSigDer :: Sig -> ByteString+exportSigDer (SigSecp256k1 x) = C.exportSig x++parsePEM :: ByteString -> Either SE PEM+parsePEM x0 =+  case pemParseBS x0 of+    Left _ -> Left InvalidPem+    Right [] -> Left TooFewPemChunks+    Right [x] -> Right x+    Right _ -> Left TooManyPemChunks++parseASN1 :: (ASN1 -> [ByteString]) -> PEM -> Either SE ByteString+parseASN1 f p = do+  xs0 <-+    first (const InvalidAsn1) $+      decodeASN1 DER (BL.fromStrict $ pemContent p)+  case xs0 >>= f of+    [] -> Left TooFewAsn1Chunks+    [x] -> Right x+    _ -> Left TooManyAsn1Chunks++class Signable a where+  toBinary :: a -> BL.ByteString+  toSha256 :: a -> Sha256+  toSha256 =+    Sha256+      . BS.pack+      . BA.unpack+      . (hashlazy :: BL.ByteString -> Digest SHA256)+      . toBinary+  sign :: PrvKey -> a -> Maybe Sig+  sign (PrvKeySecp256k1 k) =+    (SigSecp256k1 . C.signMsg k <$>)+      . C.msg+      . coerce+      . toSha256+  verify :: PubKey -> Sig -> a -> Bool+  verify (PubKeySecp256k1 k) (SigSecp256k1 s) =+    maybe False (C.verifySig k s)+      . C.msg+      . coerce+      . toSha256++instance Signable ByteString where+  toBinary = BL.drop 8 . B.encode++instance Signable BL.ByteString where+  toBinary = toBinary . BL.toStrict++instance Signable Int32 where+  toBinary = B.encode++instance Signable Int64 where+  toBinary = B.encode++instance Signable Word32 where+  toBinary = B.encode++instance Signable Word64 where+  toBinary = B.encode++instance Signable Double where+  toBinary = B.encode++instance Signable Float where+  toBinary = B.encode++instance Signable Bool where+  toBinary = B.encode++instance Signable Text where+  toBinary = toBinary . T.encodeUtf8++instance (Foldable f, Signable a) => Signable (f a) where+  toBinary = foldr (\x acc -> toBinary x <> acc) mempty
+ src/Data/Signable/Import.hs view
@@ -0,0 +1,16 @@+module Data.Signable.Import (module X) where++import Crypto.Hash as X (Digest, SHA256 (..), hashWith, hashlazy)+import Crypto.Random as X (getRandomBytes)+import Data.Bifunctor as X (bimap, first, second)+import Data.Coerce as X (coerce)+import Data.List as X (partition)+import Data.Maybe as X (catMaybes)+import Data.Monoid as X (All (..), mconcat)+import Data.Ratio as X ((%), denominator, numerator)+import Data.Signable.Util as X (liftEither, safeFromIntegral)+import Data.Text as X (pack)+import Data.Word as X (Word64)+import GHC.Generics as X (Generic)+import Text.Casing as X (camel, fromSnake, pascal, toPascal)+import Universum as X
+ src/Data/Signable/Util.hs view
@@ -0,0 +1,23 @@+module Data.Signable.Util+  ( safeFromIntegral,+    liftEither,+  )+where++import Universum++safeFromIntegral ::+  forall a b. (Integral a, Integral b, Bounded b) => a -> Maybe b+safeFromIntegral x =+  if (intX >= intMin) && (intX <= intMax)+    then Just $ fromIntegral x+    else Nothing+  where+    intX = fromIntegral x :: Integer+    intMin = fromIntegral (minBound :: b) :: Integer+    intMax = fromIntegral (maxBound :: b) :: Integer++liftEither :: (MonadFail m, Show a) => Either a b -> m b+liftEither = \case+  Left x -> fail $ show x+  Right x -> return x
+ test/Proto/Basic.hs view
@@ -0,0 +1,1214 @@+{- This file was auto-generated from basic.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Basic (+        CurrencyCode(..), CurrencyCode(), CurrencyCode'UnrecognizedValue,+        CurrencyCodeValue(), Payload(), Payload'To(..), _Payload'UserIdTo,+        _Payload'MerchantIdTo, _Payload'InvoiceTo, RequestType(..),+        RequestType(), RequestType'UnrecognizedValue, UMoney()+    ) where+import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+import qualified Proto.GoogleProtobuf+newtype CurrencyCode'UnrecognizedValue+  = CurrencyCode'UnrecognizedValue Data.Int.Int32+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)+data CurrencyCode+  = BTC |+    EUR |+    USD |+    ETH |+    CurrencyCode'Unrecognized !CurrencyCode'UnrecognizedValue+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance Data.ProtoLens.MessageEnum CurrencyCode where+  maybeToEnum 0 = Prelude.Just BTC+  maybeToEnum 1 = Prelude.Just EUR+  maybeToEnum 2 = Prelude.Just USD+  maybeToEnum 3 = Prelude.Just ETH+  maybeToEnum k+    = Prelude.Just+        (CurrencyCode'Unrecognized+           (CurrencyCode'UnrecognizedValue (Prelude.fromIntegral k)))+  showEnum BTC = "BTC"+  showEnum EUR = "EUR"+  showEnum USD = "USD"+  showEnum ETH = "ETH"+  showEnum+    (CurrencyCode'Unrecognized (CurrencyCode'UnrecognizedValue k))+    = Prelude.show k+  readEnum k+    | (Prelude.==) k "BTC" = Prelude.Just BTC+    | (Prelude.==) k "EUR" = Prelude.Just EUR+    | (Prelude.==) k "USD" = Prelude.Just USD+    | (Prelude.==) k "ETH" = Prelude.Just ETH+    | Prelude.otherwise+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum+instance Prelude.Bounded CurrencyCode where+  minBound = BTC+  maxBound = ETH+instance Prelude.Enum CurrencyCode where+  toEnum k__+    = Prelude.maybe+        (Prelude.error+           ((Prelude.++)+              "toEnum: unknown value for enum CurrencyCode: "+              (Prelude.show k__)))+        Prelude.id+        (Data.ProtoLens.maybeToEnum k__)+  fromEnum BTC = 0+  fromEnum EUR = 1+  fromEnum USD = 2+  fromEnum ETH = 3+  fromEnum+    (CurrencyCode'Unrecognized (CurrencyCode'UnrecognizedValue k))+    = Prelude.fromIntegral k+  succ ETH+    = Prelude.error+        "CurrencyCode.succ: bad argument ETH. This value would be out of bounds."+  succ BTC = EUR+  succ EUR = USD+  succ USD = ETH+  succ (CurrencyCode'Unrecognized _)+    = Prelude.error+        "CurrencyCode.succ: bad argument: unrecognized value"+  pred BTC+    = Prelude.error+        "CurrencyCode.pred: bad argument BTC. This value would be out of bounds."+  pred EUR = BTC+  pred USD = EUR+  pred ETH = USD+  pred (CurrencyCode'Unrecognized _)+    = Prelude.error+        "CurrencyCode.pred: bad argument: unrecognized value"+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo+instance Data.ProtoLens.FieldDefault CurrencyCode where+  fieldDefault = BTC+instance Control.DeepSeq.NFData CurrencyCode where+  rnf x__ = Prelude.seq x__ ()+{- | Fields :+     +         * 'Proto.Basic_Fields.value' @:: Lens' CurrencyCodeValue CurrencyCode@ -}+data CurrencyCodeValue+  = CurrencyCodeValue'_constructor {_CurrencyCodeValue'value :: !CurrencyCode,+                                    _CurrencyCodeValue'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show CurrencyCodeValue where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField CurrencyCodeValue "value" CurrencyCode where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _CurrencyCodeValue'value+           (\ x__ y__ -> x__ {_CurrencyCodeValue'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message CurrencyCodeValue where+  messageName _ = Data.Text.pack "Basic.CurrencyCodeValue"+  packedMessageDescriptor _+    = "\n\+      \\DC1CurrencyCodeValue\DC2)\n\+      \\ENQvalue\CAN\SOH \SOH(\SO2\DC3.Basic.CurrencyCodeR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::+                 Data.ProtoLens.FieldTypeDescriptor CurrencyCode)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor CurrencyCodeValue+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _CurrencyCodeValue'_unknownFields+        (\ x__ y__ -> x__ {_CurrencyCodeValue'_unknownFields = y__})+  defMessage+    = CurrencyCodeValue'_constructor+        {_CurrencyCodeValue'value = Data.ProtoLens.fieldDefault,+         _CurrencyCodeValue'_unknownFields = []}+  parseMessage+    = let+        loop ::+          CurrencyCodeValue+          -> Data.ProtoLens.Encoding.Bytes.Parser CurrencyCodeValue+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.toEnum+                                          (Prelude.fmap+                                             Prelude.fromIntegral+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "CurrencyCodeValue"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         ((Prelude..)+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)+                         Prelude.fromEnum+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData CurrencyCodeValue where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_CurrencyCodeValue'_unknownFields x__)+             (Control.DeepSeq.deepseq (_CurrencyCodeValue'value x__) ())+{- | Fields :+     +         * 'Proto.Basic_Fields.userIdFrom' @:: Lens' Payload Data.Word.Word64@+         * 'Proto.Basic_Fields.amount' @:: Lens' Payload UMoney@+         * 'Proto.Basic_Fields.maybe'amount' @:: Lens' Payload (Prelude.Maybe UMoney)@+         * 'Proto.Basic_Fields.requestType' @:: Lens' Payload RequestType@+         * 'Proto.Basic_Fields.addFee' @:: Lens' Payload Prelude.Bool@+         * 'Proto.Basic_Fields.comments' @:: Lens' Payload [Data.Text.Text]@+         * 'Proto.Basic_Fields.vec'comments' @:: Lens' Payload (Data.Vector.Vector Data.Text.Text)@+         * 'Proto.Basic_Fields.maybe'to' @:: Lens' Payload (Prelude.Maybe Payload'To)@+         * 'Proto.Basic_Fields.maybe'userIdTo' @:: Lens' Payload (Prelude.Maybe Data.Word.Word64)@+         * 'Proto.Basic_Fields.userIdTo' @:: Lens' Payload Data.Word.Word64@+         * 'Proto.Basic_Fields.maybe'merchantIdTo' @:: Lens' Payload (Prelude.Maybe Data.Text.Text)@+         * 'Proto.Basic_Fields.merchantIdTo' @:: Lens' Payload Data.Text.Text@+         * 'Proto.Basic_Fields.maybe'invoiceTo' @:: Lens' Payload (Prelude.Maybe Proto.GoogleProtobuf.StringValue)@+         * 'Proto.Basic_Fields.invoiceTo' @:: Lens' Payload Proto.GoogleProtobuf.StringValue@ -}+data Payload+  = Payload'_constructor {_Payload'userIdFrom :: !Data.Word.Word64,+                          _Payload'amount :: !(Prelude.Maybe UMoney),+                          _Payload'requestType :: !RequestType,+                          _Payload'addFee :: !Prelude.Bool,+                          _Payload'comments :: !(Data.Vector.Vector Data.Text.Text),+                          _Payload'to :: !(Prelude.Maybe Payload'To),+                          _Payload'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Payload where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+data Payload'To+  = Payload'UserIdTo !Data.Word.Word64 |+    Payload'MerchantIdTo !Data.Text.Text |+    Payload'InvoiceTo !Proto.GoogleProtobuf.StringValue+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance Data.ProtoLens.Field.HasField Payload "userIdFrom" Data.Word.Word64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'userIdFrom (\ x__ y__ -> x__ {_Payload'userIdFrom = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Payload "amount" UMoney where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'amount (\ x__ y__ -> x__ {_Payload'amount = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Payload "maybe'amount" (Prelude.Maybe UMoney) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'amount (\ x__ y__ -> x__ {_Payload'amount = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Payload "requestType" RequestType where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'requestType+           (\ x__ y__ -> x__ {_Payload'requestType = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Payload "addFee" Prelude.Bool where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'addFee (\ x__ y__ -> x__ {_Payload'addFee = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Payload "comments" [Data.Text.Text] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'comments (\ x__ y__ -> x__ {_Payload'comments = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Payload "vec'comments" (Data.Vector.Vector Data.Text.Text) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'comments (\ x__ y__ -> x__ {_Payload'comments = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Payload "maybe'to" (Prelude.Maybe Payload'To) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'to (\ x__ y__ -> x__ {_Payload'to = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Payload "maybe'userIdTo" (Prelude.Maybe Data.Word.Word64) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'to (\ x__ y__ -> x__ {_Payload'to = y__}))+        (Lens.Family2.Unchecked.lens+           (\ x__+              -> case x__ of+                   (Prelude.Just (Payload'UserIdTo x__val)) -> Prelude.Just x__val+                   _otherwise -> Prelude.Nothing)+           (\ _ y__ -> Prelude.fmap Payload'UserIdTo y__))+instance Data.ProtoLens.Field.HasField Payload "userIdTo" Data.Word.Word64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'to (\ x__ y__ -> x__ {_Payload'to = y__}))+        ((Prelude..)+           (Lens.Family2.Unchecked.lens+              (\ x__+                 -> case x__ of+                      (Prelude.Just (Payload'UserIdTo x__val)) -> Prelude.Just x__val+                      _otherwise -> Prelude.Nothing)+              (\ _ y__ -> Prelude.fmap Payload'UserIdTo y__))+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))+instance Data.ProtoLens.Field.HasField Payload "maybe'merchantIdTo" (Prelude.Maybe Data.Text.Text) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'to (\ x__ y__ -> x__ {_Payload'to = y__}))+        (Lens.Family2.Unchecked.lens+           (\ x__+              -> case x__ of+                   (Prelude.Just (Payload'MerchantIdTo x__val)) -> Prelude.Just x__val+                   _otherwise -> Prelude.Nothing)+           (\ _ y__ -> Prelude.fmap Payload'MerchantIdTo y__))+instance Data.ProtoLens.Field.HasField Payload "merchantIdTo" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'to (\ x__ y__ -> x__ {_Payload'to = y__}))+        ((Prelude..)+           (Lens.Family2.Unchecked.lens+              (\ x__+                 -> case x__ of+                      (Prelude.Just (Payload'MerchantIdTo x__val)) -> Prelude.Just x__val+                      _otherwise -> Prelude.Nothing)+              (\ _ y__ -> Prelude.fmap Payload'MerchantIdTo y__))+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))+instance Data.ProtoLens.Field.HasField Payload "maybe'invoiceTo" (Prelude.Maybe Proto.GoogleProtobuf.StringValue) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'to (\ x__ y__ -> x__ {_Payload'to = y__}))+        (Lens.Family2.Unchecked.lens+           (\ x__+              -> case x__ of+                   (Prelude.Just (Payload'InvoiceTo x__val)) -> Prelude.Just x__val+                   _otherwise -> Prelude.Nothing)+           (\ _ y__ -> Prelude.fmap Payload'InvoiceTo y__))+instance Data.ProtoLens.Field.HasField Payload "invoiceTo" Proto.GoogleProtobuf.StringValue where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'to (\ x__ y__ -> x__ {_Payload'to = y__}))+        ((Prelude..)+           (Lens.Family2.Unchecked.lens+              (\ x__+                 -> case x__ of+                      (Prelude.Just (Payload'InvoiceTo x__val)) -> Prelude.Just x__val+                      _otherwise -> Prelude.Nothing)+              (\ _ y__ -> Prelude.fmap Payload'InvoiceTo y__))+           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))+instance Data.ProtoLens.Message Payload where+  messageName _ = Data.Text.pack "Basic.Payload"+  packedMessageDescriptor _+    = "\n\+      \\aPayload\DC2 \n\+      \\fuser_id_from\CAN\SOH \SOH(\EOTR\n\+      \userIdFrom\DC2%\n\+      \\ACKamount\CAN\STX \SOH(\v2\r.Basic.UMoneyR\ACKamount\DC25\n\+      \\frequest_type\CAN\ETX \SOH(\SO2\DC2.Basic.RequestTypeR\vrequestType\DC2\ETB\n\+      \\aadd_fee\CAN\EOT \SOH(\bR\ACKaddFee\DC2\SUB\n\+      \\bcomments\CAN\ENQ \ETX(\tR\bcomments\DC2\RS\n\+      \\n\+      \user_id_to\CAN\ACK \SOH(\EOTH\NULR\buserIdTo\DC2&\n\+      \\SOmerchant_id_to\CAN\a \SOH(\tH\NULR\fmerchantIdTo\DC2=\n\+      \\n\+      \invoice_to\CAN\b \SOH(\v2\FS.Google.Protobuf.StringValueH\NULR\tinvoiceToB\EOT\n\+      \\STXto"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        userIdFrom__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "user_id_from"+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"userIdFrom")) ::+              Data.ProtoLens.FieldDescriptor Payload+        amount__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "amount"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor UMoney)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'amount")) ::+              Data.ProtoLens.FieldDescriptor Payload+        requestType__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "request_type"+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::+                 Data.ProtoLens.FieldTypeDescriptor RequestType)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"requestType")) ::+              Data.ProtoLens.FieldDescriptor Payload+        addFee__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "add_fee"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"addFee")) ::+              Data.ProtoLens.FieldDescriptor Payload+        comments__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "comments"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked+                 (Data.ProtoLens.Field.field @"comments")) ::+              Data.ProtoLens.FieldDescriptor Payload+        userIdTo__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "user_id_to"+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'userIdTo")) ::+              Data.ProtoLens.FieldDescriptor Payload+        merchantIdTo__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "merchant_id_to"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'merchantIdTo")) ::+              Data.ProtoLens.FieldDescriptor Payload+        invoiceTo__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "invoice_to"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Proto.GoogleProtobuf.StringValue)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'invoiceTo")) ::+              Data.ProtoLens.FieldDescriptor Payload+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, userIdFrom__field_descriptor),+           (Data.ProtoLens.Tag 2, amount__field_descriptor),+           (Data.ProtoLens.Tag 3, requestType__field_descriptor),+           (Data.ProtoLens.Tag 4, addFee__field_descriptor),+           (Data.ProtoLens.Tag 5, comments__field_descriptor),+           (Data.ProtoLens.Tag 6, userIdTo__field_descriptor),+           (Data.ProtoLens.Tag 7, merchantIdTo__field_descriptor),+           (Data.ProtoLens.Tag 8, invoiceTo__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Payload'_unknownFields+        (\ x__ y__ -> x__ {_Payload'_unknownFields = y__})+  defMessage+    = Payload'_constructor+        {_Payload'userIdFrom = Data.ProtoLens.fieldDefault,+         _Payload'amount = Prelude.Nothing,+         _Payload'requestType = Data.ProtoLens.fieldDefault,+         _Payload'addFee = Data.ProtoLens.fieldDefault,+         _Payload'comments = Data.Vector.Generic.empty,+         _Payload'to = Prelude.Nothing, _Payload'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Payload+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text+             -> Data.ProtoLens.Encoding.Bytes.Parser Payload+        loop x mutable'comments+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'comments <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                           (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                              mutable'comments)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields+                           (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'comments") frozen'comments x))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "user_id_from"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"userIdFrom") y x)+                                  mutable'comments+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "amount"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"amount") y x)+                                  mutable'comments+                        24+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.toEnum+                                          (Prelude.fmap+                                             Prelude.fromIntegral+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))+                                       "request_type"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"requestType") y x)+                                  mutable'comments+                        32+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "add_fee"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"addFee") y x)+                                  mutable'comments+                        42+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                                        Data.ProtoLens.Encoding.Bytes.getBytes+                                                          (Prelude.fromIntegral len)+                                            Data.ProtoLens.Encoding.Bytes.runEither+                                              (case Data.Text.Encoding.decodeUtf8' value of+                                                 (Prelude.Left err)+                                                   -> Prelude.Left (Prelude.show err)+                                                 (Prelude.Right r) -> Prelude.Right r))+                                        "comments"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'comments y)+                                loop x v+                        48+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "user_id_to"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"userIdTo") y x)+                                  mutable'comments+                        58+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                                       Data.ProtoLens.Encoding.Bytes.getBytes+                                                         (Prelude.fromIntegral len)+                                           Data.ProtoLens.Encoding.Bytes.runEither+                                             (case Data.Text.Encoding.decodeUtf8' value of+                                                (Prelude.Left err)+                                                  -> Prelude.Left (Prelude.show err)+                                                (Prelude.Right r) -> Prelude.Right r))+                                       "merchant_id_to"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"merchantIdTo") y x)+                                  mutable'comments+                        66+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "invoice_to"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"invoiceTo") y x)+                                  mutable'comments+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'comments+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'comments <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                    Data.ProtoLens.Encoding.Growing.new+              loop Data.ProtoLens.defMessage mutable'comments)+          "Payload"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v+                  = Lens.Family2.view (Data.ProtoLens.Field.field @"userIdFrom") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))+             ((Data.Monoid.<>)+                (case+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'amount") _x+                 of+                   Prelude.Nothing -> Data.Monoid.mempty+                   (Prelude.Just _v)+                     -> (Data.Monoid.<>)+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                          ((Prelude..)+                             (\ bs+                                -> (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                             Data.ProtoLens.encodeMessage+                             _v))+                ((Data.Monoid.<>)+                   (let+                      _v+                        = Lens.Family2.view (Data.ProtoLens.Field.field @"requestType") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)+                            ((Prelude..)+                               ((Prelude..)+                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)+                               Prelude.fromEnum+                               _v))+                   ((Data.Monoid.<>)+                      (let+                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"addFee") _x+                       in+                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                             Data.Monoid.mempty+                         else+                             (Data.Monoid.<>)+                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)+                               ((Prelude..)+                                  Data.ProtoLens.Encoding.Bytes.putVarInt+                                  (\ b -> if b then 1 else 0)+                                  _v))+                      ((Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                            (\ _v+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 42)+                                    ((Prelude..)+                                       (\ bs+                                          -> (Data.Monoid.<>)+                                               (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                  (Prelude.fromIntegral+                                                     (Data.ByteString.length bs)))+                                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                       Data.Text.Encoding.encodeUtf8+                                       _v))+                            (Lens.Family2.view+                               (Data.ProtoLens.Field.field @"vec'comments") _x))+                         ((Data.Monoid.<>)+                            (case+                                 Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'to") _x+                             of+                               Prelude.Nothing -> Data.Monoid.mempty+                               (Prelude.Just (Payload'UserIdTo v))+                                 -> (Data.Monoid.<>)+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt 48)+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt v)+                               (Prelude.Just (Payload'MerchantIdTo v))+                                 -> (Data.Monoid.<>)+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt 58)+                                      ((Prelude..)+                                         (\ bs+                                            -> (Data.Monoid.<>)+                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                    (Prelude.fromIntegral+                                                       (Data.ByteString.length bs)))+                                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                         Data.Text.Encoding.encodeUtf8+                                         v)+                               (Prelude.Just (Payload'InvoiceTo v))+                                 -> (Data.Monoid.<>)+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt 66)+                                      ((Prelude..)+                                         (\ bs+                                            -> (Data.Monoid.<>)+                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                    (Prelude.fromIntegral+                                                       (Data.ByteString.length bs)))+                                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                         Data.ProtoLens.encodeMessage+                                         v))+                            (Data.ProtoLens.Encoding.Wire.buildFieldSet+                               (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))))+instance Control.DeepSeq.NFData Payload where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Payload'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Payload'userIdFrom x__)+                (Control.DeepSeq.deepseq+                   (_Payload'amount x__)+                   (Control.DeepSeq.deepseq+                      (_Payload'requestType x__)+                      (Control.DeepSeq.deepseq+                         (_Payload'addFee x__)+                         (Control.DeepSeq.deepseq+                            (_Payload'comments x__)+                            (Control.DeepSeq.deepseq (_Payload'to x__) ()))))))+instance Control.DeepSeq.NFData Payload'To where+  rnf (Payload'UserIdTo x__) = Control.DeepSeq.rnf x__+  rnf (Payload'MerchantIdTo x__) = Control.DeepSeq.rnf x__+  rnf (Payload'InvoiceTo x__) = Control.DeepSeq.rnf x__+_Payload'UserIdTo ::+  Data.ProtoLens.Prism.Prism' Payload'To Data.Word.Word64+_Payload'UserIdTo+  = Data.ProtoLens.Prism.prism'+      Payload'UserIdTo+      (\ p__+         -> case p__ of+              (Payload'UserIdTo p__val) -> Prelude.Just p__val+              _otherwise -> Prelude.Nothing)+_Payload'MerchantIdTo ::+  Data.ProtoLens.Prism.Prism' Payload'To Data.Text.Text+_Payload'MerchantIdTo+  = Data.ProtoLens.Prism.prism'+      Payload'MerchantIdTo+      (\ p__+         -> case p__ of+              (Payload'MerchantIdTo p__val) -> Prelude.Just p__val+              _otherwise -> Prelude.Nothing)+_Payload'InvoiceTo ::+  Data.ProtoLens.Prism.Prism' Payload'To Proto.GoogleProtobuf.StringValue+_Payload'InvoiceTo+  = Data.ProtoLens.Prism.prism'+      Payload'InvoiceTo+      (\ p__+         -> case p__ of+              (Payload'InvoiceTo p__val) -> Prelude.Just p__val+              _otherwise -> Prelude.Nothing)+newtype RequestType'UnrecognizedValue+  = RequestType'UnrecognizedValue Data.Int.Int32+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)+data RequestType+  = USER |+    LEDGER |+    RequestType'Unrecognized !RequestType'UnrecognizedValue+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance Data.ProtoLens.MessageEnum RequestType where+  maybeToEnum 0 = Prelude.Just USER+  maybeToEnum 1 = Prelude.Just LEDGER+  maybeToEnum k+    = Prelude.Just+        (RequestType'Unrecognized+           (RequestType'UnrecognizedValue (Prelude.fromIntegral k)))+  showEnum USER = "USER"+  showEnum LEDGER = "LEDGER"+  showEnum+    (RequestType'Unrecognized (RequestType'UnrecognizedValue k))+    = Prelude.show k+  readEnum k+    | (Prelude.==) k "USER" = Prelude.Just USER+    | (Prelude.==) k "LEDGER" = Prelude.Just LEDGER+    | Prelude.otherwise+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum+instance Prelude.Bounded RequestType where+  minBound = USER+  maxBound = LEDGER+instance Prelude.Enum RequestType where+  toEnum k__+    = Prelude.maybe+        (Prelude.error+           ((Prelude.++)+              "toEnum: unknown value for enum RequestType: " (Prelude.show k__)))+        Prelude.id+        (Data.ProtoLens.maybeToEnum k__)+  fromEnum USER = 0+  fromEnum LEDGER = 1+  fromEnum+    (RequestType'Unrecognized (RequestType'UnrecognizedValue k))+    = Prelude.fromIntegral k+  succ LEDGER+    = Prelude.error+        "RequestType.succ: bad argument LEDGER. This value would be out of bounds."+  succ USER = LEDGER+  succ (RequestType'Unrecognized _)+    = Prelude.error+        "RequestType.succ: bad argument: unrecognized value"+  pred USER+    = Prelude.error+        "RequestType.pred: bad argument USER. This value would be out of bounds."+  pred LEDGER = USER+  pred (RequestType'Unrecognized _)+    = Prelude.error+        "RequestType.pred: bad argument: unrecognized value"+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo+instance Data.ProtoLens.FieldDefault RequestType where+  fieldDefault = USER+instance Control.DeepSeq.NFData RequestType where+  rnf x__ = Prelude.seq x__ ()+{- | Fields :+     +         * 'Proto.Basic_Fields.amount' @:: Lens' UMoney Data.Word.Word64@+         * 'Proto.Basic_Fields.currencyCode' @:: Lens' UMoney CurrencyCodeValue@+         * 'Proto.Basic_Fields.maybe'currencyCode' @:: Lens' UMoney (Prelude.Maybe CurrencyCodeValue)@ -}+data UMoney+  = UMoney'_constructor {_UMoney'amount :: !Data.Word.Word64,+                         _UMoney'currencyCode :: !(Prelude.Maybe CurrencyCodeValue),+                         _UMoney'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show UMoney where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField UMoney "amount" Data.Word.Word64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UMoney'amount (\ x__ y__ -> x__ {_UMoney'amount = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField UMoney "currencyCode" CurrencyCodeValue where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UMoney'currencyCode+           (\ x__ y__ -> x__ {_UMoney'currencyCode = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField UMoney "maybe'currencyCode" (Prelude.Maybe CurrencyCodeValue) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UMoney'currencyCode+           (\ x__ y__ -> x__ {_UMoney'currencyCode = y__}))+        Prelude.id+instance Data.ProtoLens.Message UMoney where+  messageName _ = Data.Text.pack "Basic.UMoney"+  packedMessageDescriptor _+    = "\n\+      \\ACKUMoney\DC2\SYN\n\+      \\ACKamount\CAN\SOH \SOH(\EOTR\ACKamount\DC2=\n\+      \\rcurrency_code\CAN\STX \SOH(\v2\CAN.Basic.CurrencyCodeValueR\fcurrencyCode"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        amount__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "amount"+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"amount")) ::+              Data.ProtoLens.FieldDescriptor UMoney+        currencyCode__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "currency_code"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor CurrencyCodeValue)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'currencyCode")) ::+              Data.ProtoLens.FieldDescriptor UMoney+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, amount__field_descriptor),+           (Data.ProtoLens.Tag 2, currencyCode__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _UMoney'_unknownFields+        (\ x__ y__ -> x__ {_UMoney'_unknownFields = y__})+  defMessage+    = UMoney'_constructor+        {_UMoney'amount = Data.ProtoLens.fieldDefault,+         _UMoney'currencyCode = Prelude.Nothing,+         _UMoney'_unknownFields = []}+  parseMessage+    = let+        loop :: UMoney -> Data.ProtoLens.Encoding.Bytes.Parser UMoney+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "amount"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"amount") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "currency_code"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"currencyCode") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "UMoney"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"amount") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))+             ((Data.Monoid.<>)+                (case+                     Lens.Family2.view+                       (Data.ProtoLens.Field.field @"maybe'currencyCode") _x+                 of+                   Prelude.Nothing -> Data.Monoid.mempty+                   (Prelude.Just _v)+                     -> (Data.Monoid.<>)+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                          ((Prelude..)+                             (\ bs+                                -> (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                             Data.ProtoLens.encodeMessage+                             _v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData UMoney where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_UMoney'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_UMoney'amount x__)+                (Control.DeepSeq.deepseq (_UMoney'currencyCode x__) ()))+packedFileDescriptor :: Data.ByteString.ByteString+packedFileDescriptor+  = "\n\+    \\vbasic.proto\DC2\ENQBasic\SUB\NAKgoogle_protobuf.proto\"\203\STX\n\+    \\aPayload\DC2 \n\+    \\fuser_id_from\CAN\SOH \SOH(\EOTR\n\+    \userIdFrom\DC2%\n\+    \\ACKamount\CAN\STX \SOH(\v2\r.Basic.UMoneyR\ACKamount\DC25\n\+    \\frequest_type\CAN\ETX \SOH(\SO2\DC2.Basic.RequestTypeR\vrequestType\DC2\ETB\n\+    \\aadd_fee\CAN\EOT \SOH(\bR\ACKaddFee\DC2\SUB\n\+    \\bcomments\CAN\ENQ \ETX(\tR\bcomments\DC2\RS\n\+    \\n\+    \user_id_to\CAN\ACK \SOH(\EOTH\NULR\buserIdTo\DC2&\n\+    \\SOmerchant_id_to\CAN\a \SOH(\tH\NULR\fmerchantIdTo\DC2=\n\+    \\n\+    \invoice_to\CAN\b \SOH(\v2\FS.Google.Protobuf.StringValueH\NULR\tinvoiceToB\EOT\n\+    \\STXto\"_\n\+    \\ACKUMoney\DC2\SYN\n\+    \\ACKamount\CAN\SOH \SOH(\EOTR\ACKamount\DC2=\n\+    \\rcurrency_code\CAN\STX \SOH(\v2\CAN.Basic.CurrencyCodeValueR\fcurrencyCode\">\n\+    \\DC1CurrencyCodeValue\DC2)\n\+    \\ENQvalue\CAN\SOH \SOH(\SO2\DC3.Basic.CurrencyCodeR\ENQvalue*2\n\+    \\fCurrencyCode\DC2\a\n\+    \\ETXBTC\DLE\NUL\DC2\a\n\+    \\ETXEUR\DLE\SOH\DC2\a\n\+    \\ETXUSD\DLE\STX\DC2\a\n\+    \\ETXETH\DLE\ETX*#\n\+    \\vRequestType\DC2\b\n\+    \\EOTUSER\DLE\NUL\DC2\n\+    \\n\+    \\ACKLEDGER\DLE\SOHJ\133\t\n\+    \\ACK\DC2\EOT\NUL\NUL%\SOH\n\+    \\b\n\+    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\+    \\b\n\+    \\SOH\STX\DC2\ETX\SOH\NUL\SO\n\+    \\t\n\+    \\STX\ETX\NUL\DC2\ETX\ETX\NUL\US\n\+    \\n\+    \\n\+    \\STX\EOT\NUL\DC2\EOT\ENQ\NUL\DLE\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\NUL\SOH\DC2\ETX\ENQ\b\SI\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\ACK\STX\SUB\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\NUL\EOT\DC2\EOT\ACK\STX\ENQ\DC1\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\ACK\STX\b\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\ACK\t\NAK\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\ACK\CAN\EM\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\a\STX\DC4\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\SOH\EOT\DC2\EOT\a\STX\ACK\SUB\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\ACK\DC2\ETX\a\STX\b\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\a\t\SI\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\a\DC2\DC3\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\STX\DC2\ETX\b\STX\US\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\STX\EOT\DC2\EOT\b\STX\a\DC4\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\STX\ACK\DC2\ETX\b\STX\r\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX\b\SO\SUB\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX\b\GS\RS\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\ETX\DC2\ETX\t\STX\DC3\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\ETX\EOT\DC2\EOT\t\STX\b\US\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ETX\ENQ\DC2\ETX\t\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ETX\SOH\DC2\ETX\t\a\SO\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ETX\ETX\DC2\ETX\t\DC1\DC2\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\EOT\DC2\ETX\n\+    \\STX\US\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\EOT\EOT\DC2\ETX\n\+    \\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\EOT\ENQ\DC2\ETX\n\+    \\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\EOT\SOH\DC2\ETX\n\+    \\DC2\SUB\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\EOT\ETX\DC2\ETX\n\+    \\GS\RS\n\+    \\f\n\+    \\EOT\EOT\NUL\b\NUL\DC2\EOT\v\STX\SI\ETX\n\+    \\f\n\+    \\ENQ\EOT\NUL\b\NUL\SOH\DC2\ETX\v\b\n\+    \\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\ENQ\DC2\ETX\f\EOT\SUB\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ENQ\ENQ\DC2\ETX\f\EOT\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ENQ\SOH\DC2\ETX\f\v\NAK\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ENQ\ETX\DC2\ETX\f\CAN\EM\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\ACK\DC2\ETX\r\EOT\RS\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ACK\ENQ\DC2\ETX\r\EOT\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ACK\SOH\DC2\ETX\r\v\EM\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ACK\ETX\DC2\ETX\r\FS\GS\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\a\DC2\ETX\SO\EOT/\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\a\ACK\DC2\ETX\SO\EOT\US\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\a\SOH\DC2\ETX\SO *\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\a\ETX\DC2\ETX\SO-.\n\+    \\n\+    \\n\+    \\STX\EOT\SOH\DC2\EOT\DC2\NUL\NAK\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\SOH\SOH\DC2\ETX\DC2\b\SO\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\DC3\STX\DC4\n\+    \\r\n\+    \\ENQ\EOT\SOH\STX\NUL\EOT\DC2\EOT\DC3\STX\DC2\DLE\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETX\DC3\STX\b\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\DC3\t\SI\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\DC3\DC2\DC3\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\SOH\DC2\ETX\DC4\STX&\n\+    \\r\n\+    \\ENQ\EOT\SOH\STX\SOH\EOT\DC2\EOT\DC4\STX\DC3\DC4\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\ACK\DC2\ETX\DC4\STX\DC3\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX\DC4\DC4!\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX\DC4$%\n\+    \\n\+    \\n\+    \\STX\EOT\STX\DC2\EOT\ETB\NUL\EM\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\STX\SOH\DC2\ETX\ETB\b\EM\n\+    \\v\n\+    \\EOT\EOT\STX\STX\NUL\DC2\ETX\CAN\STX\EM\n\+    \\r\n\+    \\ENQ\EOT\STX\STX\NUL\EOT\DC2\EOT\CAN\STX\ETB\ESC\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\ACK\DC2\ETX\CAN\STX\SO\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX\CAN\SI\DC4\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX\CAN\ETB\CAN\n\+    \\n\+    \\n\+    \\STX\ENQ\NUL\DC2\EOT\ESC\NUL \SOH\n\+    \\n\+    \\n\+    \\ETX\ENQ\NUL\SOH\DC2\ETX\ESC\ENQ\DC1\n\+    \\v\n\+    \\EOT\ENQ\NUL\STX\NUL\DC2\ETX\FS\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\NUL\SOH\DC2\ETX\FS\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\NUL\STX\DC2\ETX\FS\b\t\n\+    \\v\n\+    \\EOT\ENQ\NUL\STX\SOH\DC2\ETX\GS\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\SOH\SOH\DC2\ETX\GS\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\SOH\STX\DC2\ETX\GS\b\t\n\+    \\v\n\+    \\EOT\ENQ\NUL\STX\STX\DC2\ETX\RS\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\STX\SOH\DC2\ETX\RS\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\STX\STX\DC2\ETX\RS\b\t\n\+    \\v\n\+    \\EOT\ENQ\NUL\STX\ETX\DC2\ETX\US\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\ETX\SOH\DC2\ETX\US\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\ETX\STX\DC2\ETX\US\b\t\n\+    \\n\+    \\n\+    \\STX\ENQ\SOH\DC2\EOT\"\NUL%\SOH\n\+    \\n\+    \\n\+    \\ETX\ENQ\SOH\SOH\DC2\ETX\"\ENQ\DLE\n\+    \\v\n\+    \\EOT\ENQ\SOH\STX\NUL\DC2\ETX#\STX\v\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\NUL\SOH\DC2\ETX#\STX\ACK\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\NUL\STX\DC2\ETX#\t\n\+    \\n\+    \\v\n\+    \\EOT\ENQ\SOH\STX\SOH\DC2\ETX$\STX\r\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\SOH\SOH\DC2\ETX$\STX\b\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\SOH\STX\DC2\ETX$\v\fb\ACKproto3"
+ test/Proto/Basic_Fields.hs view
@@ -0,0 +1,131 @@+{- This file was auto-generated from basic.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Basic_Fields where+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+import qualified Proto.GoogleProtobuf+addFee ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "addFee" a) =>+  Lens.Family2.LensLike' f s a+addFee = Data.ProtoLens.Field.field @"addFee"+amount ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "amount" a) =>+  Lens.Family2.LensLike' f s a+amount = Data.ProtoLens.Field.field @"amount"+comments ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "comments" a) =>+  Lens.Family2.LensLike' f s a+comments = Data.ProtoLens.Field.field @"comments"+currencyCode ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "currencyCode" a) =>+  Lens.Family2.LensLike' f s a+currencyCode = Data.ProtoLens.Field.field @"currencyCode"+invoiceTo ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "invoiceTo" a) =>+  Lens.Family2.LensLike' f s a+invoiceTo = Data.ProtoLens.Field.field @"invoiceTo"+maybe'amount ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'amount" a) =>+  Lens.Family2.LensLike' f s a+maybe'amount = Data.ProtoLens.Field.field @"maybe'amount"+maybe'currencyCode ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'currencyCode" a) =>+  Lens.Family2.LensLike' f s a+maybe'currencyCode+  = Data.ProtoLens.Field.field @"maybe'currencyCode"+maybe'invoiceTo ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'invoiceTo" a) =>+  Lens.Family2.LensLike' f s a+maybe'invoiceTo = Data.ProtoLens.Field.field @"maybe'invoiceTo"+maybe'merchantIdTo ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'merchantIdTo" a) =>+  Lens.Family2.LensLike' f s a+maybe'merchantIdTo+  = Data.ProtoLens.Field.field @"maybe'merchantIdTo"+maybe'to ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'to" a) =>+  Lens.Family2.LensLike' f s a+maybe'to = Data.ProtoLens.Field.field @"maybe'to"+maybe'userIdTo ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'userIdTo" a) =>+  Lens.Family2.LensLike' f s a+maybe'userIdTo = Data.ProtoLens.Field.field @"maybe'userIdTo"+merchantIdTo ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "merchantIdTo" a) =>+  Lens.Family2.LensLike' f s a+merchantIdTo = Data.ProtoLens.Field.field @"merchantIdTo"+requestType ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "requestType" a) =>+  Lens.Family2.LensLike' f s a+requestType = Data.ProtoLens.Field.field @"requestType"+userIdFrom ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "userIdFrom" a) =>+  Lens.Family2.LensLike' f s a+userIdFrom = Data.ProtoLens.Field.field @"userIdFrom"+userIdTo ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "userIdTo" a) =>+  Lens.Family2.LensLike' f s a+userIdTo = Data.ProtoLens.Field.field @"userIdTo"+value ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "value" a) =>+  Lens.Family2.LensLike' f s a+value = Data.ProtoLens.Field.field @"value"+vec'comments ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'comments" a) =>+  Lens.Family2.LensLike' f s a+vec'comments = Data.ProtoLens.Field.field @"vec'comments"
+ test/Proto/Coins.hs view
@@ -0,0 +1,2066 @@+{- This file was auto-generated from coins.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Coins (+        CurrencyCode(..), CurrencyCode(), CurrencyCode'UnrecognizedValue,+        CurrencyCodeValue(), InvoiceType(..), InvoiceType(),+        InvoiceType'UnrecognizedValue, LightningInvoice(), Request(),+        Request'LedgerTransferRequest(), Request'UserTransferRequest(),+        Request'UserTransferRequest'To(..),+        _Request'UserTransferRequest'MerchantIdTo,+        _Request'UserTransferRequest'Invoice, UDecimal(), UMoney(),+        UserRequest()+    ) where+import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+newtype CurrencyCode'UnrecognizedValue+  = CurrencyCode'UnrecognizedValue Data.Int.Int32+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)+data CurrencyCode+  = BTC |+    EUR |+    USD |+    ETH |+    CurrencyCode'Unrecognized !CurrencyCode'UnrecognizedValue+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance Data.ProtoLens.MessageEnum CurrencyCode where+  maybeToEnum 0 = Prelude.Just BTC+  maybeToEnum 1 = Prelude.Just EUR+  maybeToEnum 2 = Prelude.Just USD+  maybeToEnum 3 = Prelude.Just ETH+  maybeToEnum k+    = Prelude.Just+        (CurrencyCode'Unrecognized+           (CurrencyCode'UnrecognizedValue (Prelude.fromIntegral k)))+  showEnum BTC = "BTC"+  showEnum EUR = "EUR"+  showEnum USD = "USD"+  showEnum ETH = "ETH"+  showEnum+    (CurrencyCode'Unrecognized (CurrencyCode'UnrecognizedValue k))+    = Prelude.show k+  readEnum k+    | (Prelude.==) k "BTC" = Prelude.Just BTC+    | (Prelude.==) k "EUR" = Prelude.Just EUR+    | (Prelude.==) k "USD" = Prelude.Just USD+    | (Prelude.==) k "ETH" = Prelude.Just ETH+    | Prelude.otherwise+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum+instance Prelude.Bounded CurrencyCode where+  minBound = BTC+  maxBound = ETH+instance Prelude.Enum CurrencyCode where+  toEnum k__+    = Prelude.maybe+        (Prelude.error+           ((Prelude.++)+              "toEnum: unknown value for enum CurrencyCode: "+              (Prelude.show k__)))+        Prelude.id+        (Data.ProtoLens.maybeToEnum k__)+  fromEnum BTC = 0+  fromEnum EUR = 1+  fromEnum USD = 2+  fromEnum ETH = 3+  fromEnum+    (CurrencyCode'Unrecognized (CurrencyCode'UnrecognizedValue k))+    = Prelude.fromIntegral k+  succ ETH+    = Prelude.error+        "CurrencyCode.succ: bad argument ETH. This value would be out of bounds."+  succ BTC = EUR+  succ EUR = USD+  succ USD = ETH+  succ (CurrencyCode'Unrecognized _)+    = Prelude.error+        "CurrencyCode.succ: bad argument: unrecognized value"+  pred BTC+    = Prelude.error+        "CurrencyCode.pred: bad argument BTC. This value would be out of bounds."+  pred EUR = BTC+  pred USD = EUR+  pred ETH = USD+  pred (CurrencyCode'Unrecognized _)+    = Prelude.error+        "CurrencyCode.pred: bad argument: unrecognized value"+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo+instance Data.ProtoLens.FieldDefault CurrencyCode where+  fieldDefault = BTC+instance Control.DeepSeq.NFData CurrencyCode where+  rnf x__ = Prelude.seq x__ ()+{- | Fields :+     +         * 'Proto.Coins_Fields.value' @:: Lens' CurrencyCodeValue CurrencyCode@ -}+data CurrencyCodeValue+  = CurrencyCodeValue'_constructor {_CurrencyCodeValue'value :: !CurrencyCode,+                                    _CurrencyCodeValue'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show CurrencyCodeValue where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField CurrencyCodeValue "value" CurrencyCode where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _CurrencyCodeValue'value+           (\ x__ y__ -> x__ {_CurrencyCodeValue'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message CurrencyCodeValue where+  messageName _ = Data.Text.pack "Coins.CurrencyCodeValue"+  packedMessageDescriptor _+    = "\n\+      \\DC1CurrencyCodeValue\DC2)\n\+      \\ENQvalue\CAN\SOH \SOH(\SO2\DC3.Coins.CurrencyCodeR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::+                 Data.ProtoLens.FieldTypeDescriptor CurrencyCode)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor CurrencyCodeValue+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _CurrencyCodeValue'_unknownFields+        (\ x__ y__ -> x__ {_CurrencyCodeValue'_unknownFields = y__})+  defMessage+    = CurrencyCodeValue'_constructor+        {_CurrencyCodeValue'value = Data.ProtoLens.fieldDefault,+         _CurrencyCodeValue'_unknownFields = []}+  parseMessage+    = let+        loop ::+          CurrencyCodeValue+          -> Data.ProtoLens.Encoding.Bytes.Parser CurrencyCodeValue+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.toEnum+                                          (Prelude.fmap+                                             Prelude.fromIntegral+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "CurrencyCodeValue"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         ((Prelude..)+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)+                         Prelude.fromEnum+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData CurrencyCodeValue where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_CurrencyCodeValue'_unknownFields x__)+             (Control.DeepSeq.deepseq (_CurrencyCodeValue'value x__) ())+newtype InvoiceType'UnrecognizedValue+  = InvoiceType'UnrecognizedValue Data.Int.Int32+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)+data InvoiceType+  = REGULAR |+    HODL |+    InvoiceType'Unrecognized !InvoiceType'UnrecognizedValue+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance Data.ProtoLens.MessageEnum InvoiceType where+  maybeToEnum 0 = Prelude.Just REGULAR+  maybeToEnum 1 = Prelude.Just HODL+  maybeToEnum k+    = Prelude.Just+        (InvoiceType'Unrecognized+           (InvoiceType'UnrecognizedValue (Prelude.fromIntegral k)))+  showEnum REGULAR = "REGULAR"+  showEnum HODL = "HODL"+  showEnum+    (InvoiceType'Unrecognized (InvoiceType'UnrecognizedValue k))+    = Prelude.show k+  readEnum k+    | (Prelude.==) k "REGULAR" = Prelude.Just REGULAR+    | (Prelude.==) k "HODL" = Prelude.Just HODL+    | Prelude.otherwise+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum+instance Prelude.Bounded InvoiceType where+  minBound = REGULAR+  maxBound = HODL+instance Prelude.Enum InvoiceType where+  toEnum k__+    = Prelude.maybe+        (Prelude.error+           ((Prelude.++)+              "toEnum: unknown value for enum InvoiceType: " (Prelude.show k__)))+        Prelude.id+        (Data.ProtoLens.maybeToEnum k__)+  fromEnum REGULAR = 0+  fromEnum HODL = 1+  fromEnum+    (InvoiceType'Unrecognized (InvoiceType'UnrecognizedValue k))+    = Prelude.fromIntegral k+  succ HODL+    = Prelude.error+        "InvoiceType.succ: bad argument HODL. This value would be out of bounds."+  succ REGULAR = HODL+  succ (InvoiceType'Unrecognized _)+    = Prelude.error+        "InvoiceType.succ: bad argument: unrecognized value"+  pred REGULAR+    = Prelude.error+        "InvoiceType.pred: bad argument REGULAR. This value would be out of bounds."+  pred HODL = REGULAR+  pred (InvoiceType'Unrecognized _)+    = Prelude.error+        "InvoiceType.pred: bad argument: unrecognized value"+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo+instance Data.ProtoLens.FieldDefault InvoiceType where+  fieldDefault = REGULAR+instance Control.DeepSeq.NFData InvoiceType where+  rnf x__ = Prelude.seq x__ ()+{- | Fields :+     +         * 'Proto.Coins_Fields.rHash' @:: Lens' LightningInvoice Data.ByteString.ByteString@+         * 'Proto.Coins_Fields.paymentRequest' @:: Lens' LightningInvoice Data.Text.Text@+         * 'Proto.Coins_Fields.invoiceType' @:: Lens' LightningInvoice InvoiceType@ -}+data LightningInvoice+  = LightningInvoice'_constructor {_LightningInvoice'rHash :: !Data.ByteString.ByteString,+                                   _LightningInvoice'paymentRequest :: !Data.Text.Text,+                                   _LightningInvoice'invoiceType :: !InvoiceType,+                                   _LightningInvoice'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show LightningInvoice where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField LightningInvoice "rHash" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _LightningInvoice'rHash+           (\ x__ y__ -> x__ {_LightningInvoice'rHash = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField LightningInvoice "paymentRequest" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _LightningInvoice'paymentRequest+           (\ x__ y__ -> x__ {_LightningInvoice'paymentRequest = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField LightningInvoice "invoiceType" InvoiceType where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _LightningInvoice'invoiceType+           (\ x__ y__ -> x__ {_LightningInvoice'invoiceType = y__}))+        Prelude.id+instance Data.ProtoLens.Message LightningInvoice where+  messageName _ = Data.Text.pack "Coins.LightningInvoice"+  packedMessageDescriptor _+    = "\n\+      \\DLELightningInvoice\DC2\NAK\n\+      \\ACKr_hash\CAN\SOH \SOH(\fR\ENQrHash\DC2'\n\+      \\SIpayment_request\CAN\STX \SOH(\tR\SOpaymentRequest\DC25\n\+      \\finvoice_type\CAN\ETX \SOH(\SO2\DC2.Coins.InvoiceTypeR\vinvoiceType"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        rHash__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "r_hash"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"rHash")) ::+              Data.ProtoLens.FieldDescriptor LightningInvoice+        paymentRequest__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "payment_request"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"paymentRequest")) ::+              Data.ProtoLens.FieldDescriptor LightningInvoice+        invoiceType__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "invoice_type"+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::+                 Data.ProtoLens.FieldTypeDescriptor InvoiceType)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"invoiceType")) ::+              Data.ProtoLens.FieldDescriptor LightningInvoice+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, rHash__field_descriptor),+           (Data.ProtoLens.Tag 2, paymentRequest__field_descriptor),+           (Data.ProtoLens.Tag 3, invoiceType__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _LightningInvoice'_unknownFields+        (\ x__ y__ -> x__ {_LightningInvoice'_unknownFields = y__})+  defMessage+    = LightningInvoice'_constructor+        {_LightningInvoice'rHash = Data.ProtoLens.fieldDefault,+         _LightningInvoice'paymentRequest = Data.ProtoLens.fieldDefault,+         _LightningInvoice'invoiceType = Data.ProtoLens.fieldDefault,+         _LightningInvoice'_unknownFields = []}+  parseMessage+    = let+        loop ::+          LightningInvoice+          -> Data.ProtoLens.Encoding.Bytes.Parser LightningInvoice+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "r_hash"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"rHash") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                                       Data.ProtoLens.Encoding.Bytes.getBytes+                                                         (Prelude.fromIntegral len)+                                           Data.ProtoLens.Encoding.Bytes.runEither+                                             (case Data.Text.Encoding.decodeUtf8' value of+                                                (Prelude.Left err)+                                                  -> Prelude.Left (Prelude.show err)+                                                (Prelude.Right r) -> Prelude.Right r))+                                       "payment_request"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"paymentRequest") y x)+                        24+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.toEnum+                                          (Prelude.fmap+                                             Prelude.fromIntegral+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))+                                       "invoice_type"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"invoiceType") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "LightningInvoice"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rHash") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((\ bs+                          -> (Data.Monoid.<>)+                               (Data.ProtoLens.Encoding.Bytes.putVarInt+                                  (Prelude.fromIntegral (Data.ByteString.length bs)))+                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         _v))+             ((Data.Monoid.<>)+                (let+                   _v+                     = Lens.Family2.view+                         (Data.ProtoLens.Field.field @"paymentRequest") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((Prelude..)+                            (\ bs+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            Data.Text.Encoding.encodeUtf8+                            _v))+                ((Data.Monoid.<>)+                   (let+                      _v+                        = Lens.Family2.view (Data.ProtoLens.Field.field @"invoiceType") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)+                            ((Prelude..)+                               ((Prelude..)+                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)+                               Prelude.fromEnum+                               _v))+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))+instance Control.DeepSeq.NFData LightningInvoice where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_LightningInvoice'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_LightningInvoice'rHash x__)+                (Control.DeepSeq.deepseq+                   (_LightningInvoice'paymentRequest x__)+                   (Control.DeepSeq.deepseq (_LightningInvoice'invoiceType x__) ())))+{- | Fields :+     +         * 'Proto.Coins_Fields.ledgerTransferRequest' @:: Lens' Request Request'LedgerTransferRequest@+         * 'Proto.Coins_Fields.maybe'ledgerTransferRequest' @:: Lens' Request (Prelude.Maybe Request'LedgerTransferRequest)@+         * 'Proto.Coins_Fields.ledgerSignature' @:: Lens' Request Data.ByteString.ByteString@ -}+data Request+  = Request'_constructor {_Request'ledgerTransferRequest :: !(Prelude.Maybe Request'LedgerTransferRequest),+                          _Request'ledgerSignature :: !Data.ByteString.ByteString,+                          _Request'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Request where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Request "ledgerTransferRequest" Request'LedgerTransferRequest where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'ledgerTransferRequest+           (\ x__ y__ -> x__ {_Request'ledgerTransferRequest = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Request "maybe'ledgerTransferRequest" (Prelude.Maybe Request'LedgerTransferRequest) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'ledgerTransferRequest+           (\ x__ y__ -> x__ {_Request'ledgerTransferRequest = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Request "ledgerSignature" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'ledgerSignature+           (\ x__ y__ -> x__ {_Request'ledgerSignature = y__}))+        Prelude.id+instance Data.ProtoLens.Message Request where+  messageName _ = Data.Text.pack "Coins.Request"+  packedMessageDescriptor _+    = "\n\+      \\aRequest\DC2\\\n\+      \\ETBledger_transfer_request\CAN\SOH \SOH(\v2$.Coins.Request.LedgerTransferRequestR\NAKledgerTransferRequest\DC2)\n\+      \\DLEledger_signature\CAN\STX \SOH(\fR\SIledgerSignature\SUB\201\SOH\n\+      \\NAKLedgerTransferRequest\DC2V\n\+      \\NAKuser_transfer_request\CAN\SOH \SOH(\v2\".Coins.Request.UserTransferRequestR\DC3userTransferRequest\DC2%\n\+      \\SOuser_signature\CAN\STX \SOH(\fR\ruserSignature\DC21\n\+      \\ainvoice\CAN\ETX \SOH(\v2\ETB.Coins.LightningInvoiceR\ainvoice\SUB\175\SOH\n\+      \\DC3UserTransferRequest\DC25\n\+      \\fuser_request\CAN\SOH \SOH(\v2\DC2.Coins.UserRequestR\vuserRequest\DC2&\n\+      \\SOmerchant_id_to\CAN\STX \SOH(\EOTH\NULR\fmerchantIdTo\DC23\n\+      \\ainvoice\CAN\ETX \SOH(\v2\ETB.Coins.LightningInvoiceH\NULR\ainvoiceB\EOT\n\+      \\STXto"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        ledgerTransferRequest__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "ledger_transfer_request"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Request'LedgerTransferRequest)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'ledgerTransferRequest")) ::+              Data.ProtoLens.FieldDescriptor Request+        ledgerSignature__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "ledger_signature"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"ledgerSignature")) ::+              Data.ProtoLens.FieldDescriptor Request+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, ledgerTransferRequest__field_descriptor),+           (Data.ProtoLens.Tag 2, ledgerSignature__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Request'_unknownFields+        (\ x__ y__ -> x__ {_Request'_unknownFields = y__})+  defMessage+    = Request'_constructor+        {_Request'ledgerTransferRequest = Prelude.Nothing,+         _Request'ledgerSignature = Data.ProtoLens.fieldDefault,+         _Request'_unknownFields = []}+  parseMessage+    = let+        loop :: Request -> Data.ProtoLens.Encoding.Bytes.Parser Request+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "ledger_transfer_request"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"ledgerTransferRequest") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "ledger_signature"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"ledgerSignature") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Request"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (case+                  Lens.Family2.view+                    (Data.ProtoLens.Field.field @"maybe'ledgerTransferRequest") _x+              of+                Prelude.Nothing -> Data.Monoid.mempty+                (Prelude.Just _v)+                  -> (Data.Monoid.<>)+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                       ((Prelude..)+                          (\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                          Data.ProtoLens.encodeMessage+                          _v))+             ((Data.Monoid.<>)+                (let+                   _v+                     = Lens.Family2.view+                         (Data.ProtoLens.Field.field @"ledgerSignature") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            _v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData Request where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Request'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Request'ledgerTransferRequest x__)+                (Control.DeepSeq.deepseq (_Request'ledgerSignature x__) ()))+{- | Fields :+     +         * 'Proto.Coins_Fields.userTransferRequest' @:: Lens' Request'LedgerTransferRequest Request'UserTransferRequest@+         * 'Proto.Coins_Fields.maybe'userTransferRequest' @:: Lens' Request'LedgerTransferRequest (Prelude.Maybe Request'UserTransferRequest)@+         * 'Proto.Coins_Fields.userSignature' @:: Lens' Request'LedgerTransferRequest Data.ByteString.ByteString@+         * 'Proto.Coins_Fields.invoice' @:: Lens' Request'LedgerTransferRequest LightningInvoice@+         * 'Proto.Coins_Fields.maybe'invoice' @:: Lens' Request'LedgerTransferRequest (Prelude.Maybe LightningInvoice)@ -}+data Request'LedgerTransferRequest+  = Request'LedgerTransferRequest'_constructor {_Request'LedgerTransferRequest'userTransferRequest :: !(Prelude.Maybe Request'UserTransferRequest),+                                                _Request'LedgerTransferRequest'userSignature :: !Data.ByteString.ByteString,+                                                _Request'LedgerTransferRequest'invoice :: !(Prelude.Maybe LightningInvoice),+                                                _Request'LedgerTransferRequest'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Request'LedgerTransferRequest where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Request'LedgerTransferRequest "userTransferRequest" Request'UserTransferRequest where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'LedgerTransferRequest'userTransferRequest+           (\ x__ y__+              -> x__ {_Request'LedgerTransferRequest'userTransferRequest = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Request'LedgerTransferRequest "maybe'userTransferRequest" (Prelude.Maybe Request'UserTransferRequest) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'LedgerTransferRequest'userTransferRequest+           (\ x__ y__+              -> x__ {_Request'LedgerTransferRequest'userTransferRequest = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Request'LedgerTransferRequest "userSignature" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'LedgerTransferRequest'userSignature+           (\ x__ y__+              -> x__ {_Request'LedgerTransferRequest'userSignature = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Request'LedgerTransferRequest "invoice" LightningInvoice where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'LedgerTransferRequest'invoice+           (\ x__ y__ -> x__ {_Request'LedgerTransferRequest'invoice = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Request'LedgerTransferRequest "maybe'invoice" (Prelude.Maybe LightningInvoice) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'LedgerTransferRequest'invoice+           (\ x__ y__ -> x__ {_Request'LedgerTransferRequest'invoice = y__}))+        Prelude.id+instance Data.ProtoLens.Message Request'LedgerTransferRequest where+  messageName _+    = Data.Text.pack "Coins.Request.LedgerTransferRequest"+  packedMessageDescriptor _+    = "\n\+      \\NAKLedgerTransferRequest\DC2V\n\+      \\NAKuser_transfer_request\CAN\SOH \SOH(\v2\".Coins.Request.UserTransferRequestR\DC3userTransferRequest\DC2%\n\+      \\SOuser_signature\CAN\STX \SOH(\fR\ruserSignature\DC21\n\+      \\ainvoice\CAN\ETX \SOH(\v2\ETB.Coins.LightningInvoiceR\ainvoice"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        userTransferRequest__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "user_transfer_request"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Request'UserTransferRequest)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'userTransferRequest")) ::+              Data.ProtoLens.FieldDescriptor Request'LedgerTransferRequest+        userSignature__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "user_signature"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"userSignature")) ::+              Data.ProtoLens.FieldDescriptor Request'LedgerTransferRequest+        invoice__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "invoice"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor LightningInvoice)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'invoice")) ::+              Data.ProtoLens.FieldDescriptor Request'LedgerTransferRequest+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, userTransferRequest__field_descriptor),+           (Data.ProtoLens.Tag 2, userSignature__field_descriptor),+           (Data.ProtoLens.Tag 3, invoice__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Request'LedgerTransferRequest'_unknownFields+        (\ x__ y__+           -> x__ {_Request'LedgerTransferRequest'_unknownFields = y__})+  defMessage+    = Request'LedgerTransferRequest'_constructor+        {_Request'LedgerTransferRequest'userTransferRequest = Prelude.Nothing,+         _Request'LedgerTransferRequest'userSignature = Data.ProtoLens.fieldDefault,+         _Request'LedgerTransferRequest'invoice = Prelude.Nothing,+         _Request'LedgerTransferRequest'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Request'LedgerTransferRequest+          -> Data.ProtoLens.Encoding.Bytes.Parser Request'LedgerTransferRequest+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "user_transfer_request"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"userTransferRequest") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "user_signature"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"userSignature") y x)+                        26+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "invoice"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"invoice") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "LedgerTransferRequest"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (case+                  Lens.Family2.view+                    (Data.ProtoLens.Field.field @"maybe'userTransferRequest") _x+              of+                Prelude.Nothing -> Data.Monoid.mempty+                (Prelude.Just _v)+                  -> (Data.Monoid.<>)+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                       ((Prelude..)+                          (\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                          Data.ProtoLens.encodeMessage+                          _v))+             ((Data.Monoid.<>)+                (let+                   _v+                     = Lens.Family2.view+                         (Data.ProtoLens.Field.field @"userSignature") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            _v))+                ((Data.Monoid.<>)+                   (case+                        Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'invoice") _x+                    of+                      Prelude.Nothing -> Data.Monoid.mempty+                      (Prelude.Just _v)+                        -> (Data.Monoid.<>)+                             (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                             ((Prelude..)+                                (\ bs+                                   -> (Data.Monoid.<>)+                                        (Data.ProtoLens.Encoding.Bytes.putVarInt+                                           (Prelude.fromIntegral (Data.ByteString.length bs)))+                                        (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                Data.ProtoLens.encodeMessage+                                _v))+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))+instance Control.DeepSeq.NFData Request'LedgerTransferRequest where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Request'LedgerTransferRequest'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Request'LedgerTransferRequest'userTransferRequest x__)+                (Control.DeepSeq.deepseq+                   (_Request'LedgerTransferRequest'userSignature x__)+                   (Control.DeepSeq.deepseq+                      (_Request'LedgerTransferRequest'invoice x__) ())))+{- | Fields :+     +         * 'Proto.Coins_Fields.userRequest' @:: Lens' Request'UserTransferRequest UserRequest@+         * 'Proto.Coins_Fields.maybe'userRequest' @:: Lens' Request'UserTransferRequest (Prelude.Maybe UserRequest)@+         * 'Proto.Coins_Fields.maybe'to' @:: Lens' Request'UserTransferRequest (Prelude.Maybe Request'UserTransferRequest'To)@+         * 'Proto.Coins_Fields.maybe'merchantIdTo' @:: Lens' Request'UserTransferRequest (Prelude.Maybe Data.Word.Word64)@+         * 'Proto.Coins_Fields.merchantIdTo' @:: Lens' Request'UserTransferRequest Data.Word.Word64@+         * 'Proto.Coins_Fields.maybe'invoice' @:: Lens' Request'UserTransferRequest (Prelude.Maybe LightningInvoice)@+         * 'Proto.Coins_Fields.invoice' @:: Lens' Request'UserTransferRequest LightningInvoice@ -}+data Request'UserTransferRequest+  = Request'UserTransferRequest'_constructor {_Request'UserTransferRequest'userRequest :: !(Prelude.Maybe UserRequest),+                                              _Request'UserTransferRequest'to :: !(Prelude.Maybe Request'UserTransferRequest'To),+                                              _Request'UserTransferRequest'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Request'UserTransferRequest where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+data Request'UserTransferRequest'To+  = Request'UserTransferRequest'MerchantIdTo !Data.Word.Word64 |+    Request'UserTransferRequest'Invoice !LightningInvoice+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance Data.ProtoLens.Field.HasField Request'UserTransferRequest "userRequest" UserRequest where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'UserTransferRequest'userRequest+           (\ x__ y__+              -> x__ {_Request'UserTransferRequest'userRequest = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Request'UserTransferRequest "maybe'userRequest" (Prelude.Maybe UserRequest) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'UserTransferRequest'userRequest+           (\ x__ y__+              -> x__ {_Request'UserTransferRequest'userRequest = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Request'UserTransferRequest "maybe'to" (Prelude.Maybe Request'UserTransferRequest'To) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'UserTransferRequest'to+           (\ x__ y__ -> x__ {_Request'UserTransferRequest'to = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Request'UserTransferRequest "maybe'merchantIdTo" (Prelude.Maybe Data.Word.Word64) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'UserTransferRequest'to+           (\ x__ y__ -> x__ {_Request'UserTransferRequest'to = y__}))+        (Lens.Family2.Unchecked.lens+           (\ x__+              -> case x__ of+                   (Prelude.Just (Request'UserTransferRequest'MerchantIdTo x__val))+                     -> Prelude.Just x__val+                   _otherwise -> Prelude.Nothing)+           (\ _ y__+              -> Prelude.fmap Request'UserTransferRequest'MerchantIdTo y__))+instance Data.ProtoLens.Field.HasField Request'UserTransferRequest "merchantIdTo" Data.Word.Word64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'UserTransferRequest'to+           (\ x__ y__ -> x__ {_Request'UserTransferRequest'to = y__}))+        ((Prelude..)+           (Lens.Family2.Unchecked.lens+              (\ x__+                 -> case x__ of+                      (Prelude.Just (Request'UserTransferRequest'MerchantIdTo x__val))+                        -> Prelude.Just x__val+                      _otherwise -> Prelude.Nothing)+              (\ _ y__+                 -> Prelude.fmap Request'UserTransferRequest'MerchantIdTo y__))+           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))+instance Data.ProtoLens.Field.HasField Request'UserTransferRequest "maybe'invoice" (Prelude.Maybe LightningInvoice) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'UserTransferRequest'to+           (\ x__ y__ -> x__ {_Request'UserTransferRequest'to = y__}))+        (Lens.Family2.Unchecked.lens+           (\ x__+              -> case x__ of+                   (Prelude.Just (Request'UserTransferRequest'Invoice x__val))+                     -> Prelude.Just x__val+                   _otherwise -> Prelude.Nothing)+           (\ _ y__ -> Prelude.fmap Request'UserTransferRequest'Invoice y__))+instance Data.ProtoLens.Field.HasField Request'UserTransferRequest "invoice" LightningInvoice where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Request'UserTransferRequest'to+           (\ x__ y__ -> x__ {_Request'UserTransferRequest'to = y__}))+        ((Prelude..)+           (Lens.Family2.Unchecked.lens+              (\ x__+                 -> case x__ of+                      (Prelude.Just (Request'UserTransferRequest'Invoice x__val))+                        -> Prelude.Just x__val+                      _otherwise -> Prelude.Nothing)+              (\ _ y__ -> Prelude.fmap Request'UserTransferRequest'Invoice y__))+           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))+instance Data.ProtoLens.Message Request'UserTransferRequest where+  messageName _ = Data.Text.pack "Coins.Request.UserTransferRequest"+  packedMessageDescriptor _+    = "\n\+      \\DC3UserTransferRequest\DC25\n\+      \\fuser_request\CAN\SOH \SOH(\v2\DC2.Coins.UserRequestR\vuserRequest\DC2&\n\+      \\SOmerchant_id_to\CAN\STX \SOH(\EOTH\NULR\fmerchantIdTo\DC23\n\+      \\ainvoice\CAN\ETX \SOH(\v2\ETB.Coins.LightningInvoiceH\NULR\ainvoiceB\EOT\n\+      \\STXto"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        userRequest__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "user_request"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor UserRequest)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'userRequest")) ::+              Data.ProtoLens.FieldDescriptor Request'UserTransferRequest+        merchantIdTo__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "merchant_id_to"+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'merchantIdTo")) ::+              Data.ProtoLens.FieldDescriptor Request'UserTransferRequest+        invoice__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "invoice"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor LightningInvoice)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'invoice")) ::+              Data.ProtoLens.FieldDescriptor Request'UserTransferRequest+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, userRequest__field_descriptor),+           (Data.ProtoLens.Tag 2, merchantIdTo__field_descriptor),+           (Data.ProtoLens.Tag 3, invoice__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Request'UserTransferRequest'_unknownFields+        (\ x__ y__+           -> x__ {_Request'UserTransferRequest'_unknownFields = y__})+  defMessage+    = Request'UserTransferRequest'_constructor+        {_Request'UserTransferRequest'userRequest = Prelude.Nothing,+         _Request'UserTransferRequest'to = Prelude.Nothing,+         _Request'UserTransferRequest'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Request'UserTransferRequest+          -> Data.ProtoLens.Encoding.Bytes.Parser Request'UserTransferRequest+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "user_request"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"userRequest") y x)+                        16+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "merchant_id_to"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"merchantIdTo") y x)+                        26+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "invoice"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"invoice") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "UserTransferRequest"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (case+                  Lens.Family2.view+                    (Data.ProtoLens.Field.field @"maybe'userRequest") _x+              of+                Prelude.Nothing -> Data.Monoid.mempty+                (Prelude.Just _v)+                  -> (Data.Monoid.<>)+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                       ((Prelude..)+                          (\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                          Data.ProtoLens.encodeMessage+                          _v))+             ((Data.Monoid.<>)+                (case+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'to") _x+                 of+                   Prelude.Nothing -> Data.Monoid.mempty+                   (Prelude.Just (Request'UserTransferRequest'MerchantIdTo v))+                     -> (Data.Monoid.<>)+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 16)+                          (Data.ProtoLens.Encoding.Bytes.putVarInt v)+                   (Prelude.Just (Request'UserTransferRequest'Invoice v))+                     -> (Data.Monoid.<>)+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                          ((Prelude..)+                             (\ bs+                                -> (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                             Data.ProtoLens.encodeMessage+                             v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData Request'UserTransferRequest where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Request'UserTransferRequest'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Request'UserTransferRequest'userRequest x__)+                (Control.DeepSeq.deepseq (_Request'UserTransferRequest'to x__) ()))+instance Control.DeepSeq.NFData Request'UserTransferRequest'To where+  rnf (Request'UserTransferRequest'MerchantIdTo x__)+    = Control.DeepSeq.rnf x__+  rnf (Request'UserTransferRequest'Invoice x__)+    = Control.DeepSeq.rnf x__+_Request'UserTransferRequest'MerchantIdTo ::+  Data.ProtoLens.Prism.Prism' Request'UserTransferRequest'To Data.Word.Word64+_Request'UserTransferRequest'MerchantIdTo+  = Data.ProtoLens.Prism.prism'+      Request'UserTransferRequest'MerchantIdTo+      (\ p__+         -> case p__ of+              (Request'UserTransferRequest'MerchantIdTo p__val)+                -> Prelude.Just p__val+              _otherwise -> Prelude.Nothing)+_Request'UserTransferRequest'Invoice ::+  Data.ProtoLens.Prism.Prism' Request'UserTransferRequest'To LightningInvoice+_Request'UserTransferRequest'Invoice+  = Data.ProtoLens.Prism.prism'+      Request'UserTransferRequest'Invoice+      (\ p__+         -> case p__ of+              (Request'UserTransferRequest'Invoice p__val) -> Prelude.Just p__val+              _otherwise -> Prelude.Nothing)+{- | Fields :+     +         * 'Proto.Coins_Fields.coef' @:: Lens' UDecimal Data.Word.Word64@+         * 'Proto.Coins_Fields.exp' @:: Lens' UDecimal Data.Int.Int32@ -}+data UDecimal+  = UDecimal'_constructor {_UDecimal'coef :: !Data.Word.Word64,+                           _UDecimal'exp :: !Data.Int.Int32,+                           _UDecimal'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show UDecimal where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField UDecimal "coef" Data.Word.Word64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UDecimal'coef (\ x__ y__ -> x__ {_UDecimal'coef = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField UDecimal "exp" Data.Int.Int32 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UDecimal'exp (\ x__ y__ -> x__ {_UDecimal'exp = y__}))+        Prelude.id+instance Data.ProtoLens.Message UDecimal where+  messageName _ = Data.Text.pack "Coins.UDecimal"+  packedMessageDescriptor _+    = "\n\+      \\bUDecimal\DC2\DC2\n\+      \\EOTcoef\CAN\SOH \SOH(\EOTR\EOTcoef\DC2\DLE\n\+      \\ETXexp\CAN\STX \SOH(\ENQR\ETXexp"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        coef__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "coef"+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"coef")) ::+              Data.ProtoLens.FieldDescriptor UDecimal+        exp__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "exp"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"exp")) ::+              Data.ProtoLens.FieldDescriptor UDecimal+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, coef__field_descriptor),+           (Data.ProtoLens.Tag 2, exp__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _UDecimal'_unknownFields+        (\ x__ y__ -> x__ {_UDecimal'_unknownFields = y__})+  defMessage+    = UDecimal'_constructor+        {_UDecimal'coef = Data.ProtoLens.fieldDefault,+         _UDecimal'exp = Data.ProtoLens.fieldDefault,+         _UDecimal'_unknownFields = []}+  parseMessage+    = let+        loop :: UDecimal -> Data.ProtoLens.Encoding.Bytes.Parser UDecimal+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "coef"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"coef") y x)+                        16+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "exp"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"exp") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "UDecimal"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"coef") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))+             ((Data.Monoid.<>)+                (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"exp") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)+                         ((Prelude..)+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData UDecimal where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_UDecimal'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_UDecimal'coef x__)+                (Control.DeepSeq.deepseq (_UDecimal'exp x__) ()))+{- | Fields :+     +         * 'Proto.Coins_Fields.amount' @:: Lens' UMoney UDecimal@+         * 'Proto.Coins_Fields.maybe'amount' @:: Lens' UMoney (Prelude.Maybe UDecimal)@+         * 'Proto.Coins_Fields.currencyCode' @:: Lens' UMoney CurrencyCodeValue@+         * 'Proto.Coins_Fields.maybe'currencyCode' @:: Lens' UMoney (Prelude.Maybe CurrencyCodeValue)@ -}+data UMoney+  = UMoney'_constructor {_UMoney'amount :: !(Prelude.Maybe UDecimal),+                         _UMoney'currencyCode :: !(Prelude.Maybe CurrencyCodeValue),+                         _UMoney'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show UMoney where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField UMoney "amount" UDecimal where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UMoney'amount (\ x__ y__ -> x__ {_UMoney'amount = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField UMoney "maybe'amount" (Prelude.Maybe UDecimal) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UMoney'amount (\ x__ y__ -> x__ {_UMoney'amount = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField UMoney "currencyCode" CurrencyCodeValue where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UMoney'currencyCode+           (\ x__ y__ -> x__ {_UMoney'currencyCode = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField UMoney "maybe'currencyCode" (Prelude.Maybe CurrencyCodeValue) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UMoney'currencyCode+           (\ x__ y__ -> x__ {_UMoney'currencyCode = y__}))+        Prelude.id+instance Data.ProtoLens.Message UMoney where+  messageName _ = Data.Text.pack "Coins.UMoney"+  packedMessageDescriptor _+    = "\n\+      \\ACKUMoney\DC2'\n\+      \\ACKamount\CAN\SOH \SOH(\v2\SI.Coins.UDecimalR\ACKamount\DC2=\n\+      \\rcurrency_code\CAN\STX \SOH(\v2\CAN.Coins.CurrencyCodeValueR\fcurrencyCode"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        amount__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "amount"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor UDecimal)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'amount")) ::+              Data.ProtoLens.FieldDescriptor UMoney+        currencyCode__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "currency_code"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor CurrencyCodeValue)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'currencyCode")) ::+              Data.ProtoLens.FieldDescriptor UMoney+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, amount__field_descriptor),+           (Data.ProtoLens.Tag 2, currencyCode__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _UMoney'_unknownFields+        (\ x__ y__ -> x__ {_UMoney'_unknownFields = y__})+  defMessage+    = UMoney'_constructor+        {_UMoney'amount = Prelude.Nothing,+         _UMoney'currencyCode = Prelude.Nothing,+         _UMoney'_unknownFields = []}+  parseMessage+    = let+        loop :: UMoney -> Data.ProtoLens.Encoding.Bytes.Parser UMoney+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "amount"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"amount") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "currency_code"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"currencyCode") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "UMoney"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (case+                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'amount") _x+              of+                Prelude.Nothing -> Data.Monoid.mempty+                (Prelude.Just _v)+                  -> (Data.Monoid.<>)+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                       ((Prelude..)+                          (\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                          Data.ProtoLens.encodeMessage+                          _v))+             ((Data.Monoid.<>)+                (case+                     Lens.Family2.view+                       (Data.ProtoLens.Field.field @"maybe'currencyCode") _x+                 of+                   Prelude.Nothing -> Data.Monoid.mempty+                   (Prelude.Just _v)+                     -> (Data.Monoid.<>)+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                          ((Prelude..)+                             (\ bs+                                -> (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                             Data.ProtoLens.encodeMessage+                             _v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData UMoney where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_UMoney'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_UMoney'amount x__)+                (Control.DeepSeq.deepseq (_UMoney'currencyCode x__) ()))+{- | Fields :+     +         * 'Proto.Coins_Fields.pubKeyUidFrom' @:: Lens' UserRequest Data.ByteString.ByteString@+         * 'Proto.Coins_Fields.amount' @:: Lens' UserRequest UMoney@+         * 'Proto.Coins_Fields.maybe'amount' @:: Lens' UserRequest (Prelude.Maybe UMoney)@+         * 'Proto.Coins_Fields.requestId' @:: Lens' UserRequest Data.ByteString.ByteString@ -}+data UserRequest+  = UserRequest'_constructor {_UserRequest'pubKeyUidFrom :: !Data.ByteString.ByteString,+                              _UserRequest'amount :: !(Prelude.Maybe UMoney),+                              _UserRequest'requestId :: !Data.ByteString.ByteString,+                              _UserRequest'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show UserRequest where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField UserRequest "pubKeyUidFrom" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UserRequest'pubKeyUidFrom+           (\ x__ y__ -> x__ {_UserRequest'pubKeyUidFrom = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField UserRequest "amount" UMoney where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UserRequest'amount (\ x__ y__ -> x__ {_UserRequest'amount = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField UserRequest "maybe'amount" (Prelude.Maybe UMoney) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UserRequest'amount (\ x__ y__ -> x__ {_UserRequest'amount = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField UserRequest "requestId" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UserRequest'requestId+           (\ x__ y__ -> x__ {_UserRequest'requestId = y__}))+        Prelude.id+instance Data.ProtoLens.Message UserRequest where+  messageName _ = Data.Text.pack "Coins.UserRequest"+  packedMessageDescriptor _+    = "\n\+      \\vUserRequest\DC2'\n\+      \\DLEpub_key_uid_from\CAN\SOH \SOH(\fR\rpubKeyUidFrom\DC2%\n\+      \\ACKamount\CAN\STX \SOH(\v2\r.Coins.UMoneyR\ACKamount\DC2\GS\n\+      \\n\+      \request_id\CAN\ETX \SOH(\fR\trequestId"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        pubKeyUidFrom__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "pub_key_uid_from"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"pubKeyUidFrom")) ::+              Data.ProtoLens.FieldDescriptor UserRequest+        amount__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "amount"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor UMoney)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'amount")) ::+              Data.ProtoLens.FieldDescriptor UserRequest+        requestId__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "request_id"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"requestId")) ::+              Data.ProtoLens.FieldDescriptor UserRequest+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, pubKeyUidFrom__field_descriptor),+           (Data.ProtoLens.Tag 2, amount__field_descriptor),+           (Data.ProtoLens.Tag 3, requestId__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _UserRequest'_unknownFields+        (\ x__ y__ -> x__ {_UserRequest'_unknownFields = y__})+  defMessage+    = UserRequest'_constructor+        {_UserRequest'pubKeyUidFrom = Data.ProtoLens.fieldDefault,+         _UserRequest'amount = Prelude.Nothing,+         _UserRequest'requestId = Data.ProtoLens.fieldDefault,+         _UserRequest'_unknownFields = []}+  parseMessage+    = let+        loop ::+          UserRequest -> Data.ProtoLens.Encoding.Bytes.Parser UserRequest+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "pub_key_uid_from"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"pubKeyUidFrom") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "amount"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"amount") y x)+                        26+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "request_id"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"requestId") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "UserRequest"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v+                  = Lens.Family2.view+                      (Data.ProtoLens.Field.field @"pubKeyUidFrom") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((\ bs+                          -> (Data.Monoid.<>)+                               (Data.ProtoLens.Encoding.Bytes.putVarInt+                                  (Prelude.fromIntegral (Data.ByteString.length bs)))+                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         _v))+             ((Data.Monoid.<>)+                (case+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'amount") _x+                 of+                   Prelude.Nothing -> Data.Monoid.mempty+                   (Prelude.Just _v)+                     -> (Data.Monoid.<>)+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                          ((Prelude..)+                             (\ bs+                                -> (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                             Data.ProtoLens.encodeMessage+                             _v))+                ((Data.Monoid.<>)+                   (let+                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"requestId") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                            ((\ bs+                                -> (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                               _v))+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))+instance Control.DeepSeq.NFData UserRequest where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_UserRequest'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_UserRequest'pubKeyUidFrom x__)+                (Control.DeepSeq.deepseq+                   (_UserRequest'amount x__)+                   (Control.DeepSeq.deepseq (_UserRequest'requestId x__) ())))+packedFileDescriptor :: Data.ByteString.ByteString+packedFileDescriptor+  = "\n\+    \\vcoins.proto\DC2\ENQCoins\"\144\EOT\n\+    \\aRequest\DC2\\\n\+    \\ETBledger_transfer_request\CAN\SOH \SOH(\v2$.Coins.Request.LedgerTransferRequestR\NAKledgerTransferRequest\DC2)\n\+    \\DLEledger_signature\CAN\STX \SOH(\fR\SIledgerSignature\SUB\201\SOH\n\+    \\NAKLedgerTransferRequest\DC2V\n\+    \\NAKuser_transfer_request\CAN\SOH \SOH(\v2\".Coins.Request.UserTransferRequestR\DC3userTransferRequest\DC2%\n\+    \\SOuser_signature\CAN\STX \SOH(\fR\ruserSignature\DC21\n\+    \\ainvoice\CAN\ETX \SOH(\v2\ETB.Coins.LightningInvoiceR\ainvoice\SUB\175\SOH\n\+    \\DC3UserTransferRequest\DC25\n\+    \\fuser_request\CAN\SOH \SOH(\v2\DC2.Coins.UserRequestR\vuserRequest\DC2&\n\+    \\SOmerchant_id_to\CAN\STX \SOH(\EOTH\NULR\fmerchantIdTo\DC23\n\+    \\ainvoice\CAN\ETX \SOH(\v2\ETB.Coins.LightningInvoiceH\NULR\ainvoiceB\EOT\n\+    \\STXto\"\137\SOH\n\+    \\DLELightningInvoice\DC2\NAK\n\+    \\ACKr_hash\CAN\SOH \SOH(\fR\ENQrHash\DC2'\n\+    \\SIpayment_request\CAN\STX \SOH(\tR\SOpaymentRequest\DC25\n\+    \\finvoice_type\CAN\ETX \SOH(\SO2\DC2.Coins.InvoiceTypeR\vinvoiceType\"|\n\+    \\vUserRequest\DC2'\n\+    \\DLEpub_key_uid_from\CAN\SOH \SOH(\fR\rpubKeyUidFrom\DC2%\n\+    \\ACKamount\CAN\STX \SOH(\v2\r.Coins.UMoneyR\ACKamount\DC2\GS\n\+    \\n\+    \request_id\CAN\ETX \SOH(\fR\trequestId\"p\n\+    \\ACKUMoney\DC2'\n\+    \\ACKamount\CAN\SOH \SOH(\v2\SI.Coins.UDecimalR\ACKamount\DC2=\n\+    \\rcurrency_code\CAN\STX \SOH(\v2\CAN.Coins.CurrencyCodeValueR\fcurrencyCode\"0\n\+    \\bUDecimal\DC2\DC2\n\+    \\EOTcoef\CAN\SOH \SOH(\EOTR\EOTcoef\DC2\DLE\n\+    \\ETXexp\CAN\STX \SOH(\ENQR\ETXexp\">\n\+    \\DC1CurrencyCodeValue\DC2)\n\+    \\ENQvalue\CAN\SOH \SOH(\SO2\DC3.Coins.CurrencyCodeR\ENQvalue*$\n\+    \\vInvoiceType\DC2\v\n\+    \\aREGULAR\DLE\NUL\DC2\b\n\+    \\EOTHODL\DLE\SOH*2\n\+    \\fCurrencyCode\DC2\a\n\+    \\ETXBTC\DLE\NUL\DC2\a\n\+    \\ETXEUR\DLE\SOH\DC2\a\n\+    \\ETXUSD\DLE\STX\DC2\a\n\+    \\ETXETH\DLE\ETXJ\218\SI\n\+    \\ACK\DC2\EOT\NUL\NUL<\SOH\n\+    \\b\n\+    \\SOH\f\DC2\ETX\NUL\NUL\DLE\n\+    \\b\n\+    \\SOH\STX\DC2\ETX\SOH\NUL\SO\n\+    \\n\+    \\n\+    \\STX\EOT\NUL\DC2\EOT\ETX\NUL\SYN\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\NUL\SOH\DC2\ETX\ETX\b\SI\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\EOT\STX4\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\NUL\EOT\DC2\EOT\EOT\STX\ETX\DC1\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ACK\DC2\ETX\EOT\STX\ETB\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\EOT\CAN/\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\EOT23\n\+    \>\n\+    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\ACK\STX\GS\SUB1 signature of serialized ledger_transfer_request\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\SOH\EOT\DC2\EOT\ACK\STX\EOT4\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\ACK\STX\a\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\ACK\b\CAN\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\ACK\ESC\FS\n\+    \\f\n\+    \\EOT\EOT\NUL\ETX\NUL\DC2\EOT\b\STX\r\ETX\n\+    \\f\n\+    \\ENQ\EOT\NUL\ETX\NUL\SOH\DC2\ETX\b\n\+    \\US\n\+    \\r\n\+    \\ACK\EOT\NUL\ETX\NUL\STX\NUL\DC2\ETX\t\EOT2\n\+    \\SI\n\+    \\a\EOT\NUL\ETX\NUL\STX\NUL\EOT\DC2\EOT\t\EOT\b!\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\NUL\ACK\DC2\ETX\t\EOT\ETB\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\NUL\SOH\DC2\ETX\t\CAN-\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\NUL\ETX\DC2\ETX\t01\n\+    \>\n\+    \\ACK\EOT\NUL\ETX\NUL\STX\SOH\DC2\ETX\v\EOT\GS\SUB/ signature of serialized user_transfer_request\n\+    \\n\+    \\SI\n\+    \\a\EOT\NUL\ETX\NUL\STX\SOH\EOT\DC2\EOT\v\EOT\t2\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\SOH\ENQ\DC2\ETX\v\EOT\t\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\SOH\SOH\DC2\ETX\v\n\+    \\CAN\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\SOH\ETX\DC2\ETX\v\ESC\FS\n\+    \\r\n\+    \\ACK\EOT\NUL\ETX\NUL\STX\STX\DC2\ETX\f\EOT!\n\+    \\SI\n\+    \\a\EOT\NUL\ETX\NUL\STX\STX\EOT\DC2\EOT\f\EOT\v\GS\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\STX\ACK\DC2\ETX\f\EOT\DC4\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\STX\SOH\DC2\ETX\f\NAK\FS\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\STX\ETX\DC2\ETX\f\US \n\+    \\f\n\+    \\EOT\EOT\NUL\ETX\SOH\DC2\EOT\SI\STX\NAK\ETX\n\+    \\f\n\+    \\ENQ\EOT\NUL\ETX\SOH\SOH\DC2\ETX\SI\n\+    \\GS\n\+    \\r\n\+    \\ACK\EOT\NUL\ETX\SOH\STX\NUL\DC2\ETX\DLE\EOT!\n\+    \\SI\n\+    \\a\EOT\NUL\ETX\SOH\STX\NUL\EOT\DC2\EOT\DLE\EOT\SI\US\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\STX\NUL\ACK\DC2\ETX\DLE\EOT\SI\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\STX\NUL\SOH\DC2\ETX\DLE\DLE\FS\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\STX\NUL\ETX\DC2\ETX\DLE\US \n\+    \\SO\n\+    \\ACK\EOT\NUL\ETX\SOH\b\NUL\DC2\EOT\DC1\EOT\DC4\ENQ\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\b\NUL\SOH\DC2\ETX\DC1\n\+    \\f\n\+    \\r\n\+    \\ACK\EOT\NUL\ETX\SOH\STX\SOH\DC2\ETX\DC2\ACK \n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\STX\SOH\ENQ\DC2\ETX\DC2\ACK\f\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\STX\SOH\SOH\DC2\ETX\DC2\r\ESC\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\STX\SOH\ETX\DC2\ETX\DC2\RS\US\n\+    \\r\n\+    \\ACK\EOT\NUL\ETX\SOH\STX\STX\DC2\ETX\DC3\ACK#\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\STX\STX\ACK\DC2\ETX\DC3\ACK\SYN\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\STX\STX\SOH\DC2\ETX\DC3\ETB\RS\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\SOH\STX\STX\ETX\DC2\ETX\DC3!\"\n\+    \\n\+    \\n\+    \\STX\EOT\SOH\DC2\EOT\CAN\NUL\FS\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\SOH\SOH\DC2\ETX\CAN\b\CAN\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\EM\STX\DC3\n\+    \\r\n\+    \\ENQ\EOT\SOH\STX\NUL\EOT\DC2\EOT\EM\STX\CAN\SUB\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETX\EM\STX\a\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\EM\b\SO\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\EM\DC1\DC2\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\SOH\DC2\ETX\SUB\STX\GS\n\+    \\r\n\+    \\ENQ\EOT\SOH\STX\SOH\EOT\DC2\EOT\SUB\STX\EM\DC3\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\ENQ\DC2\ETX\SUB\STX\b\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX\SUB\t\CAN\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX\SUB\ESC\FS\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\STX\DC2\ETX\ESC\STX\US\n\+    \\r\n\+    \\ENQ\EOT\SOH\STX\STX\EOT\DC2\EOT\ESC\STX\SUB\GS\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\ACK\DC2\ETX\ESC\STX\r\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\SOH\DC2\ETX\ESC\SO\SUB\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\ETX\DC2\ETX\ESC\GS\RS\n\+    \\n\+    \\n\+    \\STX\EOT\STX\DC2\EOT\RS\NUL\"\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\STX\SOH\DC2\ETX\RS\b\DC3\n\+    \\v\n\+    \\EOT\EOT\STX\STX\NUL\DC2\ETX\US\STX\GS\n\+    \\r\n\+    \\ENQ\EOT\STX\STX\NUL\EOT\DC2\EOT\US\STX\RS\NAK\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETX\US\STX\a\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX\US\b\CAN\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX\US\ESC\FS\n\+    \\v\n\+    \\EOT\EOT\STX\STX\SOH\DC2\ETX \STX\DC4\n\+    \\r\n\+    \\ENQ\EOT\STX\STX\SOH\EOT\DC2\EOT \STX\US\GS\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\SOH\ACK\DC2\ETX \STX\b\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\SOH\SOH\DC2\ETX \t\SI\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\SOH\ETX\DC2\ETX \DC2\DC3\n\+    \\v\n\+    \\EOT\EOT\STX\STX\STX\DC2\ETX!\STX\ETB\n\+    \\r\n\+    \\ENQ\EOT\STX\STX\STX\EOT\DC2\EOT!\STX \DC4\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\STX\ENQ\DC2\ETX!\STX\a\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\STX\SOH\DC2\ETX!\b\DC2\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\STX\ETX\DC2\ETX!\NAK\SYN\n\+    \\n\+    \\n\+    \\STX\ENQ\NUL\DC2\EOT$\NUL'\SOH\n\+    \\n\+    \\n\+    \\ETX\ENQ\NUL\SOH\DC2\ETX$\ENQ\DLE\n\+    \\v\n\+    \\EOT\ENQ\NUL\STX\NUL\DC2\ETX%\STX\SO\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\NUL\SOH\DC2\ETX%\STX\t\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\NUL\STX\DC2\ETX%\f\r\n\+    \\v\n\+    \\EOT\ENQ\NUL\STX\SOH\DC2\ETX&\STX\v\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\SOH\SOH\DC2\ETX&\STX\ACK\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\SOH\STX\DC2\ETX&\t\n\+    \\n\+    \\n\+    \\n\+    \\STX\EOT\ETX\DC2\EOT)\NUL,\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\ETX\SOH\DC2\ETX)\b\SO\n\+    \\v\n\+    \\EOT\EOT\ETX\STX\NUL\DC2\ETX*\STX\SYN\n\+    \\r\n\+    \\ENQ\EOT\ETX\STX\NUL\EOT\DC2\EOT*\STX)\DLE\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\NUL\ACK\DC2\ETX*\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETX*\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETX*\DC4\NAK\n\+    \\v\n\+    \\EOT\EOT\ETX\STX\SOH\DC2\ETX+\STX&\n\+    \\r\n\+    \\ENQ\EOT\ETX\STX\SOH\EOT\DC2\EOT+\STX*\SYN\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\SOH\ACK\DC2\ETX+\STX\DC3\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\SOH\SOH\DC2\ETX+\DC4!\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\SOH\ETX\DC2\ETX+$%\n\+    \\n\+    \\n\+    \\STX\EOT\EOT\DC2\EOT.\NUL1\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\EOT\SOH\DC2\ETX.\b\DLE\n\+    \\v\n\+    \\EOT\EOT\EOT\STX\NUL\DC2\ETX/\STX\DC2\n\+    \\r\n\+    \\ENQ\EOT\EOT\STX\NUL\EOT\DC2\EOT/\STX.\DC2\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\NUL\ENQ\DC2\ETX/\STX\b\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETX/\t\r\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETX/\DLE\DC1\n\+    \\v\n\+    \\EOT\EOT\EOT\STX\SOH\DC2\ETX0\STX\DC2\n\+    \\r\n\+    \\ENQ\EOT\EOT\STX\SOH\EOT\DC2\EOT0\STX/\DC2\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\SOH\ENQ\DC2\ETX0\STX\a\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\SOH\SOH\DC2\ETX0\b\v\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\SOH\ETX\DC2\ETX0\DLE\DC1\n\+    \\n\+    \\n\+    \\STX\EOT\ENQ\DC2\EOT3\NUL5\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\ENQ\SOH\DC2\ETX3\b\EM\n\+    \\v\n\+    \\EOT\EOT\ENQ\STX\NUL\DC2\ETX4\STX\EM\n\+    \\r\n\+    \\ENQ\EOT\ENQ\STX\NUL\EOT\DC2\EOT4\STX3\ESC\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\NUL\ACK\DC2\ETX4\STX\SO\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\NUL\SOH\DC2\ETX4\SI\DC4\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\NUL\ETX\DC2\ETX4\ETB\CAN\n\+    \\n\+    \\n\+    \\STX\ENQ\SOH\DC2\EOT7\NUL<\SOH\n\+    \\n\+    \\n\+    \\ETX\ENQ\SOH\SOH\DC2\ETX7\ENQ\DC1\n\+    \\v\n\+    \\EOT\ENQ\SOH\STX\NUL\DC2\ETX8\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\NUL\SOH\DC2\ETX8\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\NUL\STX\DC2\ETX8\b\t\n\+    \\v\n\+    \\EOT\ENQ\SOH\STX\SOH\DC2\ETX9\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\SOH\SOH\DC2\ETX9\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\SOH\STX\DC2\ETX9\b\t\n\+    \\v\n\+    \\EOT\ENQ\SOH\STX\STX\DC2\ETX:\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\STX\SOH\DC2\ETX:\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\STX\STX\DC2\ETX:\b\t\n\+    \\v\n\+    \\EOT\ENQ\SOH\STX\ETX\DC2\ETX;\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\ETX\SOH\DC2\ETX;\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\SOH\STX\ETX\STX\DC2\ETX;\b\tb\ACKproto3"
+ test/Proto/Coins_Fields.hs view
@@ -0,0 +1,179 @@+{- This file was auto-generated from coins.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Coins_Fields where+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+amount ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "amount" a) =>+  Lens.Family2.LensLike' f s a+amount = Data.ProtoLens.Field.field @"amount"+coef ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "coef" a) =>+  Lens.Family2.LensLike' f s a+coef = Data.ProtoLens.Field.field @"coef"+currencyCode ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "currencyCode" a) =>+  Lens.Family2.LensLike' f s a+currencyCode = Data.ProtoLens.Field.field @"currencyCode"+exp ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "exp" a) =>+  Lens.Family2.LensLike' f s a+exp = Data.ProtoLens.Field.field @"exp"+invoice ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "invoice" a) =>+  Lens.Family2.LensLike' f s a+invoice = Data.ProtoLens.Field.field @"invoice"+invoiceType ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "invoiceType" a) =>+  Lens.Family2.LensLike' f s a+invoiceType = Data.ProtoLens.Field.field @"invoiceType"+ledgerSignature ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "ledgerSignature" a) =>+  Lens.Family2.LensLike' f s a+ledgerSignature = Data.ProtoLens.Field.field @"ledgerSignature"+ledgerTransferRequest ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "ledgerTransferRequest" a) =>+  Lens.Family2.LensLike' f s a+ledgerTransferRequest+  = Data.ProtoLens.Field.field @"ledgerTransferRequest"+maybe'amount ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'amount" a) =>+  Lens.Family2.LensLike' f s a+maybe'amount = Data.ProtoLens.Field.field @"maybe'amount"+maybe'currencyCode ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'currencyCode" a) =>+  Lens.Family2.LensLike' f s a+maybe'currencyCode+  = Data.ProtoLens.Field.field @"maybe'currencyCode"+maybe'invoice ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'invoice" a) =>+  Lens.Family2.LensLike' f s a+maybe'invoice = Data.ProtoLens.Field.field @"maybe'invoice"+maybe'ledgerTransferRequest ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'ledgerTransferRequest" a) =>+  Lens.Family2.LensLike' f s a+maybe'ledgerTransferRequest+  = Data.ProtoLens.Field.field @"maybe'ledgerTransferRequest"+maybe'merchantIdTo ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'merchantIdTo" a) =>+  Lens.Family2.LensLike' f s a+maybe'merchantIdTo+  = Data.ProtoLens.Field.field @"maybe'merchantIdTo"+maybe'to ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'to" a) =>+  Lens.Family2.LensLike' f s a+maybe'to = Data.ProtoLens.Field.field @"maybe'to"+maybe'userRequest ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'userRequest" a) =>+  Lens.Family2.LensLike' f s a+maybe'userRequest = Data.ProtoLens.Field.field @"maybe'userRequest"+maybe'userTransferRequest ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'userTransferRequest" a) =>+  Lens.Family2.LensLike' f s a+maybe'userTransferRequest+  = Data.ProtoLens.Field.field @"maybe'userTransferRequest"+merchantIdTo ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "merchantIdTo" a) =>+  Lens.Family2.LensLike' f s a+merchantIdTo = Data.ProtoLens.Field.field @"merchantIdTo"+paymentRequest ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "paymentRequest" a) =>+  Lens.Family2.LensLike' f s a+paymentRequest = Data.ProtoLens.Field.field @"paymentRequest"+pubKeyUidFrom ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "pubKeyUidFrom" a) =>+  Lens.Family2.LensLike' f s a+pubKeyUidFrom = Data.ProtoLens.Field.field @"pubKeyUidFrom"+rHash ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "rHash" a) =>+  Lens.Family2.LensLike' f s a+rHash = Data.ProtoLens.Field.field @"rHash"+requestId ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "requestId" a) =>+  Lens.Family2.LensLike' f s a+requestId = Data.ProtoLens.Field.field @"requestId"+userRequest ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "userRequest" a) =>+  Lens.Family2.LensLike' f s a+userRequest = Data.ProtoLens.Field.field @"userRequest"+userSignature ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "userSignature" a) =>+  Lens.Family2.LensLike' f s a+userSignature = Data.ProtoLens.Field.field @"userSignature"+userTransferRequest ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "userTransferRequest" a) =>+  Lens.Family2.LensLike' f s a+userTransferRequest+  = Data.ProtoLens.Field.field @"userTransferRequest"+value ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "value" a) =>+  Lens.Family2.LensLike' f s a+value = Data.ProtoLens.Field.field @"value"
+ test/Proto/EmbeddedSchema.hs view
@@ -0,0 +1,693 @@+{- This file was auto-generated from embedded_schema.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.EmbeddedSchema (+        Embedded(), Embedded'Msg(), Embedded'Msg'Enum(..),+        Embedded'Msg'Enum(), Embedded'Msg'Enum'UnrecognizedValue, Enum(..),+        Enum(), Enum'UnrecognizedValue, Msg(), Msg'Enum(..), Msg'Enum(),+        Msg'Enum'UnrecognizedValue+    ) where+import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+{- | Fields :+     +         * 'Proto.EmbeddedSchema_Fields.msgField' @:: Lens' Embedded Embedded'Msg@+         * 'Proto.EmbeddedSchema_Fields.maybe'msgField' @:: Lens' Embedded (Prelude.Maybe Embedded'Msg)@ -}+data Embedded+  = Embedded'_constructor {_Embedded'msgField :: !(Prelude.Maybe Embedded'Msg),+                           _Embedded'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Embedded where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Embedded "msgField" Embedded'Msg where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Embedded'msgField (\ x__ y__ -> x__ {_Embedded'msgField = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Embedded "maybe'msgField" (Prelude.Maybe Embedded'Msg) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Embedded'msgField (\ x__ y__ -> x__ {_Embedded'msgField = y__}))+        Prelude.id+instance Data.ProtoLens.Message Embedded where+  messageName _ = Data.Text.pack "Embedded.Schema.Embedded"+  packedMessageDescriptor _+    = "\n\+      \\bEmbedded\DC29\n\+      \\bmsgField\CAN\SOH \SOH(\v2\GS.Embedded.Schema.Embedded.MsgR\bmsgField\SUBa\n\+      \\ETXMsg\DC2@\n\+      \\tenumField\CAN\SOH \SOH(\SO2\".Embedded.Schema.Embedded.Msg.EnumR\tenumField\"\CAN\n\+      \\EOTEnum\DC2\a\n\+      \\ETXFOO\DLE\NUL\DC2\a\n\+      \\ETXBAR\DLE\SOH"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        msgField__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "msgField"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Embedded'Msg)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'msgField")) ::+              Data.ProtoLens.FieldDescriptor Embedded+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, msgField__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Embedded'_unknownFields+        (\ x__ y__ -> x__ {_Embedded'_unknownFields = y__})+  defMessage+    = Embedded'_constructor+        {_Embedded'msgField = Prelude.Nothing,+         _Embedded'_unknownFields = []}+  parseMessage+    = let+        loop :: Embedded -> Data.ProtoLens.Encoding.Bytes.Parser Embedded+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "msgField"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"msgField") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Embedded"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (case+                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'msgField") _x+              of+                Prelude.Nothing -> Data.Monoid.mempty+                (Prelude.Just _v)+                  -> (Data.Monoid.<>)+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                       ((Prelude..)+                          (\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                          Data.ProtoLens.encodeMessage+                          _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData Embedded where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Embedded'_unknownFields x__)+             (Control.DeepSeq.deepseq (_Embedded'msgField x__) ())+{- | Fields :+     +         * 'Proto.EmbeddedSchema_Fields.enumField' @:: Lens' Embedded'Msg Embedded'Msg'Enum@ -}+data Embedded'Msg+  = Embedded'Msg'_constructor {_Embedded'Msg'enumField :: !Embedded'Msg'Enum,+                               _Embedded'Msg'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Embedded'Msg where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Embedded'Msg "enumField" Embedded'Msg'Enum where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Embedded'Msg'enumField+           (\ x__ y__ -> x__ {_Embedded'Msg'enumField = y__}))+        Prelude.id+instance Data.ProtoLens.Message Embedded'Msg where+  messageName _ = Data.Text.pack "Embedded.Schema.Embedded.Msg"+  packedMessageDescriptor _+    = "\n\+      \\ETXMsg\DC2@\n\+      \\tenumField\CAN\SOH \SOH(\SO2\".Embedded.Schema.Embedded.Msg.EnumR\tenumField\"\CAN\n\+      \\EOTEnum\DC2\a\n\+      \\ETXFOO\DLE\NUL\DC2\a\n\+      \\ETXBAR\DLE\SOH"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        enumField__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "enumField"+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::+                 Data.ProtoLens.FieldTypeDescriptor Embedded'Msg'Enum)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"enumField")) ::+              Data.ProtoLens.FieldDescriptor Embedded'Msg+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, enumField__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Embedded'Msg'_unknownFields+        (\ x__ y__ -> x__ {_Embedded'Msg'_unknownFields = y__})+  defMessage+    = Embedded'Msg'_constructor+        {_Embedded'Msg'enumField = Data.ProtoLens.fieldDefault,+         _Embedded'Msg'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Embedded'Msg -> Data.ProtoLens.Encoding.Bytes.Parser Embedded'Msg+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.toEnum+                                          (Prelude.fmap+                                             Prelude.fromIntegral+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))+                                       "enumField"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"enumField") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Msg"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"enumField") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         ((Prelude..)+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)+                         Prelude.fromEnum+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData Embedded'Msg where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Embedded'Msg'_unknownFields x__)+             (Control.DeepSeq.deepseq (_Embedded'Msg'enumField x__) ())+newtype Embedded'Msg'Enum'UnrecognizedValue+  = Embedded'Msg'Enum'UnrecognizedValue Data.Int.Int32+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)+data Embedded'Msg'Enum+  = Embedded'Msg'FOO |+    Embedded'Msg'BAR |+    Embedded'Msg'Enum'Unrecognized !Embedded'Msg'Enum'UnrecognizedValue+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance Data.ProtoLens.MessageEnum Embedded'Msg'Enum where+  maybeToEnum 0 = Prelude.Just Embedded'Msg'FOO+  maybeToEnum 1 = Prelude.Just Embedded'Msg'BAR+  maybeToEnum k+    = Prelude.Just+        (Embedded'Msg'Enum'Unrecognized+           (Embedded'Msg'Enum'UnrecognizedValue (Prelude.fromIntegral k)))+  showEnum Embedded'Msg'FOO = "FOO"+  showEnum Embedded'Msg'BAR = "BAR"+  showEnum+    (Embedded'Msg'Enum'Unrecognized (Embedded'Msg'Enum'UnrecognizedValue k))+    = Prelude.show k+  readEnum k+    | (Prelude.==) k "FOO" = Prelude.Just Embedded'Msg'FOO+    | (Prelude.==) k "BAR" = Prelude.Just Embedded'Msg'BAR+    | Prelude.otherwise+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum+instance Prelude.Bounded Embedded'Msg'Enum where+  minBound = Embedded'Msg'FOO+  maxBound = Embedded'Msg'BAR+instance Prelude.Enum Embedded'Msg'Enum where+  toEnum k__+    = Prelude.maybe+        (Prelude.error+           ((Prelude.++)+              "toEnum: unknown value for enum Enum: " (Prelude.show k__)))+        Prelude.id+        (Data.ProtoLens.maybeToEnum k__)+  fromEnum Embedded'Msg'FOO = 0+  fromEnum Embedded'Msg'BAR = 1+  fromEnum+    (Embedded'Msg'Enum'Unrecognized (Embedded'Msg'Enum'UnrecognizedValue k))+    = Prelude.fromIntegral k+  succ Embedded'Msg'BAR+    = Prelude.error+        "Embedded'Msg'Enum.succ: bad argument Embedded'Msg'BAR. This value would be out of bounds."+  succ Embedded'Msg'FOO = Embedded'Msg'BAR+  succ (Embedded'Msg'Enum'Unrecognized _)+    = Prelude.error+        "Embedded'Msg'Enum.succ: bad argument: unrecognized value"+  pred Embedded'Msg'FOO+    = Prelude.error+        "Embedded'Msg'Enum.pred: bad argument Embedded'Msg'FOO. This value would be out of bounds."+  pred Embedded'Msg'BAR = Embedded'Msg'FOO+  pred (Embedded'Msg'Enum'Unrecognized _)+    = Prelude.error+        "Embedded'Msg'Enum.pred: bad argument: unrecognized value"+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo+instance Data.ProtoLens.FieldDefault Embedded'Msg'Enum where+  fieldDefault = Embedded'Msg'FOO+instance Control.DeepSeq.NFData Embedded'Msg'Enum where+  rnf x__ = Prelude.seq x__ ()+newtype Enum'UnrecognizedValue+  = Enum'UnrecognizedValue Data.Int.Int32+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)+data Enum+  = FOO | BAR | Enum'Unrecognized !Enum'UnrecognizedValue+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance Data.ProtoLens.MessageEnum Enum where+  maybeToEnum 0 = Prelude.Just FOO+  maybeToEnum 1 = Prelude.Just BAR+  maybeToEnum k+    = Prelude.Just+        (Enum'Unrecognized+           (Enum'UnrecognizedValue (Prelude.fromIntegral k)))+  showEnum FOO = "FOO"+  showEnum BAR = "BAR"+  showEnum (Enum'Unrecognized (Enum'UnrecognizedValue k))+    = Prelude.show k+  readEnum k+    | (Prelude.==) k "FOO" = Prelude.Just FOO+    | (Prelude.==) k "BAR" = Prelude.Just BAR+    | Prelude.otherwise+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum+instance Prelude.Bounded Enum where+  minBound = FOO+  maxBound = BAR+instance Prelude.Enum Enum where+  toEnum k__+    = Prelude.maybe+        (Prelude.error+           ((Prelude.++)+              "toEnum: unknown value for enum Enum: " (Prelude.show k__)))+        Prelude.id+        (Data.ProtoLens.maybeToEnum k__)+  fromEnum FOO = 0+  fromEnum BAR = 1+  fromEnum (Enum'Unrecognized (Enum'UnrecognizedValue k))+    = Prelude.fromIntegral k+  succ BAR+    = Prelude.error+        "Enum.succ: bad argument BAR. This value would be out of bounds."+  succ FOO = BAR+  succ (Enum'Unrecognized _)+    = Prelude.error "Enum.succ: bad argument: unrecognized value"+  pred FOO+    = Prelude.error+        "Enum.pred: bad argument FOO. This value would be out of bounds."+  pred BAR = FOO+  pred (Enum'Unrecognized _)+    = Prelude.error "Enum.pred: bad argument: unrecognized value"+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo+instance Data.ProtoLens.FieldDefault Enum where+  fieldDefault = FOO+instance Control.DeepSeq.NFData Enum where+  rnf x__ = Prelude.seq x__ ()+{- | Fields :+     +         * 'Proto.EmbeddedSchema_Fields.enumField' @:: Lens' Msg Msg'Enum@ -}+data Msg+  = Msg'_constructor {_Msg'enumField :: !Msg'Enum,+                      _Msg'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Msg where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Msg "enumField" Msg'Enum where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Msg'enumField (\ x__ y__ -> x__ {_Msg'enumField = y__}))+        Prelude.id+instance Data.ProtoLens.Message Msg where+  messageName _ = Data.Text.pack "Embedded.Schema.Msg"+  packedMessageDescriptor _+    = "\n\+      \\ETXMsg\DC27\n\+      \\tenumField\CAN\SOH \SOH(\SO2\EM.Embedded.Schema.Msg.EnumR\tenumField\"\CAN\n\+      \\EOTEnum\DC2\a\n\+      \\ETXFOO\DLE\NUL\DC2\a\n\+      \\ETXBAR\DLE\SOH"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        enumField__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "enumField"+              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::+                 Data.ProtoLens.FieldTypeDescriptor Msg'Enum)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"enumField")) ::+              Data.ProtoLens.FieldDescriptor Msg+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, enumField__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Msg'_unknownFields (\ x__ y__ -> x__ {_Msg'_unknownFields = y__})+  defMessage+    = Msg'_constructor+        {_Msg'enumField = Data.ProtoLens.fieldDefault,+         _Msg'_unknownFields = []}+  parseMessage+    = let+        loop :: Msg -> Data.ProtoLens.Encoding.Bytes.Parser Msg+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.toEnum+                                          (Prelude.fmap+                                             Prelude.fromIntegral+                                             Data.ProtoLens.Encoding.Bytes.getVarInt))+                                       "enumField"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"enumField") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Msg"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"enumField") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         ((Prelude..)+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)+                         Prelude.fromEnum+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData Msg where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Msg'_unknownFields x__)+             (Control.DeepSeq.deepseq (_Msg'enumField x__) ())+newtype Msg'Enum'UnrecognizedValue+  = Msg'Enum'UnrecognizedValue Data.Int.Int32+  deriving stock (Prelude.Eq, Prelude.Ord, Prelude.Show)+data Msg'Enum+  = Msg'FOO |+    Msg'BAR |+    Msg'Enum'Unrecognized !Msg'Enum'UnrecognizedValue+  deriving stock (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance Data.ProtoLens.MessageEnum Msg'Enum where+  maybeToEnum 0 = Prelude.Just Msg'FOO+  maybeToEnum 1 = Prelude.Just Msg'BAR+  maybeToEnum k+    = Prelude.Just+        (Msg'Enum'Unrecognized+           (Msg'Enum'UnrecognizedValue (Prelude.fromIntegral k)))+  showEnum Msg'FOO = "FOO"+  showEnum Msg'BAR = "BAR"+  showEnum (Msg'Enum'Unrecognized (Msg'Enum'UnrecognizedValue k))+    = Prelude.show k+  readEnum k+    | (Prelude.==) k "FOO" = Prelude.Just Msg'FOO+    | (Prelude.==) k "BAR" = Prelude.Just Msg'BAR+    | Prelude.otherwise+    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum+instance Prelude.Bounded Msg'Enum where+  minBound = Msg'FOO+  maxBound = Msg'BAR+instance Prelude.Enum Msg'Enum where+  toEnum k__+    = Prelude.maybe+        (Prelude.error+           ((Prelude.++)+              "toEnum: unknown value for enum Enum: " (Prelude.show k__)))+        Prelude.id+        (Data.ProtoLens.maybeToEnum k__)+  fromEnum Msg'FOO = 0+  fromEnum Msg'BAR = 1+  fromEnum (Msg'Enum'Unrecognized (Msg'Enum'UnrecognizedValue k))+    = Prelude.fromIntegral k+  succ Msg'BAR+    = Prelude.error+        "Msg'Enum.succ: bad argument Msg'BAR. This value would be out of bounds."+  succ Msg'FOO = Msg'BAR+  succ (Msg'Enum'Unrecognized _)+    = Prelude.error "Msg'Enum.succ: bad argument: unrecognized value"+  pred Msg'FOO+    = Prelude.error+        "Msg'Enum.pred: bad argument Msg'FOO. This value would be out of bounds."+  pred Msg'BAR = Msg'FOO+  pred (Msg'Enum'Unrecognized _)+    = Prelude.error "Msg'Enum.pred: bad argument: unrecognized value"+  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom+  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo+  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen+  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo+instance Data.ProtoLens.FieldDefault Msg'Enum where+  fieldDefault = Msg'FOO+instance Control.DeepSeq.NFData Msg'Enum where+  rnf x__ = Prelude.seq x__ ()+packedFileDescriptor :: Data.ByteString.ByteString+packedFileDescriptor+  = "\n\+    \\NAKembedded_schema.proto\DC2\SIEmbedded.Schema\"\168\SOH\n\+    \\bEmbedded\DC29\n\+    \\bmsgField\CAN\SOH \SOH(\v2\GS.Embedded.Schema.Embedded.MsgR\bmsgField\SUBa\n\+    \\ETXMsg\DC2@\n\+    \\tenumField\CAN\SOH \SOH(\SO2\".Embedded.Schema.Embedded.Msg.EnumR\tenumField\"\CAN\n\+    \\EOTEnum\DC2\a\n\+    \\ETXFOO\DLE\NUL\DC2\a\n\+    \\ETXBAR\DLE\SOH\"X\n\+    \\ETXMsg\DC27\n\+    \\tenumField\CAN\SOH \SOH(\SO2\EM.Embedded.Schema.Msg.EnumR\tenumField\"\CAN\n\+    \\EOTEnum\DC2\a\n\+    \\ETXFOO\DLE\NUL\DC2\a\n\+    \\ETXBAR\DLE\SOH*\CAN\n\+    \\EOTEnum\DC2\a\n\+    \\ETXFOO\DLE\NUL\DC2\a\n\+    \\ETXBAR\DLE\SOHJ\178\ENQ\n\+    \\ACK\DC2\EOT\NUL\NUL\EM\SOH\n\+    \\b\n\+    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\+    \\b\n\+    \\SOH\STX\DC2\ETX\SOH\NUL\CAN\n\+    \\n\+    \\n\+    \\STX\EOT\NUL\DC2\EOT\ETX\NUL\f\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\NUL\SOH\DC2\ETX\ETX\b\DLE\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\EOT\STX\DC3\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\NUL\EOT\DC2\EOT\EOT\STX\ETX\DC2\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ACK\DC2\ETX\EOT\STX\ENQ\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\EOT\ACK\SO\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\EOT\DC1\DC2\n\+    \\f\n\+    \\EOT\EOT\NUL\ETX\NUL\DC2\EOT\ENQ\STX\v\ETX\n\+    \\f\n\+    \\ENQ\EOT\NUL\ETX\NUL\SOH\DC2\ETX\ENQ\n\+    \\r\n\+    \\r\n\+    \\ACK\EOT\NUL\ETX\NUL\STX\NUL\DC2\ETX\ACK\EOT\ETB\n\+    \\SI\n\+    \\a\EOT\NUL\ETX\NUL\STX\NUL\EOT\DC2\EOT\ACK\EOT\ENQ\SI\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\NUL\ACK\DC2\ETX\ACK\EOT\b\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\NUL\SOH\DC2\ETX\ACK\t\DC2\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\STX\NUL\ETX\DC2\ETX\ACK\NAK\SYN\n\+    \\SO\n\+    \\ACK\EOT\NUL\ETX\NUL\EOT\NUL\DC2\EOT\a\EOT\n\+    \\ENQ\n\+    \\SO\n\+    \\a\EOT\NUL\ETX\NUL\EOT\NUL\SOH\DC2\ETX\a\t\r\n\+    \\SI\n\+    \\b\EOT\NUL\ETX\NUL\EOT\NUL\STX\NUL\DC2\ETX\b\ACK\SO\n\+    \\DLE\n\+    \\t\EOT\NUL\ETX\NUL\EOT\NUL\STX\NUL\SOH\DC2\ETX\b\ACK\t\n\+    \\DLE\n\+    \\t\EOT\NUL\ETX\NUL\EOT\NUL\STX\NUL\STX\DC2\ETX\b\f\r\n\+    \\SI\n\+    \\b\EOT\NUL\ETX\NUL\EOT\NUL\STX\SOH\DC2\ETX\t\ACK\SO\n\+    \\DLE\n\+    \\t\EOT\NUL\ETX\NUL\EOT\NUL\STX\SOH\SOH\DC2\ETX\t\ACK\t\n\+    \\DLE\n\+    \\t\EOT\NUL\ETX\NUL\EOT\NUL\STX\SOH\STX\DC2\ETX\t\f\r\n\+    \\n\+    \\n\+    \\STX\EOT\SOH\DC2\EOT\SO\NUL\DC4\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\SOH\SOH\DC2\ETX\SO\b\v\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\SI\STX\NAK\n\+    \\r\n\+    \\ENQ\EOT\SOH\STX\NUL\EOT\DC2\EOT\SI\STX\SO\r\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX\SI\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\SI\a\DLE\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\SI\DC3\DC4\n\+    \\f\n\+    \\EOT\EOT\SOH\EOT\NUL\DC2\EOT\DLE\STX\DC3\ETX\n\+    \\f\n\+    \\ENQ\EOT\SOH\EOT\NUL\SOH\DC2\ETX\DLE\a\v\n\+    \\r\n\+    \\ACK\EOT\SOH\EOT\NUL\STX\NUL\DC2\ETX\DC1\EOT\f\n\+    \\SO\n\+    \\a\EOT\SOH\EOT\NUL\STX\NUL\SOH\DC2\ETX\DC1\EOT\a\n\+    \\SO\n\+    \\a\EOT\SOH\EOT\NUL\STX\NUL\STX\DC2\ETX\DC1\n\+    \\v\n\+    \\r\n\+    \\ACK\EOT\SOH\EOT\NUL\STX\SOH\DC2\ETX\DC2\EOT\f\n\+    \\SO\n\+    \\a\EOT\SOH\EOT\NUL\STX\SOH\SOH\DC2\ETX\DC2\EOT\a\n\+    \\SO\n\+    \\a\EOT\SOH\EOT\NUL\STX\SOH\STX\DC2\ETX\DC2\n\+    \\v\n\+    \\n\+    \\n\+    \\STX\ENQ\NUL\DC2\EOT\SYN\NUL\EM\SOH\n\+    \\n\+    \\n\+    \\ETX\ENQ\NUL\SOH\DC2\ETX\SYN\ENQ\t\n\+    \\v\n\+    \\EOT\ENQ\NUL\STX\NUL\DC2\ETX\ETB\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\NUL\SOH\DC2\ETX\ETB\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\NUL\STX\DC2\ETX\ETB\b\t\n\+    \\v\n\+    \\EOT\ENQ\NUL\STX\SOH\DC2\ETX\CAN\STX\n\+    \\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\SOH\SOH\DC2\ETX\CAN\STX\ENQ\n\+    \\f\n\+    \\ENQ\ENQ\NUL\STX\SOH\STX\DC2\ETX\CAN\b\tb\ACKproto3"
+ test/Proto/EmbeddedSchema_Fields.hs view
@@ -0,0 +1,47 @@+{- This file was auto-generated from embedded_schema.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.EmbeddedSchema_Fields where+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+enumField ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "enumField" a) =>+  Lens.Family2.LensLike' f s a+enumField = Data.ProtoLens.Field.field @"enumField"+maybe'msgField ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'msgField" a) =>+  Lens.Family2.LensLike' f s a+maybe'msgField = Data.ProtoLens.Field.field @"maybe'msgField"+msgField ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "msgField" a) =>+  Lens.Family2.LensLike' f s a+msgField = Data.ProtoLens.Field.field @"msgField"
+ test/Proto/GoogleProtobuf.hs view
@@ -0,0 +1,1524 @@+{- This file was auto-generated from google_protobuf.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.GoogleProtobuf (+        BoolValue(), BytesValue(), DoubleValue(), FloatValue(),+        Int32Value(), Int64Value(), StringValue(), Timestamp(),+        UInt32Value(), UInt64Value()+    ) where+import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.value' @:: Lens' BoolValue Prelude.Bool@ -}+data BoolValue+  = BoolValue'_constructor {_BoolValue'value :: !Prelude.Bool,+                            _BoolValue'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show BoolValue where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField BoolValue "value" Prelude.Bool where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _BoolValue'value (\ x__ y__ -> x__ {_BoolValue'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message BoolValue where+  messageName _ = Data.Text.pack "Google.Protobuf.BoolValue"+  packedMessageDescriptor _+    = "\n\+      \\tBoolValue\DC2\DC4\n\+      \\ENQvalue\CAN\SOH \SOH(\bR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor BoolValue+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _BoolValue'_unknownFields+        (\ x__ y__ -> x__ {_BoolValue'_unknownFields = y__})+  defMessage+    = BoolValue'_constructor+        {_BoolValue'value = Data.ProtoLens.fieldDefault,+         _BoolValue'_unknownFields = []}+  parseMessage+    = let+        loop :: BoolValue -> Data.ProtoLens.Encoding.Bytes.Parser BoolValue+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "BoolValue"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         Data.ProtoLens.Encoding.Bytes.putVarInt+                         (\ b -> if b then 1 else 0)+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData BoolValue where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_BoolValue'_unknownFields x__)+             (Control.DeepSeq.deepseq (_BoolValue'value x__) ())+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.value' @:: Lens' BytesValue Data.ByteString.ByteString@ -}+data BytesValue+  = BytesValue'_constructor {_BytesValue'value :: !Data.ByteString.ByteString,+                             _BytesValue'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show BytesValue where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField BytesValue "value" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _BytesValue'value (\ x__ y__ -> x__ {_BytesValue'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message BytesValue where+  messageName _ = Data.Text.pack "Google.Protobuf.BytesValue"+  packedMessageDescriptor _+    = "\n\+      \\n\+      \BytesValue\DC2\DC4\n\+      \\ENQvalue\CAN\SOH \SOH(\fR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor BytesValue+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _BytesValue'_unknownFields+        (\ x__ y__ -> x__ {_BytesValue'_unknownFields = y__})+  defMessage+    = BytesValue'_constructor+        {_BytesValue'value = Data.ProtoLens.fieldDefault,+         _BytesValue'_unknownFields = []}+  parseMessage+    = let+        loop ::+          BytesValue -> Data.ProtoLens.Encoding.Bytes.Parser BytesValue+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "BytesValue"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((\ bs+                          -> (Data.Monoid.<>)+                               (Data.ProtoLens.Encoding.Bytes.putVarInt+                                  (Prelude.fromIntegral (Data.ByteString.length bs)))+                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData BytesValue where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_BytesValue'_unknownFields x__)+             (Control.DeepSeq.deepseq (_BytesValue'value x__) ())+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.value' @:: Lens' DoubleValue Prelude.Double@ -}+data DoubleValue+  = DoubleValue'_constructor {_DoubleValue'value :: !Prelude.Double,+                              _DoubleValue'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show DoubleValue where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField DoubleValue "value" Prelude.Double where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _DoubleValue'value (\ x__ y__ -> x__ {_DoubleValue'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message DoubleValue where+  messageName _ = Data.Text.pack "Google.Protobuf.DoubleValue"+  packedMessageDescriptor _+    = "\n\+      \\vDoubleValue\DC2\DC4\n\+      \\ENQvalue\CAN\SOH \SOH(\SOHR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor DoubleValue+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _DoubleValue'_unknownFields+        (\ x__ y__ -> x__ {_DoubleValue'_unknownFields = y__})+  defMessage+    = DoubleValue'_constructor+        {_DoubleValue'value = Data.ProtoLens.fieldDefault,+         _DoubleValue'_unknownFields = []}+  parseMessage+    = let+        loop ::+          DoubleValue -> Data.ProtoLens.Encoding.Bytes.Parser DoubleValue+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        9 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Data.ProtoLens.Encoding.Bytes.wordToDouble+                                          Data.ProtoLens.Encoding.Bytes.getFixed64)+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "DoubleValue"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 9)+                      ((Prelude..)+                         Data.ProtoLens.Encoding.Bytes.putFixed64+                         Data.ProtoLens.Encoding.Bytes.doubleToWord+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData DoubleValue where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_DoubleValue'_unknownFields x__)+             (Control.DeepSeq.deepseq (_DoubleValue'value x__) ())+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.value' @:: Lens' FloatValue Prelude.Float@ -}+data FloatValue+  = FloatValue'_constructor {_FloatValue'value :: !Prelude.Float,+                             _FloatValue'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show FloatValue where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField FloatValue "value" Prelude.Float where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _FloatValue'value (\ x__ y__ -> x__ {_FloatValue'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message FloatValue where+  messageName _ = Data.Text.pack "Google.Protobuf.FloatValue"+  packedMessageDescriptor _+    = "\n\+      \\n\+      \FloatValue\DC2\DC4\n\+      \\ENQvalue\CAN\SOH \SOH(\STXR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.FloatField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Float)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor FloatValue+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _FloatValue'_unknownFields+        (\ x__ y__ -> x__ {_FloatValue'_unknownFields = y__})+  defMessage+    = FloatValue'_constructor+        {_FloatValue'value = Data.ProtoLens.fieldDefault,+         _FloatValue'_unknownFields = []}+  parseMessage+    = let+        loop ::+          FloatValue -> Data.ProtoLens.Encoding.Bytes.Parser FloatValue+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        13+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Data.ProtoLens.Encoding.Bytes.wordToFloat+                                          Data.ProtoLens.Encoding.Bytes.getFixed32)+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "FloatValue"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 13)+                      ((Prelude..)+                         Data.ProtoLens.Encoding.Bytes.putFixed32+                         Data.ProtoLens.Encoding.Bytes.floatToWord+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData FloatValue where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_FloatValue'_unknownFields x__)+             (Control.DeepSeq.deepseq (_FloatValue'value x__) ())+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.value' @:: Lens' Int32Value Data.Int.Int32@ -}+data Int32Value+  = Int32Value'_constructor {_Int32Value'value :: !Data.Int.Int32,+                             _Int32Value'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Int32Value where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Int32Value "value" Data.Int.Int32 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Int32Value'value (\ x__ y__ -> x__ {_Int32Value'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message Int32Value where+  messageName _ = Data.Text.pack "Google.Protobuf.Int32Value"+  packedMessageDescriptor _+    = "\n\+      \\n\+      \Int32Value\DC2\DC4\n\+      \\ENQvalue\CAN\SOH \SOH(\ENQR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor Int32Value+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Int32Value'_unknownFields+        (\ x__ y__ -> x__ {_Int32Value'_unknownFields = y__})+  defMessage+    = Int32Value'_constructor+        {_Int32Value'value = Data.ProtoLens.fieldDefault,+         _Int32Value'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Int32Value -> Data.ProtoLens.Encoding.Bytes.Parser Int32Value+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Int32Value"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData Int32Value where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Int32Value'_unknownFields x__)+             (Control.DeepSeq.deepseq (_Int32Value'value x__) ())+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.value' @:: Lens' Int64Value Data.Int.Int64@ -}+data Int64Value+  = Int64Value'_constructor {_Int64Value'value :: !Data.Int.Int64,+                             _Int64Value'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Int64Value where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Int64Value "value" Data.Int.Int64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Int64Value'value (\ x__ y__ -> x__ {_Int64Value'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message Int64Value where+  messageName _ = Data.Text.pack "Google.Protobuf.Int64Value"+  packedMessageDescriptor _+    = "\n\+      \\n\+      \Int64Value\DC2\DC4\n\+      \\ENQvalue\CAN\SOH \SOH(\ETXR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor Int64Value+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Int64Value'_unknownFields+        (\ x__ y__ -> x__ {_Int64Value'_unknownFields = y__})+  defMessage+    = Int64Value'_constructor+        {_Int64Value'value = Data.ProtoLens.fieldDefault,+         _Int64Value'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Int64Value -> Data.ProtoLens.Encoding.Bytes.Parser Int64Value+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Int64Value"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData Int64Value where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Int64Value'_unknownFields x__)+             (Control.DeepSeq.deepseq (_Int64Value'value x__) ())+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.value' @:: Lens' StringValue Data.Text.Text@ -}+data StringValue+  = StringValue'_constructor {_StringValue'value :: !Data.Text.Text,+                              _StringValue'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show StringValue where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField StringValue "value" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _StringValue'value (\ x__ y__ -> x__ {_StringValue'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message StringValue where+  messageName _ = Data.Text.pack "Google.Protobuf.StringValue"+  packedMessageDescriptor _+    = "\n\+      \\vStringValue\DC2\DC4\n\+      \\ENQvalue\CAN\SOH \SOH(\tR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor StringValue+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _StringValue'_unknownFields+        (\ x__ y__ -> x__ {_StringValue'_unknownFields = y__})+  defMessage+    = StringValue'_constructor+        {_StringValue'value = Data.ProtoLens.fieldDefault,+         _StringValue'_unknownFields = []}+  parseMessage+    = let+        loop ::+          StringValue -> Data.ProtoLens.Encoding.Bytes.Parser StringValue+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                                       Data.ProtoLens.Encoding.Bytes.getBytes+                                                         (Prelude.fromIntegral len)+                                           Data.ProtoLens.Encoding.Bytes.runEither+                                             (case Data.Text.Encoding.decodeUtf8' value of+                                                (Prelude.Left err)+                                                  -> Prelude.Left (Prelude.show err)+                                                (Prelude.Right r) -> Prelude.Right r))+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "StringValue"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData StringValue where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_StringValue'_unknownFields x__)+             (Control.DeepSeq.deepseq (_StringValue'value x__) ())+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.seconds' @:: Lens' Timestamp Data.Int.Int64@+         * 'Proto.GoogleProtobuf_Fields.nanos' @:: Lens' Timestamp Data.Int.Int32@ -}+data Timestamp+  = Timestamp'_constructor {_Timestamp'seconds :: !Data.Int.Int64,+                            _Timestamp'nanos :: !Data.Int.Int32,+                            _Timestamp'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Timestamp where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Timestamp "seconds" Data.Int.Int64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Timestamp'seconds (\ x__ y__ -> x__ {_Timestamp'seconds = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Timestamp "nanos" Data.Int.Int32 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Timestamp'nanos (\ x__ y__ -> x__ {_Timestamp'nanos = y__}))+        Prelude.id+instance Data.ProtoLens.Message Timestamp where+  messageName _ = Data.Text.pack "Google.Protobuf.Timestamp"+  packedMessageDescriptor _+    = "\n\+      \\tTimestamp\DC2\CAN\n\+      \\aseconds\CAN\SOH \SOH(\ETXR\aseconds\DC2\DC4\n\+      \\ENQnanos\CAN\STX \SOH(\ENQR\ENQnanos"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        seconds__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "seconds"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"seconds")) ::+              Data.ProtoLens.FieldDescriptor Timestamp+        nanos__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "nanos"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"nanos")) ::+              Data.ProtoLens.FieldDescriptor Timestamp+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, seconds__field_descriptor),+           (Data.ProtoLens.Tag 2, nanos__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Timestamp'_unknownFields+        (\ x__ y__ -> x__ {_Timestamp'_unknownFields = y__})+  defMessage+    = Timestamp'_constructor+        {_Timestamp'seconds = Data.ProtoLens.fieldDefault,+         _Timestamp'nanos = Data.ProtoLens.fieldDefault,+         _Timestamp'_unknownFields = []}+  parseMessage+    = let+        loop :: Timestamp -> Data.ProtoLens.Encoding.Bytes.Parser Timestamp+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "seconds"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"seconds") y x)+                        16+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "nanos"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"nanos") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Timestamp"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"seconds") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+             ((Data.Monoid.<>)+                (let+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"nanos") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)+                         ((Prelude..)+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData Timestamp where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Timestamp'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Timestamp'seconds x__)+                (Control.DeepSeq.deepseq (_Timestamp'nanos x__) ()))+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.value' @:: Lens' UInt32Value Data.Word.Word32@ -}+data UInt32Value+  = UInt32Value'_constructor {_UInt32Value'value :: !Data.Word.Word32,+                              _UInt32Value'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show UInt32Value where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField UInt32Value "value" Data.Word.Word32 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UInt32Value'value (\ x__ y__ -> x__ {_UInt32Value'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message UInt32Value where+  messageName _ = Data.Text.pack "Google.Protobuf.UInt32Value"+  packedMessageDescriptor _+    = "\n\+      \\vUInt32Value\DC2\DC4\n\+      \\ENQvalue\CAN\SOH \SOH(\rR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor UInt32Value+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _UInt32Value'_unknownFields+        (\ x__ y__ -> x__ {_UInt32Value'_unknownFields = y__})+  defMessage+    = UInt32Value'_constructor+        {_UInt32Value'value = Data.ProtoLens.fieldDefault,+         _UInt32Value'_unknownFields = []}+  parseMessage+    = let+        loop ::+          UInt32Value -> Data.ProtoLens.Encoding.Bytes.Parser UInt32Value+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "UInt32Value"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData UInt32Value where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_UInt32Value'_unknownFields x__)+             (Control.DeepSeq.deepseq (_UInt32Value'value x__) ())+{- | Fields :+     +         * 'Proto.GoogleProtobuf_Fields.value' @:: Lens' UInt64Value Data.Word.Word64@ -}+data UInt64Value+  = UInt64Value'_constructor {_UInt64Value'value :: !Data.Word.Word64,+                              _UInt64Value'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show UInt64Value where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField UInt64Value "value" Data.Word.Word64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _UInt64Value'value (\ x__ y__ -> x__ {_UInt64Value'value = y__}))+        Prelude.id+instance Data.ProtoLens.Message UInt64Value where+  messageName _ = Data.Text.pack "Google.Protobuf.UInt64Value"+  packedMessageDescriptor _+    = "\n\+      \\vUInt64Value\DC2\DC4\n\+      \\ENQvalue\CAN\SOH \SOH(\EOTR\ENQvalue"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        value__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "value"+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::+              Data.ProtoLens.FieldDescriptor UInt64Value+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _UInt64Value'_unknownFields+        (\ x__ y__ -> x__ {_UInt64Value'_unknownFields = y__})+  defMessage+    = UInt64Value'_constructor+        {_UInt64Value'value = Data.ProtoLens.fieldDefault,+         _UInt64Value'_unknownFields = []}+  parseMessage+    = let+        loop ::+          UInt64Value -> Data.ProtoLens.Encoding.Bytes.Parser UInt64Value+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "value"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "UInt64Value"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData UInt64Value where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_UInt64Value'_unknownFields x__)+             (Control.DeepSeq.deepseq (_UInt64Value'value x__) ())+packedFileDescriptor :: Data.ByteString.ByteString+packedFileDescriptor+  = "\n\+    \\NAKgoogle_protobuf.proto\DC2\SIGoogle.Protobuf\"#\n\+    \\vDoubleValue\DC2\DC4\n\+    \\ENQvalue\CAN\SOH \SOH(\SOHR\ENQvalue\"\"\n\+    \\n\+    \FloatValue\DC2\DC4\n\+    \\ENQvalue\CAN\SOH \SOH(\STXR\ENQvalue\"\"\n\+    \\n\+    \Int64Value\DC2\DC4\n\+    \\ENQvalue\CAN\SOH \SOH(\ETXR\ENQvalue\"#\n\+    \\vUInt64Value\DC2\DC4\n\+    \\ENQvalue\CAN\SOH \SOH(\EOTR\ENQvalue\"\"\n\+    \\n\+    \Int32Value\DC2\DC4\n\+    \\ENQvalue\CAN\SOH \SOH(\ENQR\ENQvalue\"#\n\+    \\vUInt32Value\DC2\DC4\n\+    \\ENQvalue\CAN\SOH \SOH(\rR\ENQvalue\"!\n\+    \\tBoolValue\DC2\DC4\n\+    \\ENQvalue\CAN\SOH \SOH(\bR\ENQvalue\"#\n\+    \\vStringValue\DC2\DC4\n\+    \\ENQvalue\CAN\SOH \SOH(\tR\ENQvalue\"\"\n\+    \\n\+    \BytesValue\DC2\DC4\n\+    \\ENQvalue\CAN\SOH \SOH(\fR\ENQvalue\";\n\+    \\tTimestamp\DC2\CAN\n\+    \\aseconds\CAN\SOH \SOH(\ETXR\aseconds\DC2\DC4\n\+    \\ENQnanos\CAN\STX \SOH(\ENQR\ENQnanosB|\n\+    \\DC3com.google.protobufB\rWrappersProtoP\SOHZ*github.com/golang/protobuf/ptypes/wrappers\248\SOH\SOH\162\STX\ETXGPB\170\STX\RSGoogle.Protobuf.WellKnownTypesJ\214@\n\+    \\a\DC2\ENQ(\NUL\219\SOH\SOH\n\+    \\219\DLE\n\+    \\SOH\f\DC2\ETX(\NUL\DC22\193\f Protocol Buffers - Google's data interchange format\n\+    \ Copyright 2008 Google Inc.  All rights reserved.\n\+    \ https://developers.google.com/protocol-buffers/\n\+    \\n\+    \ Redistribution and use in source and binary forms, with or without\n\+    \ modification, are permitted provided that the following conditions are\n\+    \ met:\n\+    \\n\+    \     * Redistributions of source code must retain the above copyright\n\+    \ notice, this list of conditions and the following disclaimer.\n\+    \     * Redistributions in binary form must reproduce the above\n\+    \ copyright notice, this list of conditions and the following disclaimer\n\+    \ in the documentation and/or other materials provided with the\n\+    \ distribution.\n\+    \     * Neither the name of Google Inc. nor the names of its\n\+    \ contributors may be used to endorse or promote products derived from\n\+    \ this software without specific prior written permission.\n\+    \\n\+    \ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\+    \ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\+    \ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\+    \ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\+    \ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\+    \ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\+    \ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\+    \ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\+    \ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\+    \ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\+    \ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\+    \2\140\EOT Wrappers for primitive (non-message) types. These types are useful\n\+    \ for embedding primitives in the `google.protobuf.Any` type and for places\n\+    \ where we need to distinguish between the absence of a primitive\n\+    \ typed field and its default value.\n\+    \\n\+    \ These wrappers have no meaningful use within repeated fields as they lack\n\+    \ the ability to detect presence on individual elements.\n\+    \ These wrappers have no meaningful use within a map or a oneof since\n\+    \ individual entries of a map or fields of a oneof can already detect presence.\n\+    \\n\+    \\b\n\+    \\SOH\STX\DC2\ETX*\NUL\CAN\n\+    \\b\n\+    \\SOH\b\DC2\ETX,\NUL;\n\+    \\t\n\+    \\STX\b%\DC2\ETX,\NUL;\n\+    \\b\n\+    \\SOH\b\DC2\ETX-\NUL\US\n\+    \\t\n\+    \\STX\b\US\DC2\ETX-\NUL\US\n\+    \\b\n\+    \\SOH\b\DC2\ETX.\NULA\n\+    \\t\n\+    \\STX\b\v\DC2\ETX.\NULA\n\+    \\b\n\+    \\SOH\b\DC2\ETX/\NUL,\n\+    \\t\n\+    \\STX\b\SOH\DC2\ETX/\NUL,\n\+    \\b\n\+    \\SOH\b\DC2\ETX0\NUL.\n\+    \\t\n\+    \\STX\b\b\DC2\ETX0\NUL.\n\+    \\b\n\+    \\SOH\b\DC2\ETX1\NUL\"\n\+    \\t\n\+    \\STX\b\n\+    \\DC2\ETX1\NUL\"\n\+    \\b\n\+    \\SOH\b\DC2\ETX2\NUL!\n\+    \\t\n\+    \\STX\b$\DC2\ETX2\NUL!\n\+    \g\n\+    \\STX\EOT\NUL\DC2\EOT7\NUL:\SOH\SUB[ Wrapper message for `double`.\n\+    \\n\+    \ The JSON representation for `DoubleValue` is JSON number.\n\+    \\n\+    \\n\+    \\n\+    \\ETX\EOT\NUL\SOH\DC2\ETX7\b\DC3\n\+    \ \n\+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX9\STX\DC3\SUB\DC3 The double value.\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\NUL\EOT\DC2\EOT9\STX7\NAK\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX9\STX\b\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX9\t\SO\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX9\DC1\DC2\n\+    \e\n\+    \\STX\EOT\SOH\DC2\EOT?\NULB\SOH\SUBY Wrapper message for `float`.\n\+    \\n\+    \ The JSON representation for `FloatValue` is JSON number.\n\+    \\n\+    \\n\+    \\n\+    \\ETX\EOT\SOH\SOH\DC2\ETX?\b\DC2\n\+    \\US\n\+    \\EOT\EOT\SOH\STX\NUL\DC2\ETXA\STX\DC2\SUB\DC2 The float value.\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\SOH\STX\NUL\EOT\DC2\EOTA\STX?\DC4\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETXA\STX\a\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETXA\b\r\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETXA\DLE\DC1\n\+    \e\n\+    \\STX\EOT\STX\DC2\EOTG\NULJ\SOH\SUBY Wrapper message for `int64`.\n\+    \\n\+    \ The JSON representation for `Int64Value` is JSON string.\n\+    \\n\+    \\n\+    \\n\+    \\ETX\EOT\STX\SOH\DC2\ETXG\b\DC2\n\+    \\US\n\+    \\EOT\EOT\STX\STX\NUL\DC2\ETXI\STX\DC2\SUB\DC2 The int64 value.\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\STX\STX\NUL\EOT\DC2\EOTI\STXG\DC4\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETXI\STX\a\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETXI\b\r\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETXI\DLE\DC1\n\+    \g\n\+    \\STX\EOT\ETX\DC2\EOTO\NULR\SOH\SUB[ Wrapper message for `uint64`.\n\+    \\n\+    \ The JSON representation for `UInt64Value` is JSON string.\n\+    \\n\+    \\n\+    \\n\+    \\ETX\EOT\ETX\SOH\DC2\ETXO\b\DC3\n\+    \ \n\+    \\EOT\EOT\ETX\STX\NUL\DC2\ETXQ\STX\DC3\SUB\DC3 The uint64 value.\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\ETX\STX\NUL\EOT\DC2\EOTQ\STXO\NAK\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\NUL\ENQ\DC2\ETXQ\STX\b\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETXQ\t\SO\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETXQ\DC1\DC2\n\+    \e\n\+    \\STX\EOT\EOT\DC2\EOTW\NULZ\SOH\SUBY Wrapper message for `int32`.\n\+    \\n\+    \ The JSON representation for `Int32Value` is JSON number.\n\+    \\n\+    \\n\+    \\n\+    \\ETX\EOT\EOT\SOH\DC2\ETXW\b\DC2\n\+    \\US\n\+    \\EOT\EOT\EOT\STX\NUL\DC2\ETXY\STX\DC2\SUB\DC2 The int32 value.\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\EOT\STX\NUL\EOT\DC2\EOTY\STXW\DC4\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\NUL\ENQ\DC2\ETXY\STX\a\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETXY\b\r\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETXY\DLE\DC1\n\+    \g\n\+    \\STX\EOT\ENQ\DC2\EOT_\NULb\SOH\SUB[ Wrapper message for `uint32`.\n\+    \\n\+    \ The JSON representation for `UInt32Value` is JSON number.\n\+    \\n\+    \\n\+    \\n\+    \\ETX\EOT\ENQ\SOH\DC2\ETX_\b\DC3\n\+    \ \n\+    \\EOT\EOT\ENQ\STX\NUL\DC2\ETXa\STX\DC3\SUB\DC3 The uint32 value.\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\ENQ\STX\NUL\EOT\DC2\EOTa\STX_\NAK\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\NUL\ENQ\DC2\ETXa\STX\b\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\NUL\SOH\DC2\ETXa\t\SO\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\NUL\ETX\DC2\ETXa\DC1\DC2\n\+    \o\n\+    \\STX\EOT\ACK\DC2\EOTg\NULj\SOH\SUBc Wrapper message for `bool`.\n\+    \\n\+    \ The JSON representation for `BoolValue` is JSON `true` and `false`.\n\+    \\n\+    \\n\+    \\n\+    \\ETX\EOT\ACK\SOH\DC2\ETXg\b\DC1\n\+    \\RS\n\+    \\EOT\EOT\ACK\STX\NUL\DC2\ETXi\STX\DC1\SUB\DC1 The bool value.\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\ACK\STX\NUL\EOT\DC2\EOTi\STXg\DC3\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\NUL\ENQ\DC2\ETXi\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\NUL\SOH\DC2\ETXi\a\f\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\NUL\ETX\DC2\ETXi\SI\DLE\n\+    \g\n\+    \\STX\EOT\a\DC2\EOTo\NULr\SOH\SUB[ Wrapper message for `string`.\n\+    \\n\+    \ The JSON representation for `StringValue` is JSON string.\n\+    \\n\+    \\n\+    \\n\+    \\ETX\EOT\a\SOH\DC2\ETXo\b\DC3\n\+    \ \n\+    \\EOT\EOT\a\STX\NUL\DC2\ETXq\STX\DC3\SUB\DC3 The string value.\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\a\STX\NUL\EOT\DC2\EOTq\STXo\NAK\n\+    \\f\n\+    \\ENQ\EOT\a\STX\NUL\ENQ\DC2\ETXq\STX\b\n\+    \\f\n\+    \\ENQ\EOT\a\STX\NUL\SOH\DC2\ETXq\t\SO\n\+    \\f\n\+    \\ENQ\EOT\a\STX\NUL\ETX\DC2\ETXq\DC1\DC2\n\+    \e\n\+    \\STX\EOT\b\DC2\EOTw\NULz\SOH\SUBY Wrapper message for `bytes`.\n\+    \\n\+    \ The JSON representation for `BytesValue` is JSON string.\n\+    \\n\+    \\n\+    \\n\+    \\ETX\EOT\b\SOH\DC2\ETXw\b\DC2\n\+    \\US\n\+    \\EOT\EOT\b\STX\NUL\DC2\ETXy\STX\DC2\SUB\DC2 The bytes value.\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\b\STX\NUL\EOT\DC2\EOTy\STXw\DC4\n\+    \\f\n\+    \\ENQ\EOT\b\STX\NUL\ENQ\DC2\ETXy\STX\a\n\+    \\f\n\+    \\ENQ\EOT\b\STX\NUL\SOH\DC2\ETXy\b\r\n\+    \\f\n\+    \\ENQ\EOT\b\STX\NUL\ETX\DC2\ETXy\DLE\DC1\n\+    \\244\ESC\n\+    \\STX\EOT\t\DC2\ACK\208\SOH\NUL\219\SOH\SOH\SUB\229\ESC A Timestamp represents a point in time independent of any time zone or local\n\+    \ calendar, encoded as a count of seconds and fractions of seconds at\n\+    \ nanosecond resolution. The count is relative to an epoch at UTC midnight on\n\+    \ January 1, 1970, in the proleptic Gregorian calendar which extends the\n\+    \ Gregorian calendar backwards to year one.\n\+    \\n\+    \ All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n\+    \ second table is needed for interpretation, using a [24-hour linear\n\+    \ smear](https://developers.google.com/time/smear).\n\+    \\n\+    \ The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n\+    \ restricting to that range, we ensure that we can convert to and from [RFC\n\+    \ 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n\+    \\n\+    \ # Examples\n\+    \\n\+    \ Example 1: Compute Timestamp from POSIX `time()`.\n\+    \\n\+    \     Timestamp timestamp;\n\+    \     timestamp.set_seconds(time(NULL));\n\+    \     timestamp.set_nanos(0);\n\+    \\n\+    \ Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n\+    \\n\+    \     struct timeval tv;\n\+    \     gettimeofday(&tv, NULL);\n\+    \\n\+    \     Timestamp timestamp;\n\+    \     timestamp.set_seconds(tv.tv_sec);\n\+    \     timestamp.set_nanos(tv.tv_usec * 1000);\n\+    \\n\+    \ Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\+    \\n\+    \     FILETIME ft;\n\+    \     GetSystemTimeAsFileTime(&ft);\n\+    \     UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\+    \\n\+    \     // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n\+    \     // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n\+    \     Timestamp timestamp;\n\+    \     timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n\+    \     timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\+    \\n\+    \ Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\+    \\n\+    \     long millis = System.currentTimeMillis();\n\+    \\n\+    \     Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n\+    \         .setNanos((int) ((millis % 1000) * 1000000)).build();\n\+    \\n\+    \\n\+    \ Example 5: Compute Timestamp from current time in Python.\n\+    \\n\+    \     timestamp = Timestamp()\n\+    \     timestamp.GetCurrentTime()\n\+    \\n\+    \ # JSON Mapping\n\+    \\n\+    \ In JSON format, the Timestamp type is encoded as a string in the\n\+    \ [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n\+    \ format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n\+    \ where {year} is always expressed using four digits while {month}, {day},\n\+    \ {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n\+    \ seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n\+    \ are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n\+    \ is required. A proto3 JSON serializer should always use UTC (as indicated by\n\+    \ \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n\+    \ able to accept both UTC and other timezones (as indicated by an offset).\n\+    \\n\+    \ For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n\+    \ 01:30 UTC on January 15, 2017.\n\+    \\n\+    \ In JavaScript, one can convert a Date object to this format using the\n\+    \ standard\n\+    \ [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n\+    \ method. In Python, a standard `datetime.datetime` object can be converted\n\+    \ to this format using\n\+    \ [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n\+    \ the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n\+    \ the Joda Time's [`ISODateTimeFormat.dateTime()`](\n\+    \ http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D\n\+    \ ) to obtain a formatter capable of generating timestamps in this format.\n\+    \\n\+    \\n\+    \\n\+    \\v\n\+    \\ETX\EOT\t\SOH\DC2\EOT\208\SOH\b\DC1\n\+    \\157\SOH\n\+    \\EOT\EOT\t\STX\NUL\DC2\EOT\212\SOH\STX\DC4\SUB\142\SOH Represents seconds of UTC time since Unix epoch\n\+    \ 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n\+    \ 9999-12-31T23:59:59Z inclusive.\n\+    \\n\+    \\SI\n\+    \\ENQ\EOT\t\STX\NUL\EOT\DC2\ACK\212\SOH\STX\208\SOH\DC3\n\+    \\r\n\+    \\ENQ\EOT\t\STX\NUL\ENQ\DC2\EOT\212\SOH\STX\a\n\+    \\r\n\+    \\ENQ\EOT\t\STX\NUL\SOH\DC2\EOT\212\SOH\b\SI\n\+    \\r\n\+    \\ENQ\EOT\t\STX\NUL\ETX\DC2\EOT\212\SOH\DC2\DC3\n\+    \\229\SOH\n\+    \\EOT\EOT\t\STX\SOH\DC2\EOT\218\SOH\STX\DC2\SUB\214\SOH Non-negative fractions of a second at nanosecond resolution. Negative\n\+    \ second values with fractions must still have non-negative nanos values\n\+    \ that count forward in time. Must be from 0 to 999,999,999\n\+    \ inclusive.\n\+    \\n\+    \\SI\n\+    \\ENQ\EOT\t\STX\SOH\EOT\DC2\ACK\218\SOH\STX\212\SOH\DC4\n\+    \\r\n\+    \\ENQ\EOT\t\STX\SOH\ENQ\DC2\EOT\218\SOH\STX\a\n\+    \\r\n\+    \\ENQ\EOT\t\STX\SOH\SOH\DC2\EOT\218\SOH\b\r\n\+    \\r\n\+    \\ENQ\EOT\t\STX\SOH\ETX\DC2\EOT\218\SOH\DLE\DC1b\ACKproto3"
+ test/Proto/GoogleProtobuf_Fields.hs view
@@ -0,0 +1,44 @@+{- This file was auto-generated from google_protobuf.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.GoogleProtobuf_Fields where+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+nanos ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "nanos" a) =>+  Lens.Family2.LensLike' f s a+nanos = Data.ProtoLens.Field.field @"nanos"+seconds ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "seconds" a) =>+  Lens.Family2.LensLike' f s a+seconds = Data.ProtoLens.Field.field @"seconds"+value ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "value" a) =>+  Lens.Family2.LensLike' f s a+value = Data.ProtoLens.Field.field @"value"
+ test/Proto/Number.hs view
@@ -0,0 +1,307 @@+{- This file was auto-generated from number.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Number (+        Payload()+    ) where+import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+{- | Fields :+     +         * 'Proto.Number_Fields.one' @:: Lens' Payload Data.Word.Word32@+         * 'Proto.Number_Fields.two' @:: Lens' Payload Data.Int.Int32@+         * 'Proto.Number_Fields.three' @:: Lens' Payload Data.Word.Word64@+         * 'Proto.Number_Fields.four' @:: Lens' Payload Data.Int.Int64@ -}+data Payload+  = Payload'_constructor {_Payload'one :: !Data.Word.Word32,+                          _Payload'two :: !Data.Int.Int32,+                          _Payload'three :: !Data.Word.Word64,+                          _Payload'four :: !Data.Int.Int64,+                          _Payload'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Payload where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Payload "one" Data.Word.Word32 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'one (\ x__ y__ -> x__ {_Payload'one = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Payload "two" Data.Int.Int32 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'two (\ x__ y__ -> x__ {_Payload'two = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Payload "three" Data.Word.Word64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'three (\ x__ y__ -> x__ {_Payload'three = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Payload "four" Data.Int.Int64 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'four (\ x__ y__ -> x__ {_Payload'four = y__}))+        Prelude.id+instance Data.ProtoLens.Message Payload where+  messageName _ = Data.Text.pack "Number.Payload"+  packedMessageDescriptor _+    = "\n\+      \\aPayload\DC2\DLE\n\+      \\ETXone\CAN\SOH \SOH(\rR\ETXone\DC2\DLE\n\+      \\ETXtwo\CAN\STX \SOH(\ENQR\ETXtwo\DC2\DC4\n\+      \\ENQthree\CAN\ETX \SOH(\EOTR\ENQthree\DC2\DC2\n\+      \\EOTfour\CAN\EOT \SOH(\ETXR\EOTfour"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        one__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "one"+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"one")) ::+              Data.ProtoLens.FieldDescriptor Payload+        two__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "two"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"two")) ::+              Data.ProtoLens.FieldDescriptor Payload+        three__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "three"+              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"three")) ::+              Data.ProtoLens.FieldDescriptor Payload+        four__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "four"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"four")) ::+              Data.ProtoLens.FieldDescriptor Payload+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, one__field_descriptor),+           (Data.ProtoLens.Tag 2, two__field_descriptor),+           (Data.ProtoLens.Tag 3, three__field_descriptor),+           (Data.ProtoLens.Tag 4, four__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Payload'_unknownFields+        (\ x__ y__ -> x__ {_Payload'_unknownFields = y__})+  defMessage+    = Payload'_constructor+        {_Payload'one = Data.ProtoLens.fieldDefault,+         _Payload'two = Data.ProtoLens.fieldDefault,+         _Payload'three = Data.ProtoLens.fieldDefault,+         _Payload'four = Data.ProtoLens.fieldDefault,+         _Payload'_unknownFields = []}+  parseMessage+    = let+        loop :: Payload -> Data.ProtoLens.Encoding.Bytes.Parser Payload+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "one"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"one") y x)+                        16+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "two"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"two") y x)+                        24+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       Data.ProtoLens.Encoding.Bytes.getVarInt "three"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"three") y x)+                        32+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "four"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"four") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Payload"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"one") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+             ((Data.Monoid.<>)+                (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"two") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)+                         ((Prelude..)+                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+                ((Data.Monoid.<>)+                   (let+                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"three") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))+                   ((Data.Monoid.<>)+                      (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"four") _x+                       in+                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                             Data.Monoid.mempty+                         else+                             (Data.Monoid.<>)+                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)+                               ((Prelude..)+                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+                      (Data.ProtoLens.Encoding.Wire.buildFieldSet+                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))+instance Control.DeepSeq.NFData Payload where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Payload'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Payload'one x__)+                (Control.DeepSeq.deepseq+                   (_Payload'two x__)+                   (Control.DeepSeq.deepseq+                      (_Payload'three x__)+                      (Control.DeepSeq.deepseq (_Payload'four x__) ()))))+packedFileDescriptor :: Data.ByteString.ByteString+packedFileDescriptor+  = "\n\+    \\fnumber.proto\DC2\ACKNumber\"W\n\+    \\aPayload\DC2\DLE\n\+    \\ETXone\CAN\SOH \SOH(\rR\ETXone\DC2\DLE\n\+    \\ETXtwo\CAN\STX \SOH(\ENQR\ETXtwo\DC2\DC4\n\+    \\ENQthree\CAN\ETX \SOH(\EOTR\ENQthree\DC2\DC2\n\+    \\EOTfour\CAN\EOT \SOH(\ETXR\EOTfourJ\204\STX\n\+    \\ACK\DC2\EOT\NUL\NUL\b\SOH\n\+    \\b\n\+    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\+    \\b\n\+    \\SOH\STX\DC2\ETX\SOH\NUL\SI\n\+    \\n\+    \\n\+    \\STX\EOT\NUL\DC2\EOT\ETX\NUL\b\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\NUL\SOH\DC2\ETX\ETX\b\SI\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\EOT\STX\DC1\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\NUL\EOT\DC2\EOT\EOT\STX\ETX\DC1\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\EOT\STX\b\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\EOT\t\f\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\EOT\SI\DLE\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\ENQ\STX\DLE\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\SOH\EOT\DC2\EOT\ENQ\STX\EOT\DC1\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\ENQ\STX\a\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\ENQ\b\v\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\ENQ\SO\SI\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\STX\DC2\ETX\ACK\STX\DC3\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\STX\EOT\DC2\EOT\ACK\STX\ENQ\DLE\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\STX\ENQ\DC2\ETX\ACK\STX\b\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX\ACK\t\SO\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX\ACK\DC1\DC2\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\ETX\DC2\ETX\a\STX\DC1\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\ETX\EOT\DC2\EOT\a\STX\ACK\DC3\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ETX\ENQ\DC2\ETX\a\STX\a\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ETX\SOH\DC2\ETX\a\b\f\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\ETX\ETX\DC2\ETX\a\SI\DLEb\ACKproto3"
+ test/Proto/Number_Fields.hs view
@@ -0,0 +1,49 @@+{- This file was auto-generated from number.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Number_Fields where+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+four ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "four" a) =>+  Lens.Family2.LensLike' f s a+four = Data.ProtoLens.Field.field @"four"+one ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "one" a) =>+  Lens.Family2.LensLike' f s a+one = Data.ProtoLens.Field.field @"one"+three ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "three" a) =>+  Lens.Family2.LensLike' f s a+three = Data.ProtoLens.Field.field @"three"+two ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "two" a) =>+  Lens.Family2.LensLike' f s a+two = Data.ProtoLens.Field.field @"two"
+ test/Proto/SignableOrphan.hs view
@@ -0,0 +1,242 @@+{- This file was auto-generated by the signable-haskell-protoc program. -}+{-# OPTIONS_GHC -fno-warn-orphans #-}++module Proto.SignableOrphan (+    ) where+import Universum+import Data.Signable+import Proto.GoogleProtobuf+import Proto.GoogleProtobuf_Fields+import Proto.Basic+import Proto.Basic_Fields+import Proto.Coins+import Proto.Coins_Fields+import Proto.EmbeddedSchema+import Proto.EmbeddedSchema_Fields+import Proto.Number+import Proto.Number_Fields+import Proto.Text+import Proto.Text_Fields+instance Signable Proto.GoogleProtobuf.DoubleValue where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.value x)]+instance Signable Proto.GoogleProtobuf.FloatValue where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.value x)]+instance Signable Proto.GoogleProtobuf.Int64Value where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.value x)]+instance Signable Proto.GoogleProtobuf.UInt64Value where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.value x)]+instance Signable Proto.GoogleProtobuf.Int32Value where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.value x)]+instance Signable Proto.GoogleProtobuf.UInt32Value where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.value x)]+instance Signable Proto.GoogleProtobuf.BoolValue where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.value x)]+instance Signable Proto.GoogleProtobuf.StringValue where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.value x)]+instance Signable Proto.GoogleProtobuf.BytesValue where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.value x)]+instance Signable Proto.GoogleProtobuf.Timestamp where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.seconds x),+         toBinary (2 :: Int32)+           <> toBinary (view Proto.GoogleProtobuf_Fields.nanos x)]+instance Signable Proto.Basic.CurrencyCode where+  toBinary x+    = case safeFromIntegral (fromEnum x) :: (Maybe Int32) of+        (Just v) -> toBinary v+        Nothing -> error "ENUM_OVERFLOW"+instance Signable Proto.Basic.RequestType where+  toBinary x+    = case safeFromIntegral (fromEnum x) :: (Maybe Int32) of+        (Just v) -> toBinary v+        Nothing -> error "ENUM_OVERFLOW"+instance Signable Proto.Basic.Payload where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.Basic_Fields.userIdFrom x),+         case view Proto.Basic_Fields.maybe'amount x of+           (Just v) -> toBinary (2 :: Int32) <> toBinary v+           Nothing -> toBinary (2 :: Int32),+         toBinary (3 :: Int32)+           <> toBinary (view Proto.Basic_Fields.requestType x),+         toBinary (4 :: Int32)+           <> toBinary (view Proto.Basic_Fields.addFee x),+         toBinary (5 :: Int32)+           <> toBinary (view Proto.Basic_Fields.comments x),+         case view Proto.Basic_Fields.maybe'userIdTo x of+           (Just v) -> toBinary (6 :: Int32) <> toBinary v+           Nothing -> toBinary (6 :: Int32),+         case view Proto.Basic_Fields.maybe'merchantIdTo x of+           (Just v) -> toBinary (7 :: Int32) <> toBinary v+           Nothing -> toBinary (7 :: Int32),+         case view Proto.Basic_Fields.maybe'invoiceTo x of+           (Just v) -> toBinary (8 :: Int32) <> toBinary v+           Nothing -> toBinary (8 :: Int32)]+instance Signable Proto.Basic.UMoney where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.Basic_Fields.amount x),+         case view Proto.Basic_Fields.maybe'currencyCode x of+           (Just v) -> toBinary (2 :: Int32) <> toBinary v+           Nothing -> toBinary (2 :: Int32)]+instance Signable Proto.Basic.CurrencyCodeValue where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.Basic_Fields.value x)]+instance Signable Proto.Coins.InvoiceType where+  toBinary x+    = case safeFromIntegral (fromEnum x) :: (Maybe Int32) of+        (Just v) -> toBinary v+        Nothing -> error "ENUM_OVERFLOW"+instance Signable Proto.Coins.CurrencyCode where+  toBinary x+    = case safeFromIntegral (fromEnum x) :: (Maybe Int32) of+        (Just v) -> toBinary v+        Nothing -> error "ENUM_OVERFLOW"+instance Signable Proto.Coins.Request where+  toBinary x+    = mconcat+        [case view Proto.Coins_Fields.maybe'ledgerTransferRequest x of+           (Just v) -> toBinary (1 :: Int32) <> toBinary v+           Nothing -> toBinary (1 :: Int32),+         toBinary (2 :: Int32)+           <> toBinary (view Proto.Coins_Fields.ledgerSignature x)]+instance Signable Proto.Coins.Request'LedgerTransferRequest where+  toBinary x+    = mconcat+        [case view Proto.Coins_Fields.maybe'userTransferRequest x of+           (Just v) -> toBinary (1 :: Int32) <> toBinary v+           Nothing -> toBinary (1 :: Int32),+         toBinary (2 :: Int32)+           <> toBinary (view Proto.Coins_Fields.userSignature x),+         case view Proto.Coins_Fields.maybe'invoice x of+           (Just v) -> toBinary (3 :: Int32) <> toBinary v+           Nothing -> toBinary (3 :: Int32)]+instance Signable Proto.Coins.Request'UserTransferRequest where+  toBinary x+    = mconcat+        [case view Proto.Coins_Fields.maybe'userRequest x of+           (Just v) -> toBinary (1 :: Int32) <> toBinary v+           Nothing -> toBinary (1 :: Int32),+         case view Proto.Coins_Fields.maybe'merchantIdTo x of+           (Just v) -> toBinary (2 :: Int32) <> toBinary v+           Nothing -> toBinary (2 :: Int32),+         case view Proto.Coins_Fields.maybe'invoice x of+           (Just v) -> toBinary (3 :: Int32) <> toBinary v+           Nothing -> toBinary (3 :: Int32)]+instance Signable Proto.Coins.LightningInvoice where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.Coins_Fields.rHash x),+         toBinary (2 :: Int32)+           <> toBinary (view Proto.Coins_Fields.paymentRequest x),+         toBinary (3 :: Int32)+           <> toBinary (view Proto.Coins_Fields.invoiceType x)]+instance Signable Proto.Coins.UserRequest where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.Coins_Fields.pubKeyUidFrom x),+         case view Proto.Coins_Fields.maybe'amount x of+           (Just v) -> toBinary (2 :: Int32) <> toBinary v+           Nothing -> toBinary (2 :: Int32),+         toBinary (3 :: Int32)+           <> toBinary (view Proto.Coins_Fields.requestId x)]+instance Signable Proto.Coins.UMoney where+  toBinary x+    = mconcat+        [case view Proto.Coins_Fields.maybe'amount x of+           (Just v) -> toBinary (1 :: Int32) <> toBinary v+           Nothing -> toBinary (1 :: Int32),+         case view Proto.Coins_Fields.maybe'currencyCode x of+           (Just v) -> toBinary (2 :: Int32) <> toBinary v+           Nothing -> toBinary (2 :: Int32)]+instance Signable Proto.Coins.UDecimal where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.Coins_Fields.coef x),+         toBinary (2 :: Int32) <> toBinary (view Proto.Coins_Fields.exp x)]+instance Signable Proto.Coins.CurrencyCodeValue where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.Coins_Fields.value x)]+instance Signable Proto.EmbeddedSchema.Enum where+  toBinary x+    = case safeFromIntegral (fromEnum x) :: (Maybe Int32) of+        (Just v) -> toBinary v+        Nothing -> error "ENUM_OVERFLOW"+instance Signable Proto.EmbeddedSchema.Embedded where+  toBinary x+    = mconcat+        [case view Proto.EmbeddedSchema_Fields.maybe'msgField x of+           (Just v) -> toBinary (1 :: Int32) <> toBinary v+           Nothing -> toBinary (1 :: Int32)]+instance Signable Proto.EmbeddedSchema.Embedded'Msg where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.EmbeddedSchema_Fields.enumField x)]+instance Signable Proto.EmbeddedSchema.Embedded'Msg'Enum where+  toBinary x+    = case safeFromIntegral (fromEnum x) :: (Maybe Int32) of+        (Just v) -> toBinary v+        Nothing -> error "ENUM_OVERFLOW"+instance Signable Proto.EmbeddedSchema.Msg where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.EmbeddedSchema_Fields.enumField x)]+instance Signable Proto.EmbeddedSchema.Msg'Enum where+  toBinary x+    = case safeFromIntegral (fromEnum x) :: (Maybe Int32) of+        (Just v) -> toBinary v+        Nothing -> error "ENUM_OVERFLOW"+instance Signable Proto.Number.Payload where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32)+           <> toBinary (view Proto.Number_Fields.one x),+         toBinary (2 :: Int32) <> toBinary (view Proto.Number_Fields.two x),+         toBinary (3 :: Int32)+           <> toBinary (view Proto.Number_Fields.three x),+         toBinary (4 :: Int32)+           <> toBinary (view Proto.Number_Fields.four x)]+instance Signable Proto.Text.Payload where+  toBinary x+    = mconcat+        [toBinary (1 :: Int32) <> toBinary (view Proto.Text_Fields.text x)]
+ test/Proto/Text.hs view
@@ -0,0 +1,175 @@+{- This file was auto-generated from text.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Text (+        Payload()+    ) where+import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+{- | Fields :+     +         * 'Proto.Text_Fields.text' @:: Lens' Payload Data.Text.Text@ -}+data Payload+  = Payload'_constructor {_Payload'text :: !Data.Text.Text,+                          _Payload'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Payload where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Payload "text" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Payload'text (\ x__ y__ -> x__ {_Payload'text = y__}))+        Prelude.id+instance Data.ProtoLens.Message Payload where+  messageName _ = Data.Text.pack "Text.Payload"+  packedMessageDescriptor _+    = "\n\+      \\aPayload\DC2\DC2\n\+      \\EOTtext\CAN\SOH \SOH(\tR\EOTtext"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        text__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "text"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"text")) ::+              Data.ProtoLens.FieldDescriptor Payload+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, text__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Payload'_unknownFields+        (\ x__ y__ -> x__ {_Payload'_unknownFields = y__})+  defMessage+    = Payload'_constructor+        {_Payload'text = Data.ProtoLens.fieldDefault,+         _Payload'_unknownFields = []}+  parseMessage+    = let+        loop :: Payload -> Data.ProtoLens.Encoding.Bytes.Parser Payload+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                                       Data.ProtoLens.Encoding.Bytes.getBytes+                                                         (Prelude.fromIntegral len)+                                           Data.ProtoLens.Encoding.Bytes.runEither+                                             (case Data.Text.Encoding.decodeUtf8' value of+                                                (Prelude.Left err)+                                                  -> Prelude.Left (Prelude.show err)+                                                (Prelude.Right r) -> Prelude.Right r))+                                       "text"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"text") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Payload"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"text") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8+                         _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData Payload where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Payload'_unknownFields x__)+             (Control.DeepSeq.deepseq (_Payload'text x__) ())+packedFileDescriptor :: Data.ByteString.ByteString+packedFileDescriptor+  = "\n\+    \\n\+    \text.proto\DC2\EOTText\"\GS\n\+    \\aPayload\DC2\DC2\n\+    \\EOTtext\CAN\SOH \SOH(\tR\EOTtextJz\n\+    \\ACK\DC2\EOT\NUL\NUL\ENQ\SOH\n\+    \\b\n\+    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\+    \\b\n\+    \\SOH\STX\DC2\ETX\SOH\NUL\r\n\+    \\n\+    \\n\+    \\STX\EOT\NUL\DC2\EOT\ETX\NUL\ENQ\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\NUL\SOH\DC2\ETX\ETX\b\SI\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\EOT\STX\DC2\n\+    \\r\n\+    \\ENQ\EOT\NUL\STX\NUL\EOT\DC2\EOT\EOT\STX\ETX\DC1\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\EOT\STX\b\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\EOT\t\r\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\EOT\DLE\DC1b\ACKproto3"
+ test/Proto/Text_Fields.hs view
@@ -0,0 +1,34 @@+{- This file was auto-generated from text.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Text_Fields where+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+text ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "text" a) =>+  Lens.Family2.LensLike' f s a+text = Data.ProtoLens.Field.field @"text"
+ test/SignableSpec.hs view
@@ -0,0 +1,39 @@+module SignableSpec+  ( spec,+  )+where++import Data.ProtoLens.Arbitrary+import Data.Signable+import Data.Signable.Import+import Lens.Micro+import Proto.Basic+import Proto.Basic_Fields+import Proto.SignableOrphan ()+import Test.Hspec+import Test.QuickCheck+import Test.QuickCheck.Instances ()++spec :: Spec+spec = before (newRandomPrvKey AlgSecp256k1) $ do+  it "is able to sign proto message" $+    \k -> property $ \x0 ->+      sign k (unArbitraryMessage x0 :: Payload)+        `shouldSatisfy` isJust+  it "is able to verify valid proto message signature" $+    \k -> property $ \x0 -> do+      let x :: Payload = unArbitraryMessage x0+      maybe+        False+        (\s -> verify (derivePubKey k) s x)+        (sign k x)+        `shouldBe` True+  it "is able to discard invalid proto message signature" $+    \k -> property $ \x0 -> do+      let x :: Payload = unArbitraryMessage x0+      let y = x & (amount . amount) +~ 1+      maybe+        False+        (\s -> verify (derivePubKey k) s y)+        (sign k x)+        `shouldBe` False
+ test/Spec.hs view
@@ -0,0 +1,2 @@+{-# OPTIONS_GHC -Wno-missing-export-lists #-}+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
+ test/TestCaseSpec.hs view
@@ -0,0 +1,287 @@+{-# LANGUAGE BangPatterns #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++module TestCaseSpec+  ( spec,+    Env (..),+    TestCase (..),+  )+where++import Data.Aeson+import Data.Aeson.Types (Parser)+import qualified Data.ByteString.Base64 as B64+import qualified Data.ByteString.Lazy as BL+import qualified Data.HashMap.Strict as Map+import Data.ProtoLens+import Data.ProtoLens.Arbitrary+import Data.Signable+import Data.Signable.Import+import qualified Data.Text as T+import Proto.Basic+import Proto.Coins+import Proto.Number+import Proto.SignableOrphan ()+import Proto.Text+import System.Directory (listDirectory)+import Test.Hspec+import Test.QuickCheck++spec :: Spec+spec = before (readEnv "elixir.json") $ do+  it "generates haskell test case" $ \env -> do+    let prv = envPrvKey env+    tcs <-+      generate $+        concat+          <$> mapM+            (\i -> mapM (genTestCase prv i) [minBound .. maxBound])+            [1 .. 1000]+    let newEnv = env {envTCS = tcs}+    writeEnv newEnv+    testCasesSpec newEnv+  it "complies all test cases" $ \_ -> do+    xs <- listDirectory testCaseDir+    mapM_ (\x -> readEnv x >>= testCasesSpec) xs+  where+    testCasesSpec env = do+      let pub = envPubKey env+      mapM_+        ( \tc -> do+            let t = tcProtoType tc+            let x = coerce $ tcProtoBin tc+            s <- case importSigDer AlgSecp256k1 . coerce $ tcSignatureBin tc of+              Just s0 -> return s0+              Nothing -> fail "INVALID_SIG"+            --putStrLn $ tcDescription tc+            (BL.unpack <$> serializer t x)+              `shouldBe` (Right . BL.unpack . coerce $ tcSignableBin tc)+            verifier pub s t x+              `shouldBe` Right True+        )+        $ envTCS env+    serializer = \case+      Basic'Payload ->+        ((toBinary :: Proto.Basic.Payload -> BL.ByteString) <$>) . decodeMessage+      Text'Payload ->+        ((toBinary :: Proto.Text.Payload -> BL.ByteString) <$>) . decodeMessage+      Number'Payload ->+        ((toBinary :: Proto.Number.Payload -> BL.ByteString) <$>) . decodeMessage+      Coins'Request ->+        ((toBinary :: Proto.Coins.Request -> BL.ByteString) <$>) . decodeMessage+    verifier pub s = \case+      Basic'Payload ->+        ((verify pub s :: Proto.Basic.Payload -> Bool) <$>) . decodeMessage+      Text'Payload ->+        ((verify pub s :: Proto.Text.Payload -> Bool) <$>) . decodeMessage+      Number'Payload ->+        ((verify pub s :: Proto.Number.Payload -> Bool) <$>) . decodeMessage+      Coins'Request ->+        ((verify pub s :: Proto.Coins.Request -> Bool) <$>) . decodeMessage++genTestCase :: PrvKey -> Int -> ProtoType -> Gen TestCase+genTestCase prv i t =+  case t of+    Basic'Payload -> do+      x <-+        unArbitraryMessage+          <$> (arbitrary :: Gen (ArbitraryMessage Proto.Basic.Payload))+      let pb = encodeMessage x+      let sb = toBinary x+      sig <- case exportSigDer <$> sign prv x of+        Nothing -> error "SIGNATURE_FAILURE"+        Just s -> return s+      return $+        TestCase+          { tcProtoType = t,+            tcProtoBin = ProtoBin pb,+            tcSignableBin = SignableBin sb,+            tcSignatureBin = SignatureBin sig,+            tcDescription = show t <> "-" <> show i+          }+    Text'Payload -> do+      x <-+        unArbitraryMessage+          <$> (arbitrary :: Gen (ArbitraryMessage Proto.Text.Payload))+      let pb = encodeMessage x+      let sb = toBinary x+      sig <- case exportSigDer <$> sign prv x of+        Nothing -> error "SIGNATURE_FAILURE"+        Just s -> return s+      return $+        TestCase+          { tcProtoType = t,+            tcProtoBin = ProtoBin pb,+            tcSignableBin = SignableBin sb,+            tcSignatureBin = SignatureBin sig,+            tcDescription = show t <> "-" <> show i+          }+    Number'Payload -> do+      x <-+        unArbitraryMessage+          <$> (arbitrary :: Gen (ArbitraryMessage Proto.Number.Payload))+      let pb = encodeMessage x+      let sb = toBinary x+      sig <- case exportSigDer <$> sign prv x of+        Nothing -> error "SIGNATURE_FAILURE"+        Just s -> return s+      return $+        TestCase+          { tcProtoType = t,+            tcProtoBin = ProtoBin pb,+            tcSignableBin = SignableBin sb,+            tcSignatureBin = SignatureBin sig,+            tcDescription = show t <> "-" <> show i+          }+    Coins'Request -> do+      x <-+        unArbitraryMessage+          <$> (arbitrary :: Gen (ArbitraryMessage Proto.Coins.Request))+      let pb = encodeMessage x+      let sb = toBinary x+      sig <- case exportSigDer <$> sign prv x of+        Nothing -> error "SIGNATURE_FAILURE"+        Just s -> return s+      return $+        TestCase+          { tcProtoType = t,+            tcProtoBin = ProtoBin pb,+            tcSignableBin = SignableBin sb,+            tcSignatureBin = SignatureBin sig,+            tcDescription = show t <> "-" <> show i+          }++data Env+  = Env+      { envPrvKey :: PrvKey,+        envPubKey :: PubKey,+        envTCS :: [TestCase],+        envRaw :: Map.HashMap Text Value+      }++data TestCase+  = TestCase+      { tcProtoType :: ProtoType,+        tcProtoBin :: ProtoBin,+        tcSignableBin :: SignableBin,+        tcSignatureBin :: SignatureBin,+        tcDescription :: Text+      }++data ProtoType+  = Basic'Payload+  | Text'Payload+  | Number'Payload+  | Coins'Request+  deriving (Show, Read, Enum, Bounded)++newtype ProtoBin = ProtoBin ByteString++newtype SignableBin = SignableBin BL.ByteString++newtype SignatureBin = SignatureBin ByteString++instance FromJSON Env where+  parseJSON = withObject "Env" $ \x ->+    Env+      <$> x .: "private_key_pem"+      <*> x .: "public_key_pem"+      <*> x .: "testcases"+      <*> pure x++instance ToJSON Env where+  --+  -- TODO : fix this workaround later+  -- when PEM-encoding of haskell-generated+  -- keys will be available+  --+  toJSON x =+    Object $+      Map.insert+        "testcases"+        (toJSON $ envTCS x)+        (envRaw x)++instance FromJSON TestCase where+  parseJSON = withObject "TestCase" $ \x ->+    TestCase+      <$> x .: "proto_message_type"+      <*> x .: "proto_serialized_b64"+      <*> x .: "signable_serialized_b64"+      <*> x .: "signable_signature_b64"+      <*> x .: "test_description"++instance ToJSON TestCase where+  toJSON x =+    Object $+      Map.fromList+        [ ("proto_message_type", toJSON $ tcProtoType x),+          ("proto_serialized_b64", toJSON $ tcProtoBin x),+          ("signable_serialized_b64", toJSON $ tcSignableBin x),+          ("signable_signature_b64", toJSON $ tcSignatureBin x),+          ("test_description", toJSON $ tcDescription x)+        ]++instance FromJSON PrvKey where+  parseJSON = withText "PrvKey" $ \x0 ->+    case importPrvKeyPem AlgSecp256k1 . encodeUtf8 $ x0 of+      Left e -> fail $ show e+      Right x -> return x++instance FromJSON PubKey where+  parseJSON = withText "PubKey" $ \x0 ->+    case importPubKeyPem AlgSecp256k1 . encodeUtf8 $ x0 of+      Left e -> fail $ show e+      Right x -> return x++instance FromJSON ProtoType where+  parseJSON = withText "ProtoType" $ \x0 ->+    case readMaybe . T.unpack $ T.replace "." "'" x0 of+      Just x -> return x+      Nothing -> fail "INVALID_PROTO_TYPE"++instance ToJSON ProtoType where+  toJSON = String . T.replace "'" "." . show++instance FromJSON ProtoBin where+  parseJSON = (ProtoBin <$>) . parseB64++instance ToJSON ProtoBin where+  toJSON = encodeB64 . coerce++instance FromJSON SignableBin where+  parseJSON = (SignableBin . BL.fromStrict <$>) . parseB64++instance ToJSON SignableBin where+  toJSON = encodeB64 . BL.toStrict . coerce++instance FromJSON SignatureBin where+  parseJSON = (SignatureBin <$>) . parseB64++instance ToJSON SignatureBin where+  toJSON = encodeB64 . coerce++readEnv :: String -> IO Env+readEnv n = do+  !f <- readFile $ testCaseDir <> "/" <> n+  case eitherDecode $ encodeUtf8 f of+    Left e -> fail e+    Right x -> return x++testCaseDir :: String+testCaseDir = "test/Support/test-case"++writeEnv :: Env -> IO ()+writeEnv =+  writeFile (testCaseDir <> "/haskell-new.json")+    . decodeUtf8+    . encode++parseB64 :: Value -> Parser ByteString+parseB64 = withText "B64" $ \x0 ->+  case B64.decode $ encodeUtf8 x0 of+    Left e -> fail e+    Right x -> return x++encodeB64 :: ByteString -> Value+encodeB64 = String . decodeUtf8 . B64.encode