{- This file was auto-generated from modules/auth.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.Modules.Auth (
        Account(), Amount(), Coin(), CoinId()
    ) 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.Modules.Auth_Fields.coins' @:: Lens' Account [Coin]@
         * 'Proto.Modules.Auth_Fields.vec'coins' @:: Lens' Account (Data.Vector.Vector Coin)@
         * 'Proto.Modules.Auth_Fields.nonce' @:: Lens' Account Data.Word.Word64@ -}
data Account
  = Account'_constructor {Account -> Vector Coin
_Account'coins :: !(Data.Vector.Vector Coin),
                          Account -> Word64
_Account'nonce :: !Data.Word.Word64,
                          Account -> FieldSet
_Account'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (Account -> Account -> Bool
(Account -> Account -> Bool)
-> (Account -> Account -> Bool) -> Eq Account
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Account -> Account -> Bool
$c/= :: Account -> Account -> Bool
== :: Account -> Account -> Bool
$c== :: Account -> Account -> Bool
Prelude.Eq, Eq Account
Eq Account =>
(Account -> Account -> Ordering)
-> (Account -> Account -> Bool)
-> (Account -> Account -> Bool)
-> (Account -> Account -> Bool)
-> (Account -> Account -> Bool)
-> (Account -> Account -> Account)
-> (Account -> Account -> Account)
-> Ord Account
Account -> Account -> Bool
Account -> Account -> Ordering
Account -> Account -> Account
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Account -> Account -> Account
$cmin :: Account -> Account -> Account
max :: Account -> Account -> Account
$cmax :: Account -> Account -> Account
>= :: Account -> Account -> Bool
$c>= :: Account -> Account -> Bool
> :: Account -> Account -> Bool
$c> :: Account -> Account -> Bool
<= :: Account -> Account -> Bool
$c<= :: Account -> Account -> Bool
< :: Account -> Account -> Bool
$c< :: Account -> Account -> Bool
compare :: Account -> Account -> Ordering
$ccompare :: Account -> Account -> Ordering
$cp1Ord :: Eq Account
Prelude.Ord)
instance Prelude.Show Account where
  showsPrec :: Int -> Account -> ShowS
showsPrec _ __x :: Account
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (Account -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Account
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Account "coins" [Coin] where
  fieldOf :: Proxy# "coins" -> ([Coin] -> f [Coin]) -> Account -> f Account
fieldOf _
    = ((Vector Coin -> f (Vector Coin)) -> Account -> f Account)
-> (([Coin] -> f [Coin]) -> Vector Coin -> f (Vector Coin))
-> ([Coin] -> f [Coin])
-> Account
-> f Account
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Account -> Vector Coin)
-> (Account -> Vector Coin -> Account)
-> Lens Account Account (Vector Coin) (Vector Coin)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Account -> Vector Coin
_Account'coins (\ x__ :: Account
x__ y__ :: Vector Coin
y__ -> Account
x__ {_Account'coins :: Vector Coin
_Account'coins = Vector Coin
y__}))
        ((Vector Coin -> [Coin])
-> (Vector Coin -> [Coin] -> Vector Coin)
-> Lens (Vector Coin) (Vector Coin) [Coin] [Coin]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector Coin -> [Coin]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [Coin]
y__ -> [Coin] -> Vector Coin
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Coin]
y__))
instance Data.ProtoLens.Field.HasField Account "vec'coins" (Data.Vector.Vector Coin) where
  fieldOf :: Proxy# "vec'coins"
-> (Vector Coin -> f (Vector Coin)) -> Account -> f Account
fieldOf _
    = ((Vector Coin -> f (Vector Coin)) -> Account -> f Account)
-> ((Vector Coin -> f (Vector Coin))
    -> Vector Coin -> f (Vector Coin))
-> (Vector Coin -> f (Vector Coin))
-> Account
-> f Account
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Account -> Vector Coin)
-> (Account -> Vector Coin -> Account)
-> Lens Account Account (Vector Coin) (Vector Coin)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Account -> Vector Coin
_Account'coins (\ x__ :: Account
x__ y__ :: Vector Coin
y__ -> Account
x__ {_Account'coins :: Vector Coin
_Account'coins = Vector Coin
y__}))
        (Vector Coin -> f (Vector Coin)) -> Vector Coin -> f (Vector Coin)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Account "nonce" Data.Word.Word64 where
  fieldOf :: Proxy# "nonce" -> (Word64 -> f Word64) -> Account -> f Account
fieldOf _
    = ((Word64 -> f Word64) -> Account -> f Account)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> Account
-> f Account
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Account -> Word64)
-> (Account -> Word64 -> Account)
-> Lens Account Account Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Account -> Word64
_Account'nonce (\ x__ :: Account
x__ y__ :: Word64
y__ -> Account
x__ {_Account'nonce :: Word64
_Account'nonce = Word64
y__}))
        (Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Account where
  messageName :: Proxy Account -> Text
messageName _ = String -> Text
Data.Text.pack "Auth.Account"
  fieldsByTag :: Map Tag (FieldDescriptor Account)
fieldsByTag
    = let
        coins__field_descriptor :: FieldDescriptor Account
coins__field_descriptor
          = String
-> FieldTypeDescriptor Coin
-> FieldAccessor Account Coin
-> FieldDescriptor Account
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "coins"
              (MessageOrGroup -> FieldTypeDescriptor Coin
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Coin)
              (Packing -> Lens' Account [Coin] -> FieldAccessor Account Coin
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "coins" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"coins")) ::
              Data.ProtoLens.FieldDescriptor Account
        nonce__field_descriptor :: FieldDescriptor Account
nonce__field_descriptor
          = String
-> FieldTypeDescriptor Word64
-> FieldAccessor Account Word64
-> FieldDescriptor Account
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "nonce"
              (ScalarField Word64 -> FieldTypeDescriptor Word64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word64
Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (WireDefault Word64
-> Lens Account Account Word64 Word64
-> FieldAccessor Account Word64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Word64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "nonce" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"nonce")) ::
              Data.ProtoLens.FieldDescriptor Account
      in
        [(Tag, FieldDescriptor Account)]
-> Map Tag (FieldDescriptor Account)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Account
coins__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Account
nonce__field_descriptor)]
  unknownFields :: LensLike' f Account FieldSet
unknownFields
    = (Account -> FieldSet)
-> (Account -> FieldSet -> Account) -> Lens' Account FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Account -> FieldSet
_Account'_unknownFields
        (\ x__ :: Account
x__ y__ :: FieldSet
y__ -> Account
x__ {_Account'_unknownFields :: FieldSet
_Account'_unknownFields = FieldSet
y__})
  defMessage :: Account
defMessage
    = $WAccount'_constructor :: Vector Coin -> Word64 -> FieldSet -> Account
Account'_constructor
        {_Account'coins :: Vector Coin
_Account'coins = Vector Coin
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _Account'nonce :: Word64
_Account'nonce = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _Account'_unknownFields :: FieldSet
_Account'_unknownFields = []}
  parseMessage :: Parser Account
parseMessage
    = let
        loop ::
          Account
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Coin
             -> Data.ProtoLens.Encoding.Bytes.Parser Account
        loop :: Account -> Growing Vector RealWorld Coin -> Parser Account
loop x :: Account
x mutable'coins :: Growing Vector RealWorld Coin
mutable'coins
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector Coin
frozen'coins <- IO (Vector Coin) -> Parser (Vector Coin)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                        (Growing Vector (PrimState IO) Coin -> IO (Vector Coin)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze Growing Vector RealWorld Coin
Growing Vector (PrimState IO) Coin
mutable'coins)
                      (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  "Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      Account -> Parser Account
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Account Account FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Account -> Account
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter Account Account FieldSet FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter Account Account (Vector Coin) (Vector Coin)
-> Vector Coin -> Account -> Account
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'coins" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'coins") Vector Coin
frozen'coins Account
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do !Coin
y <- Parser Coin -> String -> Parser Coin
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser Coin -> Parser Coin
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                              (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                              Parser Coin
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        "coins"
                                Growing Vector RealWorld Coin
v <- IO (Growing Vector RealWorld Coin)
-> Parser (Growing Vector RealWorld Coin)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) Coin
-> Coin -> IO (Growing Vector (PrimState IO) Coin)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append Growing Vector RealWorld Coin
Growing Vector (PrimState IO) Coin
mutable'coins Coin
y)
                                Account -> Growing Vector RealWorld Coin -> Parser Account
loop Account
x Growing Vector RealWorld Coin
v
                        16
                          -> do Word64
y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt "nonce"
                                Account -> Growing Vector RealWorld Coin -> Parser Account
loop
                                  (Setter Account Account Word64 Word64
-> Word64 -> Account -> Account
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "nonce" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"nonce") Word64
y Account
x)
                                  Growing Vector RealWorld Coin
mutable'coins
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Account -> Growing Vector RealWorld Coin -> Parser Account
loop
                                  (Setter Account Account FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Account -> Account
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter Account Account FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Account
x)
                                  Growing Vector RealWorld Coin
mutable'coins
      in
        Parser Account -> String -> Parser Account
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld Coin
mutable'coins <- IO (Growing Vector RealWorld Coin)
-> Parser (Growing Vector RealWorld Coin)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                 IO (Growing Vector RealWorld Coin)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              Account -> Growing Vector RealWorld Coin -> Parser Account
loop Account
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Coin
mutable'coins)
          "Account"
  buildMessage :: Account -> Builder
buildMessage
    = \ _x :: Account
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             ((Coin -> Builder) -> Vector Coin -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v :: Coin
_v
                   -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                        (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((ByteString -> Builder) -> (Coin -> ByteString) -> Coin -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                           (\ bs :: ByteString
bs
                              -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                   (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                   (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                           Coin -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                           Coin
_v))
                (FoldLike (Vector Coin) Account Account (Vector Coin) (Vector Coin)
-> Account -> Vector Coin
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'coins" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'coins") Account
_x))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: Word64
_v = FoldLike Word64 Account Account Word64 Word64 -> Account -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "nonce" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"nonce") Account
_x
                 in
                   if Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word64
_v Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet Account Account FieldSet FieldSet
-> Account -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Account Account FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Account
_x)))
instance Control.DeepSeq.NFData Account where
  rnf :: Account -> ()
rnf
    = \ x__ :: Account
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Account -> FieldSet
_Account'_unknownFields Account
x__)
             (Vector Coin -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (Account -> Vector Coin
_Account'coins Account
x__)
                (Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Account -> Word64
_Account'nonce Account
x__) ()))
{- | Fields :
     
         * 'Proto.Modules.Auth_Fields.amount' @:: Lens' Amount Data.Word.Word64@ -}
data Amount
  = Amount'_constructor {Amount -> Word64
_Amount'amount :: !Data.Word.Word64,
                         Amount -> FieldSet
_Amount'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (Amount -> Amount -> Bool
(Amount -> Amount -> Bool)
-> (Amount -> Amount -> Bool) -> Eq Amount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Amount -> Amount -> Bool
$c/= :: Amount -> Amount -> Bool
== :: Amount -> Amount -> Bool
$c== :: Amount -> Amount -> Bool
Prelude.Eq, Eq Amount
Eq Amount =>
(Amount -> Amount -> Ordering)
-> (Amount -> Amount -> Bool)
-> (Amount -> Amount -> Bool)
-> (Amount -> Amount -> Bool)
-> (Amount -> Amount -> Bool)
-> (Amount -> Amount -> Amount)
-> (Amount -> Amount -> Amount)
-> Ord Amount
Amount -> Amount -> Bool
Amount -> Amount -> Ordering
Amount -> Amount -> Amount
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Amount -> Amount -> Amount
$cmin :: Amount -> Amount -> Amount
max :: Amount -> Amount -> Amount
$cmax :: Amount -> Amount -> Amount
>= :: Amount -> Amount -> Bool
$c>= :: Amount -> Amount -> Bool
> :: Amount -> Amount -> Bool
$c> :: Amount -> Amount -> Bool
<= :: Amount -> Amount -> Bool
$c<= :: Amount -> Amount -> Bool
< :: Amount -> Amount -> Bool
$c< :: Amount -> Amount -> Bool
compare :: Amount -> Amount -> Ordering
$ccompare :: Amount -> Amount -> Ordering
$cp1Ord :: Eq Amount
Prelude.Ord)
instance Prelude.Show Amount where
  showsPrec :: Int -> Amount -> ShowS
showsPrec _ __x :: Amount
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (Amount -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Amount
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Amount "amount" Data.Word.Word64 where
  fieldOf :: Proxy# "amount" -> (Word64 -> f Word64) -> Amount -> f Amount
fieldOf _
    = ((Word64 -> f Word64) -> Amount -> f Amount)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> Amount
-> f Amount
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Amount -> Word64)
-> (Amount -> Word64 -> Amount) -> Lens Amount Amount Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Amount -> Word64
_Amount'amount (\ x__ :: Amount
x__ y__ :: Word64
y__ -> Amount
x__ {_Amount'amount :: Word64
_Amount'amount = Word64
y__}))
        (Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Amount where
  messageName :: Proxy Amount -> Text
messageName _ = String -> Text
Data.Text.pack "Auth.Amount"
  fieldsByTag :: Map Tag (FieldDescriptor Amount)
fieldsByTag
    = let
        amount__field_descriptor :: FieldDescriptor Amount
amount__field_descriptor
          = String
-> FieldTypeDescriptor Word64
-> FieldAccessor Amount Word64
-> FieldDescriptor Amount
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "amount"
              (ScalarField Word64 -> FieldTypeDescriptor Word64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word64
Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (WireDefault Word64
-> Lens Amount Amount Word64 Word64 -> FieldAccessor Amount Word64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Word64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "amount" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"amount")) ::
              Data.ProtoLens.FieldDescriptor Amount
      in
        [(Tag, FieldDescriptor Amount)] -> Map Tag (FieldDescriptor Amount)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Amount
amount__field_descriptor)]
  unknownFields :: LensLike' f Amount FieldSet
unknownFields
    = (Amount -> FieldSet)
-> (Amount -> FieldSet -> Amount) -> Lens' Amount FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Amount -> FieldSet
_Amount'_unknownFields
        (\ x__ :: Amount
x__ y__ :: FieldSet
y__ -> Amount
x__ {_Amount'_unknownFields :: FieldSet
_Amount'_unknownFields = FieldSet
y__})
  defMessage :: Amount
defMessage
    = $WAmount'_constructor :: Word64 -> FieldSet -> Amount
Amount'_constructor
        {_Amount'amount :: Word64
_Amount'amount = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _Amount'_unknownFields :: FieldSet
_Amount'_unknownFields = []}
  parseMessage :: Parser Amount
parseMessage
    = let
        loop :: Amount -> Data.ProtoLens.Encoding.Bytes.Parser Amount
        loop :: Amount -> Parser Amount
loop x :: Amount
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  "Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      Amount -> Parser Amount
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Amount Amount FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Amount -> Amount
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter Amount Amount FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Amount
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        8 -> do Word64
y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt "amount"
                                Amount -> Parser Amount
loop (Setter Amount Amount Word64 Word64 -> Word64 -> Amount -> Amount
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "amount" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"amount") Word64
y Amount
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Amount -> Parser Amount
loop
                                  (Setter Amount Amount FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Amount -> Amount
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter Amount Amount FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Amount
x)
      in
        Parser Amount -> String -> Parser Amount
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Amount -> Parser Amount
loop Amount
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Amount"
  buildMessage :: Amount -> Builder
buildMessage
    = \ _x :: Amount
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Word64
_v = FoldLike Word64 Amount Amount Word64 Word64 -> Amount -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "amount" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"amount") Amount
_x
              in
                if Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word64
_v Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet Amount Amount FieldSet FieldSet
-> Amount -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Amount Amount FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Amount
_x))
instance Control.DeepSeq.NFData Amount where
  rnf :: Amount -> ()
rnf
    = \ x__ :: Amount
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Amount -> FieldSet
_Amount'_unknownFields Amount
x__)
             (Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Amount -> Word64
_Amount'amount Amount
x__) ())
{- | Fields :
     
         * 'Proto.Modules.Auth_Fields.id' @:: Lens' Coin CoinId@
         * 'Proto.Modules.Auth_Fields.maybe'id' @:: Lens' Coin (Prelude.Maybe CoinId)@
         * 'Proto.Modules.Auth_Fields.amount' @:: Lens' Coin Amount@
         * 'Proto.Modules.Auth_Fields.maybe'amount' @:: Lens' Coin (Prelude.Maybe Amount)@ -}
data Coin
  = Coin'_constructor {Coin -> Maybe CoinId
_Coin'id :: !(Prelude.Maybe CoinId),
                       Coin -> Maybe Amount
_Coin'amount :: !(Prelude.Maybe Amount),
                       Coin -> FieldSet
_Coin'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (Coin -> Coin -> Bool
(Coin -> Coin -> Bool) -> (Coin -> Coin -> Bool) -> Eq Coin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Coin -> Coin -> Bool
$c/= :: Coin -> Coin -> Bool
== :: Coin -> Coin -> Bool
$c== :: Coin -> Coin -> Bool
Prelude.Eq, Eq Coin
Eq Coin =>
(Coin -> Coin -> Ordering)
-> (Coin -> Coin -> Bool)
-> (Coin -> Coin -> Bool)
-> (Coin -> Coin -> Bool)
-> (Coin -> Coin -> Bool)
-> (Coin -> Coin -> Coin)
-> (Coin -> Coin -> Coin)
-> Ord Coin
Coin -> Coin -> Bool
Coin -> Coin -> Ordering
Coin -> Coin -> Coin
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Coin -> Coin -> Coin
$cmin :: Coin -> Coin -> Coin
max :: Coin -> Coin -> Coin
$cmax :: Coin -> Coin -> Coin
>= :: Coin -> Coin -> Bool
$c>= :: Coin -> Coin -> Bool
> :: Coin -> Coin -> Bool
$c> :: Coin -> Coin -> Bool
<= :: Coin -> Coin -> Bool
$c<= :: Coin -> Coin -> Bool
< :: Coin -> Coin -> Bool
$c< :: Coin -> Coin -> Bool
compare :: Coin -> Coin -> Ordering
$ccompare :: Coin -> Coin -> Ordering
$cp1Ord :: Eq Coin
Prelude.Ord)
instance Prelude.Show Coin where
  showsPrec :: Int -> Coin -> ShowS
showsPrec _ __x :: Coin
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (Coin -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Coin
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Coin "id" CoinId where
  fieldOf :: Proxy# "id" -> (CoinId -> f CoinId) -> Coin -> f Coin
fieldOf _
    = ((Maybe CoinId -> f (Maybe CoinId)) -> Coin -> f Coin)
-> ((CoinId -> f CoinId) -> Maybe CoinId -> f (Maybe CoinId))
-> (CoinId -> f CoinId)
-> Coin
-> f Coin
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Coin -> Maybe CoinId)
-> (Coin -> Maybe CoinId -> Coin)
-> Lens Coin Coin (Maybe CoinId) (Maybe CoinId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Coin -> Maybe CoinId
_Coin'id (\ x__ :: Coin
x__ y__ :: Maybe CoinId
y__ -> Coin
x__ {_Coin'id :: Maybe CoinId
_Coin'id = Maybe CoinId
y__}))
        (CoinId -> Lens' (Maybe CoinId) CoinId
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens CoinId
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Coin "maybe'id" (Prelude.Maybe CoinId) where
  fieldOf :: Proxy# "maybe'id"
-> (Maybe CoinId -> f (Maybe CoinId)) -> Coin -> f Coin
fieldOf _
    = ((Maybe CoinId -> f (Maybe CoinId)) -> Coin -> f Coin)
-> ((Maybe CoinId -> f (Maybe CoinId))
    -> Maybe CoinId -> f (Maybe CoinId))
-> (Maybe CoinId -> f (Maybe CoinId))
-> Coin
-> f Coin
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Coin -> Maybe CoinId)
-> (Coin -> Maybe CoinId -> Coin)
-> Lens Coin Coin (Maybe CoinId) (Maybe CoinId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Coin -> Maybe CoinId
_Coin'id (\ x__ :: Coin
x__ y__ :: Maybe CoinId
y__ -> Coin
x__ {_Coin'id :: Maybe CoinId
_Coin'id = Maybe CoinId
y__}))
        (Maybe CoinId -> f (Maybe CoinId))
-> Maybe CoinId -> f (Maybe CoinId)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Coin "amount" Amount where
  fieldOf :: Proxy# "amount" -> (Amount -> f Amount) -> Coin -> f Coin
fieldOf _
    = ((Maybe Amount -> f (Maybe Amount)) -> Coin -> f Coin)
-> ((Amount -> f Amount) -> Maybe Amount -> f (Maybe Amount))
-> (Amount -> f Amount)
-> Coin
-> f Coin
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Coin -> Maybe Amount)
-> (Coin -> Maybe Amount -> Coin)
-> Lens Coin Coin (Maybe Amount) (Maybe Amount)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Coin -> Maybe Amount
_Coin'amount (\ x__ :: Coin
x__ y__ :: Maybe Amount
y__ -> Coin
x__ {_Coin'amount :: Maybe Amount
_Coin'amount = Maybe Amount
y__}))
        (Amount -> Lens' (Maybe Amount) Amount
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Amount
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Coin "maybe'amount" (Prelude.Maybe Amount) where
  fieldOf :: Proxy# "maybe'amount"
-> (Maybe Amount -> f (Maybe Amount)) -> Coin -> f Coin
fieldOf _
    = ((Maybe Amount -> f (Maybe Amount)) -> Coin -> f Coin)
-> ((Maybe Amount -> f (Maybe Amount))
    -> Maybe Amount -> f (Maybe Amount))
-> (Maybe Amount -> f (Maybe Amount))
-> Coin
-> f Coin
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Coin -> Maybe Amount)
-> (Coin -> Maybe Amount -> Coin)
-> Lens Coin Coin (Maybe Amount) (Maybe Amount)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Coin -> Maybe Amount
_Coin'amount (\ x__ :: Coin
x__ y__ :: Maybe Amount
y__ -> Coin
x__ {_Coin'amount :: Maybe Amount
_Coin'amount = Maybe Amount
y__}))
        (Maybe Amount -> f (Maybe Amount))
-> Maybe Amount -> f (Maybe Amount)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Coin where
  messageName :: Proxy Coin -> Text
messageName _ = String -> Text
Data.Text.pack "Auth.Coin"
  fieldsByTag :: Map Tag (FieldDescriptor Coin)
fieldsByTag
    = let
        id__field_descriptor :: FieldDescriptor Coin
id__field_descriptor
          = String
-> FieldTypeDescriptor CoinId
-> FieldAccessor Coin CoinId
-> FieldDescriptor Coin
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "id"
              (MessageOrGroup -> FieldTypeDescriptor CoinId
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor CoinId)
              (Lens Coin Coin (Maybe CoinId) (Maybe CoinId)
-> FieldAccessor Coin CoinId
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'id" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'id")) ::
              Data.ProtoLens.FieldDescriptor Coin
        amount__field_descriptor :: FieldDescriptor Coin
amount__field_descriptor
          = String
-> FieldTypeDescriptor Amount
-> FieldAccessor Coin Amount
-> FieldDescriptor Coin
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "amount"
              (MessageOrGroup -> FieldTypeDescriptor Amount
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Amount)
              (Lens Coin Coin (Maybe Amount) (Maybe Amount)
-> FieldAccessor Coin Amount
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'amount" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'amount")) ::
              Data.ProtoLens.FieldDescriptor Coin
      in
        [(Tag, FieldDescriptor Coin)] -> Map Tag (FieldDescriptor Coin)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Coin
id__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Coin
amount__field_descriptor)]
  unknownFields :: LensLike' f Coin FieldSet
unknownFields
    = (Coin -> FieldSet)
-> (Coin -> FieldSet -> Coin) -> Lens' Coin FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Coin -> FieldSet
_Coin'_unknownFields
        (\ x__ :: Coin
x__ y__ :: FieldSet
y__ -> Coin
x__ {_Coin'_unknownFields :: FieldSet
_Coin'_unknownFields = FieldSet
y__})
  defMessage :: Coin
defMessage
    = $WCoin'_constructor :: Maybe CoinId -> Maybe Amount -> FieldSet -> Coin
Coin'_constructor
        {_Coin'id :: Maybe CoinId
_Coin'id = Maybe CoinId
forall a. Maybe a
Prelude.Nothing, _Coin'amount :: Maybe Amount
_Coin'amount = Maybe Amount
forall a. Maybe a
Prelude.Nothing,
         _Coin'_unknownFields :: FieldSet
_Coin'_unknownFields = []}
  parseMessage :: Parser Coin
parseMessage
    = let
        loop :: Coin -> Data.ProtoLens.Encoding.Bytes.Parser Coin
        loop :: Coin -> Parser Coin
loop x :: Coin
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  "Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      Coin -> Parser Coin
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Coin Coin FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Coin -> Coin
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter Coin Coin FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Coin
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do CoinId
y <- Parser CoinId -> String -> Parser CoinId
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser CoinId -> Parser CoinId
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser CoinId
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "id"
                                Coin -> Parser Coin
loop (Setter Coin Coin CoinId CoinId -> CoinId -> Coin -> Coin
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "id" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"id") CoinId
y Coin
x)
                        18
                          -> do Amount
y <- Parser Amount -> String -> Parser Amount
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser Amount -> Parser Amount
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser Amount
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "amount"
                                Coin -> Parser Coin
loop (Setter Coin Coin Amount Amount -> Amount -> Coin -> Coin
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "amount" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"amount") Amount
y Coin
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Coin -> Parser Coin
loop
                                  (Setter Coin Coin FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Coin -> Coin
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter Coin Coin FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Coin
x)
      in
        Parser Coin -> String -> Parser Coin
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Coin -> Parser Coin
loop Coin
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Coin"
  buildMessage :: Coin -> Builder
buildMessage
    = \ _x :: Coin
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike (Maybe CoinId) Coin Coin (Maybe CoinId) (Maybe CoinId)
-> Coin -> Maybe CoinId
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'id" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'id") Coin
_x
              of
                Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just _v :: CoinId
_v)
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                       ((ByteString -> Builder)
-> (CoinId -> ByteString) -> CoinId -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                          (\ bs :: ByteString
bs
                             -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                  (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                          CoinId -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                          CoinId
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (case
                     FoldLike (Maybe Amount) Coin Coin (Maybe Amount) (Maybe Amount)
-> Coin -> Maybe Amount
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'amount" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'amount") Coin
_x
                 of
                   Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just _v :: Amount
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((ByteString -> Builder)
-> (Amount -> ByteString) -> Amount -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                             (\ bs :: ByteString
bs
                                -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                     (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                     (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                             Amount -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                             Amount
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet Coin Coin FieldSet FieldSet -> Coin -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Coin Coin FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Coin
_x)))
instance Control.DeepSeq.NFData Coin where
  rnf :: Coin -> ()
rnf
    = \ x__ :: Coin
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Coin -> FieldSet
_Coin'_unknownFields Coin
x__)
             (Maybe CoinId -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (Coin -> Maybe CoinId
_Coin'id Coin
x__) (Maybe Amount -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Coin -> Maybe Amount
_Coin'amount Coin
x__) ()))
{- | Fields :
     
         * 'Proto.Modules.Auth_Fields.id' @:: Lens' CoinId Data.Text.Text@ -}
data CoinId
  = CoinId'_constructor {CoinId -> Text
_CoinId'id :: !Data.Text.Text,
                         CoinId -> FieldSet
_CoinId'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (CoinId -> CoinId -> Bool
(CoinId -> CoinId -> Bool)
-> (CoinId -> CoinId -> Bool) -> Eq CoinId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CoinId -> CoinId -> Bool
$c/= :: CoinId -> CoinId -> Bool
== :: CoinId -> CoinId -> Bool
$c== :: CoinId -> CoinId -> Bool
Prelude.Eq, Eq CoinId
Eq CoinId =>
(CoinId -> CoinId -> Ordering)
-> (CoinId -> CoinId -> Bool)
-> (CoinId -> CoinId -> Bool)
-> (CoinId -> CoinId -> Bool)
-> (CoinId -> CoinId -> Bool)
-> (CoinId -> CoinId -> CoinId)
-> (CoinId -> CoinId -> CoinId)
-> Ord CoinId
CoinId -> CoinId -> Bool
CoinId -> CoinId -> Ordering
CoinId -> CoinId -> CoinId
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: CoinId -> CoinId -> CoinId
$cmin :: CoinId -> CoinId -> CoinId
max :: CoinId -> CoinId -> CoinId
$cmax :: CoinId -> CoinId -> CoinId
>= :: CoinId -> CoinId -> Bool
$c>= :: CoinId -> CoinId -> Bool
> :: CoinId -> CoinId -> Bool
$c> :: CoinId -> CoinId -> Bool
<= :: CoinId -> CoinId -> Bool
$c<= :: CoinId -> CoinId -> Bool
< :: CoinId -> CoinId -> Bool
$c< :: CoinId -> CoinId -> Bool
compare :: CoinId -> CoinId -> Ordering
$ccompare :: CoinId -> CoinId -> Ordering
$cp1Ord :: Eq CoinId
Prelude.Ord)
instance Prelude.Show CoinId where
  showsPrec :: Int -> CoinId -> ShowS
showsPrec _ __x :: CoinId
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (CoinId -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort CoinId
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField CoinId "id" Data.Text.Text where
  fieldOf :: Proxy# "id" -> (Text -> f Text) -> CoinId -> f CoinId
fieldOf _
    = ((Text -> f Text) -> CoinId -> f CoinId)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> CoinId
-> f CoinId
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((CoinId -> Text)
-> (CoinId -> Text -> CoinId) -> Lens CoinId CoinId Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           CoinId -> Text
_CoinId'id (\ x__ :: CoinId
x__ y__ :: Text
y__ -> CoinId
x__ {_CoinId'id :: Text
_CoinId'id = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message CoinId where
  messageName :: Proxy CoinId -> Text
messageName _ = String -> Text
Data.Text.pack "Auth.CoinId"
  fieldsByTag :: Map Tag (FieldDescriptor CoinId)
fieldsByTag
    = let
        id__field_descriptor :: FieldDescriptor CoinId
id__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor CoinId Text
-> FieldDescriptor CoinId
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "id"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens CoinId CoinId Text Text -> FieldAccessor CoinId Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "id" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"id")) ::
              Data.ProtoLens.FieldDescriptor CoinId
      in [(Tag, FieldDescriptor CoinId)] -> Map Tag (FieldDescriptor CoinId)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor CoinId
id__field_descriptor)]
  unknownFields :: LensLike' f CoinId FieldSet
unknownFields
    = (CoinId -> FieldSet)
-> (CoinId -> FieldSet -> CoinId) -> Lens' CoinId FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        CoinId -> FieldSet
_CoinId'_unknownFields
        (\ x__ :: CoinId
x__ y__ :: FieldSet
y__ -> CoinId
x__ {_CoinId'_unknownFields :: FieldSet
_CoinId'_unknownFields = FieldSet
y__})
  defMessage :: CoinId
defMessage
    = $WCoinId'_constructor :: Text -> FieldSet -> CoinId
CoinId'_constructor
        {_CoinId'id :: Text
_CoinId'id = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _CoinId'_unknownFields :: FieldSet
_CoinId'_unknownFields = []}
  parseMessage :: Parser CoinId
parseMessage
    = let
        loop :: CoinId -> Data.ProtoLens.Encoding.Bytes.Parser CoinId
        loop :: CoinId -> Parser CoinId
loop x :: CoinId
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  "Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      CoinId -> Parser CoinId
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter CoinId CoinId FieldSet FieldSet
-> (FieldSet -> FieldSet) -> CoinId -> CoinId
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter CoinId CoinId FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) CoinId
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left err :: UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       "id"
                                CoinId -> Parser CoinId
loop (Setter CoinId CoinId Text Text -> Text -> CoinId -> CoinId
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "id" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"id") Text
y CoinId
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                CoinId -> Parser CoinId
loop
                                  (Setter CoinId CoinId FieldSet FieldSet
-> (FieldSet -> FieldSet) -> CoinId -> CoinId
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter CoinId CoinId FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) CoinId
x)
      in
        Parser CoinId -> String -> Parser CoinId
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do CoinId -> Parser CoinId
loop CoinId
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "CoinId"
  buildMessage :: CoinId -> Builder
buildMessage
    = \ _x :: CoinId
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: Text
_v = FoldLike Text CoinId CoinId Text Text -> CoinId -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "id" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"id") CoinId
_x
              in
                if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         (\ bs :: ByteString
bs
                            -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                 (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                 (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         Text -> ByteString
Data.Text.Encoding.encodeUtf8
                         Text
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet CoinId CoinId FieldSet FieldSet
-> CoinId -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet CoinId CoinId FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields CoinId
_x))
instance Control.DeepSeq.NFData CoinId where
  rnf :: CoinId -> ()
rnf
    = \ x__ :: CoinId
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (CoinId -> FieldSet
_CoinId'_unknownFields CoinId
x__)
             (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (CoinId -> Text
_CoinId'id CoinId
x__) ())